Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

LunaTK/CustomMapView

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

19 Commits

Repository files navigation

CustomMapView

Custom map view for Android

Features

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

Example

private fun initMapView() {
 val currentLocationLayer = CurrentLocationLayer().apply {
 locationProvider = object: CurrentLocationProvider {
 val loc = Location(1500f, 1500f)
 override fun getLocation(): 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

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /