[OpenLayers-Users] Interactive hot spots on a map for large, complex vector geometries

Rob Marjot rob.marjot at gmail.com
Wed Jul 2 14:01:40 PDT 2014


Hey Martin,

That's interesting! Without too much hacking this technique could be used
for vectors that have a surface (in 2D that would only be (multi)polygons).
But as soon as lines and points are cartographically styled, they start
occupying area as well (at least in pixel space on the canvas)... :))

Applying this technique to vectors, one is effectively sampling the
rendered (symbolised) geometry... Unfortunately, the sampling does not
match my wish to highlight entire (yet simplified) vectors in the map.
Moreover: doing the sampling isn't easy; such a pixel<>feature mapping
would ideally be a by-product (besides the rendered image) of the renderer
(mapnik / mapserver / geoserver).

Again, cool for pointing me at this; I'm sure it is going to proof useful
to me in the near future - in another application.

Rob



2014-07-02 19:28 GMT+02:00 Martin Davis <mtnclimb at gmail.com>:

> Another technique designed to meet this requirement is UTFGrid:
>
> https://www.mapbox.com/foundations/an-open-platform/#utfgrid
>
> OpenLayers apparently has support for UTFGrids:
>
> Doc:
> http://dev.openlayers.org/apidocs/files/OpenLayers/Control/UTFGrid-js.html
> Example:  http://openlayers.org/dev/examples/utfgrid.html
>
> The tricky part is generating the UFTGrid!  Not sure what tools there are
> out there for doing this.  It would be nice if there was a map server which
> could generate these on-the-fly...
>
>
>
> On Wed, Jun 25, 2014 at 3:35 AM, Rob Marjot <rob.marjot at gmail.com> wrote:
>
>> Dear list,
>>
>> I'm in the quest of developing a performant webmapping application
>> involving large, complex vector objects (pipelines) originating from CAD.
>> In the application, these objects need to be interactive.
>>
>> Whether complex or not: the vectors will only be (possibly partly:
>> clipped by the map extents) rendered to a limited number of pixels. In
>> OpenLayers 3, this idea is exploited: before rendering vectors are
>> pre-processed by quantizing (and removing duplicate / co-linear)
>> coordinates. (The algorithm has been implemented by Tim Schaub
>> <http://tschaub.net/blog/2014/03/04/topology-preserving-simplification.html>
>> ).
>>
>> Applying quantization (and clipping) dramatically reduces the serialized
>> (GeoJSON) size of the geometries. Yet, since my coordsys is in meters,
>> exchanging pixel coordinates will reduce the size even further...
>>
>> My question: is there a layer type that takes pixel coordinates, relative
>> to a map corner? Effectively, this would allow me to create hotspots on a
>> map that was rendered purely serverside.
>>
>> I fully understand (and tend to accept) the downside of required traffic
>> upon each panning / zooming. It will be acceptable to request a refresh of
>> hotspots with a delay of a 1 sec or so.
>>
>> Otherwise, I'm open to any suggestion taking another approach :))
>>
>> Thank you in advance!
>>
>> Rob
>>
>> _______________________________________________
>> 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/20140702/f5a6a1fd/attachment.html>


More information about the Users mailing list