[OpenLayers-Users] Interactive hot spots on a map for large, complex vector geometries
Rob Marjot
robmarjot at gmail.com
Mon Jun 30 00:43:45 PDT 2014
Hi Phil,
Not sure if we understand eachother correctly. My point here is: I need
stuff tot hover over :)) So, I don't see how I could be fetching geometry
on hover.
Otherwise, I guess I'm on a similar track as you're pointing at, thanks.
By the wat, since JS is so slow, I'm choosing GeoJSON over WFS/GML.
Rob
Op 30 jun. 2014 00:46 schreef "Phil Scadden" <p.scadden at gns.cri.nz>:
>
> I guess I forgot to mention: the idea is to have geometries highlighting
>> on hover / mouse-over...
>>
> Yep. I do that. Do WFSgetfeature in a hover handler.
>
> eg
> hoverHandler = new OpenLayers.Handler.Hover({
> map:map
> },{});
> hoverHandler.callbacks= {
> "pause":function(e){
> // do WFSgetfeature here
> }
> };
> hoverHandler.activate();
>
>
> Or,
> hoverFeatures = new OpenLayers.Control.GetFeature({
> protocol:myWfsProtocol,
> hover: true,
> propertyNames:myListOfFields,
> click:false,
> maxFeatures:1
> });
> hoverFeatures.events.register("hoverfeature", this,
> showFeature);
> hoverFeatures.events.register("outfeature", this,
> function(evt) { clearFeature;});
>
> Or, have serverside function that is called on hover, which in turns make
> the WFS call to fetch the geometry and simplifies it based on zoom before
> passing up has GML. Ie do everything serverside if possible since js is so
> slow.
>
> You might want to look at the SLDSelect control which could also be called
> on Hover.
>
> 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/20140630/c1451ad4/attachment.html>
More information about the Users
mailing list