Thanks for reporting back, hopefully this will help others !
... and yes UTFGrid is what you are looking for :)
On 02/20/2018 03:39 PM, João Duarte wrote:
Found what I wanted, thought I would share here...
I was checking geocaching.com <http://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
<mailto: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 <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
--
Regards,
Nuno Oliveira
==
GeoServer Professional Services from the experts! Visit http://goo.gl/it488V
for more information.
==
Nuno Miguel Carvalho Oliveira
@nmcoliveira
Software Engineer
GeoSolutions S.A.S.
Via di Montramito 3/A
55054 Massarosa (LU)
Italy
phone: +39 0584 962313
fax: +39 0584 1660272
http://www.geo-solutions.it
http://twitter.com/geosolutions_it
-------------------------------------------------------
AVVERTENZE AI SENSI DEL D.Lgs. 196/2003
Le informazioni contenute in questo messaggio di posta elettronica e/o nel/i
file/s allegato/i sono da considerarsi strettamente riservate. Il loro utilizzo
è consentito esclusivamente al destinatario del messaggio, per le finalità
indicate nel messaggio stesso. Qualora riceviate questo messaggio senza esserne
il destinatario, Vi preghiamo cortesemente di darcene notizia via e-mail e di
procedere alla distruzione del messaggio stesso, cancellandolo dal Vostro
sistema. Conservare il messaggio stesso, divulgarlo anche in parte,
distribuirlo ad altri soggetti, copiarlo, od utilizzarlo per finalità diverse,
costituisce comportamento contrario ai principi dettati dal D.Lgs. 196/2003.
The information in this message and/or attachments, is intended solely for the attention and use of the named addressee(s) and may be confidential or proprietary in nature or covered by the provisions of privacy act (Legislative Decree June, 30 2003, no.196 - Italy's New Data Protection Code).Any use not in accord with its purpose, any disclosure, reproduction, copying, distribution, or either dissemination, either whole or partial, is strictly forbidden except previous formal approval of the named addressee(s). If you are not the intended recipient, please contact immediately the sender by telephone, fax or e-mail and delete the information in this message that has been received in error. The sender does not give any warranty or accept liability as the content, accuracy or completeness of sent messages and accepts no responsibility for changes made after they were sent or for other risks which arise as a result of e-mail transmission, viruses, etc.
------------------------------------------------------------------------------
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