Forked from https://github.com/onlylemi/MapView
This a indoor map view named MapView for Android
. It also offer some layers. If you are doing a indoor map application and try to do it.
- Marker
- Instead using PointF class in some places
- MapView
- Double click for zoom in
- Added zooming controls
- Added compass button for rotate the map to 0°
- MarkLayer
- Renamed to MarkerLayer
- New method 'addMarker(Marker)'
- New method 'deleteMarker(Marker)'
- New method 'clear()'
- Custom selected marker icon
- ShapeLayer
- Shape - abstract class
- Rect
- Polygon
- MapLayer
- rotate
- scale
- slide
- LocationLayer
- Sensor
- BitmapLayer
- MarkerLayer
- ShapeLayer
- RouteLayer
- ShortestPath By FloydAlgorithm
- BestPath By GeneticAlgorithm, and you also look here.
I offer every layer demo and you can look the demo folder. And the following is a screenshot of demo.
- Include this project as module in your project
- Put in your layout
<kz.mobdev.mapview.library.MapView
android:id="@+id/mapView"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
- Add this code in Activity/Fragment
MapView mapView = (MapView) findViewById(R.id.mapview);
Bitmap bitmap = null;
try {
bitmap = BitmapFactory.decodeStream(getAssets().open("map.png"));
} catch (IOException e) {
e.printStackTrace();
}
mapView.loadMap(bitmap);
mapView.setMapViewListener(new MapViewListener() {
@Override
public void onMapLoadSuccess() {
}
@Override
public void onMapLoadFail() {
}
});
- Enjoy!
Welcome to pull requests.
If you have any new idea about this project, feel free to contact me.