-
Notifications
You must be signed in to change notification settings - Fork 493
Refactoring and splitting basic SymbolLayer icon examples #1030
Conversation
3fcf208
to
033426d
Compare
} | ||
return true; | ||
} | ||
mapboxMap.setStyle(new Style.Builder().fromUrl("mapbox://styles/mapbox/cjf4m44iw0uza2spb3q0a7s41") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you add some context why we are using this specific style?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (mapboxMap != null) { | ||
mapboxMap.removeOnMapClickListener(this); | ||
} | ||
mapView.onDestroy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we aren't stopping animations in this example so we can potentially crash with selecting a symbol and closing the activity quickly after.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, 4d4e13a adds animation cancellation in onDestroy()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I closed the example during the icon size animation. No issues.
…xample to new one
033426d
to
b9402a6
Compare
Anything else, @tobrun ? |
It's only taken me two years to get around to it, but I've always felt like the current
BasicSymbolLayerActivity
example wasn't truly basic. Yes, it addedSymbolLayer
icons, but the example had logic to listen to map clicking, change select state, animate the icon size, etc.It's not a barebones and clean example of how to simply add
SymbolLayer
icons to the map with no other frills.This pr moves the
master
branch'sBasicSymbolLayerActivity
code to an example titledIconSizeChangeOnClickActivity
and then cuts out the fluff from theBasicSymbolLayerActivity
. TheBasicSymbolLayerActivity
now just shows 3SymbolLayer
icons in Uruguay.cc @riastrad and @samfader for mobile support
cc @colleenmcginnis . This refactoring and code movement might make https://docs.mapbox.com/android/maps/examples/ a bit wonky. I will fix things downstream in
/android-docs
once this lands.