android icon indicating copy to clipboard operation
android copied to clipboard

Offline maps

Open rwrx opened this issue 8 years ago • 4 comments

Hello, I am looking for Android library which can render OpenStreetMap vector data. I need such library for rendering offline maps. I had look at MapBox and their offline maps inside their library are closed source. And it very often lags. But I found your library and I like it. I like your idea about open source and open data. Now I use in my Android app Google Maps API, but they are not supporting offline maps nor vector tiles. So I need mapping library to replace it, because I am planning to do paid version of my app with offline maps. I found this issue in tangram-es repository https://github.com/tangrams/tangram-es/issues/626 but I think for offline maps this is not very suitable for users to download thousands of tiles to their storage to show offline maps. In refill style I found that there is commented url "//localhost:8080//osm/all/{z}/{x}/{y}.topojson". Are you planning to do some http server on localhost for Mapzen Android SDK which can serve offline tiles? It will be fetching tiles from osm files which contains data about countries/cities? Also are you planning to adjust your API more like to Google Maps API? As I can now see there is much things missing compared to Google Maps API. I am asking this because I need to estimate needed work to adapt new mapping library inside my app. Anyways thank you a lot for this amazing job.

rwrx avatar May 17 '16 21:05 rwrx

Hey thanks for the feedback! Offline is definitely on our roadmap but we're not quite there yet. We'd also be interested in any suggestions on how you would want to see offline implemented.

Regarding Google Maps API compatibility this is something we are watching closely as the Mapzen public API evolves and trying to match commonly used methods as much as possible. We realize a lot of developers are currently using Google Maps so we want to make that transition as easy as possible. That said there are some fundamental differences between the two frameworks so there will never be total compatibility in the public API.

Are there specific Google Maps APIs you need that Mapzen doesn't yet support? Is there anything in particular that makes our current API difficult or confusing?

ecgreb avatar May 18 '16 17:05 ecgreb

Hello, thank you for your answer. I don't know which internal implementation is best for offline maps or for Mapzen. But from user point of view, I am expecting that it will work as offline maps in OsmAnd or MAPS.ME or in mapsforge library so users can download maps as separate files for countries, regions or cities and then show these downloaded maps. Is this way as you in Mapzen is thinking about? I don't much like how MapBox is approaching offline maps support.

Yes, currently in Mapzen there are lot of features I am missing from Google Maps API. For example camera animations, polyline width and color settings (maybe on click listener too) and also setting custom icons for markers as well as showing bubble window with description. There would be nice to have option to set z index, as well as setting visiblity for markers and polylines. I like ability to generate marker icon with color based on hue in Google Maps API with method BitmapDescriptorFactory.defaultMarker(). Also I am missing compass (I see that Eraser Map has compass) and zoom buttons.

I am not sure how adding markers and polylines work in Mapzen I didn't studied it much in depth but I think that it would be good that it will work as in Google Maps API so when developer create polyline or marker it will return reference to that object and then with this reference developer can remove that marker or polyline or edit their data. Also some kind of feature similar to Tile overlays in Google Maps API would be nice, maybe this is possible now, I am not sure.

Also I am expecting that in Mapzen it will be possible to switch map styles for example for biking, hiking, car or city usage.

I very like your work. If I can ask is it possible for offline maps to be added this year in Mapzen SDK?

rwrx avatar May 23 '16 20:05 rwrx

This is similar to how we were thinking to approach offline. I can't comment specifically on the timeline for when it will be ready but it is on our roadmap to start work on it soon.

Some of the Google Maps features you mentioned are available but the API is not the same. For example camera animations can be achieved with methods like setZoom(float zoom, int duration, EaseType easeType) and setPosition(LngLat lngLat, int duration, EaseType easeType).

Other features like changing the color or width of a polyline currently requires including a custom scene file. More information about scene files can be found here. There is also an Activity in the sample app that uses custom scene files. We do plan to make the Android API more dynamic in the future but this is the way to do it for now.

Finally, switching styles is possible using setStyle(MapStyle mapStyle). You can use any of the built in styles (BubbleWrap, Refill, Cinnabar) or a custom scene file when switching styles.

ecgreb avatar May 24 '16 14:05 ecgreb

Thank you. I had a look at scene files and at sample app and it looks very good. But by changing color and marker icons I meant this feature in that sense that users will be able to change color and icon to what they want. This is what you mean by dynamic? Also will be in Mapzen SDK compass and zoom buttons in MapView too? I am asking only to be sure and to know if I will need to make modifications to Mapzen SDK by myself or to wait and rely on your implementation.

rwrx avatar May 28 '16 09:05 rwrx