komeil sh
komeil sh

Reputation: 111

how to implement a arbitrary map using leaflet?

I want to implement an android map for indoor positioning, which has a map of a building with some floors and one can see his position in the building. My question is about the implementing the map.

till now, I have found this way: I want to use leaflet, which is a library for manipulation of maps using JS. after that, I want to connect it to the android app using webview.

I searched about leaflet, looked its tutorials and somehow its docs. I found this plugin named leaflet-Indoor. but since I want my app to be offline, I got stuck in creating the map of building. for now, I dont want a complicated one... just something simple. on this page, it is suggested to use Mapbox studio or QGIS. since Mapbox studio is not free, I installed QGIS. but it seems a little difficult to work with.

now my question is...

is the way I have chosen a good one or you suggest another one??

and what is the best way to create a map of a building for using with leaflet?

Upvotes: 1

Views: 529

Answers (1)

JoSerra
JoSerra

Reputation: 361

I was in a similar situation and choosed to use Leaflet with overlay image maps. Generating PNG images from AutoCAD or PDF is simple (4000x4000 bits images; around 500Kb / floor). You must use L.CRS.Simple in Leaflet as your coordinate reference system and use imageoverlay (http://leafletjs.com/examples/crs-simple/crs-simple.html)

Plugins for Leaflet were very useful (Draw,..).

Upvotes: 1

Related Questions