Skip to content

Repository files navigation

CustomMapView

Custom map view for Android

Features

  • Rotate
  • Zoom
  • Scale
  • Add Marker
  • Marker Detail

Example

privatefuninitMapView() {
val currentLocationLayer =CurrentLocationLayer().apply {
locationProvider =object:CurrentLocationProvider {
val loc =Location(1500f, 1500f)
overridefungetLocation(): Location= loc
}
}
val markerLayer =MarkerLayer().apply {
addMarker(Marker(1600f, 1600f, "Dummy Destination 1"))
addMarker(Marker(1550f, 1700f, "Dummy Destination 2"))
onPopupClickListener = {
logi("Popup touched : $it")
dismissPopup()
}
}
mapView = binding.mapview
mapView.setMapImage(R.drawable.map1)
mapView.addLayer(currentLocationLayer)
mapView.addLayer(markerLayer)
}

License

MIT License

This project is based on onlylemi/MapView

About

Custom map view for Android

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages