1

I want to set WMS tiles layer on the map using MapBox in my iPhone app.

Note: I am able to add tiles layer at Google Map using provided methods at https://developers.google.com/maps/documentation/ios-sdk/tiles.

Now I am trying to add WMS tiles layer in MapBox but I am not able to get any method to add WMS tiles layer at the map.

If there is any way to set tiles layer in MapBox. Please let me know. Thanks in advance.

Tanvir Nayem
  • 702
  • 10
  • 25
Asif Raza
  • 836
  • 12
  • 29

1 Answers1

1

I recently had need of this for a project myself, and found this to be a very poorly documented part of the Mapbox iOS SDK. Have a look over on this page: https://github.com/mapbox/mapbox-gl-native/blob/master/platform/ios/docs/guides/Tile%20URL%20Templates.md.

You can use {bbox-epsg-3857} as a placeholder in your URL templates. The rest of the URL format will be all your standard WMS junk like version, request, format, etc. For the WIDTH and HEIGHT, use 256.

ianthetechie
  • 575
  • 6
  • 12
  • I am not 100% sure but if that did not work then you might have to also include another query param `URLQueryItem(name: "srs", value: "EPSG:3857")`. I had to do this in order to get the WMS tiles properly. – superrehtard May 22 '19 at 19:37