I've added an alert to the function myReadFunction in order to detect function calls.
As according to my observations, the function readMyFunction is called sometimes while I have been navigating on the map, not every time. The function readMyFunction has not been called when a feature is being viewable or not during map navigation. Could you please explain in which conditions the geoJSON file is read from the server?
mVectorLayer = new OpenLayers.Layer.Vector("Overlay", {
strategies: [new OpenLayers.Strategy.BBOX()],
protocol: new OpenLayers.Protocol.HTTP({
url: 'http://localhost:56786/jlist.geojson',
format: new OpenLayers.Format.GeoJSON({
'read': myReadFunction,
'internalProjection': map.baseLayer.projection,
'externalProjection': new OpenLayers.Projection("EPSG:4326")
})
}),
projection: new OpenLayers.Projection("EPSG:900913")
});
Thanks a lot for your helps and clarifications