[OpenLayers-Users] BBOX strategy with scale

Eric Lemoine eric.c2c at gmail.com
Fri Jan 9 12:55:41 EST 2009


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
>



More information about the Users mailing list