How to control the z axis of individual Mapbox features inside the same layer?
up vote
1
down vote
favorite
I'm using the Mapbox Maps SDK for Android to display pins with custom icons in a map on my app. More specifically, I'm using the SymbolLayer API. When the user clicks on a pin, its appearance changes to show it is selected. However, that clicked pin is often behind other pins, like in this image:
All those pins are Feature
s from the same Source
, added to the same SymbolLayer
.
I want to be able to make the selected pin appear above the other pins, and for that I'm trying to control its z axis. I'm playing around with the PropertyFactory.symbolZOrder(value)
method and it seems that neither Property.SYMBOL_Z_ORDER_VIEWPORT_Y
nor Property.SYMBOL_Z_ORDER_SOURCE
will be of help. I'm hopeful that I will be able to achieve that with an Expression
but I have no idea on how to use it.
Any thoughts?
android mapbox mapbox-android
add a comment |
up vote
1
down vote
favorite
I'm using the Mapbox Maps SDK for Android to display pins with custom icons in a map on my app. More specifically, I'm using the SymbolLayer API. When the user clicks on a pin, its appearance changes to show it is selected. However, that clicked pin is often behind other pins, like in this image:
All those pins are Feature
s from the same Source
, added to the same SymbolLayer
.
I want to be able to make the selected pin appear above the other pins, and for that I'm trying to control its z axis. I'm playing around with the PropertyFactory.symbolZOrder(value)
method and it seems that neither Property.SYMBOL_Z_ORDER_VIEWPORT_Y
nor Property.SYMBOL_Z_ORDER_SOURCE
will be of help. I'm hopeful that I will be able to achieve that with an Expression
but I have no idea on how to use it.
Any thoughts?
android mapbox mapbox-android
SYMBOL_Z_ORDER_SOURCE
will allow you to specific the order of the z index of symbols. What you need to to do is order the contents of the your source object and this will be taken in account when laying out all the symbols. I created a high level api around symbols that uses theSYMBOL_Z_ORDER_SOURCE
feature for this specific reason. github.com/mapbox/mapbox-plugins-android/commit/…
– Tobrun
Nov 5 at 21:33
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm using the Mapbox Maps SDK for Android to display pins with custom icons in a map on my app. More specifically, I'm using the SymbolLayer API. When the user clicks on a pin, its appearance changes to show it is selected. However, that clicked pin is often behind other pins, like in this image:
All those pins are Feature
s from the same Source
, added to the same SymbolLayer
.
I want to be able to make the selected pin appear above the other pins, and for that I'm trying to control its z axis. I'm playing around with the PropertyFactory.symbolZOrder(value)
method and it seems that neither Property.SYMBOL_Z_ORDER_VIEWPORT_Y
nor Property.SYMBOL_Z_ORDER_SOURCE
will be of help. I'm hopeful that I will be able to achieve that with an Expression
but I have no idea on how to use it.
Any thoughts?
android mapbox mapbox-android
I'm using the Mapbox Maps SDK for Android to display pins with custom icons in a map on my app. More specifically, I'm using the SymbolLayer API. When the user clicks on a pin, its appearance changes to show it is selected. However, that clicked pin is often behind other pins, like in this image:
All those pins are Feature
s from the same Source
, added to the same SymbolLayer
.
I want to be able to make the selected pin appear above the other pins, and for that I'm trying to control its z axis. I'm playing around with the PropertyFactory.symbolZOrder(value)
method and it seems that neither Property.SYMBOL_Z_ORDER_VIEWPORT_Y
nor Property.SYMBOL_Z_ORDER_SOURCE
will be of help. I'm hopeful that I will be able to achieve that with an Expression
but I have no idea on how to use it.
Any thoughts?
android mapbox mapbox-android
android mapbox mapbox-android
asked Nov 5 at 17:45
Mateus Gondim
2,38432042
2,38432042
SYMBOL_Z_ORDER_SOURCE
will allow you to specific the order of the z index of symbols. What you need to to do is order the contents of the your source object and this will be taken in account when laying out all the symbols. I created a high level api around symbols that uses theSYMBOL_Z_ORDER_SOURCE
feature for this specific reason. github.com/mapbox/mapbox-plugins-android/commit/…
– Tobrun
Nov 5 at 21:33
add a comment |
SYMBOL_Z_ORDER_SOURCE
will allow you to specific the order of the z index of symbols. What you need to to do is order the contents of the your source object and this will be taken in account when laying out all the symbols. I created a high level api around symbols that uses theSYMBOL_Z_ORDER_SOURCE
feature for this specific reason. github.com/mapbox/mapbox-plugins-android/commit/…
– Tobrun
Nov 5 at 21:33
SYMBOL_Z_ORDER_SOURCE
will allow you to specific the order of the z index of symbols. What you need to to do is order the contents of the your source object and this will be taken in account when laying out all the symbols. I created a high level api around symbols that uses the SYMBOL_Z_ORDER_SOURCE
feature for this specific reason. github.com/mapbox/mapbox-plugins-android/commit/…– Tobrun
Nov 5 at 21:33
SYMBOL_Z_ORDER_SOURCE
will allow you to specific the order of the z index of symbols. What you need to to do is order the contents of the your source object and this will be taken in account when laying out all the symbols. I created a high level api around symbols that uses the SYMBOL_Z_ORDER_SOURCE
feature for this specific reason. github.com/mapbox/mapbox-plugins-android/commit/…– Tobrun
Nov 5 at 21:33
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53159542%2fhow-to-control-the-z-axis-of-individual-mapbox-features-inside-the-same-layer%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
SYMBOL_Z_ORDER_SOURCE
will allow you to specific the order of the z index of symbols. What you need to to do is order the contents of the your source object and this will be taken in account when laying out all the symbols. I created a high level api around symbols that uses theSYMBOL_Z_ORDER_SOURCE
feature for this specific reason. github.com/mapbox/mapbox-plugins-android/commit/…– Tobrun
Nov 5 at 21:33