[OpenLayers-Users] Problem Updating dynamic Geojson layer

Afroz Kannancheri afrozk at gmail.com
Thu Jan 21 02:45:43 EST 2010


 Dear All,
	I changed the UpdateLayer() function as follows and it works fine now.
	
	function UpdateLayer()
	{
		var p = new OpenLayers.Format.GeoJSON({
                    'internalProjection': new
OpenLayers.Projection("EPSG:900913"),
                    'externalProjection': new
OpenLayers.Projection("EPSG:4326")
                });
			
			var url =
"http://localhost/mystuff/s/D2data.json.fixed?sid="+Math.random();
			OpenLayers.loadURL(url, {}, null, function(r) {
		   
		    var f = p.read(r.responseText);
			//alert(r.responseText);
			map.layers[1].destroyFeatures();
		    map.layers[1].addFeatures(f);
			});
	
	}
 
Thnx for the support 

Regards
Afroz
-- 
View this message in context: http://n2.nabble.com/Problem-Updating-dynamic-Geojson-layer-tp4425671p4432195.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list