Leaflet/docs/examples/map-panes/example.md
Iván Sánchez Ortega 6ee1a6eb65 Clean up docs/examples - one directory per tutorial, more templating. (#4965)
* Clean up docs/examples - one directory per tutorial, more templating.

* Fix some URLs

* tutorials: update rendered CDN links to 1.0.0 and L.circle signature (#4975)

* Update shown CDN links to 1.0.0

As initially done in PR #4967, but just for the rendered links (what the users sees), as actual link / script tags are already updated.

* DOCS update L.circle to new syntax

in quick-start tutorial, following PR #4974.

* DOCS update L.circle to new syntak (example src)

updated L.circle to new signature (radius as an option instead of 2nd parameter).

* tutorials: use L.geoJSON new syntax (#4983)

* tutorials: use new syntax L.geoJSON

for consistency with recommended factory new syntax (`L.geoJSON` instead of legacy `L.geoJson`).
As done in PR #4933 for docstrings.

* tutorials: L.geoJSON new syntax in script

* Renamed several files to directory/index.md
2016-09-30 13:56:05 +02:00

39 lines
1.2 KiB
Markdown

---
layout: tutorial_frame
title: Custom Icons Tutorial
---
<script type="text/javascript" src="eu-countries.js"></script>
<script>
var map = L.map('map');
map.createPane('labels');
// This pane is above markers but below popups
map.getPane('labels').style.zIndex = 650;
// Layers in this pane are non-interactive and do not obscure mouse/touch events
map.getPane('labels').style.pointerEvents = 'none';
var cartodbAttribution = '&copy; <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, &copy; <a href="http://cartodb.com/attributions">CartoDB</a>';
var positron = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_nolabels/{z}/{x}/{y}.png', {
attribution: cartodbAttribution
}).addTo(map);
var positronLabels = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_only_labels/{z}/{x}/{y}.png', {
attribution: cartodbAttribution,
pane: 'labels'
}).addTo(map);
geojson = L.geoJson(euCountries).addTo(map);
geojson.eachLayer(function (layer) {
layer.bindPopup(layer.feature.properties.name);
});
map.setView({ lat: 47.040182144806664, lng: 9.667968750000002 }, 4);
</script>