[OpenLayers-Users] Interactive hot spots on a map for large, complex vector geometries
Rob Marjot
robmarjot at gmail.com
Tue Jul 1 01:13:12 PDT 2014
Hi Phil,
I see now. The missing link in your explanation was that you would require
the user to keep still the mouse for a second or so...
In my application (and my understanding of a responsive app) this isn't
acceptable (anno 2014). The usage scenario is going to be very
"explorative": in the map there will be all sorts of geometries statically
visualized (WMS), while interactive geoms (being query results) are to be
drawn (and instantly highlighted on hover) on top of it (in a sidebar, the
objects' properties will be listed).
Assuming a bit of correlation between map canvas size, bandwidth and
client-side CPU power; my approach (key: server side preprocessing of geoms
to canvas coordinates) should be perfectly viable. It's just that I'm lazy
and wish to reuse as much building block that are out there already as
possible :))
Thank you for you reflections on the matter!
Rob
Op 30 jun. 2014 23:15 schreef "Phil Scadden" <p.scadden at gns.cri.nz>:
> 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.
>>
>> You draw the stuff you are hovering over with WMS. So you render those
> vectors on the WMS server as just another and just send image. When the
> user has mouse over your map and pause (hover) for say 1 second, you send
> WFS spatial query on mouse position and fetch back JUST the vector
> information under the mouse and draw that (and you also have the attributes
> if needed). If you are dealing with very complex vectors, then you can go
> pure WMS, and use the SLDSelect control (see the example for SLDSelect in
> Openlayers), but you would need to do a separate WFS query (excluding the
> shape field) to fetch back attribute information. This is not as responsive
> as hover with vectors (you have a longer pause with the mouse before you
> see the vectors selected), but it allows you do deal with very complex
> vector geometry and huge vector size. More than 500 vectices really slows
> vector processing on browsing and 1000 is probably practical limit. The
> above approach allows me to play with millions of vertices.
>
> By the wat, since JS is so slow, I'm choosing GeoJSON over WFS/GML.
>>
> You can get geoJson from WFS on Geoserver outputFormat=application/json.
> GeoJson is still verbose and I havent noticed much improvement over GML.
>
>
> 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.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20140701/1bddf655/attachment.html>
More information about the Users
mailing list