From b121744e7ed20f4e3ff55e8b7a41954a0e573304 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20S=C3=A1nchez=20Ortega?= Date: Fri, 8 May 2015 15:53:46 +0200 Subject: [PATCH] Plugins page: turn headers into permalinks --- _layouts/default.html | 12 +++ docs/css/screen.css | 14 ++- plugins.md | 206 +++++++++++++++++++++--------------------- 3 files changed, 127 insertions(+), 105 deletions(-) diff --git a/_layouts/default.html b/_layouts/default.html index dd1a6fa0..4fc83cfe 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -172,6 +172,18 @@ }; } } + + if (document.body.className === 'plugins-page') { + headers = document.getElementsByTagName('h3'); + for (var i = 0, len = headers.length; i < len; i++) { + if (headers[i].id) { + headers[i].onclick = function() { + window.location.hash = '#' + this.id; + }; + } + } + } + })(); hljs.initHighlighting(); diff --git a/docs/css/screen.css b/docs/css/screen.css index 572c3abe..1990837d 100644 --- a/docs/css/screen.css +++ b/docs/css/screen.css @@ -76,11 +76,13 @@ h2 { text-shadow: 0 -1px 1px rgba(0,0,0,0.35); } -.api-page h2 { +.api-page h2, .plugins-page h2, .plugins-page h3 { cursor: pointer; } .api-page h2[id]:before, +.plugins-page h2[id]:before, +.plugins-page h3[id]:before, .api-page tr[id] td:first-child:before { content: 'Permalink'; display: inline-block; @@ -98,6 +100,10 @@ h2 { position: absolute; } +.plugins-page h3[id]:before { + margin: 0px 5px 0px -23px; + } + .api-page tr[id] td:first-child:before { opacity:0; } @@ -106,7 +112,11 @@ h2 { opacity:1; } -.api-page h2[id]:hover:before { opacity:1; } +.api-page h2[id]:hover:before, +.plugins-page h2[id]:hover:before, +.plugins-page h3[id]:hover:before { + opacity:1; + } .api-page h2 { margin-top: 2.5em; diff --git a/plugins.md b/plugins.md index 6f6b7842..20f1c30c 100644 --- a/plugins.md +++ b/plugins.md @@ -1,12 +1,12 @@ --- layout: default title: Plugins +bodyclass: plugins-page --- -## Notable Leaflet Plugins - While Leaflet is meant to be as lightweight as possible, and focuses on a core set of features, an easy way to extend its functionality is to use third-party plugins. Thanks to the awesome community behind Leaflet, there are literally hundreds of nice plugins to choose from. +---
@@ -69,32 +69,32 @@ While Leaflet is meant to be as lightweight as possible, and focuses on a core s
  • Geoprocessing
  • Routing
  • Geocoding
  • -
  • Plugin collections
  • +
  • Plugin collections
  • Integration


    - Develop your own + Develop your own
    -## Tile & image layers +## Tile & image layers The following plugins allow loading different maps and provide functionality to tile and image layers. * [Basemap providers](#basemap-providers) * [Basemap formats](#basemap-formats) -* [Non-map base layers](#basemap-nonmap) -* [Tile/image display](#tiledisplay) -* [Tile load](#tileload) +* [Non-map base layers](#non-map-base-layers) +* [Tile/image display](#tileimage-display) +* [Tile load](#tile-load) -### Basemap providers +### Basemap providers Ready-to-go basemaps, with little or no configuration at all. @@ -148,7 +148,7 @@ Ready-to-go basemaps, with little or no configuration at all. -### Basemap formats +### Basemap formats Plugins for loading basemaps or GIS raster layers in common (albeit non-default) formats. @@ -227,7 +227,7 @@ Plugins for loading basemaps or GIS raster layers in common (albeit non-default) -### Non-map base tilelayers +### Non-map base layers Sometimes you don't want to load a map, just big custom images. **Really** big ones. @@ -281,7 +281,7 @@ Sometimes you don't want to load a map, just big custom images. **Really** big o -### Tile/image display +### Tile/image display The following plugins change the way that tile or image layers are displayed in the map. @@ -335,7 +335,7 @@ The following plugins change the way that tile or image layers are displayed in -### Tile Load +### Tile Load The following plugins change the way that tile layers are loaded into the map. @@ -389,16 +389,16 @@ The following plugins change the way that tile layers are loaded into the map. -## Overlay data +## Overlay data The following plugins provide new ways of loading overlay data (GIS vector data): points, lines and polygons. -* [Overlay data formats](#vectordata-formats) -* [Dynamic data loading](#vectordata-dynamic) -* [Synthetic overlays](#vectordata-synthetic) -* [Data providers](#vectordata-providers) +* [Overlay data formats](#overlay-data-formats) +* [Dynamic data loading](#dynamiccustom-data-loading) +* [Synthetic overlays](#synthetic-overlays) +* [Data providers](#data-providers) -### Overlay data formats +### Overlay data formats Load your own data from various GIS formats. @@ -479,7 +479,7 @@ Load your own data from various GIS formats. -### Dynamic/custom data loading +### Dynamic/custom data loading Load dynamic data which is updated in the map, or load GIS vector data in non-standard ways. @@ -535,7 +535,7 @@ Load dynamic data which is updated in the map, or load GIS vector data in non-st -### Synthetic overlays +### Synthetic overlays These plugins create useful overlays from scratch, no loading required. @@ -570,7 +570,7 @@ These plugins create useful overlays from scratch, no loading required. -### Data providers +### Data providers Load overlay data from third-party-services. See also [basemap providers](#basemap-providers) and [plugin collections](#collections). @@ -606,18 +606,18 @@ Load overlay data from third-party-services. See also [basemap providers](#basem -## Overlay display +## Overlay display The following plugins provide new ways of displaying overlay data information. -* [Markers & renderers](#vectordisplay-symbolizers) -* [Marker animations](#vectordisplay-animations) -* [Clustering/decluttering](#vectordisplay-cluster) -* [Heatmaps](#vectordisplay-heatmap) -* [DataViz](#vectordisplay-dataviz) +* [Markers & renderers](#markers--renderers) +* [Overlay animations](#overlay-animations) +* [Clustering/decluttering](#clusteringdecluttering) +* [Heatmaps](#heatmaps) +* [DataViz](#dataviz) -### Markers & renderers +### Markers & renderers These plugins provide new markers or news ways of converting abstract data into images in your screen. Leaflet users versed in GIS also known these as symbolizers. @@ -772,7 +772,7 @@ These plugins provide new markers or news ways of converting abstract data into -### Overlay animations +### Overlay animations These plugins animate markers or some geometries. See also [geometries with time or elevation](#geometryinteraction-time). @@ -827,7 +827,7 @@ These plugins animate markers or some geometries. See also [geometries with time -### Clustering/Decluttering +### Clustering/Decluttering When you are displaying a lot of data, these plugins will make your map look cleaner. @@ -880,7 +880,7 @@ When you are displaying a lot of data, these plugins will make your map look cle -### Heatmaps +### Heatmaps These plugins create heatmaps and heatmap-like visualizations from vector data. @@ -937,7 +937,7 @@ These plugins create heatmaps and heatmap-like visualizations from vector data. -### DataViz +### DataViz Powerful multi-purpose libraries for data visualization. @@ -973,16 +973,16 @@ Powerful multi-purpose libraries for data visualization. -## Interaction with geometries/features +## Interaction with geometries/features The following plugins enable users to interact with overlay data: edit geometries, select areas or features, interact with the time dimension, search features and display information about them. -* [Edit geometries](#geometryinteraction-edit) -* [Time & elevation](#geometryinteraction-time) -* [Search & popups](#geometryinteraction-search) -* [Area/overlay selection](#geometryinteraction-selection) +* [Edit geometries](#edit-geometries) +* [Time & elevation](#time--elevation) +* [Search & popups](#ge#search--popups) +* [Area/overlay selection](#areaoverlay-selection) -### Edit geometries +### Edit geometries Allows users to create, draw, edit and/or delete points, lines and polygons. @@ -1119,7 +1119,7 @@ Allows users to create, draw, edit and/or delete points, lines and polygons. -### Time & elevation +### Time & elevation Most data is two-dimensional (latitude and longitude), but some data has more dimensions (altitude and/or time). The following plugins help users navigate these extra dimensions. @@ -1176,7 +1176,7 @@ Most data is two-dimensional (latitude and longitude), but some data has more di -### Search & popups +### Search & popups Plugins that search for overlays and enhance how to display information about them. @@ -1242,7 +1242,7 @@ Plugins that search for overlays and enhance how to display information about th -### Area/overlay selection +### Area/overlay selection These plugins help users select either overlays or areas in the map. @@ -1288,23 +1288,23 @@ These plugins help users select either overlays or areas in the map. -## Map interaction +## Map interaction New ways to interact with the map itself. -* [Layer switching controls](#mapcontrols-layerswitchers) -* [Interactive pan/zoom](#mapcontrols-panzoom-interactive) -* [Bookmarked pan/zoom](#mapcontrols-panzoom-bookmarked) -* [Fullscreen](#mapcontrols-fullscreen) -* [Minimaps & synced maps](#mapcontrols-minimaps) -* [Measurement](#mapcontrols-measure) -* [Mouse coordinates](#mapcontrols-mousecoords) -* [Events](#mapcontrols-events) -* [User interface](#mapcontrols-userinterface) -* [Print/export](#mapcontrols-print) -* [Geolocation](#mapcontrols-geolocation) +* [Layer switching controls](#layer-switching-controls) +* [Interactive pan/zoom](#interactive-panzoom) +* [Bookmarked pan/zoom](#bookmarked-panzoom) +* [Fullscreen](#fullscreen-controls) +* [Minimaps & synced maps](#minimaps--synced-maps) +* [Measurement](#measurement) +* [Mouse coordinates](#mouse-coordinates) +* [Events](#events) +* [User interface](#user-interface) +* [Print/export](#printexport) +* [Geolocation](#geolocation) -### Layer switching controls +### Layer switching controls The following plugins enhance or extend `L.Control.Layers`. @@ -1375,7 +1375,7 @@ The following plugins enhance or extend `L.Control.Layers`. -### Interactive pan/zoom +### Interactive pan/zoom Change the way the user can interactively move around the map. @@ -1460,7 +1460,7 @@ Change the way the user can interactively move around the map. -### Bookmarked pan/zoom +### Bookmarked pan/zoom Change the way the user is moved around the map, by jumping to predefined/stored places. @@ -1576,7 +1576,7 @@ Change the way the user is moved around the map, by jumping to predefined/stored -### Fullscreen controls +### Fullscreen controls Allows display of the map in full-screen mode. @@ -1612,7 +1612,7 @@ Allows display of the map in full-screen mode. -### Minimaps & synced maps +### Minimaps & synced maps Display two maps at once. One of them might be a different size and zoom level, usable as a minimap to aid with navigation. @@ -1660,7 +1660,7 @@ Display two maps at once. One of them might be a different size and zoom level, -### Measurement +### Measurement Allow the user to measure distances or areas. @@ -1703,7 +1703,7 @@ Allow the user to measure distances or areas. -### Mouse coordinates +### Mouse coordinates Show the geographical coordinates under the mouse cursor in different ways. @@ -1756,7 +1756,7 @@ Show the geographical coordinates under the mouse cursor in different ways. -### Events +### Events These plugins extend Leaflet event handling. @@ -1822,7 +1822,7 @@ These plugins extend Leaflet event handling. -### User interface +### User interface Buttons, sliders, toolbars, sidebars, and panels. @@ -1931,7 +1931,7 @@ Buttons, sliders, toolbars, sidebars, and panels. -### Print/export +### Print/export Print or export your map. @@ -1963,7 +1963,7 @@ Print or export your map. -### Geolocation +### Geolocation Plugins that extend Leaflet's geolocation capabilities. @@ -2011,11 +2011,11 @@ Plugins that extend Leaflet's geolocation capabilities. -## Miscellaneous +## Miscellaneous -### Geoprocessing +### Geoprocessing The following plugins perform several sorts of geoprocessing (mathematical and topological operations on points, lines and polygons). @@ -2098,7 +2098,7 @@ The following plugins perform several sorts of geoprocessing (mathematical and t -### Routing +### Routing The following plugins use external services to calculate driving or walking routes. @@ -2136,7 +2136,7 @@ The following plugins use external services to calculate driving or walking rout -### Geocoding +### Geocoding External services that transform an address or the name of a place into latitude and longitude (or vice versa). @@ -2222,7 +2222,7 @@ External services that transform an address or the name of a place into latitude -## Plugin collections +### Plugin collections Sets of plugins that span several categories. @@ -2261,9 +2261,9 @@ Plugin developers: please keep future plugins in individual repositories. -## Integration +## Integration -### Frameworks & build systems +### Frameworks & build systems Ease your development integrating Leaflet into a development framework or automating some of the javascript/CSS work for complex applications. @@ -2333,7 +2333,7 @@ Ease your development integrating Leaflet into a development framework or automa -### 3rd party integration +### 3rd party integration The following plugins integrate Leaflet into third party services or websites. @@ -2383,7 +2383,7 @@ The following plugins integrate Leaflet into third party services or websites. -## Develop your own +## Develop your own Leaflet keeps it simple. If you can think of a feature that is not required by all of Leaflet users, and you can write the javascript code in a reusable way, you've got yourself a Leaflet plugin already.