Layers overlapping markers on maps
-
Hello,
I’m using two kinds of indicators for representing wildlife sightings on a map by using Flexible Map. I use layers (coming from KML files referenced on the main KML file I load into the map) to mark general areas, and spot custom markers to display punctual sightings on given coordinates. Here is a sample of the KML file I load into Flexible Map:
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns="https://www.opengis.net/kml/2.2" xmlns:atom="https://www.w3.org/2005/Atom"> <Document> <Style id="enric"><IconStyle><Icon><href>https://opistobranquis.info/wp-content/uploads/kms/grn-circle-lv.png</href></Icon></IconStyle></Style> <NetworkLink id='atlanticocuba'><name><![CDATA[Cuba (Atlántico)]]></name><Link><href>https://opistobranquis.info/wp-content/uploads/mare/atlanticocuba.kml</href></Link></NetworkLink> <NetworkLink id='caboverde'><name><![CDATA[Cabo Verde]]></name><Link><href>https://opistobranquis.info/wp-content/uploads/mare/caboverde.kml</href></Link></NetworkLink> <NetworkLink id='marmediterraneo'><name><![CDATA[Mar Mediterráneo]]></name><Link><href>https://opistobranquis.info/wp-content/uploads/mare/marmediterraneo.kmz</href></Link></NetworkLink> <Placemark><description><![CDATA[<em>Elysia timida</em> (Risso, 1818)<br>Observed at El Medellot (Illes Medes)<br>Seguiment Medes GROC 2011 06-08-2011]]></description><styleUrl>#enric</styleUrl><Point><coordinates>3.221741,42.05146,0</coordinates></Point></Placemark> <Placemark><description><![CDATA[<em>Elysia timida</em> (Risso, 1818)<br>Observed at Aiguafreda (Begur)<br>Enric Madrenas OPK-2013 22-03-2013]]></description><styleUrl>#enric</styleUrl><Point><coordinates>3.229251,41.96399,0</coordinates></Point></Placemark> <Placemark><description><![CDATA[<em>Elysia timida</em> (Risso, 1818)<br>Observed at Sa Tuna (Begur)<br>Enric Madrenas OPK-2013 24-03-2013]]></description><styleUrl>#enric</styleUrl><Point><coordinates>3.230925,41.960926,0</coordinates></Point></Placemark> <Placemark><description><![CDATA[<em>Elysia timida</em> (Risso, 1818)<br>Observed at Depuradora (L'Escala)<br>Enric Madrenas OPK-2013 25-03-2013]]></description><styleUrl>#enric</styleUrl><Point><coordinates>3.16844,42.114986,0</coordinates></Point></Placemark> </Document> </kml>
When layers are loaded alone, if you click on any layer an overlay appears showing information for the general area, ok. When markers are loaded alone, when you click on any marker an overlay appears showing information for the sighting, ok. However, as I intend to display both layers and markers together, when I load layers and markers, in those areas where they overlap, only the layers’ overlay is displayed, even when I click on a spot marker (as if the layer has precedence over markers).
Is there a way to give precedence to the spot markers over the layers? This way, when I click on a spot I would like to see the spot overlay, and when I click a general area, I see the area overlay…
There is a full sample here: https://opistobranquis.info/en/guia/sacoglossa/elysia-timida/
Any ideas are welcome. Thank you in advance.
- The topic ‘Layers overlapping markers on maps’ is closed to new replies.