Advertisement
Guest User

OL attributes

a guest
Sep 18th, 2013
956
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. new OpenLayers.Layer.Vector("Vetor", {
  2.                 //projection: new OpenLayers.Projection("EPSG:32722"),
  3.                 strategies: [new OpenLayers.Strategy.Fixed()],
  4.                     protocol: new OpenLayers.Protocol.HTTP({
  5.                         url: "sua-url",
  6.                         format: new OpenLayers.Format.KML({
  7.                             parseAttributes: function (node) {
  8.                                 node.title       = 'titulo';
  9.                                 node.description = 'descricao';
  10.  
  11.                                 return node;
  12.                             }
  13.                         })
  14.                 }),
  15.                 layers: 'arquivo_seu_id'
  16.             });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement