forked from Snck3rs/contao-leaflet-libraries
Compare commits
15 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bab1fc701 | ||
|
|
184fe85795 | ||
|
|
041383ea4f | ||
|
|
04175e2a9c | ||
|
|
e0c853d0a9 | ||
|
|
25f64dc818 | ||
|
|
de22e28c1f | ||
|
|
ecc66d2935 | ||
|
|
ad66ff7c00 | ||
|
|
bddadbe22a | ||
|
|
1baae82984 | ||
|
|
a784851f20 | ||
|
|
996a3fb745 | ||
|
|
8045cdc07a | ||
|
|
4897509aee |
12
README.md
12
README.md
@@ -12,14 +12,14 @@ Contao CMS.
|
||||
|
||||
This package contains following packages:
|
||||
|
||||
- [leaflet 1.3.4](http://leafletjs.com)
|
||||
- [Leaflet-providers 1.3.1](http://leaflet-extras.github.io/leaflet-providers)
|
||||
- [Leaflet.markercluster 1.4.0](https://github.com/Leaflet/Leaflet.markercluster)
|
||||
- [leaflet 1.9.3](http://leafletjs.com)
|
||||
- [Leaflet-providers 1.13.0](http://leaflet-extras.github.io/leaflet-providers)
|
||||
- [Leaflet.markercluster 1.4.1](https://github.com/Leaflet/Leaflet.markercluster)
|
||||
- [Leaflet-omnivore 0.3.4](https://github.com/mapbox/leaflet-omnivore)
|
||||
- [Leaflet.loading 0.1.24](https://github.com/ebrelsford/Leaflet.loading)
|
||||
- [Leaflet.Control.FullScreen 1.4.5](https://github.com/brunob/leaflet.fullscreen)
|
||||
- [Leaflet Control Geocoder 1.6.0](https://github.com/perliedman/leaflet-control-geocoder)
|
||||
- [Leaflet.ExtraMarkers 1.0.8](https://github.com/coryasilva/Leaflet.ExtraMarkers)
|
||||
- [Leaflet.Control.FullScreen 1.6.0](https://github.com/brunob/leaflet.fullscreen)
|
||||
- [Leaflet Control Geocoder 1.13.0](https://github.com/perliedman/leaflet-control-geocoder)
|
||||
- [Leaflet.ExtraMarkers 1.2.1](https://github.com/coryasilva/Leaflet.ExtraMarkers)
|
||||
- [leaflet.pm 0.25.0](https://github.com/codeofsumit/leaflet.pm)
|
||||
- [osmtogeojson 2.2.12](https://github.com/tyrasd/osmtogeojson)
|
||||
- [spin.js 2.3.2](http://fgnass.github.io/spin.js)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
assets/control-geocoder/Control.Geocoder.min.js.map
Normal file
1
assets/control-geocoder/Control.Geocoder.min.js.map
Normal file
File diff suppressed because one or more lines are too long
@@ -6,28 +6,35 @@ I strongly believe that it is my — and your — duty to make the open
|
||||
|
||||
While I can't force anyone to do anything, if you happen to disagree with this, I ask of you not to use any of the open source I have published. Nor am I interested in contributions from people who can't accept or act respectfully towards other humans regardless of gender identity, sexual orientation, disability, ethnicity, religion, age, physical appearance, body size, race, or similar personal characteristics. If you think feminism, anti-racism or the LGBT movement is somehow wrong, disturbing or irrelevant, I ask you to go elsewhere to find software.
|
||||
|
||||
Leaflet Control Geocoder [](https://www.npmjs.com/package/leaflet-control-geocoder) 
|
||||
=============================
|
||||
# Leaflet Control Geocoder [](https://www.npmjs.com/package/leaflet-control-geocoder) 
|
||||
|
||||
A simple geocoder for [Leaflet](http://leafletjs.com/) that by default uses [OSM](https://www.openstreetmap.org/)/[Nominatim](https://wiki.openstreetmap.org/wiki/Nominatim).
|
||||
A simple geocoder for [Leaflet](https://leafletjs.com/) that by default uses [OSM](https://www.openstreetmap.org/)/[Nominatim](https://wiki.openstreetmap.org/wiki/Nominatim).
|
||||
|
||||
The plugin supports many different data providers:
|
||||
|
||||
* [OSM](https://www.openstreetmap.org/)/[Nominatim](https://wiki.openstreetmap.org/wiki/Nominatim)
|
||||
* [Bing Locations API](http://msdn.microsoft.com/en-us/library/ff701715.aspx)
|
||||
* [Google Geocoding API](https://developers.google.com/maps/documentation/geocoding/)
|
||||
* [Mapbox Geocoding](https://www.mapbox.com/developers/api/geocoding/)
|
||||
* [MapQuest Geocoding API](http://developer.mapquest.com/web/products/dev-services/geocoding-ws)
|
||||
* [What3Words](http://what3words.com/)
|
||||
* [Photon](http://photon.komoot.de/)
|
||||
* [Mapzen Search](https://mapzen.com/projects/search)
|
||||
* [HERE Geocoder API](https://developer.here.com/documentation/geocoder/topics/introduction.html)
|
||||
- LatLng to parse basic latitude/longitude strings
|
||||
- [OSM](https://www.openstreetmap.org/)/[Nominatim](https://wiki.openstreetmap.org/wiki/Nominatim)
|
||||
- [Bing Locations API](http://msdn.microsoft.com/en-us/library/ff701715.aspx)
|
||||
- [Google Geocoding API](https://developers.google.com/maps/documentation/geocoding/)
|
||||
- [Mapbox Geocoding](https://www.mapbox.com/api-documentation/#geocoding)
|
||||
- [MapQuest Geocoding API](http://developer.mapquest.com/web/products/dev-services/geocoding-ws)
|
||||
- [What3Words](http://what3words.com/)
|
||||
- [Photon](http://photon.komoot.de/)
|
||||
- [Pelias](https://pelias.io/), [geocode.earth](https://geocode.earth/) (formerly Mapzen Search), [Openrouteservice](https://openrouteservice.org/dev/#/api-docs/geocode)
|
||||
- [HERE Geocoder API](https://developer.here.com/documentation/geocoder/topics/introduction.html)
|
||||
- [Neutrino API](https://www.neutrinoapi.com/api/geocode-address/)
|
||||
- [Plus codes](https://plus.codes/) (formerly OpenLocationCode) (requires [open-location-code](https://www.npmjs.com/package/open-location-code))
|
||||
|
||||
The plugin can easily be extended to support other providers. Current extensions:
|
||||
|
||||
* [DAWA Geocoder](https://github.com/kjoller/leaflet-control-geocoder-dawa/tree/new) - support for Danish Address Web API by [Niels Kjøller Hansen](https://github.com/kjoller)
|
||||
- [DAWA Geocoder](https://github.com/kjoller/leaflet-control-geocoder-dawa/tree/new) - support for Danish Address Web API by [Niels Kjøller Hansen](https://github.com/kjoller)
|
||||
|
||||
See the [Leaflet Control Geocoder Demo](http://perliedman.github.com/leaflet-control-geocoder/).
|
||||
# Demos
|
||||
|
||||
- [Leaflet Control Geocoder Demo](https://www.liedman.net/leaflet-control-geocoder/) hosted on liedman.net
|
||||
- See [demo/](https://github.com/perliedman/leaflet-control-geocoder/tree/master/demo)
|
||||
- See [demo-rollup/](https://github.com/perliedman/leaflet-control-geocoder/tree/master/demo-rollup) using the [rollup.js](https://rollupjs.org/) bundler
|
||||
- See [demo-webpack/](https://github.com/perliedman/leaflet-control-geocoder/tree/master/demo-rollup) using the [webpack](https://webpack.js.org/) bundler
|
||||
|
||||
# Usage
|
||||
|
||||
@@ -42,8 +49,8 @@ Add the control to a map instance:
|
||||
|
||||
```javascript
|
||||
var map = L.map('map').setView([0, 0], 2);
|
||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
L.tileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
L.Control.geocoder().addTo(map);
|
||||
```
|
||||
@@ -59,19 +66,19 @@ For example:
|
||||
|
||||
```javascript
|
||||
var geocoder = L.Control.geocoder({
|
||||
defaultMarkGeocode: false
|
||||
})
|
||||
.on('markgeocode', function(e) {
|
||||
var bbox = e.geocode.bbox;
|
||||
var poly = L.polygon([
|
||||
bbox.getSouthEast(),
|
||||
bbox.getNorthEast(),
|
||||
bbox.getNorthWest(),
|
||||
bbox.getSouthWest()
|
||||
]).addTo(map);
|
||||
map.fitBounds(poly.getBounds());
|
||||
})
|
||||
.addTo(map);
|
||||
defaultMarkGeocode: false
|
||||
})
|
||||
.on('markgeocode', function(e) {
|
||||
var bbox = e.geocode.bbox;
|
||||
var poly = L.polygon([
|
||||
bbox.getSouthEast(),
|
||||
bbox.getNorthEast(),
|
||||
bbox.getNorthWest(),
|
||||
bbox.getSouthWest()
|
||||
]).addTo(map);
|
||||
map.fitBounds(poly.getBounds());
|
||||
})
|
||||
.addTo(map);
|
||||
```
|
||||
|
||||
This will add a polygon representing the result's boundingbox when a result is selected.
|
||||
@@ -84,80 +91,129 @@ This is the geocoder control. It works like any other Leaflet control, and is ad
|
||||
|
||||
### Constructor
|
||||
|
||||
This plugin supports the standard JavaScript constructor (to be invoked using `new`) as well as the [class factory methods](http://leafletjs.com/reference.html#class-class-factories) known from Leaflet:
|
||||
This plugin supports the standard JavaScript constructor (to be invoked using `new`) as well as the [class factory methods](https://leafletjs.com/reference.html#class-class-factories) known from Leaflet:
|
||||
|
||||
```js
|
||||
new L.Control.Geocoder(options)
|
||||
new L.Control.Geocoder(options);
|
||||
// or
|
||||
L.Control.geocoder(options)
|
||||
L.Control.geocoder(options);
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Type | Default | Description |
|
||||
| ----------------- | ---------------- | ------------------- | ----------- |
|
||||
| `collapsed` | Boolean | `true` | Collapse control unless hovered/clicked |
|
||||
| `expand` | String | `"touch"` | How to expand a collapsed control: `touch` or `click` or `hover` |
|
||||
| `position` | String | `"topright"` | Control [position](http://leafletjs.com/reference.html#control-positions) |
|
||||
| `placeholder` | String | `"Search..."` | Placeholder text for text input
|
||||
| `errorMessage` | String | `"Nothing found."` | Message when no result found / geocoding error occurs |
|
||||
| `geocoder` | IGeocoder | `new L.Control.Geocoder.Nominatim()` | Object to perform the actual geocoding queries |
|
||||
| `showResultIcons` | Boolean | `false` | Show icons for geocoding results (if available); supported by Nominatim |
|
||||
| Option | Type | Default | Description |
|
||||
| ------------------ | --------- | ------------------------------------ | ------------------------------------------------------------------------------------------------------------- |
|
||||
| `collapsed` | Boolean | `true` | Collapse control unless hovered/clicked |
|
||||
| `expand` | String | `"touch"` | How to expand a collapsed control: `touch` or `click` or `hover` |
|
||||
| `position` | String | `"topright"` | Control [position](https://leafletjs.com/reference.html#control-positions) |
|
||||
| `placeholder` | String | `"Search..."` | Placeholder text for text input |
|
||||
| `errorMessage` | String | `"Nothing found."` | Message when no result found / geocoding error occurs |
|
||||
| `iconLabel` | String | `"Initiate a new search"` | Accessibility label for the search icon used by screen readers |
|
||||
| `geocoder` | IGeocoder | `new L.Control.Geocoder.Nominatim()` | Object to perform the actual geocoding queries |
|
||||
| `showUniqueResult` | Boolean | `true` | Immediately show the unique result without prompting for alternatives |
|
||||
| `showResultIcons` | Boolean | `false` | Show icons for geocoding results (if available); supported by Nominatim |
|
||||
| `suggestMinLength` | Number | `3` | Minimum number characters before suggest functionality is used (if available from geocoder) |
|
||||
| `suggestTimeout` | Number | `250` | Number of milliseconds after typing stopped before suggest functionality is used (if available from geocoder) |
|
||||
| `query` | String | `""` | Initial query string for text input |
|
||||
| `queryMinLength` | Number | `1` | Minimum number of characters in search text before performing a query |
|
||||
|
||||
### Methods
|
||||
|
||||
| Method | Returns | Description |
|
||||
| ------------------------------------- | ------------------- | ----------------- |
|
||||
| `markGeocode(<GeocodingResult> result)` | `this` | Marks a geocoding result on the map |
|
||||
| Method | Returns | Description |
|
||||
| --------------------------------------- | ------- | --------------------------------------- |
|
||||
| `markGeocode(<GeocodingResult> result)` | `this` | Marks a geocoding result on the map |
|
||||
| `setQuery(<String> query)` | `this` | Sets the query string on the text input |
|
||||
|
||||
## L.Control.Geocoder.Nominatim
|
||||
|
||||
Uses [Nominatim](https://wiki.openstreetmap.org/wiki/Nominatim) to respond to geocoding queries. This is the default
|
||||
geocoding service used by the control, unless otherwise specified in the options. Implements ```IGeocoder```.
|
||||
geocoding service used by the control, unless otherwise specified in the options. Implements `IGeocoder`.
|
||||
|
||||
Unless using your own Nominatim installation, please refer to the [Nominatim usage policy](https://operations.osmfoundation.org/policies/nominatim/).
|
||||
|
||||
### Constructor
|
||||
|
||||
```js
|
||||
new L.Control.Geocoder.Nominatim(options)
|
||||
new L.Control.Geocoder.Nominatim(options);
|
||||
// or
|
||||
L.Control.Geocoder.nominatim(options)
|
||||
L.Control.Geocoder.nominatim(options);
|
||||
```
|
||||
|
||||
## Options
|
||||
### Options
|
||||
|
||||
| Option | Type | Default | Description |
|
||||
| --------------- | ---------------- | ----------------- | ----------- |
|
||||
| `serviceUrl` | String | `"https://nominatim.openstreetmap.org/"` | URL of the service |
|
||||
| `geocodingQueryParams` | Object | `{}` | Additional URL parameters (strings) that will be added to geocoding requests; can be used to restrict results to a specific country for example, by providing the [`countrycodes`](https://wiki.openstreetmap.org/wiki/Nominatim#Parameters) parameter to Nominatim |
|
||||
| `reverseQueryParams` | Object | `{}` | Additional URL parameters (strings) that will be added to reverse geocoding requests |
|
||||
| `htmlTemplate` | function | special | A function that takes an GeocodingResult as argument and returns an HTML formatted string that represents the result. Default function breaks up address in parts from most to least specific, in attempt to increase readability compared to Nominatim's naming
|
||||
| Option | Type | Default | Description |
|
||||
| ---------------------- | -------- | ---------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `serviceUrl` | String | `"https://nominatim.openstreetmap.org/"` | URL of the service |
|
||||
| `geocodingQueryParams` | Object | `{}` | Additional URL parameters (strings) that will be added to geocoding requests; can be used to restrict results to a specific country for example, by providing the [`countrycodes`](https://wiki.openstreetmap.org/wiki/Nominatim#Parameters) parameter to Nominatim |
|
||||
| `reverseQueryParams` | Object | `{}` | Additional URL parameters (strings) that will be added to reverse geocoding requests |
|
||||
| `htmlTemplate` | function | special | A function that takes an GeocodingResult as argument and returns an HTML formatted string that represents the result. Default function breaks up address in parts from most to least specific, in attempt to increase readability compared to Nominatim's naming |
|
||||
|
||||
## L.Control.Geocoder.Bing
|
||||
|
||||
Uses [Bing Locations API](http://msdn.microsoft.com/en-us/library/ff701715.aspx) to respond to geocoding queries. Implements ```IGeocoder```.
|
||||
Uses [Bing Locations API](http://msdn.microsoft.com/en-us/library/ff701715.aspx) to respond to geocoding queries. Implements `IGeocoder`.
|
||||
|
||||
Note that you need an API key to use this service.
|
||||
|
||||
### Constructor
|
||||
|
||||
```ts
|
||||
new L.Control.Geocoder.Bing(<String> key)
|
||||
new L.Control.Geocoder.Bing(<String>key);
|
||||
// or
|
||||
L.Control.Geocoder.bing(<String> key)
|
||||
L.Control.Geocoder.bing(<String>key);
|
||||
```
|
||||
|
||||
## L.Control.Geocoder.OpenCage
|
||||
|
||||
Uses [OpenCage Data API](https://opencagedata.com/) to respond to geocoding queries. Implements `IGeocoder`.
|
||||
|
||||
Note that you need an API key to use this service.
|
||||
|
||||
### Constructor
|
||||
|
||||
```ts
|
||||
new L.Control.Geocoder.OpenCage(<String>key, options);
|
||||
// or
|
||||
L.Control.Geocoder.opencage(<String>key, options);
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Type | Default | Description |
|
||||
| ---------------------- | ------ | ------------------------------------------------ | ------------------------------------------------------------------------------------ |
|
||||
| `serviceUrl` | String | `"https://api.opencagedata.com/geocode/v1/json"` | URL of the service |
|
||||
| `geocodingQueryParams` | Object | `{}` | Additional URL parameters (strings) that will be added to geocoding requests |
|
||||
| `reverseQueryParams` | Object | `{}` | Additional URL parameters (strings) that will be added to reverse geocoding requests |
|
||||
|
||||
## L.Control.Geocoder.LatLng
|
||||
|
||||
Parses basic latitude/longitude strings such as `'50.06773 14.37742'`, `'N50.06773 W14.37742'`, `'S 50° 04.064 E 014° 22.645'`, or `'S 50° 4′ 03.828″, W 14° 22′ 38.712″'`.
|
||||
|
||||
### Constructor
|
||||
|
||||
```ts
|
||||
new L.Control.Geocoder.LatLng(options);
|
||||
// or
|
||||
L.Control.Geocoder.latLng(options);
|
||||
```
|
||||
|
||||
### Options
|
||||
|
||||
| Option | Type | Default | Description |
|
||||
| -------------- | --------- | ------- | --------------------------------------------------------- |
|
||||
| `next` | IGeocoder | | The next geocoder to use for non-supported queries. |
|
||||
| `sizeInMeters` | Number | 10000 | The size in meters used for passing to `LatLng.toBounds`. |
|
||||
|
||||
## IGeocoder
|
||||
|
||||
An interface implemented to respond to geocoding queries.
|
||||
|
||||
### Methods
|
||||
|
||||
| Method | Returns | Description |
|
||||
| ------------------------------------- | ------------------- | ----------------- |
|
||||
| `geocode(<String> query, callback, context)` | `GeocodingResult[]` | Performs a geocoding query and returns the results to the callback in the provided context |
|
||||
| `reverse(<L.LatLng> location, <Number> scale, callback, context)` | `GeocodingResult[]` | Performs a reverse geocoding query and returns the results to the callback in the provided context |
|
||||
| Method | Returns | Description |
|
||||
| ----------------------------------------------------------------- | ------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `geocode(<String> query, callback, context)` | `GeocodingResult[]` | Performs a geocoding query and returns the results to the callback in the provided context |
|
||||
| `suggest(<String> query, callback, context)` | `GeocodingResult[]` | Performs a geocoding query suggestion (this happens while typing) and returns the results to the callback in the provided context |
|
||||
| `reverse(<L.LatLng> location, <Number> scale, callback, context)` | `GeocodingResult[]` | Performs a reverse geocoding query and returns the results to the callback in the provided context |
|
||||
|
||||
## GeocodingResult
|
||||
|
||||
@@ -165,10 +221,10 @@ An object that represents a result from a geocoding query.
|
||||
|
||||
### Properties
|
||||
|
||||
| Property | Type | Description |
|
||||
| ------------ | ---------------- | ------------------------------------- |
|
||||
| `name` | String | Name of found location |
|
||||
| `bbox` | L.LatLngBounds | The bounds of the location |
|
||||
| `center` | L.LatLng | The center coordinate of the location |
|
||||
| `icon` | String | URL for icon representing result; optional |
|
||||
| `html` | String | (optional) HTML formatted representation of the name |
|
||||
| Property | Type | Description |
|
||||
| -------- | -------------- | ---------------------------------------------------- |
|
||||
| `name` | String | Name of found location |
|
||||
| `bbox` | L.LatLngBounds | The bounds of the location |
|
||||
| `center` | L.LatLng | The center coordinate of the location |
|
||||
| `icon` | String | URL for icon representing result; optional |
|
||||
| `html` | String | (optional) HTML formatted representation of the name |
|
||||
|
||||
@@ -1,40 +1,63 @@
|
||||
{
|
||||
"name": "leaflet-control-geocoder",
|
||||
"version": "1.6.0",
|
||||
"description": "Extendable geocoder with builtin support for Nominatim, Bing, Google, Mapbox, Photon, What3Words, MapQuest, Mapzen, HERE",
|
||||
"version": "1.13.0",
|
||||
"description": "Extendable geocoder with builtin support for OpenStreetMap Nominatim, Bing, Google, Mapbox, MapQuest, What3Words, Photon, Pelias, HERE, Neutrino, Plus codes",
|
||||
"main": "dist/Control.Geocoder.js",
|
||||
"module": "src/index.js",
|
||||
"scripts": {
|
||||
"prepare": "npm run build",
|
||||
"build": "npm run build:js && npm run build:css && npm run build:img",
|
||||
"build:js": "rollup --output.format=iife --name=L.Control.Geocoder --globals=leaflet:L src/index.js --output.file=dist/Control.Geocoder.js --sourcemap",
|
||||
"build:css": "cpr Control.Geocoder.css dist/ --overwrite",
|
||||
"build": "npm run build:js && npm run build:css && npm run build:img && npm run build:demo-rollup && npm run build:demo-webpack",
|
||||
"build:js": "rollup -c",
|
||||
"build:css": "cpr Control.Geocoder.css dist/Control.Geocoder.css --overwrite",
|
||||
"build:img": "cpr images/ dist/images/ --overwrite",
|
||||
"test": "npm run lint",
|
||||
"lint": "npm run lint:js && npm run lint:css",
|
||||
"lint:js": "eslint 'src/**'",
|
||||
"lint:css": "prettier --list-different '*.css'",
|
||||
"publish": "sh ./scripts/publish.sh",
|
||||
"postpublish": "sh ./scripts/postpublish.sh"
|
||||
"build:demo-rollup": "cd demo-rollup && npm install && npm run build",
|
||||
"build:demo-webpack": "cd demo-rollup && npm install && npm run build",
|
||||
"test": "npm run test:karma -- --single-run && npm run lint",
|
||||
"test:karma": "karma start spec/karma.conf.js",
|
||||
"lint": "npm run lint:js && npm run lint:style",
|
||||
"lint:js": "eslint .",
|
||||
"lint:style": "prettier --check $(npm run ls-files)",
|
||||
"fix:style": "prettier --write $(npm run ls-files)",
|
||||
"ls-files": "git ls-files '*.js' '*.json' '*.css' '*.html' '*.yaml' '*.yml' '*.md'"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/perliedman/leaflet-control-geocoder.git"
|
||||
},
|
||||
"files": [
|
||||
"LICENCE",
|
||||
"dist/**",
|
||||
"demo/**",
|
||||
"images/**",
|
||||
"src/**",
|
||||
"*.css"
|
||||
],
|
||||
"keywords": [
|
||||
"leaflet",
|
||||
"geocoder",
|
||||
"locations",
|
||||
"openstreetmap",
|
||||
"nominatim",
|
||||
"bing",
|
||||
"google",
|
||||
"bingmaps",
|
||||
"googlemaps",
|
||||
"google-maps",
|
||||
"mapbox",
|
||||
"photon",
|
||||
"what3words",
|
||||
"mapquest",
|
||||
"opencage",
|
||||
"what3words",
|
||||
"photon",
|
||||
"mapzen",
|
||||
"here"
|
||||
"pelias",
|
||||
"here",
|
||||
"neutrino",
|
||||
"pluscodes",
|
||||
"open location code"
|
||||
],
|
||||
"author": "Per Liedman <per@liedman.net>",
|
||||
"contributors": [
|
||||
"Simon Legner <Simon.Legner@gmail.com>"
|
||||
],
|
||||
"license": "BSD-2-Clause",
|
||||
"bugs": {
|
||||
"url": "https://github.com/perliedman/leaflet-control-geocoder/issues"
|
||||
@@ -42,9 +65,23 @@
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"cpr": "^3.0.1",
|
||||
"eslint": "^4.15.0",
|
||||
"eslint-plugin-prettier": "^2.4.0",
|
||||
"prettier": "^1.9.2",
|
||||
"rollup": "^0.53.2"
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-plugin-prettier": "^3.1.2",
|
||||
"karma": "^4.4.1",
|
||||
"karma-expect": "^1.1.3",
|
||||
"karma-mocha": "^1.3.0",
|
||||
"karma-phantomjs-launcher": "^1.0.4",
|
||||
"karma-sinon": "^1.0.5",
|
||||
"leaflet": "^1.6.0",
|
||||
"mocha": "^6.2.2",
|
||||
"phantomjs-prebuilt": "^2.1.16",
|
||||
"prettier": "^1.19.1",
|
||||
"rollup": "^0.65.2",
|
||||
"rollup-plugin-uglify": "^5.0.2",
|
||||
"sinon": "^7.5.0",
|
||||
"uglify-js": "^3.7.5"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"open-location-code": "^1.0.0"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,44 +1,52 @@
|
||||
# Leaflet.extra-markers
|
||||
|
||||
<a href="https://github.com/lvoogdt/Leaflet.awesome-markers">Big Thanks to lvoogdt of Leaflet.awesome-markers</a>
|
||||
|
||||

|
||||
### <a href="http://coryasilva.github.io/Leaflet.ExtraMarkers/" target="_blank">Demo</a>
|
||||
|
||||
**<a href="http://coryasilva.github.io/Leaflet.ExtraMarkers/" target="_blank">Demo</a>**
|
||||
|
||||
## Icons
|
||||
Version 1.0 of Leaflet.extra-markers is designed for:
|
||||
|
||||
Leaflet.extra-markers is designed for:
|
||||
|
||||
- [Bootstrap 3 icons](http://twitter.github.com/bootstrap/)
|
||||
- [Getting Started Guide](http://getbootstrap.com/getting-started/)
|
||||
- [Font Awesome 4.0](http://fortawesome.github.com/Font-Awesome/)
|
||||
- [Getting Started Guide](http://fortawesome.github.io/Font-Awesome/get-started/)
|
||||
- [Semantic UI 0.9.8 icons](http://semantic-ui.com/)
|
||||
- [Ion Icons 2.0.1](http://ionicons.com/)
|
||||
- [Font Awesome 4.x](http://fortawesome.github.com/Font-Awesome/)
|
||||
- [Font Awesome 5.x](http://fortawesome.github.com/Font-Awesome/)
|
||||
- [Semantic UI 2.x icons](http://semantic-ui.com/)
|
||||
- [Ion Icons 2.x](http://ionicons.com/)
|
||||
- Leaflet 0.5-Latest
|
||||
|
||||
## Using the plugin
|
||||
|
||||
##### 1. Requirements #####
|
||||
### 1. Requirements
|
||||
|
||||
Follow the [getting started guide](#icons) for the desired font library and make sure its included in your project.
|
||||
|
||||
##### 2. Installing Leaflet.extra-markers #####
|
||||
### 2. Installing Leaflet.extra-markers
|
||||
|
||||
Next, copy the `dist/img` directory, `/dist/css/leaflet.extra-markers.min.css`, and `/dist/js/leaflet.extra-markers.min.js` to your project and include them:
|
||||
|
||||
````xml
|
||||
<link rel="stylesheet" href="css/leaflet.extra-markers.min.css">
|
||||
````
|
||||
|
||||
or
|
||||
|
||||
````less
|
||||
@import 'bower_components/src/assets/less/Leaflet.extra-markers.less
|
||||
````
|
||||
|
||||
and
|
||||
|
||||
````xml
|
||||
<script src="js/leaflet.extra-markers.min.js"></script>
|
||||
````
|
||||
|
||||
##### 3. Creating a Marker #####
|
||||
### 3. Creating a Marker
|
||||
|
||||
Now use the plugin to create a marker like this:
|
||||
|
||||
````js
|
||||
// Creates a red marker with the coffee icon
|
||||
var redMarker = L.ExtraMarkers.icon({
|
||||
@@ -50,20 +58,26 @@ Now use the plugin to create a marker like this:
|
||||
|
||||
L.marker([51.941196,4.512291], {icon: redMarker}).addTo(map);
|
||||
````
|
||||
|
||||
---
|
||||
|
||||
### Properties
|
||||
## Properties
|
||||
|
||||
| Property | Description | Default Value | Possible values |
|
||||
| --------------- | ------------------------------------------- | ------------- | ---------------------------------------------------- |
|
||||
| extraClasses | Additional classes in the created `<i>` tag | `''` | `fa-rotate90 myclass`; space delimited classes to add |
|
||||
| icon | Name of the icon **with** prefix | `''` | `fa-coffee` (see icon library's documentation) |
|
||||
| iconColor | Color of the icon | `'white'` | `'white'`, `'black'` or css code (hex, rgba etc) |
|
||||
| iconRotation | Rotates the icon with css transformations | `0` | numeric degrees
|
||||
| innerHTML | Custom HTML code | `''` | `<svg>`, images, or other HTML; a truthy assignment will override the default html icon creation behavior |
|
||||
| markerColor | Color of the marker (css class) | `'blue'` | `'red'`, `'orange-dark'`, `'orange'`, `'yellow'`, `'blue-dark'`, `'cyan'`, `'purple'`, `'violet'`, `'pink'`, `'green-dark'`, `'green'`, `'green-light'`, `'black'`, or `'white'` |
|
||||
| markerColor | Color of the marker (css class) | `'blue'` | `'red'`, `'orange-dark'`, `'orange'`, `'yellow'`, `'blue-dark'`, `'cyan'`, `'purple'`, `'violet'`, `'pink'`, `'green-dark'`, `'green'`, `'green-light'`, `'black'`, `'white'`, or color hex code **if `svg` is true** |
|
||||
| number | Instead of an icon, define a plain text | `''` | `'1'` or `'A'`, must set `icon: 'fa-number'` |
|
||||
| prefix | The icon library's base class | `'glyphicon'` | `fa` (see icon library's documentation) |
|
||||
| shape | Shape of the marker (css class) | `'circle'` | `'circle'`, `'square'`, `'star'`, or `'penta'` |
|
||||
| svg | Use SVG version | `false` | true or false
|
||||
| svgBorderColor | (DEPRECATED has not effect) | `'#fff'` | any valid hex color
|
||||
| svgOpacity | (DEPRECATED has not effect) | `1` | decimal range from 0 to 1
|
||||
|
||||
## License
|
||||
|
||||
- Leaflet.ExtraMarkers and colored markers are licensed under the MIT License - http://opensource.org/licenses/mit-license.html.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "Leaflet.extra-markers",
|
||||
"version": "1.0.8",
|
||||
"version": "1.2.1",
|
||||
"homepage": "https://github.com/coryasilva/Leaflet.ExtraMarkers",
|
||||
"authors": [
|
||||
"Cory Silva"
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,10 +1,10 @@
|
||||
/*!
|
||||
* Leaflet.extra-markers
|
||||
* leaflet-extra-markers
|
||||
* Custom Markers for Leaflet JS based on Awesome Markers
|
||||
* Leaflet ExtraMarkers
|
||||
* https://github.com/coryasilva/Leaflet.ExtraMarkers/
|
||||
* @author coryasilva <https://github.com/coryasilva>
|
||||
* @version 1.0.8
|
||||
* @version 1.2.1
|
||||
*/
|
||||
|
||||
(function (global, factory) {
|
||||
@@ -14,7 +14,7 @@
|
||||
}(this, (function (exports) { 'use strict';
|
||||
|
||||
var ExtraMarkers = L.ExtraMarkers = {};
|
||||
ExtraMarkers.version = L.ExtraMarkers.version = "1.0.8";
|
||||
ExtraMarkers.version = L.ExtraMarkers.version = "1.2.1";
|
||||
ExtraMarkers.Icon = L.ExtraMarkers.Icon = L.Icon.extend({
|
||||
options: {
|
||||
iconSize: [ 35, 45 ],
|
||||
@@ -32,6 +32,7 @@
|
||||
svgBorderColor: "#fff",
|
||||
svgOpacity: 1,
|
||||
iconColor: "#fff",
|
||||
iconRotate: 0,
|
||||
number: "",
|
||||
svg: false
|
||||
},
|
||||
@@ -56,28 +57,61 @@
|
||||
}
|
||||
return div;
|
||||
},
|
||||
_getColorHex: function (color) {
|
||||
var colorMap = {
|
||||
red: "#a23337",
|
||||
"orange-dark": "#d73e29",
|
||||
orange: "#ef9227",
|
||||
yellow: "#f5bb39",
|
||||
"blue-dark": "#276273",
|
||||
cyan: "#32a9dd",
|
||||
purple: "#440444",
|
||||
violet: "#90278d",
|
||||
pink: "#c057a0",
|
||||
green: "#006838",
|
||||
white: "#e8e8e8",
|
||||
black: "#211c1d"
|
||||
};
|
||||
return colorMap[color] || color;
|
||||
},
|
||||
_createSvg: function (shape, markerColor) {
|
||||
var svgMap = {
|
||||
circle: '<svg width="32" height="44" viewBox="0 0 35 45" xmlns="http://www.w3.org/2000/svg"><path d="M17.5 2.746c-8.284 0-15 6.853-15 15.307 0 .963.098 1.902.265 2.816a15.413 15.413 0 002.262 5.684l.134.193 12.295 17.785 12.439-17.863.056-.08a15.422 15.422 0 002.343-6.112c.123-.791.206-1.597.206-2.423 0-8.454-6.716-15.307-15-15.307" fill="' + markerColor + '" /><path d="M17.488 2.748c-8.284 0-15 6.853-15 15.307 0 .963.098 1.902.265 2.816a15.413 15.413 0 002.262 5.684l.134.193 12.295 17.785 12.44-17.863.055-.08a15.422 15.422 0 002.343-6.112c.124-.791.206-1.597.206-2.423 0-8.454-6.716-15.307-15-15.307m0 1.071c7.68 0 13.929 6.386 13.929 14.236 0 .685-.064 1.423-.193 2.258-.325 2.075-1.059 3.99-2.164 5.667l-.055.078-11.557 16.595L6.032 26.14l-.12-.174a14.256 14.256 0 01-2.105-5.29 14.698 14.698 0 01-.247-2.62c0-7.851 6.249-14.237 13.928-14.237" fill="#231f20" opacity=".15" /></svg>',
|
||||
square: '<svg width="33" height="44" viewBox="0 0 35 45" xmlns="http://www.w3.org/2000/svg"><path d="M28.205 3.217H6.777c-2.367 0-4.286 1.87-4.286 4.179v19.847c0 2.308 1.919 4.179 4.286 4.179h5.357l5.337 13.58 5.377-13.58h5.357c2.366 0 4.285-1.87 4.285-4.179V7.396c0-2.308-1.919-4.179-4.285-4.179" fill="' + markerColor + '" /><g opacity=".15" transform="matrix(1.0714 0 0 -1.0714 -233.22 146.783)"><path d="M244 134h-20c-2.209 0-4-1.746-4-3.9v-18.525c0-2.154 1.791-3.9 4-3.9h5L233.982 95 239 107.675h5c2.209 0 4 1.746 4 3.9V130.1c0 2.154-1.791 3.9-4 3.9m0-1c1.654 0 3-1.301 3-2.9v-18.525c0-1.599-1.346-2.9-3-2.9h-5.68l-.25-.632-4.084-10.318-4.055 10.316-.249.634H224c-1.654 0-3 1.301-3 2.9V130.1c0 1.599 1.346 2.9 3 2.9h20" fill="#231f20" /></g></svg>',
|
||||
star: '<svg width="34" height="44" viewBox="0 0 35 45" xmlns="http://www.w3.org/2000/svg"><path d="M32.92 16.93l-3.525-3.525V8.419a1.983 1.983 0 00-1.983-1.982h-4.985L18.9 2.91a1.984 1.984 0 00-2.803 0l-3.524 3.526H7.588a1.983 1.983 0 00-1.982 1.982v4.986L2.081 16.93a1.982 1.982 0 000 2.803l3.525 3.526v4.984c0 1.096.888 1.983 1.982 1.983h4.986L17.457 45l4.97-14.773h4.985a1.983 1.983 0 001.983-1.983V23.26l3.525-3.526a1.982 1.982 0 000-2.803" fill="' + markerColor + '" /><g opacity=".15" transform="matrix(1.0667 0 0 -1.0667 -347.3 97.26)"><path d="M342 89c-.476 0-.951-.181-1.314-.544l-3.305-3.305h-4.673a1.858 1.858 0 01-1.859-1.858v-4.674l-3.305-3.305a1.857 1.857 0 010-2.627l3.305-3.305v-4.674a1.86 1.86 0 011.859-1.859h4.673L341.959 49l4.659 13.849h4.674a1.86 1.86 0 011.859 1.859v4.674l3.305 3.305a1.858 1.858 0 010 2.627l-3.305 3.305v4.674a1.859 1.859 0 01-1.859 1.858h-4.674l-3.304 3.305A1.851 1.851 0 01342 89m0-1a.853.853 0 00.607-.251l3.304-3.305.293-.293h5.088a.86.86 0 00.859-.858v-5.088l3.598-3.598A.852.852 0 00356 74a.85.85 0 00-.251-.606l-3.598-3.598v-5.088a.86.86 0 00-.859-.859h-5.393l-.229-.681-3.702-11.006-3.637 11.001-.227.686h-5.396a.86.86 0 00-.859.859v5.088l-3.598 3.598c-.162.162-.251.377-.251.606s.089.445.251.607l3.598 3.598v5.088a.86.86 0 00.859.858h5.087l3.598 3.598A.853.853 0 00342 88" fill="#231f20" /></g></svg>',
|
||||
penta: '<svg width="33" height="44" viewBox="0 0 35 45" xmlns="http://www.w3.org/2000/svg"><path d="M1.872 17.35L9.679 2.993h15.615L33.1 17.35 17.486 44.992z" fill="' + markerColor + '" /><g opacity=".15" transform="matrix(1.0769 0 0 -1.0769 -272.731 48.23)"><path d="M276.75 42h-14.5L255 28.668 269.5 3 284 28.668zm-.595-1l6.701-12.323L269.5 5.033l-13.356 23.644L262.845 41z" fill="#231f20" /></g></svg>'
|
||||
};
|
||||
return svgMap[shape];
|
||||
},
|
||||
_createInner: function() {
|
||||
var iconColorStyle = "", iconNumber = "", options = this.options;
|
||||
var iconStyle = "", iconNumber = "", iconClass = "", result = "", options = this.options;
|
||||
if (options.iconColor) {
|
||||
iconColorStyle = "style='color: " + options.iconColor + "' ";
|
||||
iconStyle = "color: " + options.iconColor + ";";
|
||||
}
|
||||
if (options.iconRotate !== 0) {
|
||||
iconStyle += "-webkit-transform: rotate(" + options.iconRotate + "deg);";
|
||||
iconStyle += "-moz-transform: rotate(" + options.iconRotate + "deg);";
|
||||
iconStyle += "-o-transform: rotate(" + options.iconRotate + "deg);";
|
||||
iconStyle += "-ms-transform: rotate(" + options.iconRotate + "deg);";
|
||||
iconStyle += "transform: rotate(" + options.iconRotate + "deg);";
|
||||
}
|
||||
if (options.number) {
|
||||
iconNumber = "number='" + options.number + "' ";
|
||||
iconNumber = 'number="' + options.number + '" ';
|
||||
}
|
||||
if (options.extraClasses.length) {
|
||||
iconClass += options.extraClasses + " ";
|
||||
}
|
||||
if (options.prefix.length) {
|
||||
iconClass += options.prefix + " ";
|
||||
}
|
||||
if (options.icon.length) {
|
||||
iconClass += options.icon + " ";
|
||||
}
|
||||
if (options.svg) {
|
||||
var svg = '<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 69.529271 95.44922" style="fill:' + options.markerColor + ";stroke:" + options.svgBorderColor + ";fill-opacity:" + options.svgOpacity + ';" height="100%" width="100%" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"><g transform="translate(-139.52 -173.21)"><path d="m174.28 173.21c-19.199 0.00035-34.764 15.355-34.764 34.297 0.007 6.7035 1.5591 12.813 5.7461 18.854l0.0234 0.0371 28.979 42.262 28.754-42.107c3.1982-5.8558 5.9163-11.544 6.0275-19.045-0.0001-18.942-15.565-34.298-34.766-34.297z"/></g></svg>';
|
||||
if (options.shape === "square") {
|
||||
svg = '<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 69.457038 96.523441" style="fill:' + options.markerColor + ";stroke:" + options.svgBorderColor + ";fill-opacity:" + options.svgOpacity + ';" height="100%" width="100%" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"><g transform="translate(-545.27 -658.39)"><path d="m545.27 658.39v65.301h22.248l12.48 31.223 12.676-31.223h22.053v-65.301h-69.457z"/></g></svg>';
|
||||
}
|
||||
if (options.shape === "star") {
|
||||
svg = '<svg style="top:0; fill:' + options.markerColor + ";stroke:" + options.svgBorderColor + ";fill-opacity:" + options.svgOpacity + ';" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="100%" width="100%" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" viewBox="0 0 77.690999 101.4702"><g transform="translate(-101.15 -162.97)"><g transform="matrix(1 0 0 1.0165 -65.712 -150.28)"><path d="m205.97 308.16-11.561 11.561h-16.346v16.346l-11.197 11.197 11.197 11.197v15.83h15.744l11.615 33.693 11.467-33.568 0.125-0.125h16.346v-16.346l11.197-11.197-11.197-11.197v-15.83h-15.83l-11.561-11.561z"/></g></g></svg>';
|
||||
}
|
||||
if (options.shape === "penta") {
|
||||
svg = '<svg style="fill:' + options.markerColor + ";stroke:" + options.svgBorderColor + ";fill-opacity:" + options.svgOpacity + ';" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 71.550368 96.362438" height="100%" width="100%" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"><g transform="translate(-367.08 -289.9)"><path d="m367.08 322.5 17.236-32.604h36.151l18.164 32.25-35.665 64.112z"/></g></svg>';
|
||||
}
|
||||
return svg + "<i " + iconNumber + iconColorStyle + "class='" + options.extraClasses + " " + options.prefix + " " + options.icon + "'></i>";
|
||||
result += this._createSvg(options.shape, this._getColorHex(options.markerColor));
|
||||
}
|
||||
return "<i " + iconNumber + iconColorStyle + "class='" + options.extraClasses + " " + options.prefix + " " + options.icon + "'></i>";
|
||||
result += '<i ' + iconNumber + 'style="' + iconStyle + '" class="' + iconClass + '"></i>';
|
||||
return result;
|
||||
},
|
||||
_setIconStyles: function(img, name) {
|
||||
var options = this.options, size = L.point(options[name === "shadow" ? "shadowSize" : "iconSize"]), anchor, leafletName;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -9,6 +9,8 @@ declare module "leaflet" {
|
||||
icon?: string;
|
||||
/** Color of the icon. Default value 'white'. */
|
||||
iconColor?: string;
|
||||
/** Rotates the icon with css transformations. Default value 0. */
|
||||
iconRotation?: number;
|
||||
/** Custom HTML code. */
|
||||
innerHTML?: string;
|
||||
/** Color of the marker (css class). Default value 'blue'. */
|
||||
@@ -20,6 +22,12 @@ declare module "leaflet" {
|
||||
prefix?: string;
|
||||
/** Shape of the marker (css class). Default value 'circle'. */
|
||||
shape?: "circle" | "square" | "star" | "penta";
|
||||
/** Use SVG version of marker. Default value false. */
|
||||
svg?: boolean;
|
||||
/** DEPRECATED No Effect. Default value '#fff'. */
|
||||
svgBorderColor?: string;
|
||||
/** DEPRECATED: No effect. Default value 1. */
|
||||
svgOpacity?: number;
|
||||
}
|
||||
|
||||
export class Icon extends L.Icon {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"name": "Leaflet.extra-markers",
|
||||
"name": "leaflet-extra-markers",
|
||||
"title": "Leaflet ExtraMarkers",
|
||||
"url": "https://github.com/coryasilva/Leaflet.ExtraMarkers/",
|
||||
"version": "1.0.8",
|
||||
"version": "1.2.1",
|
||||
"description": "Custom Markers for Leaflet JS based on Awesome Markers",
|
||||
"author": "coryasilva <https://github.com/coryasilva>",
|
||||
"repository": {
|
||||
@@ -11,18 +11,22 @@
|
||||
},
|
||||
"main": "dist/js/leaflet.extra-markers.js",
|
||||
"types": "dist/leaflet.extra-markers.d.ts",
|
||||
"scripts": {
|
||||
"start": "grunt",
|
||||
"build": "grunt build"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"leaflet": ">= 0.5 < 2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"git-rev-sync": "^1.10.0",
|
||||
"grunt": "^1.0.2",
|
||||
"git-rev-sync": "^1.12.0",
|
||||
"grunt": "^1.0.4",
|
||||
"grunt-contrib-jshint": "^1.1.0",
|
||||
"grunt-contrib-less": "^1.4.1",
|
||||
"grunt-contrib-uglify": "^3.3.0",
|
||||
"grunt-contrib-uglify": "^3.4.0",
|
||||
"grunt-rollup": "^9.0.0",
|
||||
"less-plugin-autoprefix": "^1.5.1",
|
||||
"rollup-plugin-git-version": "^0.2.1",
|
||||
"rollup-plugin-git-version": "^0.3.1",
|
||||
"time-grunt": "^1.4.0"
|
||||
}
|
||||
}
|
||||
|
||||
48
assets/leaflet-fullscreen/Control.FullScreen.js
vendored
48
assets/leaflet-fullscreen/Control.FullScreen.js
vendored
@@ -26,32 +26,53 @@ L.Control.FullScreen = L.Control.extend({
|
||||
}
|
||||
|
||||
this._createButton(this.options.title, className, content, container, this.toggleFullScreen, this);
|
||||
this._map.fullscreenControl = this;
|
||||
|
||||
this._map.on('enterFullscreen exitFullscreen', this._toggleTitle, this);
|
||||
|
||||
return container;
|
||||
},
|
||||
|
||||
onRemove: function (map) {
|
||||
L.DomEvent
|
||||
.off(this.link, 'click', L.DomEvent.stopPropagation)
|
||||
.off(this.link, 'click', L.DomEvent.preventDefault)
|
||||
.off(this.link, 'click', this.toggleFullScreen, this);
|
||||
|
||||
L.DomEvent
|
||||
.off(this._container, fullScreenApi.fullScreenEventName, L.DomEvent.stopPropagation)
|
||||
.off(this._container, fullScreenApi.fullScreenEventName, L.DomEvent.preventDefault)
|
||||
.off(this._container, fullScreenApi.fullScreenEventName, this._handleFullscreenChange, this);
|
||||
|
||||
L.DomEvent
|
||||
.off(document, fullScreenApi.fullScreenEventName, L.DomEvent.stopPropagation)
|
||||
.off(document, fullScreenApi.fullScreenEventName, L.DomEvent.preventDefault)
|
||||
.off(document, fullScreenApi.fullScreenEventName, this._handleFullscreenChange, this);
|
||||
},
|
||||
|
||||
_createButton: function (title, className, content, container, fn, context) {
|
||||
this.link = L.DomUtil.create('a', className, container);
|
||||
this.link.href = '#';
|
||||
this.link.title = title;
|
||||
this.link.innerHTML = content;
|
||||
|
||||
this.link.setAttribute('role', 'button');
|
||||
this.link.setAttribute('aria-label', title);
|
||||
|
||||
L.DomEvent
|
||||
.addListener(this.link, 'click', L.DomEvent.stopPropagation)
|
||||
.addListener(this.link, 'click', L.DomEvent.preventDefault)
|
||||
.addListener(this.link, 'click', fn, context);
|
||||
.on(this.link, 'click', L.DomEvent.stopPropagation)
|
||||
.on(this.link, 'click', L.DomEvent.preventDefault)
|
||||
.on(this.link, 'click', fn, context);
|
||||
|
||||
L.DomEvent
|
||||
.addListener(container, fullScreenApi.fullScreenEventName, L.DomEvent.stopPropagation)
|
||||
.addListener(container, fullScreenApi.fullScreenEventName, L.DomEvent.preventDefault)
|
||||
.addListener(container, fullScreenApi.fullScreenEventName, this._handleFullscreenChange, context);
|
||||
.on(container, fullScreenApi.fullScreenEventName, L.DomEvent.stopPropagation)
|
||||
.on(container, fullScreenApi.fullScreenEventName, L.DomEvent.preventDefault)
|
||||
.on(container, fullScreenApi.fullScreenEventName, this._handleFullscreenChange, context);
|
||||
|
||||
L.DomEvent
|
||||
.addListener(document, fullScreenApi.fullScreenEventName, L.DomEvent.stopPropagation)
|
||||
.addListener(document, fullScreenApi.fullScreenEventName, L.DomEvent.preventDefault)
|
||||
.addListener(document, fullScreenApi.fullScreenEventName, this._handleFullscreenChange, context);
|
||||
.on(document, fullScreenApi.fullScreenEventName, L.DomEvent.stopPropagation)
|
||||
.on(document, fullScreenApi.fullScreenEventName, L.DomEvent.preventDefault)
|
||||
.on(document, fullScreenApi.fullScreenEventName, this._handleFullscreenChange, context);
|
||||
|
||||
return this.link;
|
||||
},
|
||||
@@ -95,10 +116,15 @@ L.Control.FullScreen = L.Control.extend({
|
||||
}
|
||||
});
|
||||
|
||||
L.Map.include({
|
||||
toggleFullscreen: function () {
|
||||
this.fullscreenControl.toggleFullScreen();
|
||||
}
|
||||
});
|
||||
|
||||
L.Map.addInitHook(function () {
|
||||
if (this.options.fullscreenControl) {
|
||||
this.fullscreenControl = L.control.fullscreen(this.options.fullscreenControlOptions);
|
||||
this.addControl(this.fullscreenControl);
|
||||
this.addControl(L.control.fullscreen(this.options.fullscreenControlOptions));
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
!function(){L.Control.FullScreen=L.Control.extend({options:{position:"topleft",title:"Full Screen",titleCancel:"Exit Full Screen",forceSeparateButton:!1,forcePseudoFullscreen:!1,fullscreenElement:!1},onAdd:function(e){var n,t="leaflet-control-zoom-fullscreen",l="";return n=e.zoomControl&&!this.options.forceSeparateButton?e.zoomControl._container:L.DomUtil.create("div","leaflet-bar"),this.options.content?l=this.options.content:t+=" fullscreen-icon",this._createButton(this.options.title,t,l,n,this.toggleFullScreen,this),this._map.on("enterFullscreen exitFullscreen",this._toggleTitle,this),n},_createButton:function(e,n,t,l,r,i){return this.link=L.DomUtil.create("a",n,l),this.link.href="#",this.link.title=e,this.link.innerHTML=t,L.DomEvent.addListener(this.link,"click",L.DomEvent.stopPropagation).addListener(this.link,"click",L.DomEvent.preventDefault).addListener(this.link,"click",r,i),L.DomEvent.addListener(l,s.fullScreenEventName,L.DomEvent.stopPropagation).addListener(l,s.fullScreenEventName,L.DomEvent.preventDefault).addListener(l,s.fullScreenEventName,this._handleFullscreenChange,i),L.DomEvent.addListener(document,s.fullScreenEventName,L.DomEvent.stopPropagation).addListener(document,s.fullScreenEventName,L.DomEvent.preventDefault).addListener(document,s.fullScreenEventName,this._handleFullscreenChange,i),this.link},toggleFullScreen:function(){var e=this._map;e._exitFired=!1,e._isFullscreen?(s.supportsFullScreen&&!this.options.forcePseudoFullscreen?s.cancelFullScreen():L.DomUtil.removeClass(this.options.fullscreenElement?this.options.fullscreenElement:e._container,"leaflet-pseudo-fullscreen"),e.fire("exitFullscreen"),e._exitFired=!0,e._isFullscreen=!1):(s.supportsFullScreen&&!this.options.forcePseudoFullscreen?s.requestFullScreen(this.options.fullscreenElement?this.options.fullscreenElement:e._container):L.DomUtil.addClass(this.options.fullscreenElement?this.options.fullscreenElement:e._container,"leaflet-pseudo-fullscreen"),e.fire("enterFullscreen"),e._isFullscreen=!0)},_toggleTitle:function(){this.link.title=this._map._isFullscreen?this.options.title:this.options.titleCancel},_handleFullscreenChange:function(){var e=this._map;e.invalidateSize(),s.isFullScreen()||e._exitFired||(e.fire("exitFullscreen"),e._exitFired=!0,e._isFullscreen=!1)}}),L.Map.addInitHook(function(){this.options.fullscreenControl&&(this.fullscreenControl=L.control.fullscreen(this.options.fullscreenControlOptions),this.addControl(this.fullscreenControl))});var s={supportsFullScreen:!(L.control.fullscreen=function(e){return new L.Control.FullScreen(e)}),isFullScreen:function(){return!1},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",prefix:""},e="webkit moz o ms khtml".split(" ");if(void 0!==document.exitFullscreen)s.supportsFullScreen=!0;else{for(var n=0,t=e.length;n<t;n++)if(s.prefix=e[n],void 0!==document[s.prefix+"CancelFullScreen"]){s.supportsFullScreen=!0;break}void 0!==document.msExitFullscreen&&(s.prefix="ms",s.supportsFullScreen=!0)}s.supportsFullScreen&&("ms"===s.prefix?s.fullScreenEventName="MSFullscreenChange":s.fullScreenEventName=s.prefix+"fullscreenchange",s.isFullScreen=function(){switch(this.prefix){case"":return document.fullscreen;case"webkit":return document.webkitIsFullScreen;case"ms":return document.msFullscreenElement;default:return document[this.prefix+"FullScreen"]}},s.requestFullScreen=function(e){switch(this.prefix){case"":return e.requestFullscreen();case"ms":return e.msRequestFullscreen();default:return e[this.prefix+"RequestFullScreen"]()}},s.cancelFullScreen=function(){switch(this.prefix){case"":return document.exitFullscreen();case"ms":return document.msExitFullscreen();default:return document[this.prefix+"CancelFullScreen"]()}}),"undefined"!=typeof jQuery&&(jQuery.fn.requestFullScreen=function(){return this.each(function(){var e=jQuery(this);s.supportsFullScreen&&s.requestFullScreen(e)})}),window.fullScreenApi=s}();
|
||||
!function(){L.Control.FullScreen=L.Control.extend({options:{position:"topleft",title:"Full Screen",titleCancel:"Exit Full Screen",forceSeparateButton:!1,forcePseudoFullscreen:!1,fullscreenElement:!1},onAdd:function(e){var n="leaflet-control-zoom-fullscreen",t="",e=e.zoomControl&&!this.options.forceSeparateButton?e.zoomControl._container:L.DomUtil.create("div","leaflet-bar");return this.options.content?t=this.options.content:n+=" fullscreen-icon",this._createButton(this.options.title,n,t,e,this.toggleFullScreen,this),(this._map.fullscreenControl=this)._map.on("enterFullscreen exitFullscreen",this._toggleTitle,this),e},onRemove:function(e){L.DomEvent.off(this.link,"click",L.DomEvent.stopPropagation).off(this.link,"click",L.DomEvent.preventDefault).off(this.link,"click",this.toggleFullScreen,this),L.DomEvent.off(this._container,i.fullScreenEventName,L.DomEvent.stopPropagation).off(this._container,i.fullScreenEventName,L.DomEvent.preventDefault).off(this._container,i.fullScreenEventName,this._handleFullscreenChange,this),L.DomEvent.off(document,i.fullScreenEventName,L.DomEvent.stopPropagation).off(document,i.fullScreenEventName,L.DomEvent.preventDefault).off(document,i.fullScreenEventName,this._handleFullscreenChange,this)},_createButton:function(e,n,t,l,r,o){return this.link=L.DomUtil.create("a",n,l),this.link.href="#",this.link.title=e,this.link.innerHTML=t,this.link.setAttribute("role","button"),this.link.setAttribute("aria-label",e),L.DomEvent.on(this.link,"click",L.DomEvent.stopPropagation).on(this.link,"click",L.DomEvent.preventDefault).on(this.link,"click",r,o),L.DomEvent.on(l,i.fullScreenEventName,L.DomEvent.stopPropagation).on(l,i.fullScreenEventName,L.DomEvent.preventDefault).on(l,i.fullScreenEventName,this._handleFullscreenChange,o),L.DomEvent.on(document,i.fullScreenEventName,L.DomEvent.stopPropagation).on(document,i.fullScreenEventName,L.DomEvent.preventDefault).on(document,i.fullScreenEventName,this._handleFullscreenChange,o),this.link},toggleFullScreen:function(){var e=this._map;e._exitFired=!1,e._isFullscreen?(i.supportsFullScreen&&!this.options.forcePseudoFullscreen?i.cancelFullScreen():L.DomUtil.removeClass(this.options.fullscreenElement||e._container,"leaflet-pseudo-fullscreen"),e.fire("exitFullscreen"),e._exitFired=!0,e._isFullscreen=!1):(i.supportsFullScreen&&!this.options.forcePseudoFullscreen?i.requestFullScreen(this.options.fullscreenElement||e._container):L.DomUtil.addClass(this.options.fullscreenElement||e._container,"leaflet-pseudo-fullscreen"),e.fire("enterFullscreen"),e._isFullscreen=!0)},_toggleTitle:function(){this.link.title=this._map._isFullscreen?this.options.title:this.options.titleCancel},_handleFullscreenChange:function(){var e=this._map;e.invalidateSize(),i.isFullScreen()||e._exitFired||(e.fire("exitFullscreen"),e._exitFired=!0,e._isFullscreen=!1)}}),L.Map.include({toggleFullscreen:function(){this.fullscreenControl.toggleFullScreen()}}),L.Map.addInitHook(function(){this.options.fullscreenControl&&this.addControl(L.control.fullscreen(this.options.fullscreenControlOptions))});var i={supportsFullScreen:!(L.control.fullscreen=function(e){return new L.Control.FullScreen(e)}),isFullScreen:function(){return!1},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",prefix:""},e="webkit moz o ms khtml".split(" ");if(void 0!==document.exitFullscreen)i.supportsFullScreen=!0;else{for(var n=0,t=e.length;n<t;n++)if(i.prefix=e[n],void 0!==document[i.prefix+"CancelFullScreen"]){i.supportsFullScreen=!0;break}void 0!==document.msExitFullscreen&&(i.prefix="ms",i.supportsFullScreen=!0)}i.supportsFullScreen&&("ms"===i.prefix?i.fullScreenEventName="MSFullscreenChange":i.fullScreenEventName=i.prefix+"fullscreenchange",i.isFullScreen=function(){switch(this.prefix){case"":return document.fullscreen;case"webkit":return document.webkitIsFullScreen;case"ms":return document.msFullscreenElement;default:return document[this.prefix+"FullScreen"]}},i.requestFullScreen=function(e){switch(this.prefix){case"":return e.requestFullscreen();case"ms":return e.msRequestFullscreen();default:return e[this.prefix+"RequestFullScreen"]()}},i.cancelFullScreen=function(){switch(this.prefix){case"":return document.exitFullscreen();case"ms":return document.msExitFullscreen();default:return document[this.prefix+"CancelFullScreen"]()}}),"undefined"!=typeof jQuery&&(jQuery.fn.requestFullScreen=function(){return this.each(function(){var e=jQuery(this);i.supportsFullScreen&&i.requestFullScreen(e)})}),window.fullScreenApi=i}();
|
||||
@@ -61,6 +61,9 @@ map.on('enterFullscreen', function(){
|
||||
map.on('exitFullscreen', function(){
|
||||
console.log('exited fullscreen');
|
||||
});
|
||||
|
||||
// you can also toggle fullscreen from map object
|
||||
map.toggleFullScreen();
|
||||
```
|
||||
|
||||
Where ?
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"name": "leaflet.fullscreen",
|
||||
"version": "1.4.5",
|
||||
"homepage": "https://github.com/brunob/leaflet.fullscreen",
|
||||
"license": "MIT",
|
||||
"authors": [
|
||||
"brunob <brunobergot@gmail.com>"
|
||||
],
|
||||
"description": "Leaflet.Control.FullScreen for Leaflet",
|
||||
"main": [
|
||||
"Control.FullScreen.js",
|
||||
"Control.FullScreen.css",
|
||||
"icon-fullscreen.png",
|
||||
"icon-fullscreen-2x.png"
|
||||
],
|
||||
"devDependencies": {
|
||||
"eslint": "2.3.0"
|
||||
},
|
||||
"keywords": [
|
||||
"leaflet",
|
||||
"plugins",
|
||||
"maps",
|
||||
"fullscreen"
|
||||
],
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests",
|
||||
"index.html"
|
||||
]
|
||||
}
|
||||
@@ -3,18 +3,19 @@
|
||||
<head>
|
||||
<meta charset='utf-8'>
|
||||
<title>Leaflet.Control.FullScreen Demo</title>
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" />
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.5.1/dist/leaflet.css" />
|
||||
<style type="text/css">
|
||||
#map { width: 700px; height: 433px; }
|
||||
.fullscreen-icon { background-image: url(icon-fullscreen.png); }
|
||||
.leaflet-retina .fullscreen-icon { background-image: url(icon-fullscreen-2x.png); background-size: 26px 26px; }
|
||||
/* one selector per rule as explained here : http://www.sitepoint.com/html5-full-screen-api/ */
|
||||
#map:-webkit-full-screen { width: 100% !important; height: 100% !important; z-index: 99999; }
|
||||
#map:-ms-fullscreen { width: 100% !important; height: 100% !important; z-index: 99999; }
|
||||
#map:full-screen { width: 100% !important; height: 100% !important; z-index: 99999; }
|
||||
#map:fullscreen { width: 100% !important; height: 100% !important; z-index: 99999; }
|
||||
.leaflet-container:-webkit-full-screen { width: 100% !important; height: 100% !important; z-index: 99999; }
|
||||
.leaflet-container:-ms-fullscreen { width: 100% !important; height: 100% !important; z-index: 99999; }
|
||||
.leaflet-container:full-screen { width: 100% !important; height: 100% !important; z-index: 99999; }
|
||||
.leaflet-container:fullscreen { width: 100% !important; height: 100% !important; z-index: 99999; }
|
||||
.leaflet-pseudo-fullscreen { position: fixed !important; width: 100% !important; height: 100% !important; top: 0px !important; left: 0px !important; z-index: 99999; }
|
||||
</style>
|
||||
<script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script>
|
||||
<script src="https://unpkg.com/leaflet@1.5.1/dist/leaflet.js"></script>
|
||||
<script src="Control.FullScreen.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
@@ -22,13 +23,13 @@
|
||||
<div id="map"></div>
|
||||
|
||||
<script>
|
||||
var base = new L.TileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
|
||||
var base = L.tileLayer('https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
|
||||
maxZoom: 19,
|
||||
subdomains: 'abcd',
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> © <a href="http://cartodb.com/attributions">CartoDB</a>'
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/attributions">CARTO</a>',
|
||||
});
|
||||
|
||||
var map = new L.Map('map', {
|
||||
var map = L.map('map', {
|
||||
layers: [base],
|
||||
center: new L.LatLng(48.5, -4.5),
|
||||
zoom: 5,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "leaflet.fullscreen",
|
||||
"version": "1.4.5",
|
||||
"version": "1.6.0",
|
||||
"description": "Simple plugin for Leaflet that adds fullscreen button to your maps.",
|
||||
"main": "Control.FullScreen.js",
|
||||
"scripts": {
|
||||
@@ -17,7 +17,7 @@
|
||||
"fullscreen"
|
||||
],
|
||||
"devDependencies": {
|
||||
"eslint": "2.3.0"
|
||||
"eslint": "^5.4.0"
|
||||
},
|
||||
"author": "b_b",
|
||||
"license": "MIT License",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -48,8 +48,8 @@ removed link to h1 and indented back 2 spaces all links.
|
||||
|
||||
## Using the plugin
|
||||
Include the plugin CSS and JS files on your page after Leaflet files, using your method of choice:
|
||||
* [Download the `v1.4.0` release](https://github.com/Leaflet/Leaflet.markercluster/archive/v1.4.0.zip)
|
||||
* Use unpkg CDN: `https://unpkg.com/leaflet.markercluster@1.4.0/dist/`
|
||||
* [Download the `v1.4.1` release](https://github.com/Leaflet/Leaflet.markercluster/archive/v1.4.1.zip)
|
||||
* Use unpkg CDN: `https://unpkg.com/leaflet.markercluster@1.4.1/dist/`
|
||||
* Install with npm: `npm install leaflet.markercluster`
|
||||
|
||||
In each case, use files in the `dist` folder:
|
||||
@@ -256,7 +256,7 @@ markers.on('clusterclick', function (a) {
|
||||
|
||||
#### Other clusters methods
|
||||
* **getChildCount**: Returns the total number of markers contained within that cluster.
|
||||
* **getAllChildMarkers**: Returns the array of total markers contained within that cluster.
|
||||
* **getAllChildMarkers(storage: array | undefined, ignoreDraggedMarker: boolean | undefined)**: Returns an array of all markers contained within this cluster (storage will be used if provided). If ignoreDraggedMarker is true and there is currently a marker dragged, the dragged marker will not be included in the array.
|
||||
* **spiderfy**: Spiderfies the child markers of this cluster
|
||||
* **unspiderfy**: Unspiderfies a cluster (opposite of spiderfy)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Leaflet.markercluster 1.4.0+master.458cf75,
|
||||
* Leaflet.markercluster 1.4.1+master.37ab9a2,
|
||||
* Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps.
|
||||
* https://github.com/Leaflet/Leaflet.markercluster
|
||||
* (c) 2012-2017, Dave Leaver, smartrak
|
||||
@@ -720,10 +720,11 @@ var MarkerClusterGroup = L.MarkerClusterGroup = L.FeatureGroup.extend({
|
||||
},
|
||||
|
||||
_childMarkerDragEnd: function (e) {
|
||||
if (e.target.__dragStart) {
|
||||
this._moveChild(e.target, e.target.__dragStart, e.target._latlng);
|
||||
}
|
||||
var dragStart = e.target.__dragStart;
|
||||
delete e.target.__dragStart;
|
||||
if (dragStart) {
|
||||
this._moveChild(e.target, dragStart, e.target._latlng);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -1412,7 +1413,7 @@ var MarkerCluster = L.MarkerCluster = L.Marker.extend({
|
||||
},
|
||||
|
||||
//Recursively retrieve all child markers of this cluster
|
||||
getAllChildMarkers: function (storageArray) {
|
||||
getAllChildMarkers: function (storageArray, ignoreDraggedMarker) {
|
||||
storageArray = storageArray || [];
|
||||
|
||||
for (var i = this._childClusters.length - 1; i >= 0; i--) {
|
||||
@@ -1420,6 +1421,9 @@ var MarkerCluster = L.MarkerCluster = L.Marker.extend({
|
||||
}
|
||||
|
||||
for (var j = this._markers.length - 1; j >= 0; j--) {
|
||||
if (ignoreDraggedMarker && this._markers[j].__dragStart) {
|
||||
continue;
|
||||
}
|
||||
storageArray.push(this._markers[j]);
|
||||
}
|
||||
|
||||
@@ -2113,7 +2117,7 @@ L.MarkerCluster.include({
|
||||
return;
|
||||
}
|
||||
|
||||
var childMarkers = this.getAllChildMarkers(),
|
||||
var childMarkers = this.getAllChildMarkers(null, true),
|
||||
group = this._group,
|
||||
map = group._map,
|
||||
center = map.latLngToLayerPoint(this._latlng),
|
||||
@@ -2191,7 +2195,7 @@ L.MarkerCluster.include({
|
||||
var group = this._group,
|
||||
map = group._map,
|
||||
fg = group._featureGroup,
|
||||
childMarkers = this.getAllChildMarkers(),
|
||||
childMarkers = this.getAllChildMarkers(null, true),
|
||||
m, i;
|
||||
|
||||
group._ignoreMove = true;
|
||||
@@ -2384,7 +2388,7 @@ L.MarkerCluster.include({
|
||||
map = group._map,
|
||||
fg = group._featureGroup,
|
||||
thisLayerPos = zoomDetails ? map._latLngToNewLayerPoint(this._latlng, zoomDetails.zoom, zoomDetails.center) : map.latLngToLayerPoint(this._latlng),
|
||||
childMarkers = this.getAllChildMarkers(),
|
||||
childMarkers = this.getAllChildMarkers(null, true),
|
||||
svg = L.Path.SVG,
|
||||
m, i, leg, legPath, legLength, nonAnimatable;
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "leaflet.markercluster",
|
||||
"repository": "https://github.com/Leaflet/Leaflet.markercluster",
|
||||
"version": "1.4.0",
|
||||
"version": "1.4.1",
|
||||
"description": "Provides Beautiful Animated Marker Clustering functionality for Leaflet",
|
||||
"devDependencies": {
|
||||
"git-rev-sync": "^1.8.0",
|
||||
|
||||
@@ -1,31 +1,110 @@
|
||||
|
||||
# Leaflet-providers changelog
|
||||
|
||||
## 1.13.0 (2021-10-19)
|
||||
- Add Azure Maps Tiles provider [#384](https://github.com/leaflet-extras/leaflet-providers/pull/384)
|
||||
- Fix nlmaps attribution link [#386](https://github.com/leaflet-extras/leaflet-providers/pull/386)
|
||||
- Update nlmaps.luchtfoto tiles url [#390](https://github.com/leaflet-extras/leaflet-providers/pull/390)
|
||||
- Update NASAGIBS.ModisTerraSnowCover tiles url [#391](https://github.com/leaflet-extras/leaflet-providers/pull/391)
|
||||
- Upgrade dependencies, add dependabot for npm/github actions [#392](https://github.com/leaflet-extras/leaflet-providers/pull/392)
|
||||
- Switch JusticeMap and OpenAIP to https, remove GeoportailFrance.ignMaps from index.html [#393](https://github.com/leaflet-extras/leaflet-providers/pull/393)
|
||||
- Replace OpenPtMap overlay by OPNVKarte layer [#396](https://github.com/Replace OpenPtMap overlay by OPNVKarte layer/pull/396)
|
||||
- Updated maxzoom for CartoDB [#403](https://github.com/leaflet-extras/leaflet-providers/pull/403)
|
||||
- Multiple dependencies updated by @dependabot
|
||||
|
||||
## 1.12.0 (2021-04-02)
|
||||
- Add OpenAIP map provider [#374](https://github.com/leaflet-extras/leaflet-providers/pull/374)
|
||||
- Migrate from travis to github actions [#375](https://github.com/leaflet-extras/leaflet-providers/pull/375)
|
||||
- Fix typo in OpenStreetMap France attribution [#378](https://github.com/leaflet-extras/leaflet-providers/pull/378)
|
||||
- Add OpenSnowMap map provider [#379](https://github.com/leaflet-extras/leaflet-providers/pull/379)
|
||||
- Improve Geoportail resources [#382](https://github.com/leaflet-extras/leaflet-providers/pull/382)
|
||||
- Remove Wikimedia map provider [#383](https://github.com/leaflet-extras/leaflet-providers/pull/383)
|
||||
|
||||
## 1.11.0 (2020-11-16)
|
||||
- Update example Mapbox map_ID [#365](https://github.com/leaflet-extras/leaflet-providers/pull/365)
|
||||
- Add USGS National Map tiles [#367](https://github.com/leaflet-extras/leaflet-providers/pull/367)
|
||||
- Update preview libs and use leaflet 1.7.1 [#370](https://github.com/leaflet-extras/leaflet-providers/pull/370)
|
||||
- Add Waymarked Trails overlay provider [#373](https://github.com/leaflet-extras/leaflet-providers/pull/373)
|
||||
|
||||
## 1.10.2 (2020-07-31)
|
||||
- Update mversion dep [#357](https://github.com/leaflet-extras/leaflet-providers/pull/357)
|
||||
- Mention stadia resitration in in README.md
|
||||
- Update freemap.sk tiles url [#359](https://github.com/leaflet-extras/leaflet-providers/pull/357)
|
||||
- Switch unpkg ressources to https on demo page [#361](https://github.com/leaflet-extras/leaflet-providers/pull/361)
|
||||
- Update demo page and test pages to leaflet 1.6.0
|
||||
- New (non dev) URLs for CyclOSM tiles [#363](https://github.com/leaflet-extras/leaflet-providers/pull/363)
|
||||
|
||||
## 1.10.1 (2020-05-18)
|
||||
- Exclude MapTiler from demo
|
||||
- Refine #348 : don't put jawg token in dist file
|
||||
|
||||
## 1.10.0 (2020-05-17)
|
||||
- Add HERE API v3 [#343](https://github.com/leaflet-extras/leaflet-providers/pull/343)
|
||||
- Add Stadia Maps layers [#344](https://github.com/leaflet-extras/leaflet-providers/pull/344)
|
||||
- Updated Hydda layers maxZoom to 20 [#347](https://github.com/leaflet-extras/leaflet-providers/pull/347)
|
||||
- Add Jawg Maps layers [#348](https://github.com/leaflet-extras/leaflet-providers/pull/348)
|
||||
- Updated Mapbox to new static tiles api [#352](https://github.com/leaflet-extras/leaflet-providers/pull/352)
|
||||
- Removed OpenMapSurfer layers [#354](https://github.com/leaflet-extras/leaflet-providers/pull/354)
|
||||
- Add MapTiler Cloud layers [#355](https://github.com/leaflet-extras/leaflet-providers/pull/355)
|
||||
|
||||
|
||||
## 1.9.1 (2019-12-06)
|
||||
- Add Cyclosm layer [#335](https://github.com/leaflet-extras/leaflet-providers/pull/335)
|
||||
- Fix nlmaps.luchtfoto url [#339](https://github.com/leaflet-extras/leaflet-providers/pull/339)
|
||||
- basemapAT: add terrain, surface layers [#340](https://github.com/leaflet-extras/leaflet-providers/pull/340)
|
||||
|
||||
## 1.9.0 (2019-08-30)
|
||||
- Add TomTom layers [#329](https://github.com/leaflet-extras/leaflet-providers/pull/329)
|
||||
- Add Stamen.TerrainLabels overlay [#331](https://github.com/leaflet-extras/leaflet-providers/pull/331)
|
||||
- Add HERE traffic tiles to normal and hybrid [#332](https://github.com/leaflet-extras/leaflet-providers/pull/332)
|
||||
|
||||
## 1.8.0 (2019-06-13)
|
||||
- Removed OSM B&W layer from example file
|
||||
- Removed bower.json file
|
||||
- Add support for Thunderforest `Mobile Atlas` and `Neighbourhood` map variants [#325](https://github.com/leaflet-extras/leaflet-providers/pull/325)
|
||||
|
||||
## 1.7.0 (2019-05-14)
|
||||
- Additional OpenMapSurfer layers & updated url for tiles [#322](https://github.com/leaflet-extras/leaflet-providers/pull/322)
|
||||
|
||||
## 1.6.0 (2019-03-28)
|
||||
- Tile attribution improvements [#309](https://github.com/leaflet-extras/leaflet-providers/pull/309)
|
||||
- Updated openmapsurfer tiles url [#310](https://github.com/leaflet-extras/leaflet-providers/pull/310)
|
||||
- Switched wmflbs.org tiles to https [#311](https://github.com/leaflet-extras/leaflet-providers/pull/311)
|
||||
- Removed OpenStreetMap Black and white [#319](https://github.com/leaflet-extras/leaflet-providers/pull/319)
|
||||
|
||||
## 1.5.0 (2018-11-06)
|
||||
- Prevented redirect in Stamen [#299](https://github.com/leaflet-extras/leaflet-providers/pull/299)
|
||||
- Fixed default mapbox layer [#303](https://github.com/leaflet-extras/leaflet-providers/pull/303)
|
||||
- Updated CartoDB -> CARTO [#305](https://github.com/leaflet-extras/leaflet-providers/pull/305)
|
||||
- Removed OpenInfraMap [#306](https://github.com/leaflet-extras/leaflet-providers/pull/306)
|
||||
- Updated HERE url & comments [#307](https://github.com/leaflet-extras/leaflet-providers/pull/307)
|
||||
|
||||
## 1.4.0 (2018-08-25)
|
||||
- Added [`OneMapSG`](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=OneMapSG), [#295](https://github.com/leaflet-extras/leaflet-providers/pull/295)
|
||||
|
||||
## 1.3.1 (2018-06-20)
|
||||
- No retina tiles for `Stamen.Watercolor` & `TopOSMRelief` [286](https://github.com/leaflet-extras/leaflet-providers/pull/286)
|
||||
|
||||
- No retina tiles for `Stamen.Watercolor` & `TopOSMRelief` [#286](https://github.com/leaflet-extras/leaflet-providers/pull/286)
|
||||
|
||||
## 1.3.0 (2018-06-16)
|
||||
- Added `GeoportailFrance` provider [284](https://github.com/leaflet-extras/leaflet-providers/pull/284)
|
||||
- Removed mention to protocol relativity in README.md
|
||||
|
||||
|
||||
## 1.2.0 (2018-06-05)
|
||||
- Make preview usable locally [256](https://github.com/leaflet-extras/leaflet-providers/pull/256)
|
||||
- Always use https when available [258](https://github.com/leaflet-extras/leaflet-providers/pull/258)
|
||||
- Added API Key for OpenWeatherMap [260](https://github.com/leaflet-extras/leaflet-providers/pull/260)
|
||||
- Fixed attribution of basemap.at [261](https://github.com/leaflet-extras/leaflet-providers/pull/261)
|
||||
- Added installation instructions [263](https://github.com/leaflet-extras/leaflet-providers/pull/263)
|
||||
- Added `Wikimedia` provider [266](https://github.com/leaflet-extras/leaflet-providers/pull/266)
|
||||
- Added `OpenInfraMap`/ `OpenPtMap` / `OpenRailwayMap` / `OpenFireMap` / `SafeCast` [266](https://github.com/leaflet-extras/leaflet-providers/pull/266)
|
||||
- Switched osm bzh to https [269](https://github.com/leaflet-extras/leaflet-providers/pull/269)
|
||||
- Added `OpenStreetMap.CH` bounding box + `Wikimedia` retina parameter and correct maxZoom [271](https://github.com/leaflet-extras/leaflet-providers/pull/271)
|
||||
- Make preview usable locally [#256](https://github.com/leaflet-extras/leaflet-providers/pull/256)
|
||||
- Always use https when available [#258](https://github.com/leaflet-extras/leaflet-providers/pull/258)
|
||||
- Added API Key for OpenWeatherMap [#260](https://github.com/leaflet-extras/leaflet-providers/pull/260)
|
||||
- Fixed attribution of basemap.at [#261](https://github.com/leaflet-extras/leaflet-providers/pull/261)
|
||||
- Added installation instructions [#263](https://github.com/leaflet-extras/leaflet-providers/pull/263)
|
||||
- Added `Wikimedia` provider [#266](https://github.com/leaflet-extras/leaflet-providers/pull/266)
|
||||
- Added `OpenInfraMap`/ `OpenPtMap` / `OpenRailwayMap` / `OpenFireMap` / `SafeCast` [#266](https://github.com/leaflet-extras/leaflet-providers/pull/266)
|
||||
- Switched osm bzh to https [#269](https://github.com/leaflet-extras/leaflet-providers/pull/269)
|
||||
- Added `OpenStreetMap.CH` bounding box + `Wikimedia` retina parameter and correct maxZoom [#271](https://github.com/leaflet-extras/leaflet-providers/pull/271)
|
||||
- Fixed test for providers keys
|
||||
- Mention leaflet in usage example in README.md
|
||||
- Removed mention to `force_http` in README.md [273](https://github.com/leaflet-extras/leaflet-providers/pull/273)
|
||||
- Added informations about Thunderforest key in README.md [277](https://github.com/leaflet-extras/leaflet-providers/pull/277)
|
||||
- Added retina support for `MapBox` [280](https://github.com/leaflet-extras/leaflet-providers/pull/280)
|
||||
- Added `CartoDB.Voyager` variants `MapBox` [281](https://github.com/leaflet-extras/leaflet-providers/pull/281)
|
||||
- Removed mention to `force_http` in README.md [#273](https://github.com/leaflet-extras/leaflet-providers/pull/273)
|
||||
- Added informations about Thunderforest key in README.md [#277](https://github.com/leaflet-extras/leaflet-providers/pull/277)
|
||||
- Added retina support for `MapBox` [#280](https://github.com/leaflet-extras/leaflet-providers/pull/280)
|
||||
- Added `CartoDB.Voyager` variants `MapBox` [#281](https://github.com/leaflet-extras/leaflet-providers/pull/281)
|
||||
- Removed homegrown retina detection and added retina support for `CartoDB` & `Stamen`
|
||||
|
||||
|
||||
## 1.1.17 (2017-06-29)
|
||||
- Added `maxZoom` for `Hydda` provider [242](https://github.com/leaflet-extras/leaflet-providers/pull/242)
|
||||
|
||||
@@ -6,5 +6,5 @@ rules:
|
||||
|
||||
- Don't violate a providers TOS (if it exists, include a link to it)
|
||||
- Don't pre-populate api keys with working keys.
|
||||
- It should be a basic tile source, no exteral libraries etc.
|
||||
- The owner hasn't asked us to remove it (hasn't happened yet)
|
||||
- It should be a basic tile source, no external libraries etc.
|
||||
- The owner hasn't asked us to remove it (hasn't happened yet)
|
||||
|
||||
@@ -8,13 +8,13 @@ Download [leaflet-providers.js](https://raw.githubusercontent.com/leaflet-extras
|
||||
|
||||
<head>
|
||||
...
|
||||
<script src="http://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script>
|
||||
<script src="http://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
|
||||
<script src="js/leaflet-providers.js"></script>
|
||||
</head>
|
||||
|
||||
# Usage
|
||||
|
||||
Leaflet-providers [providers](#providers) are refered to with a `provider[.<variant>]`-string. Let's say you want to add the nice [Watercolor](http://maps.stamen.com/#watercolor/) style from Stamen to your map, you pass `Stamen.Watercolor` to the `L.tileLayer.provider`-constructor, which will return a [L.TileLayer](http://leafletjs.com/reference.html#tilelayer) instance for Stamens Watercolor tile layer.
|
||||
Leaflet-providers [providers](#providers) are referred to with a `provider[.<variant>]`-string. Let's say you want to add the nice [Watercolor](http://maps.stamen.com/#watercolor/) style from Stamen to your map, you pass `Stamen.Watercolor` to the `L.tileLayer.provider`-constructor, which will return a [L.TileLayer](http://leafletjs.com/reference.html#tilelayer) instance for Stamens Watercolor tile layer.
|
||||
|
||||
```Javascript
|
||||
// add Stamen Watercolor to map.
|
||||
@@ -29,9 +29,17 @@ Leaflet-providers provides tile layers from different providers, including *Open
|
||||
|
||||
In addition to the providers you are free<b id="what-is-free">1</b> to use, we support some layers which require registration.
|
||||
|
||||
### HERE (formerly Nokia).
|
||||
### HERE and HEREv3 (formerly Nokia).
|
||||
|
||||
In order to use HERE layers, you must [register](http://developer.here.com/). Once registered, you can create an `app_id` and `app_code` which you have to pass to `L.tileLayer.provider` in the options:
|
||||
In order to use HEREv3 layers, you must [register](http://developer.here.com/). Once registered, you can create an `apiKey` which you have to pass to `L.tileLayer.provider` in the options:
|
||||
|
||||
```Javascript
|
||||
L.tileLayer.provider('HEREv3.terrainDay', {
|
||||
apiKey: '<insert apiKey here>'
|
||||
}).addTo(map);
|
||||
```
|
||||
|
||||
You can still pass `app_id` and `app_code` in legacy projects:
|
||||
|
||||
```Javascript
|
||||
L.tileLayer.provider('HERE.terrainDay', {
|
||||
@@ -40,18 +48,38 @@ L.tileLayer.provider('HERE.terrainDay', {
|
||||
}).addTo(map);
|
||||
```
|
||||
|
||||
[Available HERE layers](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=HERE)
|
||||
### Jawg Maps
|
||||
|
||||
In order to use Jawg Maps, you must [register](https://www.jawg.io/lab). Once registered, your access token will be located [here](https://www.jawg.io/lab/access-tokens) and you will access to all Jawg default maps (variants) and your own customized maps :
|
||||
|
||||
```JavaScript
|
||||
L.tileLayer.provider('Jawg.Streets', {
|
||||
variant: '<insert map id here or blank for default variant>',
|
||||
accessToken: '<insert access token here>'
|
||||
}).addTo(map);
|
||||
```
|
||||
|
||||
### Mapbox
|
||||
|
||||
In order to use Mapbox maps, you must [register](https://tiles.mapbox.com/signup). You can get map_ID (i.e mapbox.satellite) and ACCESS_TOKEN from [Mapbox projects](https://www.mapbox.com/projects):
|
||||
In order to use Mapbox maps, you must [register](https://tiles.mapbox.com/signup). You can get map_ID (e.g. "mapbox/satellite-v9") and ACCESS_TOKEN from [Mapbox projects](https://www.mapbox.com/projects):
|
||||
```JavaScript
|
||||
L.tileLayer.provider('MapBox', {
|
||||
id: 'ID': '<insert map_ID here>',
|
||||
id: '<insert map_ID here>',
|
||||
accessToken: '<insert ACCESS_TOKEN here>'
|
||||
}).addTo(map);
|
||||
```
|
||||
|
||||
The currently-valid Mapbox map styles, to use for map_IDs, [are listed in the Mapbox documentation](https://docs.mapbox.com/api/maps/#mapbox-styles) - only the final part of each is required, e.g. "mapbox/light-v10".
|
||||
|
||||
### MapTiler Cloud
|
||||
|
||||
In order to use MapTiler maps, you must [register](https://cloud.maptiler.com/). Once registered, get your API key from Account->Keys, which you have to pass to `L.tileLayer.provider` in the options:
|
||||
```JavaScript
|
||||
L.tileLayer.provider('MapTiler.Streets', {
|
||||
key: '<insert key here>'
|
||||
}).addTo(map);
|
||||
```
|
||||
|
||||
### Thunderforest
|
||||
|
||||
In order to use Thunderforest maps, you must [register](https://thunderforest.com/pricing/). Once registered, you have an `api_key` which you have to pass to `L.tileLayer.provider` in the options:
|
||||
@@ -65,9 +93,19 @@ In order to use ArcGIS maps, you must [register](https://developers.arcgis.com/e
|
||||
|
||||
[Available Esri layers](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=Esri)
|
||||
|
||||
### TomTom
|
||||
|
||||
In order to use TomTom layers, you must [register](https://developer.tomtom.com/user/register). Once registered, you can create an `apikey` which you have to pass to `L.tileLayer.provider` in the options:
|
||||
|
||||
```Javascript
|
||||
L.tileLayer.provider('TomTom', {
|
||||
apikey: '<insert your API key here>'
|
||||
}).addTo(map);
|
||||
```
|
||||
|
||||
### Geoportail France
|
||||
|
||||
In order to use Geoportail France resources, you need to obtain an [api key]( http://professionnels.ign.fr/ign/contrats/) that allows you to access the [resources](https://geoservices.ign.fr/documentation/donnees-ressources-wmts.html#ressources-servies-en-wmts-en-projection-web-mercator) you need. Pass this api key and the ID of the resource to display to `L.tileLayer.provider` in the options:
|
||||
In order to use Geoportail France resources, you need to obtain an [api key]( http://professionnels.ign.fr/ign/contrats/) that allows you to access the [resources](https://geoservices.ign.fr/documentation/donnees-ressources-wmts.html#ressources-servies-en-wmts-en-projection-web-mercator) you need. Pass this api key and the ID of the resource to display to `L.tileLayer.provider` in the options:
|
||||
```JavaScript
|
||||
L.tileLayer.provider('GeoportailFrance', {
|
||||
variant: '<insert resource ID here>',
|
||||
@@ -75,10 +113,13 @@ L.tileLayer.provider('GeoportailFrance', {
|
||||
}).addTo(map);
|
||||
```
|
||||
|
||||
Please note that a public api key (`choisirgeoportail`) is used by default and comes with no guarantee.
|
||||
Please note that a public api key (`choisirgeoportail`) is used by default and comes with no guarantee.
|
||||
|
||||
4 aliases are also provided for common Geoportail resources : `GeoportailFrance`, `GeoportailFrance.orthos`, `GeoportailFrance.ignMaps` and `GeoportailFrance.parcels` (See index.html demo).
|
||||
|
||||
### Stadia Maps
|
||||
|
||||
In order to use Stadia maps, you must [register](https://client.stadiamaps.com/signup/). Once registered, you can whitelist your domain within your account settings.
|
||||
|
||||
# Attribution
|
||||
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
{
|
||||
"name": "leaflet-providers",
|
||||
"version": "1.1.17",
|
||||
"homepage": "https://github.com/leaflet-extras/leaflet-providers",
|
||||
"description": "An extension to Leaflet that contains configurations for various free tile providers.",
|
||||
"dependencies": {
|
||||
"leaflet": "~0.7.3"
|
||||
},
|
||||
"main": "leaflet-providers.js",
|
||||
"keywords": [
|
||||
"leaflet",
|
||||
"stamen",
|
||||
"osm"
|
||||
],
|
||||
"license": "BSD-2-Clause",
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests",
|
||||
"preview",
|
||||
"*.html"
|
||||
]
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<!-- Leaflet style. REQUIRED! -->
|
||||
<link rel="stylesheet" href="http://unpkg.com/leaflet@1.0.3/dist/leaflet.css" />
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.7.1/dist/leaflet.css" />
|
||||
<style>
|
||||
html { height: 100% }
|
||||
body { height: 100%; margin: 0; padding: 0;}
|
||||
@@ -26,7 +26,7 @@
|
||||
</div>
|
||||
<div id="map" class="map"></div>
|
||||
|
||||
<script src="http://unpkg.com/leaflet@1.0.3/dist/leaflet.js"></script>
|
||||
<script src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"></script>
|
||||
<script src="leaflet-providers.js"></script>
|
||||
<script>
|
||||
var map = L.map('map', {
|
||||
@@ -40,7 +40,6 @@
|
||||
var baseLayers = {
|
||||
'OpenStreetMap Default': defaultLayer,
|
||||
'OpenStreetMap German Style': L.tileLayer.provider('OpenStreetMap.DE'),
|
||||
'OpenStreetMap Black and White': L.tileLayer.provider('OpenStreetMap.BlackAndWhite'),
|
||||
'OpenStreetMap H.O.T.': L.tileLayer.provider('OpenStreetMap.HOT'),
|
||||
'Thunderforest OpenCycleMap': L.tileLayer.provider('Thunderforest.OpenCycleMap'),
|
||||
'Thunderforest Transport': L.tileLayer.provider('Thunderforest.Transport'),
|
||||
@@ -49,6 +48,8 @@
|
||||
'Stamen Toner': L.tileLayer.provider('Stamen.Toner'),
|
||||
'Stamen Terrain': L.tileLayer.provider('Stamen.Terrain'),
|
||||
'Stamen Watercolor': L.tileLayer.provider('Stamen.Watercolor'),
|
||||
'Jawg Streets': L.tileLayer.provider('Jawg.Streets'),
|
||||
'Jawg Terrain': L.tileLayer.provider('Jawg.Terrain'),
|
||||
'Esri WorldStreetMap': L.tileLayer.provider('Esri.WorldStreetMap'),
|
||||
'Esri DeLorme': L.tileLayer.provider('Esri.DeLorme'),
|
||||
'Esri WorldTopoMap': L.tileLayer.provider('Esri.WorldTopoMap'),
|
||||
@@ -58,7 +59,12 @@
|
||||
'Esri WorldPhysical': L.tileLayer.provider('Esri.WorldPhysical'),
|
||||
'Esri OceanBasemap': L.tileLayer.provider('Esri.OceanBasemap'),
|
||||
'Esri NatGeoWorldMap': L.tileLayer.provider('Esri.NatGeoWorldMap'),
|
||||
'Esri WorldGrayCanvas': L.tileLayer.provider('Esri.WorldGrayCanvas')
|
||||
'Esri WorldGrayCanvas': L.tileLayer.provider('Esri.WorldGrayCanvas'),
|
||||
'Geoportail France Maps': L.tileLayer.provider('GeoportailFrance'),
|
||||
'Geoportail France Orthos': L.tileLayer.provider('GeoportailFrance.orthos'),
|
||||
'USGS USTopo': L.tileLayer.provider('USGS.USTopo'),
|
||||
'USGS USImagery': L.tileLayer.provider('USGS.USImagery'),
|
||||
'USGS USImageryTopo': L.tileLayer.provider('USGS.USImageryTopo'),
|
||||
};
|
||||
|
||||
var overlayLayers = {
|
||||
@@ -73,7 +79,14 @@
|
||||
'OpenWeatherMap PressureContour': L.tileLayer.provider('OpenWeatherMap.PressureContour'),
|
||||
'OpenWeatherMap Wind': L.tileLayer.provider('OpenWeatherMap.Wind'),
|
||||
'OpenWeatherMap Temperature': L.tileLayer.provider('OpenWeatherMap.Temperature'),
|
||||
'OpenWeatherMap Snow': L.tileLayer.provider('OpenWeatherMap.Snow')
|
||||
'OpenWeatherMap Snow': L.tileLayer.provider('OpenWeatherMap.Snow'),
|
||||
'Geoportail France Parcels': L.tileLayer.provider('GeoportailFrance.parcels'),
|
||||
'Waymarked Trails Hiking': L.tileLayer.provider('WaymarkedTrails.hiking'),
|
||||
'Waymarked Trails Cycling': L.tileLayer.provider('WaymarkedTrails.cycling'),
|
||||
'Waymarked Trails MTB': L.tileLayer.provider('WaymarkedTrails.mtb'),
|
||||
'Waymarked Trails Ski Slopes': L.tileLayer.provider('WaymarkedTrails.slopes'),
|
||||
'Waymarked Trails Riding': L.tileLayer.provider('WaymarkedTrails.riding'),
|
||||
'Waymarked Trails Skating': L.tileLayer.provider('WaymarkedTrails.skating')
|
||||
};
|
||||
|
||||
L.control.layers(baseLayers, overlayLayers, {collapsed: false}).addTo(map);
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
if (attr.indexOf('{attribution.') === -1) {
|
||||
return attr;
|
||||
}
|
||||
return attr.replace(/\{attribution.(\w*)\}/,
|
||||
return attr.replace(/\{attribution.(\w*)\}/g,
|
||||
function (match, attributionName) {
|
||||
return attributionReplacer(providers[attributionName].options.attribution);
|
||||
}
|
||||
@@ -81,16 +81,10 @@
|
||||
options: {
|
||||
maxZoom: 19,
|
||||
attribution:
|
||||
'© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
},
|
||||
variants: {
|
||||
Mapnik: {},
|
||||
BlackAndWhite: {
|
||||
url: 'http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 18
|
||||
}
|
||||
},
|
||||
DE: {
|
||||
url: 'https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
@@ -108,13 +102,16 @@
|
||||
url: 'https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 20,
|
||||
attribution: '© Openstreetmap France | {attribution.OpenStreetMap}'
|
||||
attribution: '© OpenStreetMap France | {attribution.OpenStreetMap}'
|
||||
}
|
||||
},
|
||||
HOT: {
|
||||
url: 'https://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
attribution: '{attribution.OpenStreetMap}, Tiles courtesy of <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>'
|
||||
attribution:
|
||||
'{attribution.OpenStreetMap}, ' +
|
||||
'Tiles style by <a href="https://www.hotosm.org/" target="_blank">Humanitarian OpenStreetMap Team</a> ' +
|
||||
'hosted by <a href="https://openstreetmap.fr/" target="_blank">OpenStreetMap France</a>'
|
||||
}
|
||||
},
|
||||
BZH: {
|
||||
@@ -126,31 +123,17 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
OpenInfraMap: {
|
||||
url: 'https://tiles-{s}.openinframap.org/{variant}/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 18,
|
||||
attribution:
|
||||
'{attribution.OpenStreetMap}, <a href="http://www.openinframap.org/about.html">About OpenInfraMap</a>'
|
||||
},
|
||||
variants: {
|
||||
Power: 'power',
|
||||
Telecom: 'telecoms',
|
||||
Petroleum: 'petroleum',
|
||||
Water: 'water'
|
||||
}
|
||||
},
|
||||
OpenSeaMap: {
|
||||
url: 'https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
attribution: 'Map data: © <a href="http://www.openseamap.org">OpenSeaMap</a> contributors'
|
||||
}
|
||||
},
|
||||
OpenPtMap: {
|
||||
url: 'http://openptmap.org/tiles/{z}/{x}/{y}.png',
|
||||
OPNVKarte: {
|
||||
url: 'https://tileserver.memomaps.de/tilegen/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 17,
|
||||
attribution: 'Map data: © <a href="http://www.openptmap.org">OpenPtMap</a> contributors'
|
||||
maxZoom: 18,
|
||||
attribution: 'Map <a href="https://memomaps.de/">memomaps.de</a> <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, map data {attribution.OpenStreetMap}'
|
||||
}
|
||||
},
|
||||
OpenTopoMap: {
|
||||
@@ -181,6 +164,27 @@
|
||||
attribution: 'Map data: {attribution.OpenStreetMap} | Map style: © <a href="https://blog.safecast.org/about/">SafeCast</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
|
||||
}
|
||||
},
|
||||
Stadia: {
|
||||
url: 'https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}{r}.png',
|
||||
options: {
|
||||
maxZoom: 20,
|
||||
attribution: '© <a href="https://stadiamaps.com/">Stadia Maps</a>, © <a href="https://openmaptiles.org/">OpenMapTiles</a> © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'
|
||||
},
|
||||
variants: {
|
||||
AlidadeSmooth: {
|
||||
url: 'https://tiles.stadiamaps.com/tiles/alidade_smooth/{z}/{x}/{y}{r}.png'
|
||||
},
|
||||
AlidadeSmoothDark: {
|
||||
url: 'https://tiles.stadiamaps.com/tiles/alidade_smooth_dark/{z}/{x}/{y}{r}.png'
|
||||
},
|
||||
OSMBright: {
|
||||
url: 'https://tiles.stadiamaps.com/tiles/osm_bright/{z}/{x}/{y}{r}.png'
|
||||
},
|
||||
Outdoors: {
|
||||
url: 'https://tiles.stadiamaps.com/tiles/outdoors/{z}/{x}/{y}{r}.png'
|
||||
}
|
||||
}
|
||||
},
|
||||
Thunderforest: {
|
||||
url: 'https://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}',
|
||||
options: {
|
||||
@@ -209,36 +213,22 @@
|
||||
},
|
||||
Landscape: 'landscape',
|
||||
Outdoors: 'outdoors',
|
||||
Pioneer: 'pioneer'
|
||||
Pioneer: 'pioneer',
|
||||
MobileAtlas: 'mobile-atlas',
|
||||
Neighbourhood: 'neighbourhood'
|
||||
}
|
||||
},
|
||||
OpenMapSurfer: {
|
||||
url: 'https://korona.geog.uni-heidelberg.de/tiles/{variant}/x={x}&y={y}&z={z}',
|
||||
CyclOSM: {
|
||||
url: 'https://{s}.tile-cyclosm.openstreetmap.fr/cyclosm/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 20,
|
||||
variant: 'roads',
|
||||
attribution: 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> — Map data {attribution.OpenStreetMap}'
|
||||
},
|
||||
variants: {
|
||||
Roads: 'roads',
|
||||
AdminBounds: {
|
||||
options: {
|
||||
variant: 'adminb',
|
||||
maxZoom: 19
|
||||
}
|
||||
},
|
||||
Grayscale: {
|
||||
options: {
|
||||
variant: 'roadsg',
|
||||
maxZoom: 19
|
||||
}
|
||||
}
|
||||
attribution: '<a href="https://github.com/cyclosm/cyclosm-cartocss-style/releases" title="CyclOSM - Open Bicycle render">CyclOSM</a> | Map data: {attribution.OpenStreetMap}'
|
||||
}
|
||||
},
|
||||
Hydda: {
|
||||
url: 'https://{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 18,
|
||||
maxZoom: 20,
|
||||
variant: 'full',
|
||||
attribution: 'Tiles courtesy of <a href="http://openstreetmap.se/" target="_blank">OpenStreetMap Sweden</a> — Map data {attribution.OpenStreetMap}'
|
||||
},
|
||||
@@ -248,15 +238,71 @@
|
||||
RoadsAndLabels: 'roads_and_labels'
|
||||
}
|
||||
},
|
||||
MapBox: {
|
||||
url: 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}{r}.png?access_token={accessToken}',
|
||||
Jawg: {
|
||||
url: 'https://{s}.tile.jawg.io/{variant}/{z}/{x}/{y}{r}.png?access-token={accessToken}',
|
||||
options: {
|
||||
attribution:
|
||||
'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> — ' +
|
||||
'Map data {attribution.OpenStreetMap}',
|
||||
'<a href="http://jawg.io" title="Tiles Courtesy of Jawg Maps" target="_blank">© <b>Jawg</b>Maps</a> ' +
|
||||
'{attribution.OpenStreetMap}',
|
||||
minZoom: 0,
|
||||
maxZoom: 22,
|
||||
subdomains: 'abcd',
|
||||
id: 'streets',
|
||||
variant: 'jawg-terrain',
|
||||
// Get your own Jawg access token here : https://www.jawg.io/lab/
|
||||
// NB : this is a demonstration key that comes with no guarantee
|
||||
accessToken: '<insert your access token here>',
|
||||
},
|
||||
variants: {
|
||||
Streets: 'jawg-streets',
|
||||
Terrain: 'jawg-terrain',
|
||||
Sunny: 'jawg-sunny',
|
||||
Dark: 'jawg-dark',
|
||||
Light: 'jawg-light',
|
||||
Matrix: 'jawg-matrix'
|
||||
}
|
||||
},
|
||||
MapBox: {
|
||||
url: 'https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}{r}?access_token={accessToken}',
|
||||
options: {
|
||||
attribution:
|
||||
'© <a href="https://www.mapbox.com/about/maps/" target="_blank">Mapbox</a> ' +
|
||||
'{attribution.OpenStreetMap} ' +
|
||||
'<a href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a>',
|
||||
tileSize: 512,
|
||||
maxZoom: 18,
|
||||
zoomOffset: -1,
|
||||
id: 'mapbox/streets-v11',
|
||||
accessToken: '<insert your access token here>',
|
||||
}
|
||||
},
|
||||
MapTiler: {
|
||||
url: 'https://api.maptiler.com/maps/{variant}/{z}/{x}/{y}{r}.{ext}?key={key}',
|
||||
options: {
|
||||
attribution:
|
||||
'<a href="https://www.maptiler.com/copyright/" target="_blank">© MapTiler</a> <a href="https://www.openstreetmap.org/copyright" target="_blank">© OpenStreetMap contributors</a>',
|
||||
variant: 'streets',
|
||||
ext: 'png',
|
||||
key: '<insert your MapTiler Cloud API key here>',
|
||||
tileSize: 512,
|
||||
zoomOffset: -1,
|
||||
minZoom: 0,
|
||||
maxZoom: 21
|
||||
},
|
||||
variants: {
|
||||
Streets: 'streets',
|
||||
Basic: 'basic',
|
||||
Bright: 'bright',
|
||||
Pastel: 'pastel',
|
||||
Positron: 'positron',
|
||||
Hybrid: {
|
||||
options: {
|
||||
variant: 'hybrid',
|
||||
ext: 'jpg'
|
||||
}
|
||||
},
|
||||
Toner: 'toner',
|
||||
Topo: 'topo',
|
||||
Voyager: 'voyager'
|
||||
}
|
||||
},
|
||||
Stamen: {
|
||||
@@ -280,9 +326,10 @@
|
||||
TonerLabels: 'toner-labels',
|
||||
TonerLite: 'toner-lite',
|
||||
Watercolor: {
|
||||
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
|
||||
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
|
||||
options: {
|
||||
variant: 'watercolor',
|
||||
ext: 'jpg',
|
||||
minZoom: 1,
|
||||
maxZoom: 16
|
||||
}
|
||||
@@ -301,8 +348,15 @@
|
||||
maxZoom: 18
|
||||
}
|
||||
},
|
||||
TerrainLabels: {
|
||||
options: {
|
||||
variant: 'terrain-labels',
|
||||
minZoom: 0,
|
||||
maxZoom: 18
|
||||
}
|
||||
},
|
||||
TopOSMRelief: {
|
||||
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
|
||||
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
|
||||
options: {
|
||||
variant: 'toposm-color-relief',
|
||||
ext: 'jpg',
|
||||
@@ -318,6 +372,24 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
TomTom: {
|
||||
url: 'https://{s}.api.tomtom.com/map/1/tile/{variant}/{style}/{z}/{x}/{y}.{ext}?key={apikey}',
|
||||
options: {
|
||||
variant: 'basic',
|
||||
maxZoom: 22,
|
||||
attribution:
|
||||
'<a href="https://tomtom.com" target="_blank">© 1992 - ' + new Date().getFullYear() + ' TomTom.</a> ',
|
||||
subdomains: 'abcd',
|
||||
style: 'main',
|
||||
ext: 'png',
|
||||
apikey: '<insert your API key here>',
|
||||
},
|
||||
variants: {
|
||||
Basic: 'basic',
|
||||
Hybrid: 'hybrid',
|
||||
Labels: 'labels'
|
||||
}
|
||||
},
|
||||
Esri: {
|
||||
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}',
|
||||
options: {
|
||||
@@ -407,7 +479,7 @@
|
||||
options: {
|
||||
maxZoom: 19,
|
||||
attribution: 'Map data © <a href="http://openweathermap.org">OpenWeatherMap</a>',
|
||||
apiKey:'<insert your api key here>',
|
||||
apiKey: '<insert your api key here>',
|
||||
opacity: 0.5
|
||||
},
|
||||
variants: {
|
||||
@@ -427,20 +499,16 @@
|
||||
HERE: {
|
||||
/*
|
||||
* HERE maps, formerly Nokia maps.
|
||||
* These basemaps are free, but you need an API key. Please sign up at
|
||||
* http://developer.here.com/getting-started
|
||||
*
|
||||
* Note that the base urls contain '.cit' whichs is HERE's
|
||||
* 'Customer Integration Testing' environment. Please remove for production
|
||||
* envirionments.
|
||||
* These basemaps are free, but you need an api id and app key. Please sign up at
|
||||
* https://developer.here.com/plans
|
||||
*/
|
||||
url:
|
||||
'https://{s}.{base}.maps.cit.api.here.com/maptile/2.1/' +
|
||||
'https://{s}.{base}.maps.api.here.com/maptile/2.1/' +
|
||||
'{type}/{mapID}/{variant}/{z}/{x}/{y}/{size}/{format}?' +
|
||||
'app_id={app_id}&app_code={app_code}&lg={language}',
|
||||
options: {
|
||||
attribution:
|
||||
'Map © 1987-2014 <a href="http://developer.here.com">HERE</a>',
|
||||
'Map © 1987-' + new Date().getFullYear() + ' <a href="http://developer.here.com">HERE</a>',
|
||||
subdomains: '1234',
|
||||
mapID: 'newest',
|
||||
'app_id': '<insert your app_id here>',
|
||||
@@ -461,11 +529,21 @@
|
||||
normalDayGreyMobile: 'normal.day.grey.mobile',
|
||||
normalDayTransit: 'normal.day.transit',
|
||||
normalDayTransitMobile: 'normal.day.transit.mobile',
|
||||
normalDayTraffic: {
|
||||
options: {
|
||||
variant: 'normal.traffic.day',
|
||||
base: 'traffic',
|
||||
type: 'traffictile'
|
||||
}
|
||||
},
|
||||
normalNight: 'normal.night',
|
||||
normalNightMobile: 'normal.night.mobile',
|
||||
normalNightGrey: 'normal.night.grey',
|
||||
normalNightGreyMobile: 'normal.night.grey.mobile',
|
||||
|
||||
normalNightTransit: 'normal.night.transit',
|
||||
normalNightTransitMobile: 'normal.night.transit.mobile',
|
||||
reducedDay: 'reduced.day',
|
||||
reducedNight: 'reduced.night',
|
||||
basicMap: {
|
||||
options: {
|
||||
type: 'basetile'
|
||||
@@ -496,6 +574,133 @@
|
||||
variant: 'hybrid.day.mobile'
|
||||
}
|
||||
},
|
||||
hybridDayTransit: {
|
||||
options: {
|
||||
base: 'aerial',
|
||||
variant: 'hybrid.day.transit'
|
||||
}
|
||||
},
|
||||
hybridDayGrey: {
|
||||
options: {
|
||||
base: 'aerial',
|
||||
variant: 'hybrid.grey.day'
|
||||
}
|
||||
},
|
||||
hybridDayTraffic: {
|
||||
options: {
|
||||
variant: 'hybrid.traffic.day',
|
||||
base: 'traffic',
|
||||
type: 'traffictile'
|
||||
}
|
||||
},
|
||||
pedestrianDay: 'pedestrian.day',
|
||||
pedestrianNight: 'pedestrian.night',
|
||||
satelliteDay: {
|
||||
options: {
|
||||
base: 'aerial',
|
||||
variant: 'satellite.day'
|
||||
}
|
||||
},
|
||||
terrainDay: {
|
||||
options: {
|
||||
base: 'aerial',
|
||||
variant: 'terrain.day'
|
||||
}
|
||||
},
|
||||
terrainDayMobile: {
|
||||
options: {
|
||||
base: 'aerial',
|
||||
variant: 'terrain.day.mobile'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
HEREv3: {
|
||||
/*
|
||||
* HERE maps API Version 3.
|
||||
* These basemaps are free, but you need an API key. Please sign up at
|
||||
* https://developer.here.com/plans
|
||||
* Version 3 deprecates the app_id and app_code access in favor of apiKey
|
||||
*
|
||||
* Supported access methods as of 2019/12/21:
|
||||
* @see https://developer.here.com/faqs#access-control-1--how-do-you-control-access-to-here-location-services
|
||||
*/
|
||||
url:
|
||||
'https://{s}.{base}.maps.ls.hereapi.com/maptile/2.1/' +
|
||||
'{type}/{mapID}/{variant}/{z}/{x}/{y}/{size}/{format}?' +
|
||||
'apiKey={apiKey}&lg={language}',
|
||||
options: {
|
||||
attribution:
|
||||
'Map © 1987-' + new Date().getFullYear() + ' <a href="http://developer.here.com">HERE</a>',
|
||||
subdomains: '1234',
|
||||
mapID: 'newest',
|
||||
apiKey: '<insert your apiKey here>',
|
||||
base: 'base',
|
||||
variant: 'normal.day',
|
||||
maxZoom: 20,
|
||||
type: 'maptile',
|
||||
language: 'eng',
|
||||
format: 'png8',
|
||||
size: '256'
|
||||
},
|
||||
variants: {
|
||||
normalDay: 'normal.day',
|
||||
normalDayCustom: 'normal.day.custom',
|
||||
normalDayGrey: 'normal.day.grey',
|
||||
normalDayMobile: 'normal.day.mobile',
|
||||
normalDayGreyMobile: 'normal.day.grey.mobile',
|
||||
normalDayTransit: 'normal.day.transit',
|
||||
normalDayTransitMobile: 'normal.day.transit.mobile',
|
||||
normalNight: 'normal.night',
|
||||
normalNightMobile: 'normal.night.mobile',
|
||||
normalNightGrey: 'normal.night.grey',
|
||||
normalNightGreyMobile: 'normal.night.grey.mobile',
|
||||
normalNightTransit: 'normal.night.transit',
|
||||
normalNightTransitMobile: 'normal.night.transit.mobile',
|
||||
reducedDay: 'reduced.day',
|
||||
reducedNight: 'reduced.night',
|
||||
basicMap: {
|
||||
options: {
|
||||
type: 'basetile'
|
||||
}
|
||||
},
|
||||
mapLabels: {
|
||||
options: {
|
||||
type: 'labeltile',
|
||||
format: 'png'
|
||||
}
|
||||
},
|
||||
trafficFlow: {
|
||||
options: {
|
||||
base: 'traffic',
|
||||
type: 'flowtile'
|
||||
}
|
||||
},
|
||||
carnavDayGrey: 'carnav.day.grey',
|
||||
hybridDay: {
|
||||
options: {
|
||||
base: 'aerial',
|
||||
variant: 'hybrid.day'
|
||||
}
|
||||
},
|
||||
hybridDayMobile: {
|
||||
options: {
|
||||
base: 'aerial',
|
||||
variant: 'hybrid.day.mobile'
|
||||
}
|
||||
},
|
||||
hybridDayTransit: {
|
||||
options: {
|
||||
base: 'aerial',
|
||||
variant: 'hybrid.day.transit'
|
||||
}
|
||||
},
|
||||
hybridDayGrey: {
|
||||
options: {
|
||||
base: 'aerial',
|
||||
variant: 'hybrid.grey.day'
|
||||
}
|
||||
},
|
||||
pedestrianDay: 'pedestrian.day',
|
||||
pedestrianNight: 'pedestrian.night',
|
||||
satelliteDay: {
|
||||
@@ -519,11 +724,11 @@
|
||||
}
|
||||
},
|
||||
FreeMapSK: {
|
||||
url: 'http://t{s}.freemap.sk/T/{z}/{x}/{y}.jpeg',
|
||||
url: 'https://{s}.freemap.sk/T/{z}/{x}/{y}.jpeg',
|
||||
options: {
|
||||
minZoom: 8,
|
||||
maxZoom: 16,
|
||||
subdomains: '1234',
|
||||
subdomains: 'abcd',
|
||||
bounds: [[47.204642, 15.996093], [49.830896, 22.576904]],
|
||||
attribution:
|
||||
'{attribution.OpenStreetMap}, vizualization CC-By-SA 2.0 <a href="http://freemap.sk">Freemap.sk</a>'
|
||||
@@ -537,11 +742,11 @@
|
||||
}
|
||||
},
|
||||
CartoDB: {
|
||||
url: 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/{variant}/{z}/{x}/{y}{r}.png',
|
||||
url: 'https://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}{r}.png',
|
||||
options: {
|
||||
attribution: '{attribution.OpenStreetMap} © <a href="http://cartodb.com/attributions">CartoDB</a>',
|
||||
attribution: '{attribution.OpenStreetMap} © <a href="https://carto.com/attributions">CARTO</a>',
|
||||
subdomains: 'abcd',
|
||||
maxZoom: 19,
|
||||
maxZoom: 20,
|
||||
variant: 'light_all'
|
||||
},
|
||||
variants: {
|
||||
@@ -558,7 +763,7 @@
|
||||
}
|
||||
},
|
||||
HikeBike: {
|
||||
url: 'http://{s}.tiles.wmflabs.org/{variant}/{z}/{x}/{y}.png',
|
||||
url: 'https://tiles.wmflabs.org/{variant}/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 19,
|
||||
attribution: '{attribution.OpenStreetMap}',
|
||||
@@ -575,11 +780,12 @@
|
||||
}
|
||||
},
|
||||
BasemapAT: {
|
||||
url: 'https://maps{s}.wien.gv.at/basemap/{variant}/normal/google3857/{z}/{y}/{x}.{format}',
|
||||
url: 'https://maps{s}.wien.gv.at/basemap/{variant}/{type}/google3857/{z}/{y}/{x}.{format}',
|
||||
options: {
|
||||
maxZoom: 19,
|
||||
attribution: 'Datenquelle: <a href="https://www.basemap.at">basemap.at</a>',
|
||||
subdomains: ['', '1', '2', '3', '4'],
|
||||
type: 'normal',
|
||||
format: 'png',
|
||||
bounds: [[46.358770, 8.782379], [49.037872, 17.189532]],
|
||||
variant: 'geolandbasemap'
|
||||
@@ -593,6 +799,20 @@
|
||||
},
|
||||
grau: 'bmapgrau',
|
||||
overlay: 'bmapoverlay',
|
||||
terrain: {
|
||||
options: {
|
||||
variant: 'bmapgelaende',
|
||||
type: 'grau',
|
||||
format: 'jpeg'
|
||||
}
|
||||
},
|
||||
surface: {
|
||||
options: {
|
||||
variant: 'bmapoberflaeche',
|
||||
type: 'grau',
|
||||
format: 'jpeg'
|
||||
}
|
||||
},
|
||||
highdpi: {
|
||||
options: {
|
||||
variant: 'bmaphidpi',
|
||||
@@ -614,14 +834,14 @@
|
||||
minZoom: 6,
|
||||
maxZoom: 19,
|
||||
bounds: [[50.5, 3.25], [54, 7.6]],
|
||||
attribution: 'Kaartgegevens © <a href="kadaster.nl">Kadaster</a>'
|
||||
attribution: 'Kaartgegevens © <a href="https://www.kadaster.nl">Kadaster</a>'
|
||||
},
|
||||
variants: {
|
||||
'standaard': 'brtachtergrondkaart',
|
||||
'pastel': 'brtachtergrondkaartpastel',
|
||||
'grijs': 'brtachtergrondkaartgrijs',
|
||||
'luchtfoto': {
|
||||
'url': 'https://geodata.nationaalgeoregister.nl/luchtfoto/rgb/wmts/1.0.0/2016_ortho25/EPSG:3857/{z}/{x}/{y}.png',
|
||||
'url': 'https://service.pdok.nl/hwh/luchtfotorgb/wmts/v1_0/Actueel_ortho25/EPSG:3857/{z}/{x}/{y}.jpeg',
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -657,7 +877,7 @@
|
||||
},
|
||||
ModisTerraSnowCover: {
|
||||
options: {
|
||||
variant: 'MODIS_Terra_Snow_Cover',
|
||||
variant: 'MODIS_Terra_NDSI_Snow_Cover',
|
||||
format: 'png',
|
||||
maxZoom: 8,
|
||||
opacity: 0.75
|
||||
@@ -703,7 +923,7 @@
|
||||
// Justice Map (http://www.justicemap.org/)
|
||||
// Visualize race and income data for your community, county and country.
|
||||
// Includes tools for data journalists, bloggers and community activists.
|
||||
url: 'http://www.justicemap.org/tile/{size}/{variant}/{z}/{x}/{y}.png',
|
||||
url: 'https://www.justicemap.org/tile/{size}/{variant}/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
attribution: '<a href="http://www.justicemap.org/terms.php">Justice Map</a>',
|
||||
// one of 'county', 'tract', 'block'
|
||||
@@ -723,14 +943,6 @@
|
||||
plurality: 'plural'
|
||||
}
|
||||
},
|
||||
Wikimedia: {
|
||||
url: 'https://maps.wikimedia.org/osm-intl/{z}/{x}/{y}{r}.png',
|
||||
options: {
|
||||
attribution: '<a href="https://wikimediafoundation.org/wiki/Maps_Terms_of_Use">Wikimedia</a>',
|
||||
minZoom: 1,
|
||||
maxZoom: 19
|
||||
}
|
||||
},
|
||||
GeoportailFrance: {
|
||||
url: 'https://wxs.ign.fr/{apikey}/geoportail/wmts?REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE={style}&TILEMATRIXSET=PM&FORMAT={format}&LAYER={variant}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}',
|
||||
options: {
|
||||
@@ -741,28 +953,142 @@
|
||||
// Get your own geoportail apikey here : http://professionnels.ign.fr/ign/contrats/
|
||||
// NB : 'choisirgeoportail' is a demonstration key that comes with no guarantee
|
||||
apikey: 'choisirgeoportail',
|
||||
format: 'image/jpeg',
|
||||
style : 'normal',
|
||||
variant: 'GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD'
|
||||
format: 'image/png',
|
||||
style: 'normal',
|
||||
variant: 'GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2'
|
||||
},
|
||||
variants: {
|
||||
plan: 'GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2',
|
||||
parcels: {
|
||||
options : {
|
||||
variant: 'CADASTRALPARCELS.PARCELS',
|
||||
maxZoom: 20,
|
||||
style : 'bdparcellaire',
|
||||
format: 'image/png'
|
||||
options: {
|
||||
variant: 'CADASTRALPARCELS.PARCELLAIRE_EXPRESS',
|
||||
style: 'PCI vecteur',
|
||||
maxZoom: 20
|
||||
}
|
||||
},
|
||||
ignMaps: 'GEOGRAPHICALGRIDSYSTEMS.MAPS',
|
||||
maps: 'GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD',
|
||||
orthos: {
|
||||
options: {
|
||||
maxZoom: 19,
|
||||
format: 'image/jpeg',
|
||||
variant: 'ORTHOIMAGERY.ORTHOPHOTOS'
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
OneMapSG: {
|
||||
url: 'https://maps-{s}.onemap.sg/v3/{variant}/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
variant: 'Default',
|
||||
minZoom: 11,
|
||||
maxZoom: 18,
|
||||
bounds: [[1.56073, 104.11475], [1.16, 103.502]],
|
||||
attribution: '<img src="https://docs.onemap.sg/maps/images/oneMap64-01.png" style="height:20px;width:20px;"/> New OneMap | Map data © contributors, <a href="http://SLA.gov.sg">Singapore Land Authority</a>'
|
||||
},
|
||||
variants: {
|
||||
Default: 'Default',
|
||||
Night: 'Night',
|
||||
Original: 'Original',
|
||||
Grey: 'Grey',
|
||||
LandLot: 'LandLot'
|
||||
}
|
||||
},
|
||||
USGS: {
|
||||
url: 'https://basemap.nationalmap.gov/arcgis/rest/services/USGSTopo/MapServer/tile/{z}/{y}/{x}',
|
||||
options: {
|
||||
maxZoom: 20,
|
||||
attribution: 'Tiles courtesy of the <a href="https://usgs.gov/">U.S. Geological Survey</a>'
|
||||
},
|
||||
variants: {
|
||||
USTopo: {},
|
||||
USImagery: {
|
||||
url: 'https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryOnly/MapServer/tile/{z}/{y}/{x}'
|
||||
},
|
||||
USImageryTopo: {
|
||||
url: 'https://basemap.nationalmap.gov/arcgis/rest/services/USGSImageryTopo/MapServer/tile/{z}/{y}/{x}'
|
||||
}
|
||||
}
|
||||
},
|
||||
WaymarkedTrails: {
|
||||
url: 'https://tile.waymarkedtrails.org/{variant}/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
maxZoom: 18,
|
||||
attribution: 'Map data: {attribution.OpenStreetMap} | Map style: © <a href="https://waymarkedtrails.org">waymarkedtrails.org</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
|
||||
},
|
||||
variants: {
|
||||
hiking: 'hiking',
|
||||
cycling: 'cycling',
|
||||
mtb: 'mtb',
|
||||
slopes: 'slopes',
|
||||
riding: 'riding',
|
||||
skating: 'skating'
|
||||
}
|
||||
},
|
||||
OpenAIP: {
|
||||
url: 'https://{s}.tile.maps.openaip.net/geowebcache/service/tms/1.0.0/openaip_basemap@EPSG%3A900913@png/{z}/{x}/{y}.{ext}',
|
||||
options: {
|
||||
attribution: '<a href="https://www.openaip.net/">openAIP Data</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-NC-SA</a>)',
|
||||
ext: 'png',
|
||||
minZoom: 4,
|
||||
maxZoom: 14,
|
||||
tms: true,
|
||||
detectRetina: true,
|
||||
subdomains: '12'
|
||||
}
|
||||
},
|
||||
OpenSnowMap: {
|
||||
url: 'https://tiles.opensnowmap.org/{variant}/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
minZoom: 9,
|
||||
maxZoom: 18,
|
||||
attribution: 'Map data: {attribution.OpenStreetMap} & ODbL, © <a href="https://www.opensnowmap.org/iframes/data.html">www.opensnowmap.org</a> <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
|
||||
},
|
||||
variants: {
|
||||
pistes: 'pistes',
|
||||
}
|
||||
},
|
||||
AzureMaps: {
|
||||
url:
|
||||
'https://atlas.microsoft.com/map/tile?api-version={apiVersion}'+
|
||||
'&tilesetId={variant}&x={x}&y={y}&zoom={z}&language={language}'+
|
||||
'&subscription-key={subscriptionKey}',
|
||||
options: {
|
||||
attribution: 'See https://docs.microsoft.com/en-US/rest/api/maps/renderv2/getmaptilepreview for details.',
|
||||
apiVersion: '2.0',
|
||||
variant: 'microsoft.imagery',
|
||||
subscriptionKey: '<insert your subscription key here>',
|
||||
language: 'en-US',
|
||||
},
|
||||
variants: {
|
||||
MicrosoftImagery: 'microsoft.imagery',
|
||||
MicrosoftBaseDarkGrey: 'microsoft.base.darkgrey',
|
||||
MicrosoftBaseRoad: 'microsoft.base.road',
|
||||
MicrosoftBaseHybridRoad: 'microsoft.base.hybrid.road',
|
||||
MicrosoftTerraMain: 'microsoft.terra.main',
|
||||
MicrosoftWeatherInfraredMain: {
|
||||
url:
|
||||
'https://atlas.microsoft.com/map/tile?api-version={apiVersion}'+
|
||||
'&tilesetId={variant}&x={x}&y={y}&zoom={z}'+
|
||||
'&timeStamp={timeStamp}&language={language}' +
|
||||
'&subscription-key={subscriptionKey}',
|
||||
options: {
|
||||
timeStamp: '2021-05-08T09:03:00Z',
|
||||
attribution: 'See https://docs.microsoft.com/en-US/rest/api/maps/renderv2/getmaptilepreview#uri-parameters for details.',
|
||||
variant: 'microsoft.weather.infrared.main',
|
||||
},
|
||||
},
|
||||
MicrosoftWeatherRadarMain: {
|
||||
url:
|
||||
'https://atlas.microsoft.com/map/tile?api-version={apiVersion}'+
|
||||
'&tilesetId={variant}&x={x}&y={y}&zoom={z}'+
|
||||
'&timeStamp={timeStamp}&language={language}' +
|
||||
'&subscription-key={subscriptionKey}',
|
||||
options: {
|
||||
timeStamp: '2021-05-08T09:03:00Z',
|
||||
attribution: 'See https://docs.microsoft.com/en-US/rest/api/maps/renderv2/getmaptilepreview#uri-parameters for details.',
|
||||
variant: 'microsoft.weather.radar.main',
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -1,46 +1,45 @@
|
||||
{
|
||||
"name": "leaflet-providers",
|
||||
"version": "1.3.1",
|
||||
"description": "An extension to Leaflet that contains configurations for various free tile providers.",
|
||||
"main": "leaflet-providers.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/leaflet-extras/leaflet-providers.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "npm run lint && npm run testsuite",
|
||||
"testsuite": "phantomjs ./node_modules/mocha-phantomjs-core/mocha-phantomjs-core.js tests/index.html",
|
||||
"lint": "eslint --config .eslintrc leaflet-providers.js index.html preview/*.js preview/*.html tests/*",
|
||||
"min": "uglifyjs leaflet-providers.js -mc -o leaflet-providers.min.js",
|
||||
"release": "mversion patch -m",
|
||||
"release-minor": "mversion minor -m"
|
||||
},
|
||||
"license": "BSD-2-Clause",
|
||||
"bugs": {
|
||||
"url": "https://github.com/leaflet-extras/leaflet-providers/issues"
|
||||
},
|
||||
"files": [
|
||||
"leaflet-providers.js",
|
||||
"README.md",
|
||||
"CHANGELOG.md",
|
||||
"licence.md"
|
||||
],
|
||||
"devDependencies": {
|
||||
"chai": "^4.1.2",
|
||||
"eslint": "^3.16.1",
|
||||
"eslint-plugin-html": "^2.0.1",
|
||||
"mocha": "^3.2.0",
|
||||
"mocha-phantomjs-core": "^2.1.1",
|
||||
"mversion": "^1.10.1",
|
||||
"phantomjs-prebuilt": "^2.1.16",
|
||||
"uglify-js": "^2.4.15"
|
||||
},
|
||||
"autoupdate": {
|
||||
"source": "git",
|
||||
"target": "git://github.com/leaflet-extras/leaflet-providers.git",
|
||||
"basePath": "/",
|
||||
"name": "leaflet-providers",
|
||||
"version": "1.13.0",
|
||||
"description": "An extension to Leaflet that contains configurations for various free tile providers.",
|
||||
"main": "leaflet-providers.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/leaflet-extras/leaflet-providers.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "npm run lint && npm run testsuite",
|
||||
"testsuite": "mocha-chrome tests/index.html",
|
||||
"lint": "eslint --config .eslintrc leaflet-providers.js index.html preview/*.js preview/*.html tests/*",
|
||||
"min": "uglifyjs leaflet-providers.js -mc -o leaflet-providers.min.js",
|
||||
"release-patch": "mversion patch -m",
|
||||
"release-minor": "mversion minor -m"
|
||||
},
|
||||
"license": "BSD-2-Clause",
|
||||
"bugs": {
|
||||
"url": "https://github.com/leaflet-extras/leaflet-providers/issues"
|
||||
},
|
||||
"files": [
|
||||
"leaflet-providers.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
"leaflet-providers.js",
|
||||
"README.md",
|
||||
"CHANGELOG.md",
|
||||
"licence.md"
|
||||
],
|
||||
"devDependencies": {
|
||||
"chai": "^4.3.4",
|
||||
"eslint": "^8.0.0",
|
||||
"eslint-plugin-html": "^6.1.2",
|
||||
"mocha": "^9.0.3",
|
||||
"mocha-chrome": "^2.2.0",
|
||||
"mversion": "^2.0.1",
|
||||
"uglify-js": "^3.14.1"
|
||||
},
|
||||
"autoupdate": {
|
||||
"source": "git",
|
||||
"target": "git://github.com/leaflet-extras/leaflet-providers.git",
|
||||
"basePath": "/",
|
||||
"files": [
|
||||
"leaflet-providers.js"
|
||||
]
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -25,6 +25,10 @@
|
||||
user-select: none;
|
||||
-webkit-user-drag: none;
|
||||
}
|
||||
/* Prevents IE11 from highlighting tiles in blue */
|
||||
.leaflet-tile::selection {
|
||||
background: transparent;
|
||||
}
|
||||
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
|
||||
.leaflet-safari .leaflet-tile {
|
||||
image-rendering: -webkit-optimize-contrast;
|
||||
@@ -41,7 +45,10 @@
|
||||
}
|
||||
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
|
||||
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
|
||||
.leaflet-container .leaflet-overlay-pane svg,
|
||||
.leaflet-container .leaflet-overlay-pane svg {
|
||||
max-width: none !important;
|
||||
max-height: none !important;
|
||||
}
|
||||
.leaflet-container .leaflet-marker-pane img,
|
||||
.leaflet-container .leaflet-shadow-pane img,
|
||||
.leaflet-container .leaflet-tile-pane img,
|
||||
@@ -49,6 +56,8 @@
|
||||
.leaflet-container .leaflet-tile {
|
||||
max-width: none !important;
|
||||
max-height: none !important;
|
||||
width: auto;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.leaflet-container.leaflet-touch-zoom {
|
||||
@@ -162,9 +171,6 @@
|
||||
|
||||
/* zoom and fade animations */
|
||||
|
||||
.leaflet-fade-anim .leaflet-tile {
|
||||
will-change: opacity;
|
||||
}
|
||||
.leaflet-fade-anim .leaflet-popup {
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.2s linear;
|
||||
@@ -179,9 +185,10 @@
|
||||
-ms-transform-origin: 0 0;
|
||||
transform-origin: 0 0;
|
||||
}
|
||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
||||
svg.leaflet-zoom-animated {
|
||||
will-change: transform;
|
||||
}
|
||||
}
|
||||
|
||||
.leaflet-zoom-anim .leaflet-zoom-animated {
|
||||
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
|
||||
@@ -237,7 +244,8 @@
|
||||
|
||||
.leaflet-marker-icon.leaflet-interactive,
|
||||
.leaflet-image-layer.leaflet-interactive,
|
||||
.leaflet-pane > svg path.leaflet-interactive {
|
||||
.leaflet-pane > svg path.leaflet-interactive,
|
||||
svg.leaflet-image-layer.leaflet-interactive path {
|
||||
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
|
||||
pointer-events: auto;
|
||||
}
|
||||
@@ -246,14 +254,11 @@
|
||||
|
||||
.leaflet-container {
|
||||
background: #ddd;
|
||||
outline: 0;
|
||||
outline-offset: 1px;
|
||||
}
|
||||
.leaflet-container a {
|
||||
color: #0078A8;
|
||||
}
|
||||
.leaflet-container a.leaflet-active {
|
||||
outline: 2px solid orange;
|
||||
}
|
||||
.leaflet-zoom-box {
|
||||
border: 2px dotted #38f;
|
||||
background: rgba(255,255,255,0.5);
|
||||
@@ -262,7 +267,10 @@
|
||||
|
||||
/* general typography */
|
||||
.leaflet-container {
|
||||
font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||||
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
|
||||
font-size: 12px;
|
||||
font-size: 0.75rem;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
|
||||
@@ -272,8 +280,7 @@
|
||||
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
|
||||
border-radius: 4px;
|
||||
}
|
||||
.leaflet-bar a,
|
||||
.leaflet-bar a:hover {
|
||||
.leaflet-bar a {
|
||||
background-color: #fff;
|
||||
border-bottom: 1px solid #ccc;
|
||||
width: 26px;
|
||||
@@ -290,7 +297,8 @@
|
||||
background-repeat: no-repeat;
|
||||
display: block;
|
||||
}
|
||||
.leaflet-bar a:hover {
|
||||
.leaflet-bar a:hover,
|
||||
.leaflet-bar a:focus {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
.leaflet-bar a:first-child {
|
||||
@@ -380,6 +388,8 @@
|
||||
}
|
||||
.leaflet-control-layers label {
|
||||
display: block;
|
||||
font-size: 13px;
|
||||
font-size: 1.08333em;
|
||||
}
|
||||
.leaflet-control-layers-separator {
|
||||
height: 0;
|
||||
@@ -388,7 +398,7 @@
|
||||
}
|
||||
|
||||
/* Default icon URLs */
|
||||
.leaflet-default-icon-path {
|
||||
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
|
||||
background-image: url(images/marker-icon.png);
|
||||
}
|
||||
|
||||
@@ -397,23 +407,27 @@
|
||||
|
||||
.leaflet-container .leaflet-control-attribution {
|
||||
background: #fff;
|
||||
background: rgba(255, 255, 255, 0.7);
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
margin: 0;
|
||||
}
|
||||
.leaflet-control-attribution,
|
||||
.leaflet-control-scale-line {
|
||||
padding: 0 5px;
|
||||
color: #333;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.leaflet-control-attribution a {
|
||||
text-decoration: none;
|
||||
}
|
||||
.leaflet-control-attribution a:hover {
|
||||
.leaflet-control-attribution a:hover,
|
||||
.leaflet-control-attribution a:focus {
|
||||
text-decoration: underline;
|
||||
}
|
||||
.leaflet-container .leaflet-control-attribution,
|
||||
.leaflet-container .leaflet-control-scale {
|
||||
font-size: 11px;
|
||||
.leaflet-attribution-flag {
|
||||
display: inline !important;
|
||||
vertical-align: baseline !important;
|
||||
width: 1em;
|
||||
height: 0.6669em;
|
||||
}
|
||||
.leaflet-left .leaflet-control-scale {
|
||||
margin-left: 5px;
|
||||
@@ -426,14 +440,11 @@
|
||||
border-top: none;
|
||||
line-height: 1.1;
|
||||
padding: 2px 5px 1px;
|
||||
font-size: 11px;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
|
||||
background: #fff;
|
||||
background: rgba(255, 255, 255, 0.5);
|
||||
background: rgba(255, 255, 255, 0.8);
|
||||
text-shadow: 1px 1px #fff;
|
||||
}
|
||||
.leaflet-control-scale-line:not(:first-child) {
|
||||
border-top: 2px solid #777;
|
||||
@@ -469,17 +480,22 @@
|
||||
border-radius: 12px;
|
||||
}
|
||||
.leaflet-popup-content {
|
||||
margin: 13px 19px;
|
||||
line-height: 1.4;
|
||||
margin: 13px 24px 13px 20px;
|
||||
line-height: 1.3;
|
||||
font-size: 13px;
|
||||
font-size: 1.08333em;
|
||||
min-height: 1px;
|
||||
}
|
||||
.leaflet-popup-content p {
|
||||
margin: 18px 0;
|
||||
margin: 17px 0;
|
||||
margin: 1.3em 0;
|
||||
}
|
||||
.leaflet-popup-tip-container {
|
||||
width: 40px;
|
||||
height: 20px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
margin-top: -1px;
|
||||
margin-left: -20px;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
@@ -490,6 +506,7 @@
|
||||
padding: 1px;
|
||||
|
||||
margin: -10px auto 0;
|
||||
pointer-events: auto;
|
||||
|
||||
-webkit-transform: rotate(45deg);
|
||||
-moz-transform: rotate(45deg);
|
||||
@@ -506,28 +523,25 @@
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding: 4px 4px 0 0;
|
||||
border: none;
|
||||
text-align: center;
|
||||
width: 18px;
|
||||
height: 14px;
|
||||
font: 16px/14px Tahoma, Verdana, sans-serif;
|
||||
color: #c3c3c3;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
font: 16px/24px Tahoma, Verdana, sans-serif;
|
||||
color: #757575;
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
background: transparent;
|
||||
}
|
||||
.leaflet-container a.leaflet-popup-close-button:hover {
|
||||
color: #999;
|
||||
.leaflet-container a.leaflet-popup-close-button:hover,
|
||||
.leaflet-container a.leaflet-popup-close-button:focus {
|
||||
color: #585858;
|
||||
}
|
||||
.leaflet-popup-scrolled {
|
||||
overflow: auto;
|
||||
border-bottom: 1px solid #ddd;
|
||||
border-top: 1px solid #ddd;
|
||||
}
|
||||
|
||||
.leaflet-oldie .leaflet-popup-content-wrapper {
|
||||
zoom: 1;
|
||||
-ms-zoom: 1;
|
||||
}
|
||||
.leaflet-oldie .leaflet-popup-tip {
|
||||
width: 24px;
|
||||
@@ -536,9 +550,6 @@
|
||||
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
|
||||
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
|
||||
}
|
||||
.leaflet-oldie .leaflet-popup-tip-container {
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
.leaflet-oldie .leaflet-control-zoom,
|
||||
.leaflet-oldie .leaflet-control-layers,
|
||||
@@ -573,7 +584,7 @@
|
||||
pointer-events: none;
|
||||
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
|
||||
}
|
||||
.leaflet-tooltip.leaflet-clickable {
|
||||
.leaflet-tooltip.leaflet-interactive {
|
||||
cursor: pointer;
|
||||
pointer-events: auto;
|
||||
}
|
||||
@@ -633,3 +644,13 @@
|
||||
margin-left: -12px;
|
||||
border-right-color: #fff;
|
||||
}
|
||||
|
||||
/* Printing */
|
||||
|
||||
@media print {
|
||||
/* Prevent printers from removing background-images of controls. */
|
||||
.leaflet-control {
|
||||
-webkit-print-color-adjust: exact;
|
||||
print-color-adjust: exact;
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
assets/leaflet/leaflet.min.css
vendored
2
assets/leaflet/leaflet.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -18,9 +18,9 @@
|
||||
"source":"https://github.com/netzmacht/contao-leaflet-libraries"
|
||||
},
|
||||
"require":{
|
||||
"php":">=5.4",
|
||||
"contao-community-alliance/composer-plugin": "~2.4 || ~3.0",
|
||||
"contao/core-bundle":"~3.5 || ~4.3"
|
||||
"php":"^7.4 || ^8.0",
|
||||
"contao/core-bundle":"^4.13 || ^5.0",
|
||||
"contao-community-alliance/composer-plugin":"~3.0"
|
||||
},
|
||||
"suggest": {
|
||||
"netzmacht/contao-leaflet-maps": "Leaflet maps integration into Contao CMS"
|
||||
|
||||
@@ -17,17 +17,17 @@
|
||||
$GLOBALS['LEAFLET_LIBRARIES']['leaflet'] = array
|
||||
(
|
||||
'name' => 'Leaflet',
|
||||
'version' => '1.3.4',
|
||||
'version' => '1.9.3',
|
||||
'license' => '<a href="https://github.com/Leaflet/Leaflet/blob/master/LICENSE" target="_blank">BSD-2-Clause</a>',
|
||||
'homepage' => 'http://leafletjs.com',
|
||||
'css' => 'assets/leaflet/libs/leaflet/leaflet.min.css',
|
||||
'javascript' => 'assets/leaflet/libs/leaflet/leaflet-src.js',
|
||||
'javascript' => 'assets/leaflet/libs/leaflet/leaflet.js',
|
||||
);
|
||||
|
||||
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-providers'] = array
|
||||
(
|
||||
'name' => 'Leaflet-providers',
|
||||
'version' => '1.3.1',
|
||||
'version' => '1.13.0',
|
||||
'license' => '<a href="https://github.com/leaflet-extras/leaflet-providers/blob/master/license.md" target="_blank">BSD-2-Clause</a>',
|
||||
'homepage' => 'http://leaflet-extras.github.io/leaflet-providers',
|
||||
'javascript' => 'assets/leaflet/libs/leaflet-providers/leaflet-providers.min.js'
|
||||
@@ -36,7 +36,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-providers'] = array
|
||||
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-markercluster'] = array
|
||||
(
|
||||
'name' => 'Leaflet.markercluster',
|
||||
'version' => '1.4.0',
|
||||
'version' => '1.4.1',
|
||||
'license' => '<a href="https://github.com/Leaflet/Leaflet.markercluster/blob/master/MIT-LICENCE.txt" target="_blank">MIT</a>',
|
||||
'homepage' => 'https://github.com/Leaflet/Leaflet.markercluster',
|
||||
'css' => 'assets/leaflet/libs/leaflet-markercluster/MarkerCluster.css',
|
||||
@@ -65,7 +65,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-loading'] = array
|
||||
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-fullscreen'] = array
|
||||
(
|
||||
'name' => 'Leaflet.Control.FullScreen',
|
||||
'version' => '1.4.5',
|
||||
'version' => '1.6.0',
|
||||
'license' => '<a href="https://github.com/brunob/leaflet.fullscreen/blob/master/LICENSE" target="_blank">MIT</a>',
|
||||
'homepage' => 'https://github.com/brunob/leaflet.fullscreen',
|
||||
'css' => 'assets/leaflet/libs/leaflet-fullscreen/Control.FullScreen.min.css',
|
||||
@@ -75,7 +75,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-fullscreen'] = array
|
||||
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-control-geocoder'] = array
|
||||
(
|
||||
'name' => 'Leaflet Control Geocoder',
|
||||
'version' => '1.6.0',
|
||||
'version' => '1.13.0',
|
||||
'license' => '<a href="https://github.com/perliedman/leaflet-control-geocoder/blob/master/LICENSE" target="_blank">BSD-2-Clause</a>',
|
||||
'homepage' => 'https://github.com/perliedman/leaflet-control-geocoder',
|
||||
'css' => 'assets/leaflet/libs/control-geocoder/Control.Geocoder.min.css',
|
||||
@@ -85,7 +85,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-control-geocoder'] = array
|
||||
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-extra-markers'] = array
|
||||
(
|
||||
'name' => 'Leaflet Extra Markers',
|
||||
'version' => '1.0.8',
|
||||
'version' => '1.2.1',
|
||||
'license' => '<a href="https://github.com/coryasilva/Leaflet.ExtraMarkers/blob/master/LICENSE" target="_blank">MIT</a>',
|
||||
'homepage' => 'https://github.com/coryasilva/Leaflet.ExtraMarkers',
|
||||
'css' => 'assets/leaflet/libs/leaflet-extra-markers/css/leaflet.extra-markers.min.css',
|
||||
|
||||
Reference in New Issue
Block a user