项目作者: LunaTK

项目描述 :
Custom map view for Android
高级语言: Kotlin
项目地址: git://github.com/LunaTK/CustomMapView.git
创建时间: 2019-08-09T12:40:29Z
项目社区:https://github.com/LunaTK/CustomMapView

开源协议:MIT License

下载


CustomMapView

Custom map view for Android

Features

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

Example

  1. private fun initMapView() {
  2. val currentLocationLayer = CurrentLocationLayer().apply {
  3. locationProvider = object: CurrentLocationProvider {
  4. val loc = Location(1500f, 1500f)
  5. override fun getLocation(): Location = loc
  6. }
  7. }
  8. val markerLayer = MarkerLayer().apply {
  9. addMarker(Marker(1600f, 1600f, "Dummy Destination 1"))
  10. addMarker(Marker(1550f, 1700f, "Dummy Destination 2"))
  11. onPopupClickListener = {
  12. logi("Popup touched : $it")
  13. dismissPopup()
  14. }
  15. }
  16. mapView = binding.mapview
  17. mapView.setMapImage(R.drawable.map1)
  18. mapView.addLayer(currentLocationLayer)
  19. mapView.addLayer(markerLayer)
  20. }

License

MIT License

This project is based on onlylemi/MapView