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

Eric Lemoine eric.lemoine at camptocamp.com
Mon Apr 11 00:21:07 EDT 2011


On Sun, Apr 10, 2011 at 11:42 PM, Michael Fisher
<michael at newmediaboutique.com> wrote:
> On 10/04/2011 20:44, Eric Lemoine wrote:
>>
>> On Sun, Apr 10, 2011 at 7:17 PM, Michael Fisher
>> <michael at newmediaboutique.com>  wrote:
>>>
>>> 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()
>>
>>                                                               ^^^^^
>>                                                               Format?
>>
>>
>>
> The format is the text. in the following format:
>
> lat     lon     title   icon    iconSize        iconOffset
> 53.784257020783 -1.6184472264204    Rich
>  http://mapapp.onlinedev.co.uk/facebookImages/1347747681.jpg     50,50
> 0,-50

I'm saying that the format provided to the protocol should be a Format
instance, not a Layer instance.


-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com
http://www.camptocamp.com


More information about the Users mailing list