[OpenLayers-Users] Simple Question

juansre juansre at gmail.com
Wed Jun 19 01:45:11 PDT 2013


Hi.
I'm a completely newbie on openlayers, and the question I supose it's a
little basic but...how can i call a layer (kml or json) stored in my own
server? 
I mean, I want to show a map with my own layers (polygon, points and lines)
and they were shapefiles. I transformed to json (with ogr2ogr) but i can't
find anyway to call them in the line code.
I guess it's something like...

var geojson_format = new OpenLayers.Format.GeoJSON();
vector_layer.addFeatures(geojson_format.read(????));

with "???" the relative path to my own layers??
I've been searching quite a lot, I can assure, but didn't find anything.
Most of the examples works with remote layers (wms services).
Thanks in advance!!!
Juan



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Simple-Question-tp5061039.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list