You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Position should be the only thing that needs to be passed to MarkerViewOptions(). Currently .icon is also required instead of just using the default red marker icon MarkerOptions() uses. In other words, setting up a simple marker view currently looks like this:
mapboxMap.addMarker(newMarkerViewOptions()
.position(newLatLng(-33.85699436, 151.21510684))
.icon(icon)); // This line shouldn't be required
@cammace great catch on Icon. Couple of remarks on the subject. Yes we should provide a default icon when none is provided but note that we can't reuse the default one:
The default for gl markers contained extra space at the bottom because at that time we didn't have any setup for anchoring. We will need to crop that image and use that as the default for ViewMarkers. FWIW the default anchoring (conform to Google is at the bottom-middle = .anchor(0.5f,1.0f).
I really liked the explanations in #5079 by the way. When you are going to release 4.1.0 you should make users aware of this in the tutorials, especially because the anchoring differs for both types. I was pretty surprised at first some days ago ;)
Just noting that @Schumi09 has documented a good workaround for the current state of the SDK as well as inspiration for fixing this when we pick this issue back up in #3276 (comment). Thanks again @Schumi09!
Activity
cammace commentedon Jun 7, 2016
BTW the default marker image has a bunch of bottom padding right now and can either be cropped out or
.anchor(0.5f,0.5f)needs to be usedtobrun commentedon Jun 8, 2016
@cammace great catch on Icon. Couple of remarks on the subject. Yes we should provide a default icon when none is provided but note that we can't reuse the default one:
The default for gl markers contained extra space at the bottom because at that time we didn't have any setup for anchoring. We will need to crop that image and use that as the default for ViewMarkers. FWIW the default anchoring (conform to Google is at the bottom-middle = .anchor(0.5f,1.0f).
Schumi09 commentedon Jun 8, 2016
I really liked the explanations in #5079 by the way. When you are going to release 4.1.0 you should make users aware of this in the tutorials, especially because the anchoring differs for both types. I was pretty surprised at first some days ago ;)
bleege commentedon Jun 9, 2016
Just noting that @Schumi09 has documented a good workaround for the current state of the SDK as well as inspiration for fixing this when we pick this issue back up in #3276 (comment). Thanks again @Schumi09!
[-]marker view icon should be optional[/-][+]MarkerViewOptions.icon() Should Be Optional[/+][android] #5276 - icon should be optional for MarkerView
[android] #5276 - icon should be optional for MarkerView
[android] #5276 - icon should be optional for MarkerView
[android] #5276 - icon should be optional for MarkerView
tobrun commentedon Jun 21, 2016
This landed in #5348 and was merged in
release-android-v4.1.0. Closing