Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiles usage policy #85

Open
jbelien opened this issue Mar 9, 2018 · 18 comments
Open

Tiles usage policy #85

jbelien opened this issue Mar 9, 2018 · 18 comments

Comments

@jbelien
Copy link

jbelien commented Mar 9, 2018

According to OpenStreetMap Tile Usage Policy :

Heavy use (e.g. distributing an app that uses tiles from openstreetmap.org) is forbidden without prior permission from the System Administrators.

So we'll have to use an alternative at some point !
This is just a notice so we don't forget this issue ; not being a Java developer I unfortunately can't really propose a solution to this.

@jbelien
Copy link
Author

jbelien commented Mar 9, 2018

I guess Mapbox GL could be a solution : https://www.mapbox.com/android-docs/map-sdk/overview/

@AndyScherzinger
Copy link
Collaborator

We can also check for caching, since the osm android lib offers offline maps (and I think also caching)

@jbelien
Copy link
Author

jbelien commented Mar 12, 2018

Unfortunately caching is not enough to use tiles.openstreetmap.org ; those are rather small servers so it can be used only for testing.

@AndyScherzinger
Copy link
Collaborator

Alright, I just thought that the page stated caching for at least 7 days, so if we would have done that we would be save.

@AndyScherzinger
Copy link
Collaborator

@jbelien do you know of any OSM services which can be used for production, non-testing setups like CityZen?

@jbelien
Copy link
Author

jbelien commented Mar 14, 2018

@jbelien do you know of any OSM services which can be used for production, non-testing setups like CityZen?

I still suggest to use Mapbox GL ! Very nice and robust product, even though you'll have to pay for it at some point.

Otherwise there are some other companies/groups that provides tiles :

It will just depends on the usage policy and the price you're ready to put in it. You could even host the tiles yourself ; I did it for Belgium (https://tile.openstreetmap.be/) and it's ""relatively"" easy to setup but it needs some maintenance and infrastructure of course.

@AndyScherzinger
Copy link
Collaborator

@rskikuli what do you think?

@rskikuli
Copy link
Member

@AndyScherzinger & @jbelien many thanks on your feedback on this. After also talking with the creator of a similar app (Transportr) I think that the best way to go at the moment is Mapbox. In the mean time the discussion about covering the costs will be intensified because we need to make sure that after reaching the freemium limit there will be no issues with the service. some things that need your opinion

  • can we choose between different map designs?
  • can we implement the 'walking route' feature with Mapbox?
  • do you think this would be better implemented in this update or the next one?

@jbelien
Copy link
Author

jbelien commented Mar 16, 2018

Check here to see what's possible : https://www.mapbox.com/mobile/

can we choose between different map designs?

Yes, you can see the style available here : https://www.mapbox.com/maps/
and see https://www.mapbox.com/help/first-steps-android-sdk/#change-the-map-style

can we implement the 'walking route' feature with Mapbox?

Yes, definitely (and much more) !

do you think this would be better implemented in this update or the next one?

Sooner the better I would say but I have absolutely no idea about the amount of work (and unfortunately can't really help 😞 ).


Some examples : https://www.mapbox.com/android-docs/map-sdk/examples/
Demo of what's possible to to with Android SDK : https://play.google.com/store/apps/details?id=com.mapbox.mapboxandroiddemo&hl=en

@rskikuli
Copy link
Member

It seems that this will need more work for research, discussion and also development. Labeling this for ver 1.2.0.

@rskikuli rskikuli added this to the v 1.2 milestone Mar 16, 2018
@AndyScherzinger
Copy link
Collaborator

AndyScherzinger commented Mar 19, 2018

I agree with you @jbelien and @rskikuli. For 1.1.0 it is already to late since I won't be able to spend much time on the app in the next 4-5 weeks (maybe even none at all 😢). So for 1.1 we did a lot of fixes and general improvements while when using mapbox is it a more or less complete rewrite of (at least) anything map related.

@rskikuli
Copy link
Member

Guys mapbox seems to be the best scenario at this stage. Let's go for it.
@jbelien do you think Mapbox offers also possibilities of an offline version?
@AndyScherzinger is this something you can help at some point? Based on the feedback I got from State of the Map conference it should be a high priority feature for us and all our energy should be focused there. This is an issue related to #38. Offline usage also offers more privacy to users since they are not connected online when they navigate.

@AndyScherzinger
Copy link
Collaborator

@AndyScherzinger is this something you can help at some point?

At some point sure while I can't say when this will be and how long it'll take, being pretty busy at the moment :/

@jbelien
Copy link
Author

jbelien commented Aug 11, 2018

@jbelien do you think Mapbox offers also possibilities of an offline version?

Yes, the "Mapbox SDK for Android" provides Offline use : https://www.mapbox.com/android-docs/maps/overview/offline/

@PrasannaVenkadesh
Copy link
Contributor

PrasannaVenkadesh commented Nov 8, 2018

Good conversation. Obviously depending on openstreetmap.org tile server is very bad practice since our app as used by many people will only increase load on those servers. Mapbox, NextZen, OpenMapTiles everyone of them serve vector and raster tiles online. But at the same time they are also limited by number of API requests or tile requests being served.

In my opinion if the app has to be self-sufficient (or) sustainable in the long run without having to depend on external services (remember the shutdown of MapZen had hurt many applications) and without having to spend much for paying for the services, then Offline maps and routing has to be integrated as a primary design feature.

OsmAnd+ is a very good example. With this thought, I propose two libraries that can be used to achieve the same with CityZen as well.

  1. mapsforge/vtm can be used as a map provider (offline) with VTM renders the offline maps on-demand on-device (eliminating the need for pre-rendered tiles).
  2. graphhopper offers excellent routing for various vehicle profiles and also can work completely offline on device.

As I already shared in our Telegram group, I have written a shell script that can prepare raw osm data into mapsforge format as well routing data required by graphhopper.

Unlike OsmAnd's pbf vector binary format, mapsforge's map format is highly compact and consumes very very less disk storage space. For example, the raw data of Tirane, Albania from OSM is around ~70mb. The same when processed and converted into mapsforge binary format is just 1.7mb.

The only online requirement would be to provide public downloads of the mapsforge maps for various countries of the world like this (http://download.mapsforge.org/maps/) and we should have a download section in our app for multiple regions. The world overview mapsforge map is already available in the same link. This file is just 3.8mb which can be distributed along within the apk and when starting the application for the first time can copy this world map into internal or external storage of the device.

The rest of the world regions should be made available for download and once downloaded the app should be able to work without Internet and next time they connect to Internet the app can periodically check for new map file updates and it is upto the user to update.

We can also customize the theme for the maps with VTM coming up with unique colours as well. The combo offers a lot of flexibility for exactly this purpose.

I have already forked and started working on integrating mapsforge/vtm with the application. I will share screenshots, sample demo apks before issuing pull requests.

@PrasannaVenkadesh
Copy link
Contributor

PrasannaVenkadesh commented Nov 10, 2018

  • World map without continent/country/region details is included within apk (3.8 mb)
  • Any other continent or country or region map can be prepared and copied into Internal (or) External Storage/maps/ location. The app will pick up these files from this location and render them offline as we zoom into those region.
  • VTM comes with inbuilt location marker, so I have used it instead of old marker. The marker now also takes GPS accuracy into account. the outer blue circle represents the GPS accuracy and it's radius increases or decreases as the accuracy increases or decreases respectively.
  • My Location and Add point of interest is also ported to VTM's mapview.

I would like to know your feedback. I shall wait and proceed after that.

cityzen-vtm

@jbelien
Copy link
Author

jbelien commented Nov 11, 2018

@PrasannaVenkadesh That's absolutely awesome ! 😍

I suggested Mapbox Android SDK because I know nothing about Android map abilities (and didn't know about VTM).
But seeing the result here above, I'm definitely convinced !

If we can provide VTM extracts per country, I think we have a solution that fixes both offline use and OSM.org tile usage policy 👍

@jbelien jbelien mentioned this issue Nov 11, 2018
@AndyScherzinger AndyScherzinger modified the milestones: v 1.2, v 1.3 Apr 3, 2019
@PrasannaVenkadesh
Copy link
Contributor

After the above Screencast, I haven't progressed much on it.

In our existing app, I see there are multiple places where MapView is recreated as fragment based on the location passed. The current issue with Mapsforge VTM is that, even though multiple instance of mapview is supported, it is buggy when it comes to having multiple MapViews on multiple fragments or dialogs.

We have two options here.

  1. Go ahead with Mapsforge's VTM library, but stick with only one MapView Fragment. This requires some changes with current activities and fragments flow.
  2. Wait until this bug is fixed in VTM.

@rskikuli rskikuli pinned this issue Jul 29, 2019
@AndyScherzinger AndyScherzinger removed their assignment Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants