We have some customer's who have facility data they are publishing through their own WMS or ArcGIS/REST services.
We're exploring the idea of building an IOS app that can display their facilities using MapBox's IOS SDK.
We've had no trouble configuring a set of landbase layers in MapBox, and displaying them in our demo app. We've not yet tried uploading sample facility data onto the MapBox site, but we don't expect to have any difficulty with that.
We expect some of our customers will want to upload their facility data into MapBox, so that they can take advantage of MapBox's offline mapping features. But a good many of them won't.
For those that don't, we're trying to figure out how to access our customers' facility services directly.
MapBox IOS SDK supports custom raster styles: Custom raster style
The idea is you create a custom style in json, and in it you specify a template for the tile URLs.
{
"version": 8,
"name": "Raster Tiles",
"sources": {
"yourTileLayer": {
"type": "raster",
"tiles": [
"https://1.tile.server/{z}/{x}/{y}.png",
"https://2.tile.server/{z}/{x}/{y}.png"
],
"tileSize": 256
}
},
"layers": [{
"id": "yourTileLayer",
"type": "raster",
"source": "yourTileLayer",
"paint": {
"raster-fade-duration": 100
}
}]
}
Those templates look suspiciously like the templates use by Leaflet's TileLayer: TileLayer
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png?{foo}', {foo: 'bar'}).addTo(map);
Leaflet has a TileLayer.WMS class, that derives from TileLayer, that provides an interface that's usually used for displaying WMS on a Leaflet map.
Is there a template I could pass to Leaflet's TileLayer class, that would retrieve tiles from a WMS server, without using Leaflet's TileLayer.WMS class?
Can anyone tell me how to build it?
Similarly, ESRI has a Leaflet plugin to display ArcGIS/REST data on a Leaflet map. Is there a template I could pass to Leaflet's TileLayer class, that would retrieve tiles from an ArcGIS/REST server, without using ESRI's plugin?
Can anyone tell me how to build that?
My hope is whatever URL I might build that works with Leaflet's TileLayer class will also work with MapBox's IOS SDK.