[OpenLayers-Users] issue with this.format.read is not a function when using OpenLayers.Layer.Vector with bbox stratergy

Michael Fisher michael at newmediaboutique.com
Sun Apr 10 13:17:11 EDT 2011


Hello,

I have spent some time searching wit out a solution. I want to get 
points to post using the bbox stratergy however when openlayers makes 
the query I get the following error in firebug after getting a response 
from server 'this.format.read is not a function'.

I am using the following code below to do plotting. I have not posted 
the rest of the code however the url is 
http://mapapp.onlinedev.co.uk/maptest.php. Is there anything I have 
missed from documentation and tutorials?

entries = new OpenLayers.Layer.Vector("Entries", {
                     projection: new OpenLayers.Projection("EPSG:4326"),
                     strategies: [
                         new OpenLayers.Strategy.BBOX(),
                         new OpenLayers.Strategy.Cluster()
                     ],
                     protocol: new OpenLayers.Protocol.HTTP({
                         url: 
"http://mapapp.onlinedev.co.uk/index/getpoints",
                         params: {
                             zoom: this.map.getZoom(),
                         },
                         format: new OpenLayers.Layer.Text()
                     }),
                     styleMap: new OpenLayers.StyleMap({
                         "default": style,
                         "select": {
                             fillColor: "#8aeeef",
                             strokeColor: "#32a8a9"
                         }
                     })
                 });

             map.addLayer(entries);


More information about the Users mailing list