Skip to content

Commit

Permalink
Official 1.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
p-lr committed Jul 28, 2019
1 parent d6257c3 commit 626a3ed
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
18 changes: 17 additions & 1 deletion Readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
[ ![Download](https://api.bintray.com/packages/peterlaurence/maven/mapview/images/download.svg?version=1.0.0) ](https://bintray.com/peterlaurence/maven/mapview/1.0.0/link)

# MapView

MapView is an android ViewGroup to display tiled maps with minimal effort.
Expand Down Expand Up @@ -27,7 +29,7 @@ This project holds the source code of this library, but also a demo app (which i

Add this to your module's build.gradle
```groovy
implementation 'com.peterlaurence:mapview:0.9.0'
implementation 'com.peterlaurence:mapview:1.0.0'
```

## Origin and motivation
Expand Down Expand Up @@ -61,6 +63,10 @@ val mapView = MapView(context)
```
2. Create a `TileStreamProvider`. See [below](#TOC-TileStreamProvider) for the details.
3. Create a `MapViewConfiguration`. See [below](#TOC-MapViewConfiguration) for the details.
4. Apply the configuration
```kotlin
mapView.configure(config)
```

### Convention

Expand All @@ -70,6 +76,16 @@ This convention allows for a simple configuration.

## Technical documentation

This section explains in details the configuration. But once configured, you can do a lot of things with your `MapView`
instance. There is just one thing to remember: `MapView` extends [ZoomPanLayout](mapview/src/main/java/com/peterlaurence/mapview/layout/ZoomPanLayout.kt) and this last class has a ton of
features (the source code is well documented). You can:

* add listeners to events like pan, fling, zoom..
* programmatically scroll and center to a position
* respond to various touch events by subclassing `MapView` and overload related methods declared in `ZoomPanLayout`

This list isn't complete. A dedicated section will be added.

### <a name="TOC-MapViewConfiguration"></a> MapViewConfiguration

The MapView must be configured using a `MapViewConfiguration`. It holds the mandatory parameters to build a MapView
Expand Down
6 changes: 4 additions & 2 deletions mapview/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlinx-serialization'

def version = "1.0.0"

androidExtensions {
experimental = true
}
Expand All @@ -25,7 +27,7 @@ android {
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
versionName version
}

buildTypes {
Expand Down Expand Up @@ -67,7 +69,7 @@ publish {
userOrg = 'peterlaurence'
groupId = 'com.peterlaurence'
artifactId = 'mapview'
publishVersion = "0.9.0"
publishVersion = version
desc = 'Android Kotlin library to display tiled maps, with support of markers and paths'
website = 'https://github.com/peterLaurence/MapView'
}

0 comments on commit 626a3ed

Please sign in to comment.