Quantcast
Channel: maps for developers - Medium
Viewing all articles
Browse latest Browse all 2230

Mapbox --> Boundless without a plugin

$
0
0

Open source geospatial tools should play well together.

It’s always been possible to use Mapbox with OpenLayers. Check out our documentation for various versions and this example dropping the revamped Mapbox Streets into OpenLayers 3:

var map = new ol.Map({
  layers: [
    new ol.layer.Tile({
      source: new ol.source.XYZ({
        tileSize: [512, 512],
        url: 'https://api.mapbox.com/styles/v1/mapbox/streets-v9/tiles/{z}/{x}/{y}?access_token=<your access token here>'
      })
    })
  ],
  target: 'map',
  view: new ol.View({
    center: [0, 0],
    zoom: 2
  })
});

You can also use Mapbox maps in QGIS and GeoNode by modifying map settings. This example adds a Mapbox basemap to GeoNode by creating a MAP_BASELAYER in your local_settings.py file:

{"source": {"ptype": "gxp_olsource"},"type":"OpenLayers.Layer.XYZ","args":["Mapbox Satellite", ["https://api.mapbox.com/v4/mapbox.satellite/{z}/{x}/{y}.png?access_token=<your access token here>"],
    {"transitionEffect": "resize","attribution": "© Mapbox © OpenStreetMap © DigitalGlobe"}],"visibility": True,"fixed": True,"group":"background"
  },

In June we’ll add the ability to use Mapbox Studio styles in Boundless tools without code modifications or plugins. Here’s a preview of Mapbox Satellite in QGIS.

Check out our integrations with Tableau, ArcGIS Online, and the CartoDB Editor, and keep an eye on @Mapbox and the blog for new tools to help your maps travel well.


Viewing all articles
Browse latest Browse all 2230

Trending Articles