Found what I wanted, thought I would share here...

I was checking geocaching.com and their map and came across a reference to
UTFGrid on their source code. Some Google searches after that's exactly
what I was looking for.

Geoserver already supports outputting UTFGrid via WMS (and WMTS as well).
Leaflet and OL already have plugins ready to integrate it into the map. I
built a prototype and it works just perfectly out of the box!

UTFGrid would be a difficult term for me to associate with this feature so
I feel I was lucky since I found this by looking at someone else's source
code. Anyway, happy story.

Cheers,
JD

On Mon, Feb 19, 2018 at 5:46 PM, João Duarte <jddua...@gmail.com> wrote:

> Hi,
>
> I tried searching the archives for this but I might not be using the right
> keywords so here it goes...
>
> I'm using Geoserver to expose a WMS layer containing some point data. I
> can use OL/Leaflet/GMaps to display my tiles and it all works perfectly.
>
> Now I wanted some way to know where point features are inside each tile so
> I could change the mouse cursor when hovering them. I came across an
> implementation of such functionality at http://mapas.sapo.pt. Here's a
> sample request:
>
> http://mapas.sapo.pt/map4.mapas.sapo.pt/wms_mapas?LAYERS=
> MapPOIs&SRS=EPSG%3A900913&FORMAT=application%2Fjson&
> TRANSPARENT=TRUE&PROPERTYNAME=POIId&SERVICE=WMS&VERSION=1.1.
> 1&REQUEST=GetFeatureBounds&STYLES=&BBOX=-1018446.9682783,
> 4681767.9780394,-1017988.3461086,4682226.600209&WIDTH=768&HEIGHT=768
>
>
> <http://mapas.sapo.pt/map4.mapas.sapo.pt/wms_mapas?LAYERS=MapPOIs&SRS=EPSG%3A900913&FORMAT=application%2Fjson&TRANSPARENT=TRUE&PROPERTYNAME=POIId&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureBounds&STYLES=&BBOX=-1018446.9682783,4681767.9780394,-1017988.3461086,4682226.600209&WIDTH=768&HEIGHT=768>They
> seem to have implemented a custom WMS operation called GetFeatureBounds and
> then have some custom JS on top of OL to listen for mousemove events and
> constantly checking if the cursor is hovering one of the point's bboxes.
>
> I know I could achieve something similar by querying for points via WFS
> and then creating Markers on the frontend code and adding them to the map
> but I believe that for a certain number of points, the other strategy could
> have performance advantages over having lots of DOM elements (representing
> the markers) on the map.
>
> I think there's no solution out-of-the-box but am curious as to if anyone
> ever tried developing something similar? A starting point I think could be
> trying to hack the ImageMap plugin to change it's output to something
> similar to what the above URL gives.
>
> Would be interested in hearing your thoughts on this.
>
> Thank you
>
> --
> JD
>



-- 
João
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Geoserver-users mailing list

Please make sure you read the following two resources before posting to this 
list:
- Earning your support instead of buying it, but Ian Turton: 
http://www.ianturton.com/talks/foss4g.html#/
- The GeoServer user list posting guidelines: 
http://geoserver.org/comm/userlist-guidelines.html

If you want to request a feature or an improvement, also see this: 
https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer


Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Reply via email to