[OpenLayers-Users] Add background features to map

maven apache apachemaven0 at gmail.com
Mon Jul 14 21:03:46 PDT 2014


​Phil, thanks for your suggestion.

And unfortunately we ​do not serve any wms server at the  moment, and I am
afraid that importing geoserver or other wms server in our project will be
almost impossible.




On Tue, Jul 15, 2014 at 11:30 AM, Phil Scadden <p.scadden at gns.cri.nz> wrote:

> You can do most of this with just WMS. It depends to some extent on your
> tolerance for how long mouse is hovering before display.
>
> First off, a hell of lot of geometry is not that big an issue to caching
> WMS server (eg Geoserver). Only images are passed. Your choice.
>
> Second, you have a couple of options for displaying features on hover or
> click. If the geometry is very complex (over 100 nodes), then consider
> using the SLDSelect Control http://openlayers.org/dev/
> examples/SLDSelect.html with a hover handler. This does it all with WMS.
> Otherwise, set up a GetFeature control.
> eg
>                hoverFeatures =  new OpenLayers.Control.GetFeature({
>                    protocol: myWfsProtocol,
>                   hover: true,
>                   click:false,
>                   maxFeatures:1
>                });
>                hoverFeatures.events.register("hoverfeature", this,
> displayTheFeature);
>                hoverFeatures.events.register("outfeature", this,
> unDisplayTheFeature);
> the event handlers will draw the feature from the gml geometry
>
>
> Notice: This email and any attachments are confidential.
> If received in error please destroy and immediately notify us.
> Do not copy or disclose the contents.
>
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20140715/ddb74c7a/attachment.html>


More information about the Users mailing list