29
Views
4
Comments
Solved
[OutSystems Maps] Unexpected behavior of Map Markers Z-index
Question
outsystems-maps
Reactive icon
Forge asset by OutSystems
Application Type
Mobile
  • “Hi,

    • We are currently experiencing an unexpected behaviour where the map marker display order does not appear consistent or controllable.

    • Our use case is a mobile application displaying the user's location using a custom marker on the map. We wish for this custom marker to be displayed behind all other markers consistently. 

    • We’ve created an OML (Attached) to demonstrate the issue, as seen in the recording here: 



Kind regards, 

Matt

MapMarker_ZIndexTest.oml
2022-11-12 11-28-30
Gonçalo Martins
Staff
Solution

Hello @Matthew Halliday 

Just ran some tests using the same approach from the post I mentioned and I'll attach an sample since it works as expected.

  1. Created a block wrapper for the Markers
  2. Created the structure MarkerAdvanced to make it easier to pass the z-index (set on the DataAction) and on the screen replaced the Marker by the new MarkerBlock:
  3. In the MarkerBlock, created a OnReady event with the following script:


Hope it helps.

Cheers,
GM

MapMarker_ZIndexTest_Workaround.oml
2022-11-12 11-28-30
Gonçalo Martins
Staff

Hi @Matthew Halliday 

Did you get the chance to check this forum post in order to see if it helps?
I'll try to take a look at your oml. 
Can you just clarify the order you want to apply on the markers in terms of z-index?

Cheers,
GM

2022-11-12 11-28-30
Gonçalo Martins
Staff
Solution

Hello @Matthew Halliday 

Just ran some tests using the same approach from the post I mentioned and I'll attach an sample since it works as expected.

  1. Created a block wrapper for the Markers
  2. Created the structure MarkerAdvanced to make it easier to pass the z-index (set on the DataAction) and on the screen replaced the Marker by the new MarkerBlock:
  3. In the MarkerBlock, created a OnReady event with the following script:


Hope it helps.

Cheers,
GM

MapMarker_ZIndexTest_Workaround.oml
2022-11-12 11-28-30
Gonçalo Martins
Staff

Hi @Matthew Halliday 

Did you get the chance to test the solution I shared?
If so, were you able to overcome your use case?

Cheers,
GM

UserImage.jpg
Matthew Halliday

Hi Gonçalo, 

The solution is exactly what we were looking for. 

Thank you very much for the assistance!

Kind regards,  Matt

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.