Select to view content in your preferred language

Layers not coming out in the correct order.

554
2
08-03-2017 08:17 PM
ThomasSaldana
Emerging Contributor

Hello, 

I am trying to create an application that finds room numbers on a campus and places a marker(a paw) on top of a searched address (like a room number). 

The first time a user runs the application and searches an address, the app is able to find the correct address and places the Floor Layer first and then the marker symbol, which is correct. 

Like this: 

However, when a user types in a search a second time, the marker label(the paw) is placed underneath the Floor Layer, and is not visible, which is incorrect. 

Like this: 

Does anyone have an idea why this happens? 

Thanks in advance!

0 Kudos
2 Replies
ThomasSaldana
Emerging Contributor

This is the main code that does this: 

0 Kudos
AlexanderNohe1
Honored Contributor

thomassldn‌,

How are you accessing the graphics layer?  Are you adding it to index 1 every time you search?  I would consider adding the graphics layer as the last layer which should show it at the top.  (Which version of the runtime is this? I assume 10.2.9)

Additionally, if you add or remove any layers between searching, this will force the graphics layer further down the list of layers.

0 Kudos