Skip to content

Enable custom raster tiled sources like WMS #965

Closed

Description

@Sumbera

Would be great to have WMS or custom raster-tile source url support through official API. {x},{y},{z} is not used by classic WMS - based services where spherical Mercator coordinates are needed as BBOX. Currently WMS works only by hacking into source._loadTile.
Sample and more details also here http://bl.ocks.org/Sumbera/ba554bb5cc8dfe4d7866

for simple bbox support, {mleft}, {mtop}, {mbottom}, {mright} could be added into TileCoord.url (only for raster-tiles ?) plus calc Spherical Mercator bbox. However there might come other bbox , quadkey etc requirements...so custom url hook would be perfect.

Activity

  1. stepankuzmin commented on Sep 1, 2015

    @stepankuzmin
    Contributor

    +1

  2. fxi commented on Feb 11, 2016

    @fxi

    +1

  3. DenisCarriere commented on Feb 21, 2016

    @DenisCarriere

    +1

  4. tmcw commented on Feb 22, 2016

    @tmcw
    Contributor

    Anyone want to roll a PR for this? The problem I've had in the past developing against WMS servers is that there aren't any stable WMS servers on the internet - I've used the NOAA server, but it doesn't support CORS, so this qualification of espg:3857 support + it'll stay online + CORS eliminates all WMS servers I know of.

  5. DenisCarriere commented on Feb 22, 2016

    @DenisCarriere

    What if you host your own GeoServer at Mapbox for WMS testing purposes. There's a few GeoServer Dockerfiles that can get you started really fast.

    As for schemas, you could primarily focus on the latest OGC schema of WMS 1.3.

  6. DenisCarriere commented on Feb 22, 2016

    @DenisCarriere

    I've been able to load a WMS 1.1 using Leaflet without a problem.

    L.tileLayer.wms("http://localhost:8080/geoserver/ows", {
        layers: 'imagery:Brockville',
        format: 'image/png',
        transparent: true,
        maxZoom: 23,
        maxNativeZoom: 23
    }).addTo(map)

    It would be really nice to have this built in MapboxGL. 👍

  7. tmcw commented on Feb 22, 2016

    @tmcw
    Contributor

    I'd really prefer not to host a server just to develop a feature - WMS servers are unstable and slow, and nobody around here wants to maintain one. Unless someone wants to roll a PR for this, I don't think it's going to happen - this is a feature that connects to a kind of server that doesn't really exist on the internet.

  8. DenisCarriere commented on Feb 22, 2016

    @DenisCarriere

    I agree with you, those WMS servers are old technology, so much trouble to enable this feature. :(

  9. Sumbera commented on Feb 22, 2016

    @Sumbera
    Author

    WMS is not the problem, nor you need your own WMS server, nor public server. You can provide custom URL tile constructor and leave it up to the client to define final URL string. GMSTileURLConstructor might be good example of elegant 'style in API' :) you can follow here.

  10. m0ose commented on Apr 4, 2016

    @m0ose

    I also +1 this request.
    The server at http://sedac.ciesin.columbia.edu/geoserver/ seems stable.
    You can use it in leaflet with
    L.tileLayer.wms("http://sedac.ciesin.columbia.edu/geoserver/ows",{layers:'gpw-v3:gpw-v3-population-density_2000', opacity:0.6})

  11. added a commit that references this issue on Apr 8, 2016
  12. jerrygarciame123 commented on May 11, 2016

    @jerrygarciame123

    I need to consume ArcGIS Rest API services into Mapbox GL API. ArcGIS has a WMS specification.

    Any new pathways for this?

  13. wangtun commented on Jun 18, 2016

    @wangtun

    I have some satellite .png tiles but the origin point of the tiles is not the Mercator origin point , I wish mapboxgl exports the url function so I can get my customs png tiles

  14. jfirebaugh commented on Jul 7, 2016

    @jfirebaugh
    Contributor

    WMS support landed in #2612.

  15. DenisCarriere commented on Jul 8, 2016

    @DenisCarriere

    Woot woot! :) This deserves its own Twitter post

  16. user1104 commented on May 9, 2017

    @user1104

    Even I need to consume ArcGIS Rest API services into Mapbox GL API. ArcGIS has a WMS specification.

    Is there any new pathways for this?

  17. deligence commented on Jun 19, 2017

    @deligence

    Hey @user1104 have you got any success in using ArcGIS Rest API in Mapbox GL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions