integrityapplications / pinz

geospatial visualization of near real-time data in a browser
Apache License 2.0
2 stars 1 forks source link

Map should support config-based layers #17

Open jsherrah opened 11 years ago

jsherrah commented 11 years ago

Instead of just using cloudmade tiles that are hard coded into map.js directive, we should use a config file or build config option to determine the intended environment. Thus, we can change which OSM server we're pointing to easily.

virtualandy commented 10 years ago

It does (sort of), just have to change the source of tiles:

    map = new L.Map('map');

    // create the tile layer with correct attribution
    var osmUrl='http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
    var osmAttrib='Map data © OpenStreetMap contributors';
    var osm = new L.TileLayer(osmUrl, {minZoom: 8, maxZoom: 12, attribution: osmAttrib});   

See getting started with leaflet on switch2osm.org for more.

Edited this issue to say "allow config-based properties to determine source of layers".