Skip to content

Repository files navigation

Map engine written from scratch.

Features

  • LRU cache
  • multiple layers at the same time
  • fast downloading times
  • smooth touch gestures
  • rotation

Simple example

MainActivity.kt

classMainActivity : AppCompatActivity() {
overridefunonCreate(savedInstanceState:Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
mapView.mapUrls = arrayOf(object:TileDownloader.LoadURL {
overrideval map:String="landscape"overrideval compressFormat:Bitmap.CompressFormat=Bitmap.CompressFormat.PNGoverrideval alpha:Float=1.0foverridefuntileExists(layer:Int, row:Int, col:Int): Boolean=trueoverridefungetUrl(layer:Int, row:Int, col:Int): String {
val apiKey:String="<Insert your api key here>"return"https://tile.thunderforest.com/$map/$layer/$col/$row.png?apikey=$apiKey"
}
})
}
}

activity_main.xml

<?xml version="1.0" encoding="utf-8"?>
<jaakko.leinonen.com.mapview.MapView
android:id="@+id/mapView"android:layout_width="match_parent"android:layout_height="match_parent"xmlns:android="http://schemas.android.com/apk/res/android" />

About

No description or website provided.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages