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.
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users