Created
August 30, 2019 22:33
-
-
Save AsynctaskCoffee/8c8be20847e426515b747c03bc70c452 to your computer and use it in GitHub Desktop.
MainActivity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class MainActivity extends AppCompatActivity implements MapListener{ | |
OfflineMapView offlineMapView; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_main); | |
offlineMapView = findViewById(R.id.map); | |
offlineMapView.init(this, this); | |
} | |
@Override | |
public void mapLoadSuccess(MapView mapView, MapUtils mapUtils) { | |
offlineMapView.setInitialPositionAndZoom(new GeoPoint(41.025135, 28.974101), 14.5); | |
Marker marker = new Marker(mapView); | |
marker.setPosition(new GeoPoint(41.025135, 28.974101)); | |
marker.setIcon(getResources().getDrawable(R.drawable.bonuspack_bubble)); | |
marker.setTitle("Hello Istanbul"); | |
marker.showInfoWindow(); | |
mapView.getOverlays().add(marker); | |
mapView.invalidate(); | |
} | |
@Override | |
public void mapLoadFailed(String ex) { | |
Log.e("ex:", ex); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment