mobile-sdk icon indicating copy to clipboard operation
mobile-sdk copied to clipboard

[FR] support Mapbox map style format

Open farfromrefug opened this issue 6 years ago • 4 comments

Now that google maps is a paid service, a lot of open source projects are going to turn to other solutions like Mapbox or Carto Mobile. The one thing really hard to handle with Carto Mobile is the style. Voyager is not a very easy style to read, so we often look at other styles on the web. But almost all of them now use Mabpox style format. And the most important one for Carto are OpenMapTiles ones are this is what you are using. So OpenMapTiles style could be used as is in Carto Mobile if it was to support Mapbox style format.

There is a lib for OpenLayers that could be use as a base: https://github.com/boundlessgeo/ol-mapbox-style

I really hope you consider that feature. Thanks

farfromrefug avatar Jun 17 '18 09:06 farfromrefug

We are using Mapbox Studio Classic for styling basemaps, but I agree that this could be made simpler. The styling language is tied to specific renderer features, so even if we convert the style from another approach (mapbox or google maps style for example), then you loose some features in original style, and cannot activate others. Also it is very difficult, or impossible, to finetune styling for maximum performance.

Specifically for mapbox I've done some experiments with mapbox-gl-json-to-mapnik-xml, but this gives maybe 80% result and the key issue is that the complex basemap will be slow, as especially after converting style you end up with thousands of map layers. So I would not consider this to be very promising route.

p.s. google maps on mobile is still free service, or has this been changed?

jaakla avatar Jun 17 '18 12:06 jaakla

@jaakla i understand what you say and in a sense i agree. Yes you will loose some features like layers, source definitions but you should keep most of the features. But as you say another solution would be a good gl-to-css tool. There's none right now and i really think you should provide one. Or maintain more styles like openmaptiles gl ones. It's really difficult to create a style right now. Also because you have specific "carto" props which do not work in mapbox studio classic. And vice versa.

Ps: google maps changed its price making us look at other solutions https://www.maptiler.com/blog/2018/05/maptiler-as-google-maps-api-alternative.html

farfromrefug avatar Jun 18 '18 08:06 farfromrefug

Thanks, your point taken.

Regarding google maps I'd check from the source: https://cloud.google.com/maps-platform/pricing/ tells that you get "Unlimited Dynamic Maps mobile loads", which means that ios and android SDK maps are still not charged, regardless of your volume. But of course there are restrictions of use cases (navigation, fleet management, pro/closed solutions etc), the other services like geocode, places and routes is not free etc.

jaakla avatar Jun 18 '18 08:06 jaakla

@jaakla thanks for the point taken. I still want to emphasise more on the need for "theming tools". Right now for example i have a style that works fine in mapbox studio classic and does not render correctly in Carto. I see some errors in the logcat but not precise enough. So i am stuck not knowing how to fix this.

I think there are 2 things Carto Mobile should provide:

  • a fork of mapbox studio classic supporting custom carto css props and reporting errors on non supported ones.
  • a node js converter from gl style to carto css. (i had found and forked one at one point. Will try and find it again).

I am sorry to emphasise on this but here for my open source projects and for all the clients projects i am about to start, this is a must have.

farfromrefug avatar Jun 20 '18 15:06 farfromrefug