[OpenLayers-Users] (no subject)
Alexandre Dube
adube at mapgears.com
Mon Aug 10 08:37:11 EDT 2009
Hi,
You could make your wms layer wfs compatible and make a getFeature
request when your page loads. Then, for each returned feature, get the
'name' and 'bbox' of the feature's geometry and populate your combobox
using DOM. I made something similar in the past (1). The only
exception is that I found the getFeature resquest a bit heavy, so I made
a small mapscript script that would only return the name + geom of
features I needed. I made it the same format as OpenLayers.Format.Text
(see what getCities.php returns in firebug).
Or, you could also take a look at the Shortcuts and Recenter examples
of MapFish (2) (if you're thinking of using ExtJS in your application).
Shortcuts works "client-side" only and you need to manually set your
data (like above). Recenter uses a server-side application to do the
queries (mapfish-server).
Regards,
(1) http://dev4.mapgears.com/bdga/bdgaWFS-T.html (click the 'house'
button, code is in bdga.js)
(2) http://demo.mapfish.org/mapfishsample/trunk/
Surya Tarigan wrote:
> dear list,
>
> I have wms layer with 100 different river names. I am looking script
> example, where i can click certain river name from dropdown list and
> the cursor fly to the specified river.
>
> best regards,
>
> surya
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
--
Alexandre Dubé
Mapgears
www.mapgears.com
More information about the Users
mailing list