-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Change icon of a Marker when zoomlevel changes #5451
Comments
@guruduttstay thank you for reaching out, what you are requesting is indeed support for z-layers. We are tracking this feature in #5238. With the |
This request is about varying a marker icon based on the zoom level, not about arranging multiple markers in z-space. Once #837 is fully implemented in the SDK, it’ll be possible to do this with GeoJSON point features and potentially GL-rendered markers, but those changes alone won’t make it possible with marker views. |
@guruduttstay if urgent, you could try using the |
Can you give us more details about the effect you're trying to achieve with zoom-dependent icons in marker views? For example, are you trying to have the icon's size vary? That information could help us decide on a better API, if any. |
Hi @1ec5 Just recorded screen for current implementation :) For more info may be you can try Stay.com App from playstore or app store :) |
I'm also interested by this feature. |
Android SDK v4.2.0-beta.1 and iOS SDK v3.2.0-alpha.1 both have support for runtime styling. As long as the icons in question are baked into the style at design time (for example in Mapbox Studio), you can have symbol features transition between the icons based on zoom levels using a zoom function on the Note that the runtime styling API only supports symbol features, not marker views (Android) or annotation views (iOS). At runtime, you can put point data inside a GeoJSON source and style it using a symbol layer. If you need this functionality for marker views or annotation views, please try the approach described in #5451 (comment). |
@guruduttstay and @SylvainHocq, like @1ec5 mentioned, runtime styling has been implemented in the Android SDK now which supports symbol layers. You might find this example particularly useful, along with the other many examples you can find here. Feel free to reach out through our contact page if you guys have any additional questions on how to achieve this. Happy to help. |
Platform: Android
Mapbox SDK version:4.1.0-beta
Steps to trigger behavior
Expected behavior
Actual behavior
I found clustering but that's not what we want :(
Let me know if this is already possible. ... I didn't found it in code or doc yet
The text was updated successfully, but these errors were encountered: