[OpenLayers-Users] BBOX Update Bug

GordonHo llian at gmx.net
Sat Nov 15 07:22:16 EST 2008


hi christopher,

the code (snippet) would be the following:

for the creation:
                bbox = new OpenLayers.Strategy.BBOX()

                var markers = new OpenLayers.Layer.Vector("Markers", {
                    strategies: [
                        bbox ,
                        new OpenLayers.Strategy.Cluster()
                    ],
                    protocol: new OpenLayers.Protocol.HTTP({
                        url: "/AJAX/GeoData.php",
                        params: {

                        },
                        format: new OpenLayers.Format.Text({
							internalProjection: map.getProjectionObject(),
							externalProjection: map.displayProjection
							})	
                    }),
                    styleMap: new OpenLayers.StyleMap({
                        "default": style,
                        "select": {
                            fillColor: "#808080",
                            strokeColor: "#000000"
                        }
                    })
                });


and for the update:
	bbox.update({force: true});


i can also show you the page with the implementation, though i can't post it
in public. if it helps, i'll send you an email with the link and logon data
and perhaps an icq/skype contact.


thanks alot, and with best regards,

gordon




Christopher Schmidt-2 wrote:
> 
> On Fri, Nov 14, 2008 at 05:14:06PM -0800, GordonHo wrote:
>> 
>> hi tim,
>> 
>> i'd be glad to supply any information i can.
>> 
>> i've seen no thrown error so far, as for the protocol its text.
> 
> Text is a format -- protocols are usually "HTTP" or something similar,
> which is probably what yours is. Can you share your code -- preferably
> a link, but if not that, an HTML page you're using to cause this to
> happen?
> 
>> if i can provide any more information let me know - though i've to admit,
>> that im new to openlayers and not too familiar with it yet.
>> 
>> thanks alot, gordon
>> 
>> 
>> Tim Schaub wrote:
>> > 
>> > Hey-
>> > 
>> > GordonHo wrote:
>> >> hi,
>> >> 
>> >> i think the bbox has a small bug in the update handler.
>> >> 
>> >> if an update is issued, and the retrieved data set is empty, the
>> previous
>> >> loaded data set is beeing displayed again after a zoom change.
>> >> 
>> >> if the returned dataset is not empty, everything works fine.
>> > 
>> > At a glance, it looks to me like the merge callback should always get 
>> > called (this is the responsibility of your protocol).  If merge is 
>> > called, layer.destroyFeatures gets called (yes, this is a blunt merge).
>> > 
>> > So, I'm guessing something is going wrong in the protocol.  Could be a 
>> > parsing error.  If you are seeing any errors or have any more detail, 
>> > please open a ticket and attach anything relevant that helps reproduce 
>> > the problem (relevant detail would include at least the format and 
>> > protocol that you are using and ideally an example).
>> > 
>> > Thanks,
>> > Tim
>> > 
>> >> 
>> >> with best regards and alot thanks for this framework, gordon
>> > 
>> > 
>> > -- 
>> > Tim Schaub
>> > OpenGeo - http://opengeo.org
>> > Expert service straight from the developers.
>> > _______________________________________________
>> > Users mailing list
>> > Users at openlayers.org
>> > http://openlayers.org/mailman/listinfo/users
>> > 
>> > 
>> 
>> -- 
>> View this message in context:
>> http://n2.nabble.com/BBOX-Update-Bug-tp1500265p1500975.html
>> Sent from the OpenLayers Users mailing list archive at Nabble.com.
>> 
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
> 
> -- 
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://n2.nabble.com/BBOX-Update-Bug-tp1500265p1502363.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list