MapTiler Basic |
I did some work for a client on MapTiler and Mapbox map sources. You get to benefit. Open source!
MapTiler & Mapbox
We were focused on Map Tiler primarily, so those work best. You can find examples for their Basic, Hybrid Satellite, and Streets styles in the AutoTester app.
MapTiler Streets |
As for Mapbox, we were trying out their Satellite offerings so you'll see examples for Satellite and Hybrid Satellite. Streets will probably kind of work, but it wasn't my priority.
Mapbox Satellite Streets |
You'll need to add in your own Map Tiler or Mapbox tokens. I'm not that much of a sucker.
Mapbox Kinda Map
Mapbox-style maps lean more toward the web side of things: Load a lot of random junk before you're ready. That's always been hard on my users.
Look for a new Swift object called MapboxKindaMap in the AutoTester app. Just copy it into your app. For various reasons it's hard to add an actual Swift module to the old version (2.6) of the toolkit.
At its simplest, give the thing a URL for the style and it'll figure out the rest. Consult the MapTiler and Mapbox Test Cases for details.
Caveats
It's working fine for my client, but their needs were pretty simple. If you want highway shields and fades per zoom level and that good stuff, it's not there. I'll be bugging my users for money to add all that and make it work on Android.... soonish.
MapTiler has pretty flexible usage, but Mapbox does not. So work it out with them before you ship anything.
This comment has been removed by the author.
ReplyDeleteHow do you use a custom Mapbox GL style sheet with MapboxVectorTileSource on Android?
ReplyDeleteI'm able to view my map using VectorStyleSimpleGenerator based on LocalVectorTileTestCase but I can't figure out how to use my own style. I tried to utilize the code from SLDTestCase but I couldn't figure out the sld library dependencies.
Can you post a code sample?
I'm afraid you can't do that on Android at the moment.
ReplyDeleteStyle Layer Descriptor is available, but the style sheet format is very different.
If your project has a budget, I'll be sending out an appeal for sponsors to extend Mapbox Style Sheet support to Android in the next few weeks.