This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@line: #226688; | |
@shade0: #FFFFFF; | |
@shade1: #FFFFE5; | |
@shade2: #FFF7BC; | |
@shade3: #FEE391; | |
@shade4: #FEC44F; | |
@shade5: #FE9929; | |
@shade6: #EC7014; | |
@shade7: #CC4C02; | |
@shade8: #993404; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var regionLayer = L.geoJson(regions, { | |
style: { | |
color: '#550055', | |
weight: 1, | |
opacity: 1, | |
fillOpacity: 0 | |
}, | |
onEachFeature: function(feature, layer) { | |
layer.bindPopup('<strong>' + feature.properties.REGC_NAME + '</strong>'); | |
layer.on({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tour = L.layerGroup([ | |
L.cartoDB('http://thematicmapping.cartodb.com/api/v2/sql?q=SELECT * FROM nz_tour', { | |
pointToLayer: function(feature, latlng) { | |
return L.marker(latlng, { | |
icon: L.icon({ | |
iconSize: [27, 27], | |
iconAnchor: [13, 27], | |
popupAnchor: [1, -24], | |
iconUrl: 'icons/' + feature.properties.icon + '.png' | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var huts = new L.MarkerClusterGroup({ | |
showCoverageOnHover: false, | |
maxClusterRadius: 50 | |
}); | |
var hutTypes = ['Basic Hut/Bivvy', 'Standard Hut', 'Serviced Hut', 'Serviced-Alpine Hut', 'Great Walk Hut']; | |
huts.addLayers(data.map(function(hut) { | |
return new L.Marker(new L.LatLng(hut[0], hut[1]), { | |
title: hut[2], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L.geoJson(springs, { | |
pointToLayer: function (feature, latlng) { | |
return L.circleMarker(latlng, { | |
fillColor: (feature.properties.temp === 'hot') ? '#f00' : '#00f', | |
radius: 4, | |
color: "#333", | |
weight: 1, | |
fillOpacity: 1 | |
}); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create map layers | |
var layers = { | |
'Seafloor': L.tileLayer('tiles/nz-seafloor/{z}/{x}/{y}.png', { | |
maxZoom: 9, | |
attribution: '<a href="http://www.niwa.co.nz/our-science/oceans/bathymetry">NIWA</a>' | |
}), | |
'Topographic': L.tileLayer('tiles/nz-topo/{z}/{x}/{y}.png', { | |
attribution: '<a href="http://data.linz.govt.nz/">LINZ</a>, <a href="http://lris.scinfo.org.nz/">LRIS</a>' | |
}), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L.cartoDB('http://thematicmapping.cartodb.com/api/v2/sql?q=SELECT * FROM nz_tour', { | |
pointToLayer: function(feature, latlng) { | |
return L.marker(latlng, { | |
icon: L.icon({ | |
iconSize: [27, 27], | |
iconAnchor: [13, 27], | |
popupAnchor: [1, -24], | |
iconUrl: 'icons/' + feature.properties.icon + '.png' | |
}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
L.CartoDB = L.GeoJSON.extend({ | |
initialize: function (url, options) { | |
L.Util.setOptions(this, options); | |
this._layers = {}; | |
var self = this; | |
if (url) { | |
this._jsonp(url, function(geojson){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var seafloor = L.tileLayer('tiles/nz-seafloor/{z}/{x}/{y}.png', { | |
maxZoom: 9, | |
attribution: 'Map data from <a href="http://www.niwa.co.nz/our-science/oceans/bathymetry">NIWA</a>' | |
}); | |
var topo = L.tileLayer('tiles/nz-topo/{z}/{x}/{y}.png', { | |
attribution: '<a href="http://data.linz.govt.nz/">LINZ</a>, <a href="http://lris.scinfo.org.nz/">LRIS</a>' | |
}); | |
var map = new L.Map('map', { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@water: #96cfe6; | |
@ice: #fff; | |
@shingle: #ccc; | |
@sand: #f1dfaa; | |
@swamp: #749039; | |
@mangrove: #79b779; | |
@exotic: #53a550; | |
@native: #39af34; | |
@mud: #bfb69b; | |
@residental: #fed700; |