Skip to content

Commit

Permalink
Merge pull request #66 from mapzen/MapFragment
Browse files Browse the repository at this point in the history
MapFragment fixing
  • Loading branch information
ecgreb committed Apr 27, 2016
2 parents 9219c4b + 60aced2 commit 90be4c8
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/basic-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -13,4 +13,4 @@ mapFragment.getMapAsync(new OnMapReadyCallback() {
});
```

For advanced map controls (animation, etc.) you can subclass `MapzenMap` and access the Tangram `MapController` directly.
For advanced map controls (animation, etc.) you can subclass `MapzenMap` and access the Tangram `MapController` directly.
2 changes: 1 addition & 1 deletion docs/current-location.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/polygon.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion docs/polyline.md
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 90be4c8

Please sign in to comment.