diff --git a/docs/basic-functions.md b/docs/basic-functions.md index 3094e818..3c54e265 100644 --- a/docs/basic-functions.md +++ b/docs/basic-functions.md @@ -3,7 +3,7 @@ Use the `MapzenMap` instance returned by `getMapAsync(OnMapReadyCallback)` to set the position, rotation, and zoom level. ```java -mapFragment = (MapFragment) getSupportFragmentManager().findFragmentById(R.id.fragment); +MapFragment mapFragment = (MapFragment) getSupportFragmentManager().findFragmentById(R.id.map_fragment); mapFragment.getMapAsync(new OnMapReadyCallback() { @Override public void onMapReady(MapzenMap map) { map.setPosition(new LngLat(-73.9903, 40.74433)); @@ -13,4 +13,4 @@ mapFragment.getMapAsync(new OnMapReadyCallback() { }); ``` -For advanced map controls (animation, etc.) you can subclass `MapzenMap` and access the Tangram `MapController` directly. \ No newline at end of file +For advanced map controls (animation, etc.) you can subclass `MapzenMap` and access the Tangram `MapController` directly. diff --git a/docs/current-location.md b/docs/current-location.md index e0adf300..edbf74d9 100644 --- a/docs/current-location.md +++ b/docs/current-location.md @@ -5,7 +5,7 @@ When `OverlayManager#setMyLocationEnabled(true)` is called, an icon is displayed to allow centering the map on the user's current location upon click. While enabled, the `OverlayManager` will continue to update the latest location but will only update the map when the button is clicked. When `OverlayManager#setMyLocationEnabled(false)` is called, this icon is hidden and location updates are stopped. ```java -mapFragment = (MapFragment) getSupportFragmentManager().findFragmentById(R.id.fragment); +MapFragment mapFragment = (MapFragment) getSupportFragmentManager().findFragmentById(R.id.map_fragment); mapFragment.getMapAsync(new OnMapReadyCallback() { @Override public void onMapReady(MapzenMap map) { map.setMyLocationEnabled(true); diff --git a/docs/getting-started.md b/docs/getting-started.md index cd5c8b65..d51d3d83 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -27,7 +27,7 @@ Sign up for a vector tiles API key from the [Mapzen developer portal](https://ma Initialize the map using `getMapAsync(OnMapReadyCallback)`. ```java -mapFragment = (MapFragment) getSupportFragmentManager().findFragmentById(R.id.fragment); +MapFragment mapFragment = (MapFragment) getSupportFragmentManager().findFragmentById(R.id.map_fragment); mapFragment.getMapAsync(new OnMapReadyCallback() { @Override public void onMapReady(MapzenMap map) { // Map is ready. diff --git a/docs/polygon.md b/docs/polygon.md index a08e1f4b..af6157ca 100644 --- a/docs/polygon.md +++ b/docs/polygon.md @@ -11,7 +11,7 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_sample_mapzen); - mapFragment = (MapFragment) getSupportFragmentManager().findFragmentById(R.id.fragment); + MapFragment mapFragment = (MapFragment) getSupportFragmentManager().findFragmentById(R.id.map_fragment); mapFragment.getMapAsync(OnMapReadyCallback() { @Override public void onMapReady(MapzenMap map) { configureMap(map); diff --git a/docs/polyline.md b/docs/polyline.md index 3b89c8b0..96f6c0fb 100644 --- a/docs/polyline.md +++ b/docs/polyline.md @@ -11,7 +11,7 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_sample_mapzen); - mapFragment = (MapFragment) getSupportFragmentManager().findFragmentById(R.id.fragment); + MapFragment mapFragment = (MapFragment) getSupportFragmentManager().findFragmentById(R.id.map_fragment); mapFragment.getMapAsync(new OnMapReadyCallback() { @Override public void onMapReady(MapzenMap map) { configureMap(map);