[OpenLayers-Users] BBOX strategy with scale
Zac Spitzer
zac.spitzer at gmail.com
Fri Jan 9 18:03:24 EST 2009
thank's eric, i got it working now...
I ended up adding
poi.events.on({"featureadded":filterPoiFeature})
as well
is it possible to link this to OpenLayers.Layer.Grid somehow?
z
On Sat, Jan 10, 2009 at 4:55 AM, Eric Lemoine <eric.c2c at gmail.com> wrote:
> Hi
>
> You can write a custom strategy that register a zoomend listener on
> the map and have this listener change the protocol params. Go back to
> the list if you need more detail.
>
> Cheers,
>
> Eric
>
> 2009/1/8, Zac Spitzer <zac.spitzer at gmail.com>:
>> Is there a way to pass the current scale within this request?
>>
>> poi_layer = new OpenLayers.Layer.Vector("POI", {
>> strategies: [new OpenLayers.Strategy.BBOX()],
>> protocol: new OpenLayers.Protocol.HTTP({
>> url: "/explore/poi_json.cfm",
>> params: { scale: map.getZoom() },
>> format: new OpenLayers.Format.GeoJSON()
>> }),
>> styleMap: new OpenLayers.StyleMap(style)
>> });
>>
>> at the moment, the scale is only calculated once
>> and is always passed at the initial scale
>>
>> z
>>
>> --
>> Zac Spitzer -
>> http://zacster.blogspot.com
>> +61 405 847 168
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://openlayers.org/mailman/listinfo/users
>>
>
--
Zac Spitzer -
http://zacster.blogspot.com
+61 405 847 168
More information about the Users
mailing list