Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

i'm using OpenLayers (v2.13.1) and would like to use Stamen Toner tiles as background.

The example is simple to understand : http://maps.stamen.com/test/openlayers.html

But i'd like to use the "lite" variant of the toner tiles, how is it possible with OpenLayer ?

Thanks

share|improve this question
add comment

2 Answers

Found it !

var toner = new OpenLayers.Layer.Stamen("toner-lite");

share|improve this answer
add comment

Please check out the following code

<html>
<head>
    <title>tile.stamen.com: OpenLayers</title>
    <script type="text/javascript" src="http://www.openlayers.org/api/OpenLayers.js"></script>
    <script type="text/javascript" src="http://maps.stamen.com/js/tile.stamen.js?v1.1.2"></script>
    <script type="text/javascript">
        var map, layer;
        function initialize() {
            map = new OpenLayers.Map('map', {controls: [new OpenLayers.Control.LayerSwitcher({})]});
            stamenLayer = new OpenLayers.Layer.Stamen("toner-lite");

            map.addLayer(stamenLayer);
            map.setCenter(new OpenLayers.LonLat(-13630355, 4546576), 10);

        }
    </script>
    <style type="text/css">
        #map {
            width: 800px;
            height: 600px;
        }
    </style>
</head>
<body onload="initialize()">
    <div id="map"></div>
</body>
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.