[Oskari-user] Bug in Suomi.fi maps - embedded maps?

Mäkinen Sami (MML) sami.makinen at maanmittauslaitos.fi
Wed Oct 31 07:04:05 PDT 2018


Hi,

Knowing about WMS-layers or GetFeatureInfo is not required; the conversation just got a bit sidetracked when trying to guess how things work in the app :) With markers you only have one layer to work with (all markers go to the same layer). To use multiple layers you need to use AddFeaturesToMapRequest (http://www.oskari.org/api/requests#1.48.0/mapping/mapmodule/request/addfeaturestomaprequest.md) and VectorLayerRequest (http://www.oskari.org/api/requests#1.48.0/mapping/mapmodule/request/vectorlayerrequest.md) which work pretty much the same way but have more options and as such are a bit more complex. Features can have the priority numbering I mentioned earlier that you can use for defining the drawing order. With markers I think the latest addition is always the one on top of another marker that has been added earlier.

Using features instead of markers creates a challenge with ShowInfoboxRequest though. You can target the popup at markers but currently there’s no support for targetting features. So with features you would have to add the infobox popup on coordinates instead of directly pointing at the marker. It’s not a big problem with points though. Anyway, hope this helps and if you want to contribute any point/feature clustering magic to Oskari it would be greatly appreciated and I can help with that as well. And also ask freely if there’s something that’s not clear with how you should proceed.

            Sami

PS. You can sign in for the list at https://lists.osgeo.org/mailman/listinfo/oskari-user so the messages come through without approval.
PPS. I removed part of the thread from this reply as it had huge images included.

Lähettäjä: Sanna Jokela [mailto:sanna at gispo.fi]
Lähetetty: 31. lokakuuta 2018 14:00
Vastaanottaja: Mäkinen Sami (MML) <sami.makinen at maanmittauslaitos.fi>; Samuli Vuorinen <samuli.vuorinen at kela.fi>; mikko.karvonen at kela.fi
Kopio: oskari-user at lists.osgeo.org
Aihe: Re: [Oskari-user] Bug in Suomi.fi maps - embedded maps?

Forwardin this message to all:

Hey, developers of the application here.

GetFeatureInfo operations are not used, but instead markers are added to the map with the AddMarkerRequest. Then ShowInfobox windows are added to these markers.

We believe your assessment is correct - it seems like there are two click events when the markers overlap and user clicks on the overlapping part. The second event indeed seems to override the first one, so the user only sees the marker that’s closer to the map clicked.

As we were discussing this, Mikko probably found a way to select the topmost one of overlapping markers, instead of the one closest to the map. We’re still interested in figuring out how to properly utilize layers, for example to draw different kinds of service locations on separate layers or something similar.

Regarding to your questions:
- We’re not familiar with the concept of WMS layers.
- We use markers only, no features as of now.
- We’re using a hosted Oskari RPC to push them to the map.
- It does seem like the app receives multiple click events when clicking the overlapping markers.
- When a marker is clicked, information on what the ShowInfobox contains is passed to the popup.
- No priority numbering - we weren’t aware of this or really even how to properly utilize layers while developing.

Best regards,
Mikko Karvonen & Samuli Vuorinen
Kela.fi


--
Sanna Jokela
GIS specialist / Oskari communication coordinator
Gispo Ltd
+358 407664607
www.gispo.fi<http://www.gispo.fi/>
https://community.oskari.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/oskari-user/attachments/20181031/1f870f9c/attachment.html>


More information about the Oskari-user mailing list