Skip to content

Commit

Permalink
[marker-view] add style toggle to the example activity
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasPaczos committed Jan 8, 2019
1 parent e7a3ef0 commit 75938ea
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import java.util.Random

import android.view.ViewGroup.LayoutParams.WRAP_CONTENT
import com.mapbox.mapboxsdk.maps.Style
import com.mapbox.mapboxsdk.plugins.testapp.Utils
import kotlinx.android.synthetic.main.activity_annotation.*

class MarkerViewActivity : AppCompatActivity(), MapboxMap.OnMapLongClickListener, MapboxMap.OnMapClickListener {
Expand All @@ -32,8 +33,9 @@ class MarkerViewActivity : AppCompatActivity(), MapboxMap.OnMapLongClickListener
setContentView(R.layout.activity_annotation)
mapView.onCreate(savedInstanceState)
mapView.getMapAsync { mapboxMap ->
mapboxMap.setStyle(Style.MAPBOX_STREETS) { _ ->
findViewById<View>(R.id.fabStyles).setOnClickListener { mapboxMap.setStyle(Utils.nextStyle) }

mapboxMap.setStyle(Style.MAPBOX_STREETS){
mapboxMap.moveCamera(CameraUpdateFactory.zoomTo(2.0))

markerViewManager = MarkerViewManager(mapView, mapboxMap)
Expand Down

0 comments on commit 75938ea

Please sign in to comment.