16 Commits

Author SHA1 Message Date
David Molineus
978ae8af21 Update to latest dependencies. 2018-08-23 16:02:27 +02:00
David Molineus
a8f73beb3d Update leaflet.pm to 0.25.0. 2018-08-23 15:48:59 +02:00
David Molineus
2f9602e21e Update LeafletExtraMarkers to 1.0.8. 2018-08-23 15:45:06 +02:00
David Molineus
9a21c60b9e Update Control.Geocoder to 1.6.0. 2018-08-23 15:42:45 +02:00
David Molineus
2f372e2d0e Update Control.FullScreen to 1.4.5. 2018-08-23 15:40:48 +02:00
David Molineus
3b187d0d95 Update leaflet.markercluster to v1.4.0. 2018-08-23 15:38:28 +02:00
David Molineus
44d1cf9550 Update leaflet providers to 1.3.1. 2018-08-23 15:35:24 +02:00
David Molineus
5b86360c35 Recompile leaflet.min.css. 2018-08-23 15:33:27 +02:00
David Molineus
22bde573d6 Switch to gulp v4. 2018-08-23 15:33:13 +02:00
David Molineus
74c10b652b Update leaflet to 1.3.4. 2018-08-23 14:57:27 +02:00
David Molineus
a89b9abc96 Hotfix geocoder merging c13ccf55da. Also minimize libraries. 2018-02-06 17:09:15 +01:00
David Molineus
bf88bbca8c Update leaflet geocoder. 2018-02-06 16:59:33 +01:00
David Molineus
232d223eee Fix branch aliases and apply spdx license format changes. 2018-01-27 13:38:31 +01:00
David Molineus
79fdad5ca3 Include leaflet.pm as new library. 2018-01-26 19:55:36 +01:00
David Molineus
c5b72d2c15 Update leaflet-markercluster to v1.3.0. 2018-01-26 19:44:04 +01:00
David Molineus
69b500a5fc Update leaflet to v1.3.1. 2018-01-26 15:01:39 +01:00
54 changed files with 16733 additions and 2055 deletions

4
.gitignore vendored
View File

@@ -16,6 +16,10 @@ nbproject/
vendor/
composer.lock
# Node
/node_modules
package-lock.json
# build
build/
build.properties

View File

@@ -12,14 +12,15 @@ Contao CMS.
This package contains following packages:
- [leaflet 1.2.0](http://leafletjs.com)
- [Leaflet-providers 1.1.17](http://leaflet-extras.github.io/leaflet-providers)
- [Leaflet.markercluster 1.1.0](https://github.com/Leaflet/Leaflet.markercluster)
- [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-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.3](https://github.com/brunob/leaflet.fullscreen)
- [Leaflet Control Geocoder 1.5.5](https://github.com/perliedman/leaflet-control-geocoder)
- [Leaflet.ExtraMarkers 1.0.6](https://github.com/coryasilva/Leaflet.ExtraMarkers)
- [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.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)
@@ -52,4 +53,4 @@ License
-------
As this package is just a meta package to provide the libraries, the licenses of each library have to be accepted. They
are unter the MIT or BSD license.
are under the MIT or BSD license.

View File

@@ -1,122 +1,126 @@
.leaflet-control-geocoder {
border-radius: 4px;
background: white;
min-width: 26px;
min-height: 26px;
border-radius: 4px;
background: white;
min-width: 26px;
min-height: 26px;
}
.leaflet-touch .leaflet-control-geocoder {
min-width: 30px;
min-height: 30px;
min-width: 30px;
min-height: 30px;
}
.leaflet-control-geocoder a, .leaflet-control-geocoder .leaflet-control-geocoder-icon {
border-bottom: none;
display: inline-block;
.leaflet-control-geocoder a,
.leaflet-control-geocoder .leaflet-control-geocoder-icon {
border-bottom: none;
display: inline-block;
}
.leaflet-control-geocoder .leaflet-control-geocoder-alternatives a {
width: inherit;
height: inherit;
line-height: inherit;
width: inherit;
height: inherit;
line-height: inherit;
}
.leaflet-control-geocoder a:hover, .leaflet-control-geocoder .leaflet-control-geocoder-icon:hover {
border-bottom: none;
display: inline-block;
.leaflet-control-geocoder a:hover,
.leaflet-control-geocoder .leaflet-control-geocoder-icon:hover {
border-bottom: none;
display: inline-block;
}
.leaflet-control-geocoder-form {
display: none;
vertical-align: middle;
display: none;
vertical-align: middle;
}
.leaflet-control-geocoder-expanded .leaflet-control-geocoder-form {
display: inline-block;
display: inline-block;
}
.leaflet-control-geocoder-form input {
font-size: 120%;
border: 0;
background-color: transparent;
width: 246px;
font-size: 120%;
border: 0;
background-color: transparent;
width: 246px;
}
.leaflet-control-geocoder-icon {
border-radius: 4px;
width: 26px;
height: 26px;
border: none;
background-color: white;
background-image: url(images/geocoder.png);
background-repeat: no-repeat;
background-position: center;
border-radius: 4px;
width: 26px;
height: 26px;
border: none;
background-color: white;
background-image: url(images/geocoder.png);
background-repeat: no-repeat;
background-position: center;
cursor: pointer;
}
.leaflet-touch .leaflet-control-geocoder-icon {
width: 30px;
height: 30px;
width: 30px;
height: 30px;
}
.leaflet-control-geocoder-throbber .leaflet-control-geocoder-icon {
background-image: url(images/throbber.gif);
background-image: url(images/throbber.gif);
}
.leaflet-control-geocoder-form-no-error {
display: none;
display: none;
}
.leaflet-control-geocoder-form input:focus {
outline: none;
outline: none;
}
.leaflet-control-geocoder-form button {
display: none;
display: none;
}
.leaflet-control-geocoder-error {
margin-top: 8px;
margin-left: 8px;
display: block;
color: #444;
margin-top: 8px;
margin-left: 8px;
display: block;
color: #444;
}
.leaflet-control-geocoder-alternatives {
display: block;
width: 272px;
list-style: none;
padding: 0;
margin: 0;
display: block;
width: 272px;
list-style: none;
padding: 0;
margin: 0;
}
.leaflet-control-geocoder-alternatives-minimized {
display: none;
height: 0;
display: none;
height: 0;
}
.leaflet-control-geocoder-alternatives li {
white-space: nowrap;
display: block;
overflow: hidden;
padding: 5px 8px;
text-overflow: ellipsis;
border-bottom: 1px solid #ccc;
cursor: pointer;
white-space: nowrap;
display: block;
overflow: hidden;
padding: 5px 8px;
text-overflow: ellipsis;
border-bottom: 1px solid #ccc;
cursor: pointer;
}
.leaflet-control-geocoder-alternatives li a, .leaflet-control-geocoder-alternatives li a:hover {
width: inherit;
height: inherit;
line-height: inherit;
background: inherit;
border-radius: inherit;
text-align: left;
.leaflet-control-geocoder-alternatives li a,
.leaflet-control-geocoder-alternatives li a:hover {
width: inherit;
height: inherit;
line-height: inherit;
background: inherit;
border-radius: inherit;
text-align: left;
}
.leaflet-control-geocoder-alternatives li:last-child {
border-bottom: none;
border-bottom: none;
}
.leaflet-control-geocoder-alternatives li:hover, .leaflet-control-geocoder-selected {
background-color: #f5f5f5;
.leaflet-control-geocoder-alternatives li:hover,
.leaflet-control-geocoder-selected {
background-color: #f5f5f5;
}
.leaflet-control-geocoder-address-detail {
}
.leaflet-control-geocoder-address-context {
color: #666;
}
color: #666;
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@@ -1 +1 @@
.leaflet-control-geocoder .leaflet-control-geocoder-icon,.leaflet-control-geocoder .leaflet-control-geocoder-icon:hover,.leaflet-control-geocoder a,.leaflet-control-geocoder a:hover{border-bottom:none;display:inline-block}.leaflet-control-geocoder{border-radius:4px;background:#fff;min-width:26px;min-height:26px}.leaflet-touch .leaflet-control-geocoder{min-width:30px;min-height:30px}.leaflet-control-geocoder .leaflet-control-geocoder-alternatives a{width:inherit;height:inherit;line-height:inherit}.leaflet-control-geocoder-form{display:none;vertical-align:middle}.leaflet-control-geocoder-expanded .leaflet-control-geocoder-form{display:inline-block}.leaflet-control-geocoder-form button,.leaflet-control-geocoder-form-no-error{display:none}.leaflet-control-geocoder-form input{font-size:120%;border:0;background-color:transparent;width:246px}.leaflet-control-geocoder-icon{border-radius:4px;width:26px;height:26px;border:none;background-color:#fff;background-image:url('images/geocoder.png');background-repeat:no-repeat;background-position:center}.leaflet-touch .leaflet-control-geocoder-icon{width:30px;height:30px}.leaflet-control-geocoder-throbber .leaflet-control-geocoder-icon{background-image:url('images/throbber.gif')}.leaflet-control-geocoder-form input:focus{outline:0}.leaflet-control-geocoder-error{margin-top:8px;margin-left:8px;display:block;color:#444}.leaflet-control-geocoder-alternatives{display:block;width:272px;list-style:none;padding:0;margin:0}.leaflet-control-geocoder-alternatives-minimized{display:none;height:0}.leaflet-control-geocoder-alternatives li{white-space:nowrap;display:block;overflow:hidden;padding:5px 8px;text-overflow:ellipsis;border-bottom:1px solid #ccc;cursor:pointer}.leaflet-control-geocoder-alternatives li a,.leaflet-control-geocoder-alternatives li a:hover{width:inherit;height:inherit;line-height:inherit;background:inherit;border-radius:inherit;text-align:left}.leaflet-control-geocoder-alternatives li:last-child{border-bottom:none}.leaflet-control-geocoder-alternatives li:hover,.leaflet-control-geocoder-selected{background-color:#f5f5f5}.leaflet-control-geocoder-address-context{color:#666}
.leaflet-control-geocoder{border-radius:4px;background:#fff;min-width:26px;min-height:26px}.leaflet-touch .leaflet-control-geocoder{min-width:30px;min-height:30px}.leaflet-control-geocoder .leaflet-control-geocoder-icon,.leaflet-control-geocoder a{border-bottom:none;display:inline-block}.leaflet-control-geocoder .leaflet-control-geocoder-alternatives a{width:inherit;height:inherit;line-height:inherit}.leaflet-control-geocoder .leaflet-control-geocoder-icon:hover,.leaflet-control-geocoder a:hover{border-bottom:none;display:inline-block}.leaflet-control-geocoder-form{display:none;vertical-align:middle}.leaflet-control-geocoder-expanded .leaflet-control-geocoder-form{display:inline-block}.leaflet-control-geocoder-form input{font-size:120%;border:0;background-color:transparent;width:246px}.leaflet-control-geocoder-icon{border-radius:4px;width:26px;height:26px;border:none;background-color:#fff;background-image:url('images/geocoder.png');background-repeat:no-repeat;background-position:center;cursor:pointer}.leaflet-touch .leaflet-control-geocoder-icon{width:30px;height:30px}.leaflet-control-geocoder-throbber .leaflet-control-geocoder-icon{background-image:url('images/throbber.gif')}.leaflet-control-geocoder-form-no-error{display:none}.leaflet-control-geocoder-form input:focus{outline:0}.leaflet-control-geocoder-form button{display:none}.leaflet-control-geocoder-error{margin-top:8px;margin-left:8px;display:block;color:#444}.leaflet-control-geocoder-alternatives{display:block;width:272px;list-style:none;padding:0;margin:0}.leaflet-control-geocoder-alternatives-minimized{display:none;height:0}.leaflet-control-geocoder-alternatives li{white-space:nowrap;display:block;overflow:hidden;padding:5px 8px;text-overflow:ellipsis;border-bottom:1px solid #ccc;cursor:pointer}.leaflet-control-geocoder-alternatives li a,.leaflet-control-geocoder-alternatives li a:hover{width:inherit;height:inherit;line-height:inherit;background:inherit;border-radius:inherit;text-align:left}.leaflet-control-geocoder-alternatives li:last-child{border-bottom:none}.leaflet-control-geocoder-alternatives li:hover,.leaflet-control-geocoder-selected{background-color:#f5f5f5}.leaflet-control-geocoder-address-context{color:#666}

File diff suppressed because one or more lines are too long

View File

@@ -9,11 +9,11 @@ While I can't force anyone to do anything, if you happen to disagree with this,
Leaflet Control Geocoder [![NPM version](https://img.shields.io/npm/v/leaflet-control-geocoder.svg)](https://www.npmjs.com/package/leaflet-control-geocoder) ![Leaflet 1.0.0 compatible!](https://img.shields.io/badge/Leaflet%201.0.0-%E2%9C%93-1EB300.svg?style=flat)
=============================
A simple geocoder for [Leaflet](http://leafletjs.com/) that by default uses [OSM](http://www.openstreetmap.org/)/[Nominatim](http://wiki.openstreetmap.org/wiki/Nominatim).
A simple geocoder for [Leaflet](http://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](http://www.openstreetmap.org/)/[Nominatim](http://wiki.openstreetmap.org/wiki/Nominatim)
* [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/)
@@ -21,7 +21,7 @@ The plugin supports many different data providers:
* [What3Words](http://what3words.com/)
* [Photon](http://photon.komoot.de/)
* [Mapzen Search](https://mapzen.com/projects/search)
* [HERE Geocoder API] (https://developer.here.com/rest-apis/documentation/geocoder/topics/overview.html)
* [HERE Geocoder API](https://developer.here.com/documentation/geocoder/topics/introduction.html)
The plugin can easily be extended to support other providers. Current extensions:
@@ -31,12 +31,11 @@ See the [Leaflet Control Geocoder Demo](http://perliedman.github.com/leaflet-con
# Usage
[Download latest release](https://github.com/perliedman/leaflet-control-geocoder/releases). Load the CSS and Javascript, located in
the `dist` folder:
[Download latest release](https://github.com/perliedman/leaflet-control-geocoder/releases), or obtain the latest release via [unpkg.com](https://unpkg.com/):
```HTML
<link rel="stylesheet" href="Control.Geocoder.css" />
<script src="Control.Geocoder.js"></script>
<link rel="stylesheet" href="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.css" />
<script src="https://unpkg.com/leaflet-control-geocoder/dist/Control.Geocoder.js"></script>
```
Add the control to a map instance:
@@ -85,48 +84,55 @@ 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:
```js
L.Control.Geocoder(options)
new L.Control.Geocoder(options)
// or
L.Control.geocoder(options)
```
### Options
| Option | Type | Default | Description |
| --------------- | ---------------- | ----------------- | ----------- |
| collapsed | Boolean | true | Collapse control unless hovered/clicked |
| 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](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 |
### Methods
| Method | Returns | Description |
| ------------------------------------- | ------------------- | ----------------- |
| markGeocode(<GeocodingResult> result) | this | Marks a geocoding result on the map |
| `markGeocode(<GeocodingResult> result)` | `this` | Marks a geocoding result on the map |
## L.Control.Geocoder.Nominatim
Uses [Nominatim](http://wiki.openstreetmap.org/wiki/Nominatim) to respond to geocoding queries. This is the default
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```.
Unless using your own Nominatim installation, please refer to the [Nominatim usage policy](http://wiki.openstreetmap.org/wiki/Nominatim_usage_policy).
Unless using your own Nominatim installation, please refer to the [Nominatim usage policy](https://operations.osmfoundation.org/policies/nominatim/).
### Constructor
```js
L.Control.Geocoder.Nominatim(options)
new L.Control.Geocoder.Nominatim(options)
// or
L.Control.Geocoder.nominatim(options)
```
## Options
| Option | Type | Default | Description |
| --------------- | ---------------- | ----------------- | ----------- |
| serviceUrl | String | "http://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`](http://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
| `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
@@ -136,8 +142,10 @@ Note that you need an API key to use this service.
### Constructor
```
L.Control.Geocoder.Bing(<String> key)
```ts
new L.Control.Geocoder.Bing(<String> key)
// or
L.Control.Geocoder.bing(<String> key)
```
## IGeocoder
@@ -148,8 +156,8 @@ An interface implemented to respond to geocoding queries.
| 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 |
| `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 |
## GeocodingResult
@@ -157,10 +165,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 |

View File

@@ -1,10 +1,18 @@
{
"name": "leaflet-control-geocoder",
"version": "1.5.5",
"version": "1.6.0",
"description": "Extendable geocoder with builtin support for Nominatim, Bing, Google, Mapbox, Photon, What3Words, MapQuest, Mapzen, HERE",
"main": "dist/Control.Geocoder.js",
"scripts": {
"prepublish": "sh ./scripts/build.sh",
"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: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"
},
@@ -31,14 +39,12 @@
"bugs": {
"url": "https://github.com/perliedman/leaflet-control-geocoder/issues"
},
"browserify-shim": {
"leaflet": "global:L"
},
"dependencies": {},
"devDependencies": {
"browserify": "^11.0.1",
"browserify-shim": "^3.8.10",
"derequire": "^2.0.3",
"es3ify": "^0.1.4"
"cpr": "^3.0.1",
"eslint": "^4.15.0",
"eslint-plugin-prettier": "^2.4.0",
"prettier": "^1.9.2",
"rollup": "^0.53.2"
}
}

View File

@@ -17,7 +17,7 @@ module.exports = function(grunt) {
less: require('./build/grunt-config/less'), // Config to compile and autoprefix less files
uglify: require('./build/grunt-config/uglify'),
jshint: require('./build/grunt-config/jshint'), // Lint Javascript
rollup: require('./build/grunt-config/rollup-config')
});
/*****************************************************
@@ -33,8 +33,9 @@ module.exports = function(grunt) {
// Javascript Dev Build - Checks for Errors in Javascript
grunt.registerTask('js-dev', [], function(){
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-rollup');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.task.run('jshint:all', 'uglify:dev');
grunt.task.run('jshint:all', 'rollup', 'uglify:build');
});
/*****************************************************
@@ -50,8 +51,9 @@ module.exports = function(grunt) {
// 'grunt js-build' compiles only javascript
grunt.registerTask('js-build', [], function(){
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-rollup');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.task.run('jshint:all', 'uglify:build');
grunt.task.run('jshint:all', 'rollup', 'uglify:build');
});

View File

@@ -1,4 +1,4 @@
# Leaflet.extra-markers plugin v1.0.4
# Leaflet.extra-markers
<a href="https://github.com/lvoogdt/Leaflet.awesome-markers">Big Thanks to lvoogdt of Leaflet.awesome-markers</a>
![ExtraMarkers screenshot](https://raw.github.com/coryasilva/Leaflet.ExtraMarkers/master/screenshot.png "Screenshot of ExtraMarkers")
@@ -48,7 +48,7 @@ Now use the plugin to create a marker like this:
prefix: 'fa'
});
L.marker([51.941196,4.512291], {icon: redMarker,}).addTo(map);
L.marker([51.941196,4.512291], {icon: redMarker}).addTo(map);
````
---

View File

@@ -1,6 +1,6 @@
{
"name": "Leaflet.extra-markers",
"version": "1.0.6",
"version": "1.0.8",
"homepage": "https://github.com/coryasilva/Leaflet.ExtraMarkers",
"authors": [
"Cory Silva"

View File

@@ -1 +1,8 @@
.extra-marker{background:url("../img/markers_default.png") no-repeat 0 0;width:35px;height:46px;position:absolute;left:0;top:0;display:block;text-align:center}.extra-marker-shadow{background:url("../img/markers_shadow.png") no-repeat 0 0;width:36px;height:16px}@media (min--moz-device-pixel-ratio:1.5),(-webkit-min-device-pixel-ratio:1.5),(min-device-pixel-ratio:1.5),(min-resolution:1.5dppx){.extra-marker{background-image:url("../img/markers_default@2x.png");background-size:540px 184px}.extra-marker-shadow{background-image:url("../img/markers_shadow@2x.png");background-size:35px 16px}}.extra-marker i{color:#fff;margin-top:10px;display:inline-block;font-size:14px}.extra-marker i.icon{margin-right:0;opacity:1}.extra-marker-circle-red{background-position:0 0}.extra-marker-circle-orange-dark{background-position:-36px 0}.extra-marker-circle-orange{background-position:-72px 0}.extra-marker-circle-yellow{background-position:-108px 0}.extra-marker-circle-blue-dark{background-position:-144px 0}.extra-marker-circle-blue{background-position:-180px 0}.extra-marker-circle-cyan{background-position:-216px 0}.extra-marker-circle-purple{background-position:-252px 0}.extra-marker-circle-violet{background-position:-288px 0}.extra-marker-circle-pink{background-position:-324px 0}.extra-marker-circle-green-dark{background-position:-360px 0}.extra-marker-circle-green{background-position:-396px 0}.extra-marker-circle-green-light{background-position:-432px 0}.extra-marker-circle-black{background-position:-468px 0}.extra-marker-circle-white{background-position:-504px 0}.extra-marker-square-red{background-position:0 -46px}.extra-marker-square-orange-dark{background-position:-36px -46px}.extra-marker-square-orange{background-position:-72px -46px}.extra-marker-square-yellow{background-position:-108px -46px}.extra-marker-square-blue-dark{background-position:-144px -46px}.extra-marker-square-blue{background-position:-180px -46px}.extra-marker-square-cyan{background-position:-216px -46px}.extra-marker-square-purple{background-position:-252px -46px}.extra-marker-square-violet{background-position:-288px -46px}.extra-marker-square-pink{background-position:-324px -46px}.extra-marker-square-green-dark{background-position:-360px -46px}.extra-marker-square-green{background-position:-396px -46px}.extra-marker-square-green-light{background-position:-432px -46px}.extra-marker-square-black{background-position:-468px -46px}.extra-marker-square-white{background-position:-504px -46px}.extra-marker-star-red{background-position:0 -92px}.extra-marker-star-orange-dark{background-position:-36px -92px}.extra-marker-star-orange{background-position:-72px -92px}.extra-marker-star-yellow{background-position:-108px -92px}.extra-marker-star-blue-dark{background-position:-144px -92px}.extra-marker-star-blue{background-position:-180px -92px}.extra-marker-star-cyan{background-position:-216px -92px}.extra-marker-star-purple{background-position:-252px -92px}.extra-marker-star-violet{background-position:-288px -92px}.extra-marker-star-pink{background-position:-324px -92px}.extra-marker-star-green-dark{background-position:-360px -92px}.extra-marker-star-green{background-position:-396px -92px}.extra-marker-star-green-light{background-position:-432px -92px}.extra-marker-star-black{background-position:-468px -92px}.extra-marker-star-white{background-position:-504px -92px}.extra-marker-penta-red{background-position:0 -138px}.extra-marker-penta-orange-dark{background-position:-36px -138px}.extra-marker-penta-orange{background-position:-72px -138px}.extra-marker-penta-yellow{background-position:-108px -138px}.extra-marker-penta-blue-dark{background-position:-144px -138px}.extra-marker-penta-blue{background-position:-180px -138px}.extra-marker-penta-cyan{background-position:-216px -138px}.extra-marker-penta-purple{background-position:-252px -138px}.extra-marker-penta-violet{background-position:-288px -138px}.extra-marker-penta-pink{background-position:-324px -138px}.extra-marker-penta-green-dark{background-position:-360px -138px}.extra-marker-penta-green{background-position:-396px -138px}.extra-marker-penta-green-light{background-position:-432px -138px}.extra-marker-penta-black{background-position:-468px -138px}.extra-marker-penta-white{background-position:-504px -138px}.extra-marker .fa-number:before{content:attr(number)}
/*!
* 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
*/.extra-marker{background:url("../img/markers_default.png") no-repeat 0 0;width:35px;height:46px;position:absolute;left:0;top:0;display:block;text-align:center}.extra-marker-shadow{background:url("../img/markers_shadow.png") no-repeat 0 0;width:36px;height:16px}@media (min--moz-device-pixel-ratio:1.5),(-webkit-min-device-pixel-ratio:1.5),(min-device-pixel-ratio:1.5),(min-resolution:1.5dppx){.extra-marker{background-image:url("../img/markers_default@2x.png");background-size:540px 184px}.extra-marker-shadow{background-image:url("../img/markers_shadow@2x.png");background-size:35px 16px}}.extra-marker i{color:#fff;margin-top:7px;display:inline-block;font-size:14px}.extra-marker i.fa,.extra-marker i.glyphicon{margin-top:10px}.extra-marker i.icon{margin-right:0;opacity:1}.extra-marker-circle-red{background-position:0 0}.extra-marker-circle-orange-dark{background-position:-36px 0}.extra-marker-circle-orange{background-position:-72px 0}.extra-marker-circle-yellow{background-position:-108px 0}.extra-marker-circle-blue-dark{background-position:-144px 0}.extra-marker-circle-blue{background-position:-180px 0}.extra-marker-circle-cyan{background-position:-216px 0}.extra-marker-circle-purple{background-position:-252px 0}.extra-marker-circle-violet{background-position:-288px 0}.extra-marker-circle-pink{background-position:-324px 0}.extra-marker-circle-green-dark{background-position:-360px 0}.extra-marker-circle-green{background-position:-396px 0}.extra-marker-circle-green-light{background-position:-432px 0}.extra-marker-circle-black{background-position:-468px 0}.extra-marker-circle-white{background-position:-504px 0}.extra-marker-square-red{background-position:0 -46px}.extra-marker-square-orange-dark{background-position:-36px -46px}.extra-marker-square-orange{background-position:-72px -46px}.extra-marker-square-yellow{background-position:-108px -46px}.extra-marker-square-blue-dark{background-position:-144px -46px}.extra-marker-square-blue{background-position:-180px -46px}.extra-marker-square-cyan{background-position:-216px -46px}.extra-marker-square-purple{background-position:-252px -46px}.extra-marker-square-violet{background-position:-288px -46px}.extra-marker-square-pink{background-position:-324px -46px}.extra-marker-square-green-dark{background-position:-360px -46px}.extra-marker-square-green{background-position:-396px -46px}.extra-marker-square-green-light{background-position:-432px -46px}.extra-marker-square-black{background-position:-468px -46px}.extra-marker-square-white{background-position:-504px -46px}.extra-marker-star-red{background-position:0 -92px}.extra-marker-star-orange-dark{background-position:-36px -92px}.extra-marker-star-orange{background-position:-72px -92px}.extra-marker-star-yellow{background-position:-108px -92px}.extra-marker-star-blue-dark{background-position:-144px -92px}.extra-marker-star-blue{background-position:-180px -92px}.extra-marker-star-cyan{background-position:-216px -92px}.extra-marker-star-purple{background-position:-252px -92px}.extra-marker-star-violet{background-position:-288px -92px}.extra-marker-star-pink{background-position:-324px -92px}.extra-marker-star-green-dark{background-position:-360px -92px}.extra-marker-star-green{background-position:-396px -92px}.extra-marker-star-green-light{background-position:-432px -92px}.extra-marker-star-black{background-position:-468px -92px}.extra-marker-star-white{background-position:-504px -92px}.extra-marker-penta-red{background-position:0 -138px}.extra-marker-penta-orange-dark{background-position:-36px -138px}.extra-marker-penta-orange{background-position:-72px -138px}.extra-marker-penta-yellow{background-position:-108px -138px}.extra-marker-penta-blue-dark{background-position:-144px -138px}.extra-marker-penta-blue{background-position:-180px -138px}.extra-marker-penta-cyan{background-position:-216px -138px}.extra-marker-penta-purple{background-position:-252px -138px}.extra-marker-penta-violet{background-position:-288px -138px}.extra-marker-penta-pink{background-position:-324px -138px}.extra-marker-penta-green-dark{background-position:-360px -138px}.extra-marker-penta-green{background-position:-396px -138px}.extra-marker-penta-green-light{background-position:-432px -138px}.extra-marker-penta-black{background-position:-468px -138px}.extra-marker-penta-white{background-position:-504px -138px}.extra-marker .fa-number:before{content:attr(number)}

View File

@@ -0,0 +1,120 @@
/*!
* 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
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.leaflet = global.leaflet || {}, global.leaflet['extra-markers'] = {})));
}(this, (function (exports) { 'use strict';
var ExtraMarkers = L.ExtraMarkers = {};
ExtraMarkers.version = L.ExtraMarkers.version = "1.0.8";
ExtraMarkers.Icon = L.ExtraMarkers.Icon = L.Icon.extend({
options: {
iconSize: [ 35, 45 ],
iconAnchor: [ 17, 42 ],
popupAnchor: [ 1, -32 ],
shadowAnchor: [ 10, 12 ],
shadowSize: [ 36, 16 ],
className: "",
prefix: "",
extraClasses: "",
shape: "circle",
icon: "",
innerHTML: "",
markerColor: "red",
svgBorderColor: "#fff",
svgOpacity: 1,
iconColor: "#fff",
number: "",
svg: false
},
initialize: function(options) {
options = L.Util.setOptions(this, options);
},
createIcon: function() {
var div = document.createElement("div"), options = this.options;
if (options.icon) {
div.innerHTML = this._createInner();
}
if (options.innerHTML) {
div.innerHTML = options.innerHTML;
}
if (options.bgPos) {
div.style.backgroundPosition = -options.bgPos.x + "px " + -options.bgPos.y + "px";
}
if (!options.svg) {
this._setIconStyles(div, options.shape + "-" + options.markerColor);
} else {
this._setIconStyles(div, "svg");
}
return div;
},
_createInner: function() {
var iconColorStyle = "", iconNumber = "", options = this.options;
if (options.iconColor) {
iconColorStyle = "style='color: " + options.iconColor + "' ";
}
if (options.number) {
iconNumber = "number='" + options.number + "' ";
}
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>";
}
return "<i " + iconNumber + iconColorStyle + "class='" + options.extraClasses + " " + options.prefix + " " + options.icon + "'></i>";
},
_setIconStyles: function(img, name) {
var options = this.options, size = L.point(options[name === "shadow" ? "shadowSize" : "iconSize"]), anchor, leafletName;
if (name === "shadow") {
anchor = L.point(options.shadowAnchor || options.iconAnchor);
leafletName = "shadow";
} else {
anchor = L.point(options.iconAnchor);
leafletName = "icon";
}
if (!anchor && size) {
anchor = size.divideBy(2, true);
}
img.className = "leaflet-marker-" + leafletName + " extra-marker extra-marker-" + name + " " + options.className;
if (anchor) {
img.style.marginLeft = -anchor.x + "px";
img.style.marginTop = -anchor.y + "px";
}
if (size) {
img.style.width = size.x + "px";
img.style.height = size.y + "px";
}
},
createShadow: function() {
var div = document.createElement("div");
this._setIconStyles(div, "shadow");
return div;
}
});
ExtraMarkers.icon = L.ExtraMarkers.icon = function(options) {
return new L.ExtraMarkers.Icon(options);
};
exports.ExtraMarkers = ExtraMarkers;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=leaflet.extra-markers.js.map

File diff suppressed because one or more lines are too long

View File

@@ -1 +1,10 @@
!function(a,b){"use strict";L.ExtraMarkers={},L.ExtraMarkers.version="1.0.1",L.ExtraMarkers.Icon=L.Icon.extend({options:{iconSize:[35,45],iconAnchor:[17,42],popupAnchor:[1,-32],shadowAnchor:[10,12],shadowSize:[36,16],className:"extra-marker",prefix:"",extraClasses:"",shape:"circle",icon:"",innerHTML:"",markerColor:"red",iconColor:"#fff",number:""},initialize:function(a){a=L.Util.setOptions(this,a)},createIcon:function(){var a=b.createElement("div"),c=this.options;return c.icon&&(a.innerHTML=this._createInner()),c.innerHTML&&(a.innerHTML=c.innerHTML),c.bgPos&&(a.style.backgroundPosition=-c.bgPos.x+"px "+-c.bgPos.y+"px"),this._setIconStyles(a,c.shape+"-"+c.markerColor),a},_createInner:function(){var a="",b="",c=this.options;return c.iconColor&&(a="style='color: "+c.iconColor+"' "),c.number&&(b="number='"+c.number+"' "),"<i "+b+a+"class='"+c.extraClasses+" "+c.prefix+" "+c.icon+"'></i>"},_setIconStyles:function(a,b){var c,d,e=this.options,f=L.point(e["shadow"===b?"shadowSize":"iconSize"]);"shadow"===b?(c=L.point(e.shadowAnchor||e.iconAnchor),d="shadow"):(c=L.point(e.iconAnchor),d="icon"),!c&&f&&(c=f.divideBy(2,!0)),a.className="leaflet-marker-"+d+" extra-marker-"+b+" "+e.className,c&&(a.style.marginLeft=-c.x+"px",a.style.marginTop=-c.y+"px"),f&&(a.style.width=f.x+"px",a.style.height=f.y+"px")},createShadow:function(){var a=b.createElement("div");return this._setIconStyles(a,"shadow"),a}}),L.ExtraMarkers.icon=function(a){return new L.ExtraMarkers.Icon(a)}}(window,document);
/*!
* 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
*/
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports):"function"==typeof define&&define.amd?define(["exports"],r):r((e.leaflet=e.leaflet||{},e.leaflet["extra-markers"]={}))}(this,function(e){"use strict";var r=L.ExtraMarkers={};r.version=L.ExtraMarkers.version="1.0.8",r.Icon=L.ExtraMarkers.Icon=L.Icon.extend({options:{iconSize:[35,45],iconAnchor:[17,42],popupAnchor:[1,-32],shadowAnchor:[10,12],shadowSize:[36,16],className:"",prefix:"",extraClasses:"",shape:"circle",icon:"",innerHTML:"",markerColor:"red",svgBorderColor:"#fff",svgOpacity:1,iconColor:"#fff",number:"",svg:!1},initialize:function(e){e=L.Util.setOptions(this,e)},createIcon:function(){var e=document.createElement("div"),r=this.options;return r.icon&&(e.innerHTML=this._createInner()),r.innerHTML&&(e.innerHTML=r.innerHTML),r.bgPos&&(e.style.backgroundPosition=-r.bgPos.x+"px "+-r.bgPos.y+"px"),r.svg?this._setIconStyles(e,"svg"):this._setIconStyles(e,r.shape+"-"+r.markerColor),e},_createInner:function(){var e="",r="",t=this.options;if(t.iconColor&&(e="style='color: "+t.iconColor+"' "),t.number&&(r="number='"+t.number+"' "),t.svg){var s='<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:'+t.markerColor+";stroke:"+t.svgBorderColor+";fill-opacity:"+t.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>';return"square"===t.shape&&(s='<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:'+t.markerColor+";stroke:"+t.svgBorderColor+";fill-opacity:"+t.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>'),"star"===t.shape&&(s='<svg style="top:0; fill:'+t.markerColor+";stroke:"+t.svgBorderColor+";fill-opacity:"+t.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>'),"penta"===t.shape&&(s='<svg style="fill:'+t.markerColor+";stroke:"+t.svgBorderColor+";fill-opacity:"+t.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>'),s+"<i "+r+e+"class='"+t.extraClasses+" "+t.prefix+" "+t.icon+"'></i>"}return"<i "+r+e+"class='"+t.extraClasses+" "+t.prefix+" "+t.icon+"'></i>"},_setIconStyles:function(e,r){var t,s,o=this.options,n=L.point(o["shadow"===r?"shadowSize":"iconSize"]);"shadow"===r?(t=L.point(o.shadowAnchor||o.iconAnchor),s="shadow"):(t=L.point(o.iconAnchor),s="icon"),!t&&n&&(t=n.divideBy(2,!0)),e.className="leaflet-marker-"+s+" extra-marker extra-marker-"+r+" "+o.className,t&&(e.style.marginLeft=-t.x+"px",e.style.marginTop=-t.y+"px"),n&&(e.style.width=n.x+"px",e.style.height=n.y+"px")},createShadow:function(){var e=document.createElement("div");return this._setIconStyles(e,"shadow"),e}}),r.icon=L.ExtraMarkers.icon=function(e){return new L.ExtraMarkers.Icon(e)},e.ExtraMarkers=r,Object.defineProperty(e,"__esModule",{value:!0})});

View File

@@ -0,0 +1,32 @@
import * as L from "leaflet";
declare module "leaflet" {
export namespace ExtraMarkers {
export interface IconOptions extends L.BaseIconOptions {
/** Additional classes in the created <i> tag. */
extraClasses?: string;
/** Name of the icon with prefix. */
icon?: string;
/** Color of the icon. Default value 'white'. */
iconColor?: string;
/** Custom HTML code. */
innerHTML?: string;
/** Color of the marker (css class). Default value 'blue'. */
markerColor?: "red" | "orange-dark" | "orange" | "yellow" | "blue" | "blue-dark" | "cyan" | "purple"
| "violet" | "pink" | "green-dark" | "green" | "green-light" | "black" | "white";
/** Instead of an icon, define a plain text. */
number?: string;
/** The icon library's base class. Default value 'glyphicon'. */
prefix?: string;
/** Shape of the marker (css class). Default value 'circle'. */
shape?: "circle" | "square" | "star" | "penta";
}
export class Icon extends L.Icon {
constructor(options: IconOptions)
}
export function icon(options: IconOptions): Icon;
}
}

View File

@@ -2,20 +2,27 @@
"name": "Leaflet.extra-markers",
"title": "Leaflet ExtraMarkers",
"url": "https://github.com/coryasilva/Leaflet.ExtraMarkers/",
"version": "1.0.6",
"version": "1.0.8",
"description": "Custom Markers for Leaflet JS based on Awesome Markers",
"author": "coryasilva <https://github.com/coryasilva>",
"repository": {
"type": "git",
"url": "https://github.com/coryasilva/Leaflet.ExtraMarkers"
},
"main": "src/assets/js/leaflet.extra-markers.js",
"main": "dist/js/leaflet.extra-markers.js",
"types": "dist/leaflet.extra-markers.d.ts",
"peerDependencies": {
"leaflet": ">= 0.5 < 2"
},
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-jshint": "^0.11.0",
"grunt-contrib-uglify": "^0.8.0",
"grunt-contrib-less": "^1.1.0",
"git-rev-sync": "^1.10.0",
"grunt": "^1.0.2",
"grunt-contrib-jshint": "^1.1.0",
"grunt-contrib-less": "^1.4.1",
"grunt-contrib-uglify": "^3.3.0",
"grunt-rollup": "^9.0.0",
"less-plugin-autoprefix": "^1.5.1",
"time-grunt": "^1.1.0"
"rollup-plugin-git-version": "^0.2.1",
"time-grunt": "^1.4.0"
}
}

View File

@@ -46,12 +46,12 @@ L.Control.FullScreen = L.Control.extend({
L.DomEvent
.addListener(container, fullScreenApi.fullScreenEventName, L.DomEvent.stopPropagation)
.addListener(container, fullScreenApi.fullScreenEventName, L.DomEvent.preventDefault)
.addListener(container, fullScreenApi.fullScreenEventName, this._handleEscKey, context);
.addListener(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._handleEscKey, context);
.addListener(document, fullScreenApi.fullScreenEventName, this._handleFullscreenChange, context);
return this.link;
},
@@ -61,11 +61,10 @@ L.Control.FullScreen = L.Control.extend({
map._exitFired = false;
if (map._isFullscreen) {
if (fullScreenApi.supportsFullScreen && !this.options.forcePseudoFullscreen) {
fullScreenApi.cancelFullScreen(this.options.fullscreenElement ? this.options.fullscreenElement : map._container);
fullScreenApi.cancelFullScreen();
} else {
L.DomUtil.removeClass(map._container, 'leaflet-pseudo-fullscreen');
L.DomUtil.removeClass(this.options.fullscreenElement ? this.options.fullscreenElement : map._container, 'leaflet-pseudo-fullscreen');
}
map.invalidateSize();
map.fire('exitFullscreen');
map._exitFired = true;
map._isFullscreen = false;
@@ -74,9 +73,8 @@ L.Control.FullScreen = L.Control.extend({
if (fullScreenApi.supportsFullScreen && !this.options.forcePseudoFullscreen) {
fullScreenApi.requestFullScreen(this.options.fullscreenElement ? this.options.fullscreenElement : map._container);
} else {
L.DomUtil.addClass(map._container, 'leaflet-pseudo-fullscreen');
L.DomUtil.addClass(this.options.fullscreenElement ? this.options.fullscreenElement : map._container, 'leaflet-pseudo-fullscreen');
}
map.invalidateSize();
map.fire('enterFullscreen');
map._isFullscreen = true;
}
@@ -86,9 +84,10 @@ L.Control.FullScreen = L.Control.extend({
this.link.title = this._map._isFullscreen ? this.options.title : this.options.titleCancel;
},
_handleEscKey: function () {
_handleFullscreenChange: function () {
var map = this._map;
if (!fullScreenApi.isFullScreen(map) && !map._exitFired) {
map.invalidateSize();
if (!fullScreenApi.isFullScreen() && !map._exitFired) {
map.fire('exitFullscreen');
map._exitFired = true;
map._isFullscreen = false;

View File

@@ -1 +1 @@
.leaflet-container:full-screen,.leaflet-pseudo-fullscreen{width:100%!important;height:100%!important;z-index:99999}.fullscreen-icon{background-image:url('icon-fullscreen.png')}.leaflet-retina .fullscreen-icon{background-image:url('icon-fullscreen-2x.png');background-size:26px 26px}.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:fullscreen{width:100%!important;height:100%!important;z-index:99999}.leaflet-pseudo-fullscreen{position:fixed!important;top:0!important;left:0!important}
.fullscreen-icon{background-image:url('icon-fullscreen.png')}.leaflet-retina .fullscreen-icon{background-image:url('icon-fullscreen-2x.png');background-size:26px 26px}.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:0!important;left:0!important;z-index:99999}

View File

@@ -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 t,n="leaflet-control-zoom-fullscreen",l="";return t=e.zoomControl&&!this.options.forceSeparateButton?e.zoomControl._container:L.DomUtil.create("div","leaflet-bar"),this.options.content?l=this.options.content:n+=" fullscreen-icon",this._createButton(this.options.title,n,l,t,this.toggleFullScreen,this),this._map.on("enterFullscreen exitFullscreen",this._toggleTitle,this),t},_createButton:function(t,n,l,r,i,s){return this.link=L.DomUtil.create("a",n,r),this.link.href="#",this.link.title=t,this.link.innerHTML=l,L.DomEvent.addListener(this.link,"click",L.DomEvent.stopPropagation).addListener(this.link,"click",L.DomEvent.preventDefault).addListener(this.link,"click",i,s),L.DomEvent.addListener(r,e.fullScreenEventName,L.DomEvent.stopPropagation).addListener(r,e.fullScreenEventName,L.DomEvent.preventDefault).addListener(r,e.fullScreenEventName,this._handleEscKey,s),L.DomEvent.addListener(document,e.fullScreenEventName,L.DomEvent.stopPropagation).addListener(document,e.fullScreenEventName,L.DomEvent.preventDefault).addListener(document,e.fullScreenEventName,this._handleEscKey,s),this.link},toggleFullScreen:function(){var t=this._map;t._exitFired=!1,t._isFullscreen?(e.supportsFullScreen&&!this.options.forcePseudoFullscreen?e.cancelFullScreen(this.options.fullscreenElement?this.options.fullscreenElement:t._container):L.DomUtil.removeClass(t._container,"leaflet-pseudo-fullscreen"),t.invalidateSize(),t.fire("exitFullscreen"),t._exitFired=!0,t._isFullscreen=!1):(e.supportsFullScreen&&!this.options.forcePseudoFullscreen?e.requestFullScreen(this.options.fullscreenElement?this.options.fullscreenElement:t._container):L.DomUtil.addClass(t._container,"leaflet-pseudo-fullscreen"),t.invalidateSize(),t.fire("enterFullscreen"),t._isFullscreen=!0)},_toggleTitle:function(){this.link.title=this._map._isFullscreen?this.options.title:this.options.titleCancel},_handleEscKey:function(){var t=this._map;e.isFullScreen(t)||t._exitFired||(t.fire("exitFullscreen"),t._exitFired=!0,t._isFullscreen=!1)}}),L.Map.addInitHook(function(){this.options.fullscreenControl&&(this.fullscreenControl=L.control.fullscreen(this.options.fullscreenControlOptions),this.addControl(this.fullscreenControl))}),L.control.fullscreen=function(e){return new L.Control.FullScreen(e)};var e={supportsFullScreen:!1,isFullScreen:function(){return!1},requestFullScreen:function(){},cancelFullScreen:function(){},fullScreenEventName:"",prefix:""},t="webkit moz o ms khtml".split(" ");if(void 0!==document.exitFullscreen)e.supportsFullScreen=!0;else{for(var n=0,l=t.length;n<l;n++)if(e.prefix=t[n],void 0!==document[e.prefix+"CancelFullScreen"]){e.supportsFullScreen=!0;break}void 0!==document.msExitFullscreen&&(e.prefix="ms",e.supportsFullScreen=!0)}e.supportsFullScreen&&("ms"===e.prefix?e.fullScreenEventName="MSFullscreenChange":e.fullScreenEventName=e.prefix+"fullscreenchange",e.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"]}},e.requestFullScreen=function(e){switch(this.prefix){case"":return e.requestFullscreen();case"ms":return e.msRequestFullscreen();default:return e[this.prefix+"RequestFullScreen"]()}},e.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 t=jQuery(this);e.supportsFullScreen&&e.requestFullScreen(t)})}),window.fullScreenApi=e}();
!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}();

View File

@@ -37,6 +37,8 @@ If your map have a zoomControl the fullscreen button will be added at the bottom
If your map doesn't have a zoomContron the fullscreen button will be added to topleft corner of the map (same as the zoomcontrol).
If you want to use the plugin on a map embedded in an iframe, don't forget to set `allowfullscreen` attribute on your iframe.
__Events and options__:
``` js

View File

@@ -1,6 +1,6 @@
{
"name": "leaflet.fullscreen",
"version": "1.4.3",
"version": "1.4.5",
"homepage": "https://github.com/brunob/leaflet.fullscreen",
"license": "MIT",
"authors": [

View File

@@ -3,7 +3,7 @@
<head>
<meta charset='utf-8'>
<title>Leaflet.Control.FullScreen Demo</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.css" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.1/dist/leaflet.css" />
<style type="text/css">
#map { width: 700px; height: 433px; }
.fullscreen-icon { background-image: url(icon-fullscreen.png); }
@@ -14,7 +14,7 @@
#map: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="http://cdn.leafletjs.com/leaflet/v0.7.7/leaflet.js"></script>
<script src="https://unpkg.com/leaflet@1.3.1/dist/leaflet.js"></script>
<script src="Control.FullScreen.js"></script>
</head>
<body>

View File

@@ -1,10 +1,10 @@
{
"name": "leaflet.fullscreen",
"version": "1.4.3",
"version": "1.4.5",
"description": "Simple plugin for Leaflet that adds fullscreen button to your maps.",
"main": "Control.FullScreen.js",
"scripts": {
"test": "jshint Control.FullScreen.js"
"test": "eslint --config .eslintrc Control.FullScreen.js"
},
"repository": {
"type": "git",

File diff suppressed because one or more lines are too long

View File

@@ -3,6 +3,47 @@ Leaflet.markercluster
(all changes without author notice are by [@danzel](https://github.com/danzel))
## 1.4.0 (2018-08-22)
Required leaflet version bumped to 1.3.1
### Improvements
* Tests run against leaflet 1.1.0+ [#863](https://github.com/Leaflet/Leaflet.markercluster/issues/863)
### Bugfixes
* Fix clearLayers not removing removed markers [#860](https://github.com/Leaflet/Leaflet.markercluster/issues/860)
* Remember opacity 0 correctly (by [@r-yanyo](https://github.com/r-yanyo)) [#890](https://github.com/Leaflet/Leaflet.markercluster/pull/890)
* Fix chunkedLoading LatLngBounds.intersects() (by [@boldtrn](https://github.com/boldtrn)) [#743](https://github.com/Leaflet/Leaflet.markercluster/issues/743) [#891](https://github.com/Leaflet/Leaflet.markercluster/pull/891)
## 1.3.0 (2018-01-19)
### Improvements
* Use Rollup for builds (by [@IvanSanchez](https://github.com/IvanSanchez)) [#769](https://github.com/Leaflet/Leaflet.markercluster/pull/769)
### Bugfixes
* Fix Spiderfier positioning for small markers (by [@ghybs](https://github.com/ghybs)) [#846](https://github.com/Leaflet/Leaflet.markercluster/pull/846)
* Fix anchor usage with latest leaflet version [#861](https://github.com/Leaflet/Leaflet.markercluster/issues/861)
## 1.2.0 (2017-11-06)
### Improvements
* Move `clusterPane` option in to `options` field (by [@ghybs](https://github.com/ghybs)) [#832](https://github.com/Leaflet/Leaflet.markercluster/pull/832)
### Bugfixes
* Fix very small `maxClusterRadius` hanging the browser (by [@lucaswerkmeister](https://github.com/lucaswerkmeister)) [#838](https://github.com/Leaflet/Leaflet.markercluster/pull/838)
## 1.1.0 (2017-08-27)
### Improvements
* Add `clusterPane` option to allow putting clusters in a different pane (by [@ckrahe](https://github.com/ckrahe)) [#819](https://github.com/Leaflet/Leaflet.markercluster/issues/819)
## 1.0.6 (2017-06-19)
### Bugfixes

View File

@@ -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.1.0` release](https://github.com/Leaflet/Leaflet.markercluster/archive/v1.1.0.zip)
* Use unpkg CDN: `https://unpkg.com/leaflet.markercluster@1.1.0/dist/`
* [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/`
* Install with npm: `npm install leaflet.markercluster`
In each case, use files in the `dist` folder:
@@ -289,3 +289,4 @@ Check also the below sub-plugins:
| [Leaflet.MarkerCluster.LayerSupport](https://github.com/ghybs/Leaflet.MarkerCluster.LayerSupport) | Brings compatibility with L.Control.Layers and other Leaflet plugins. I.e. everything that uses direct calls to map.addLayer and map.removeLayer. | [ghybs](https://github.com/ghybs) |
| [Leaflet.MarkerCluster.Freezable](https://github.com/ghybs/Leaflet.MarkerCluster.Freezable) | Adds the ability to freeze clusters at a specified zoom. E.g. freezing at maxZoom + 1 makes as if clustering was programmatically disabled. | [ghybs](https://github.com/ghybs) |
| [Leaflet.MarkerCluster.PlacementStrategies](https://github.com/adammertel/Leaflet.MarkerCluster.PlacementStrategies) | Implements new strategies to position clustered markers (eg: clock, concentric circles, ...). Recommended to use with circleMarkers. [Demo](https://adammertel.github.io/Leaflet.MarkerCluster.PlacementStrategies/demo/demo1.html) | [adammertel](https://github.com/adammertel) / [UNIVIE](http://carto.univie.ac.at/) |
| [Leaflet.MarkerCluster.List](https://github.com/adammertel/Leaflet.MarkerCluster.List) | Displays child elements in a list. Suitable for mobile devices. [Demo](https://adammertel.github.io/Leaflet.MarkerCluster.List/demo/demo1.html) | [adammertel](https://github.com/adammertel) / [UNIVIE](http://carto.univie.ac.at/) |

View File

@@ -1,6 +1,6 @@
{
"name": "leaflet.markercluster",
"version": "1.0.6",
"version": "1.4.0",
"homepage": "https://github.com/Leaflet/Leaflet.markercluster",
"authors": [
"Dave Leaver <danzel@localhost.geek.nz>"
@@ -22,6 +22,6 @@
"tests"
],
"dependencies": {
"leaflet": ">= 1.0.3"
"leaflet": ">= 1.3.1"
}
}

View File

@@ -1,17 +1,25 @@
/*
Leaflet.markercluster, Provides Beautiful Animated Marker Clustering functionality for Leaflet, a JS library for interactive maps.
https://github.com/Leaflet/Leaflet.markercluster
(c) 2012-2013, Dave Leaver, smartrak
*/
(function (window, document, undefined) {/*
* Leaflet.markercluster 1.4.0+master.458cf75,
* 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
*/
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(factory((global.Leaflet = global.Leaflet || {}, global.Leaflet.markercluster = global.Leaflet.markercluster || {})));
}(this, (function (exports) { 'use strict';
/*
* L.MarkerClusterGroup extends L.FeatureGroup by clustering the markers contained within
*/
L.MarkerClusterGroup = L.FeatureGroup.extend({
var MarkerClusterGroup = L.MarkerClusterGroup = L.FeatureGroup.extend({
options: {
maxClusterRadius: 80, //A cluster will cover at most this many pixels from its center
iconCreateFunction: null,
clusterPane: L.Marker.prototype.options.pane,
spiderfyOnMaxZoom: true,
showCoverageOnHover: true,
@@ -54,9 +62,6 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
if (!this.options.iconCreateFunction) {
this.options.iconCreateFunction = this._defaultIconCreateFunction;
}
if (!this.options.clusterPane) {
this.options.clusterPane = L.Marker.prototype.options.pane;
}
this._featureGroup = L.featureGroup();
this._featureGroup.addEventParent(this);
@@ -423,6 +428,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//If we aren't on the map (yet), blow away the markers we know of
if (!this._map) {
this._needsClustering = [];
this._needsRemoving = [];
delete this._gridClusters;
delete this._gridUnclustered;
}
@@ -505,7 +511,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
//Overrides LayerGroup.getLayer, WARNING: Really bad performance
getLayer: function (id) {
var result = null;
id = parseInt(id, 10);
this.eachLayer(function (l) {
@@ -719,7 +725,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
}
delete e.target.__dragStart;
},
//Internal function for removing a marker from everything.
//dontUpdateMap: set to true if you will handle updating the map manually (for bulk functions)
@@ -933,7 +939,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
minZoom = Math.floor(this._map.getMinZoom()),
radius = this.options.maxClusterRadius,
radiusFn = radius;
//If we just set maxClusterRadius to a single number, we need to create
//a simple function to return that number. Otherwise, we just have to
//use the function we've passed in.
@@ -947,7 +953,7 @@ L.MarkerClusterGroup = L.FeatureGroup.extend({
this._maxZoom = maxZoom;
this._gridClusters = {};
this._gridUnclustered = {};
//Set up DistanceGrids for each zoom
for (var zoom = maxZoom; zoom >= minZoom; zoom--) {
this._gridClusters[zoom] = new L.DistanceGrid(radiusFn(zoom));
@@ -1378,8 +1384,9 @@ L.markerClusterGroup = function (options) {
return new L.MarkerClusterGroup(options);
};
var MarkerCluster = L.MarkerCluster = L.Marker.extend({
options: L.Icon.prototype.options,
L.MarkerCluster = L.Marker.extend({
initialize: function (group, zoom, a, b) {
L.Marker.prototype.initialize.call(this, a ? (a._cLatLng || a.getLatLng()) : new L.LatLng(0, 0),
@@ -1763,6 +1770,9 @@ L.MarkerCluster = L.Marker.extend({
if (zoom < zoomLevelToStart || zoom < zoomLevelToStop) {
for (i = childClusters.length - 1; i >= 0; i--) {
c = childClusters[i];
if (c._boundsNeedUpdate) {
c._recalculateBounds();
}
if (boundsToApplyTo.intersects(c._bounds)) {
c._recursively(boundsToApplyTo, zoomLevelToStart, zoomLevelToStop, runAtEveryLevel, runAtBottomLevel);
}
@@ -1777,36 +1787,27 @@ L.MarkerCluster = L.Marker.extend({
}
});
/*
* Extends L.Marker to include two extra methods: clusterHide and clusterShow.
*
* They work as setOpacity(0) and setOpacity(1) respectively, but
* they will remember the marker's opacity when hiding and showing it again.
* don't overwrite the options.opacity
*
*/
L.Marker.include({
clusterHide: function () {
this.options.opacityWhenUnclustered = this.options.opacity || 1;
return this.setOpacity(0);
var backup = this.options.opacity;
this.setOpacity(0);
this.options.opacity = backup;
return this;
},
clusterShow: function () {
var ret = this.setOpacity(this.options.opacity || this.options.opacityWhenUnclustered);
delete this.options.opacityWhenUnclustered;
return ret;
return this.setOpacity(this.options.opacity);
}
});
L.DistanceGrid = function (cellSize) {
this._cellSize = cellSize;
this._sqCellSize = cellSize * cellSize;
@@ -1900,7 +1901,8 @@ L.DistanceGrid.prototype = {
for (k = 0, len = cell.length; k < len; k++) {
obj = cell[k];
dist = this._sqDist(objectPoint[L.Util.stamp(obj)], point);
if (dist < closestDistSq) {
if (dist < closestDistSq ||
dist <= closestDistSq && closest === null) {
closestDistSq = dist;
closest = obj;
}
@@ -1913,7 +1915,8 @@ L.DistanceGrid.prototype = {
},
_getCoord: function (x) {
return Math.floor(x / this._cellSize);
var coord = Math.floor(x / this._cellSize);
return isFinite(coord) ? coord : x;
},
_sqDist: function (p, p2) {
@@ -1923,7 +1926,6 @@ L.DistanceGrid.prototype = {
}
};
/* Copyright (c) 2012 the authors listed at the following URL, and/or
the authors of referenced articles or incorporated external code:
http://en.literateprograms.org/Quickhull_(Javascript)?action=history&offset=20120410175256
@@ -2090,7 +2092,6 @@ L.MarkerCluster.include({
}
});
//This code is 100% based on https://github.com/jawj/OverlappingMarkerSpiderfier-Leaflet
//Huge thanks to jawj for implementing it first to make my job easy :-)
@@ -2098,7 +2099,7 @@ L.MarkerCluster.include({
_2PI: Math.PI * 2,
_circleFootSeparation: 25, //related to circumference of circle
_circleStartAngle: Math.PI / 6,
_circleStartAngle: 0,
_spiralFootSeparation: 28, //related to size of spiral (experiment!)
_spiralLengthStart: 11,
@@ -2150,9 +2151,11 @@ L.MarkerCluster.include({
res = [],
i, angle;
legLength = Math.max(legLength, 35); // Minimum distance to get outside the cluster icon.
res.length = count;
for (i = count - 1; i >= 0; i--) {
for (i = 0; i < count; i++) { // Clockwise, like spiral.
angle = this._circleStartAngle + i * angleStep;
res[i] = new L.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle))._round();
}
@@ -2172,9 +2175,13 @@ L.MarkerCluster.include({
res.length = count;
// Higher index, closer position to cluster center.
for (i = count - 1; i >= 0; i--) {
for (i = count; i >= 0; i--) {
// Skip the first position, so that we are already farther from center and we avoid
// being under the default cluster icon (especially important for Circle Markers).
if (i < count) {
res[i] = new L.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle))._round();
}
angle += separation / legLength + i * 0.0005;
res[i] = new L.Point(centerPt.x + legLength * Math.cos(angle), centerPt.y + legLength * Math.sin(angle))._round();
legLength += lengthFactor / angle;
}
return res;
@@ -2561,7 +2568,6 @@ L.MarkerClusterGroup.include({
}
});
/**
* Adds 1 public method to MCG and 1 to L.Marker to facilitate changing
* markers' icon options and refreshing their icon and their parent clusters
@@ -2673,5 +2679,8 @@ L.Marker.include({
}
});
exports.MarkerClusterGroup = MarkerClusterGroup;
exports.MarkerCluster = MarkerCluster;
}(window, document));
})));
//# sourceMappingURL=leaflet.markercluster-src.js.map

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

View File

@@ -1,22 +1,43 @@
{
"name": "leaflet.markercluster",
"repository": "https://github.com/Leaflet/Leaflet.markercluster",
"version": "1.1.0",
"version": "1.4.0",
"description": "Provides Beautiful Animated Marker Clustering functionality for Leaflet",
"devDependencies": {
"jshint": "~2.1.3",
"mocha": "~1.10.0",
"karma": "~0.8.5",
"uglify-js": "~2.3.6",
"git-rev-sync": "^1.8.0",
"happen": "^0.3.1",
"jake": "~0.5.16",
"magic-string": "^0.7.0",
"leaflet": "~1.0.3"
"jshint": "^2.9.4",
"karma": "^1.5.0",
"karma-chrome-launcher": "^2.0.0",
"karma-coverage": "^1.1.1",
"karma-firefox-launcher": "^1.0.1",
"karma-mocha": "^1.3.0",
"karma-phantomjs-launcher": "^1.0.4",
"karma-rollup-plugin": "^0.2.4",
"karma-safari-launcher": "^1.0.0",
"leaflet": "^1.3.1",
"mocha": "~1.10.0",
"phantomjs-prebuilt": "^2.1.14",
"rollup": "^0.41.4",
"rollup-plugin-git-version": "0.2.1",
"rollup-plugin-json": "^2.1.0",
"uglify-js": "~2.3.6"
},
"main": "dist/leaflet.markercluster.js",
"peerDependencies": {
"leaflet": "~1.3.1"
},
"main": "dist/leaflet.markercluster-src.js",
"scripts": {
"test": "jake test",
"prepublish": "jake"
"test": "karma start ./spec/karma.conf.js",
"prepublish": "jake",
"rollup": "rollup -c build/rollup-config.js",
"uglify": "uglifyjs dist/leaflet.markercluster-src.js -c -m -o dist/leaflet.markercluster.js --source-map dist/leaflet.markercluster.js.map --in-source-map dist/leaflet.markercluster-src.js.map --source-map-url leaflet.markercluster.js.map"
},
"keywords": ["gis", "map"],
"keywords": [
"gis",
"map",
"cluster"
],
"license": "MIT"
}

View File

@@ -0,0 +1,122 @@
.marker-icon,
.marker-icon:focus {
background-color: #ffffff;
border: 1px solid #3388ff;
border-radius: 50%;
margin: -8px 0 0 -8px !important;
width: 14px !important;
height: 14px !important;
outline: 0;
transition: opacity ease 0.3s;
}
.marker-icon-middle,
.marker-icon-middle:focus {
opacity: 0.7;
margin: -6px 0 0 -6px !important;
width: 10px !important;
height: 10px !important;
}
.leaflet-pm-draggable {
cursor: move !important;
}
.cursor-marker {
cursor: crosshair;
pointer-events: none;
display: none;
}
.cursor-marker.visible {
display: block !important;
}
.leaflet-pm-invalid {
stroke: red;
transition: fill ease 0s, stroke ease 0s;
}
.rect-style-marker,
.rect-start-marker {
opacity: 0;
}
.rect-style-marker.visible,
.rect-start-marker.visible {
opacity: 1 !important;
}
.hidden {
display: none;
}
.leaflet-pm-toolbar {
}
.leaflet-pm-toolbar .leaflet-buttons-control-button {
padding: 3px;
box-sizing: border-box;
}
.leaflet-pm-toolbar .control-icon {
width: 100%;
height: 100%;
box-sizing: border-box;
opacity: .8;
background-size: contain;
background-repeat: no-repeat;
background-position: center center;
}
.leaflet-pm-toolbar .leaflet-pm-icon-marker {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAAZCAYAAADTyxWqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABAhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9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mVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTk5NzA1OGEtZDI3OC00NDZkLWE4ODgtNGM4MGQ4YWI1NzNmIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6YzRkZmQxMGMtY2NlNS0xMTc4LWE5OGQtY2NkZmM5ODk5YWYwIi8+IDxkYzp0aXRsZT4gPHJkZjpBbHQ+IDxyZGY6bGkgeG1sOmxhbmc9IngtZGVmYXVsdCI+Z2x5cGhpY29uczwvcmRmOmxpPiA8L3JkZjpBbHQ+IDwvZGM6dGl0bGU+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+J3lsvQAAAFpJREFUeNrsljsOACAIQ1sPyGG9IJq4IKOfQdNuhuQ90gUJwBHi7sRGSE48DuaA5uFqIq/gcpgr6rFNZo2Pkjq3A0tbrOp6RRJIIIEEEjxxcD68yae/LU2AAQC7fSa9H1rL6AAAAABJRU5ErkJggg==);
background-size: 90%;
}
.leaflet-pm-toolbar .leaflet-pm-icon-drag {
/*background-image: url('../assets/icons/drag.png');*/
}
.leaflet-pm-toolbar .leaflet-pm-icon-delete {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAaCAYAAAC3g3x9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABAhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwO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anJt0EGAAZUK4sZc82dAAAAABJRU5ErkJggg==);
background-size: 80%;
background-position: 4px center;
}
.leaflet-pm-toolbar .leaflet-pm-icon-cut {
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAXCAYAAAD+4+QTAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAABAhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMDY3IDc5LjE1Nzc0NywgMjAxNS8wMy8zMC0yMzo0MDo0MiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1wTU06T3JpZ2luYWxEb2N1bWVudElEPSJ1dWlkOjY1RTYzOTA2ODZDRjExREJBNkUyRDg4N0NFQUNCNDA3IiB4bXBNTTpEb2N1bWVudElEPSJ4bXAuZGlkOkNDNkM0RTY5ODUzNzExRTU4RTQwRkQwODFEOUZEMEE3IiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkNDNkM0RTY4ODUzNzExRTU4RTQwRkQwODFEOUZEMEE3IiB4bXA6Q3JlYXRvclRvb2w9IkFkb2JlIFBob3Rvc2hvcCBDQyAyMDE1IChNYWNpbnRvc2gpIj4gPHhtcE1NOkRlcml2ZWRGcm9tIHN0UmVmOmluc3RhbmNlSUQ9InhtcC5paWQ6MTk5NzA1OGEtZDI3OC00NDZkLWE4ODgtNGM4MGQ4YWI1NzNmIiBzdFJlZjpkb2N1bWVudElEPSJhZG9iZTpkb2NpZDpwaG90b3Nob3A6YzRkZmQxMGMtY2NlNS0xMTc4LWE5OGQtY2NkZmM5ODk5YWYwIi8+IDxkYzp0aXRsZT4gPHJkZjpBbHQ+IDxyZGY6bGkgeG1sOmxhbmc9IngtZGVmYXVsdCI+Z2x5cGhpY29uczwvcmRmOmxpPiA8L3JkZjpBbHQ+IDwvZGM6dGl0bGU+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+UbC4LAAAATFJREFUeNrUVosRgyAMhU5gN3AER3AER2AER7AbOIIjdAS7gSO4Qd2AEu+ll6JYP9i75i4nIrxHkgeorbVKa50opYxzevbO765/ULGMSJy11BROBBV9i+FkuQBu8GSyOhYJR1GJzpqJYpBogJFduQ6o0RPp1EdLIkluSA8T2T0kWGDhPEVX85EaLjiUtjpdACxnBETe8aAS0vUH2AXgDAucnQdvR2F5E83MJHo3YkzuKTAI/p4TWKUZw5ySVdiwKaLwySj/2QTvS65zkedBOJMlaBN4GsRZWViL6IwnknoJfG0kmSAZFmqxPRKvJgYpGbYAB0kC6urE9wJy51O7F5HaUHv3Ptl6QB7e8WtImGCUpaeo/zmFL84faJeiv1KR7fyb8Rd3vObquzqUZ/2tvAQYANwXksvfGBuLAAAAAElFTkSuQmCC);
background-size: 80%;
background-position: 4px center;
}
.leaflet-buttons-control-button:hover {
cursor: pointer;
background-color: #f4f4f4;
}
.leaflet-buttons-control-button.active {
background-color: #f4f4f4;
}
.leaflet-buttons-control-button.active > .control-icon {
opacity: .5;
}
.leaflet-buttons-control-text-hide {
display: none;
}

1
assets/leaflet-pm/leaflet.pm.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,32 @@
# Leaflet-providers changelog
## 1.3.1 (2018-06-20)
- 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)
- 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 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)
- Fixed `maxZoom` for all layers from the `thunderforest` provider
@@ -9,7 +35,7 @@
- Added `nlmaps` provider [#254](https://github.com/leaflet-extras/leaflet-providers/pull/254)
## 1.1.16 (2016-11-04)
- Updates to reflect changes in [BasemapAT](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=BasemapAT) by [@ximex](https://github.com/ximex), [#232]((https://github.com/leaflet-extras/leaflet-providers/pull/232), [#233]((https://github.com/leaflet-extras/leaflet-providers/pull/233)
- Updates to reflect changes in [BasemapAT](http://leaflet-extras.github.io/leaflet-providers/preview/#filter=BasemapAT) by [@ximex](https://github.com/ximex), [#232](https://github.com/leaflet-extras/leaflet-providers/pull/232), [#233](https://github.com/leaflet-extras/leaflet-providers/pull/233)
- Bump leaflet version in tests and preview to 1.0.1.
- Added some layers from http://justicemap.org [#224](https://github.com/leaflet-extras/leaflet-providers/pull/224).

View File

@@ -2,7 +2,18 @@ Leaflet-providers
=================
An extension to [Leaflet](http://leafletjs.com/) that contains configurations for various free<sup>[1](#what-is-free)</sup> tile providers.
# Installation
Download [leaflet-providers.js](https://raw.githubusercontent.com/leaflet-extras/leaflet-providers/master/leaflet-providers.js) and include it in your page after including Leaflet, e.g.:
<head>
...
<script src="http://unpkg.com/leaflet@1.3.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.
```Javascript
@@ -10,15 +21,6 @@ Leaflet-providers [providers](#providers) are refered to with a `provider[.<vari
L.tileLayer.provider('Stamen.Watercolor').addTo(map);
```
## Protocol relativity (`https://`-urls)
Leaflet-providers tries to use `https://` if the page uses `https://` and the provider supports it.
You can force the use of `http://` by passing `force_http: true` in the options argument.
## Retina tiles
Some providers have retina tiles for which the URL only needs to be slightly adjusted, e.g. `-----@2x.png`. For this, add the retina option in the URL, e.g. `-----{retina}.png`, and set a retina value in the options, e.g. `retina: '@2x'`. If Leaflet detects a retina screen (`L.Browser.retina`), the retina option passed to the tileLayer is set to the value supplied, otherwise it's replaced by an empty string.
# Providers
Leaflet-providers provides tile layers from different providers, including *OpenStreetMap*, *Stamen*, *Esri* and *OpenWeatherMap*. The full listing of free to use layers can be [previewed](http://leaflet-extras.github.io/leaflet-providers/preview/index.html). The page will show you the name to use with `leaflet-providers.js` and the code to use it without dependencies.
@@ -42,9 +44,19 @@ L.tileLayer.provider('HERE.terrainDay', {
### Mapbox
In order to use Mapbox maps, you must [register](https://tiles.mapbox.com/signup). You can get map ID 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 (i.e mapbox.satellite) and ACCESS_TOKEN from [Mapbox projects](https://www.mapbox.com/projects):
```JavaScript
L.tileLayer.provider('MapBox', {id: 'ID', accessToken: 'ACCESS_TOKEN'}).addTo(map);
L.tileLayer.provider('MapBox', {
id: 'ID': '<insert map_ID here>',
accessToken: '<insert ACCESS_TOKEN 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:
```JavaScript
L.tileLayer.provider('Thunderforest.Landscape', {apikey: '<insert api_key here>'}).addTo(map);
```
### Esri/ArcGIS
@@ -53,6 +65,21 @@ 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)
### 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:
```JavaScript
L.tileLayer.provider('GeoportailFrance', {
variant: '<insert resource ID here>',
apikey: '<insert api key here>'
}).addTo(map);
```
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).
# Attribution
This work was inspired from <https://gist.github.com/1804938>, and originally created by [Stefan Seelmann](https://github.com/seelmann).

View File

@@ -50,24 +50,6 @@
};
}
var forceHTTP = window.location.protocol === 'file:' || provider.options.forceHTTP;
if (provider.url.indexOf('//') === 0 && forceHTTP) {
provider.url = 'http:' + provider.url;
}
// If retina option is set
if (provider.options.retina) {
// Check retina screen
if (options.detectRetina && L.Browser.retina) {
// The retina option will be active now
// But we need to prevent Leaflet retina mode
options.detectRetina = false;
} else {
// No retina, remove option
provider.options.retina = '';
}
}
// replace attribution placeholders with their values from toplevel provider attribution,
// recursively
var attributionReplacer = function (attr) {
@@ -95,7 +77,7 @@
L.TileLayer.Provider.providers = {
OpenStreetMap: {
url: '//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
url: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
options: {
maxZoom: 19,
attribution:
@@ -110,41 +92,97 @@
}
},
DE: {
url: '//{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
url: 'https://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',
options: {
maxZoom: 18
}
},
CH: {
url: 'https://tile.osm.ch/switzerland/{z}/{x}/{y}.png',
options: {
maxZoom: 18,
bounds: [[45, 5], [48, 11]]
}
},
France: {
url: '//{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png',
url: 'https://{s}.tile.openstreetmap.fr/osmfr/{z}/{x}/{y}.png',
options: {
maxZoom: 20,
attribution: '&copy; Openstreetmap France | {attribution.OpenStreetMap}'
}
},
HOT: {
url: '//{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
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>'
}
},
BZH: {
url: 'https://tile.openstreetmap.bzh/br/{z}/{x}/{y}.png',
options: {
attribution: '{attribution.OpenStreetMap}, Tiles courtesy of <a href="http://www.openstreetmap.bzh/" target="_blank">Breton OpenStreetMap Team</a>',
bounds: [[46.2, -5.5], [50, 0.7]]
}
}
}
},
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: 'http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png',
url: 'https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png',
options: {
attribution: 'Map data: &copy; <a href="http://www.openseamap.org">OpenSeaMap</a> contributors'
}
},
OpenPtMap: {
url: 'http://openptmap.org/tiles/{z}/{x}/{y}.png',
options: {
maxZoom: 17,
attribution: 'Map data: &copy; <a href="http://www.openptmap.org">OpenPtMap</a> contributors'
}
},
OpenTopoMap: {
url: '//{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
url: 'https://{s}.tile.opentopomap.org/{z}/{x}/{y}.png',
options: {
maxZoom: 17,
attribution: 'Map data: {attribution.OpenStreetMap}, <a href="http://viewfinderpanoramas.org">SRTM</a> | Map style: &copy; <a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
}
},
OpenRailwayMap: {
url: 'https://{s}.tiles.openrailwaymap.org/standard/{z}/{x}/{y}.png',
options: {
maxZoom: 19,
attribution: 'Map data: {attribution.OpenStreetMap} | Map style: &copy; <a href="https://www.OpenRailwayMap.org">OpenRailwayMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
}
},
OpenFireMap: {
url: 'http://openfiremap.org/hytiles/{z}/{x}/{y}.png',
options: {
maxZoom: 19,
attribution: 'Map data: {attribution.OpenStreetMap} | Map style: &copy; <a href="http://www.openfiremap.org">OpenFireMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
}
},
SafeCast: {
url: 'https://s3.amazonaws.com/te512.safecast.org/{z}/{x}/{y}.png',
options: {
maxZoom: 16,
attribution: 'Map data: {attribution.OpenStreetMap} | Map style: &copy; <a href="https://blog.safecast.org/about/">SafeCast</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)'
}
},
Thunderforest: {
url: '//{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}',
url: 'https://{s}.tile.thunderforest.com/{variant}/{z}/{x}/{y}.png?apikey={apikey}',
options: {
attribution:
'&copy; <a href="http://www.thunderforest.com/">Thunderforest</a>, {attribution.OpenStreetMap}',
@@ -175,7 +213,7 @@
}
},
OpenMapSurfer: {
url: 'http://korona.geog.uni-heidelberg.de/tiles/{variant}/x={x}&y={y}&z={z}',
url: 'https://korona.geog.uni-heidelberg.de/tiles/{variant}/x={x}&y={y}&z={z}',
options: {
maxZoom: 20,
variant: 'roads',
@@ -198,7 +236,7 @@
}
},
Hydda: {
url: '//{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png',
url: 'https://{s}.tile.openstreetmap.se/hydda/{variant}/{z}/{x}/{y}.png',
options: {
maxZoom: 18,
variant: 'full',
@@ -211,7 +249,7 @@
}
},
MapBox: {
url: '//api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}',
url: 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}{r}.png?access_token={accessToken}',
options: {
attribution:
'Imagery from <a href="http://mapbox.com/about/maps/">MapBox</a> &mdash; ' +
@@ -222,7 +260,7 @@
}
},
Stamen: {
url: '//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}{r}.{ext}',
options: {
attribution:
'Map tiles by <a href="http://stamen.com">Stamen Design</a>, ' +
@@ -242,6 +280,7 @@
TonerLabels: 'toner-labels',
TonerLite: 'toner-lite',
Watercolor: {
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
options: {
variant: 'watercolor',
minZoom: 1,
@@ -263,6 +302,7 @@
}
},
TopOSMRelief: {
url: 'https://stamen-tiles-{s}.a.ssl.fastly.net/{variant}/{z}/{x}/{y}.{ext}',
options: {
variant: 'toposm-color-relief',
ext: 'jpg',
@@ -279,7 +319,7 @@
}
},
Esri: {
url: '//server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}',
url: 'https://server.arcgisonline.com/ArcGIS/rest/services/{variant}/MapServer/tile/{z}/{y}/{x}',
options: {
variant: 'World_Street_Map',
attribution: 'Tiles &copy; Esri'
@@ -363,10 +403,11 @@
}
},
OpenWeatherMap: {
url: 'http://{s}.tile.openweathermap.org/map/{variant}/{z}/{x}/{y}.png',
url: 'http://{s}.tile.openweathermap.org/map/{variant}/{z}/{x}/{y}.png?appid={apiKey}',
options: {
maxZoom: 19,
attribution: 'Map data &copy; <a href="http://openweathermap.org">OpenWeatherMap</a>',
apiKey:'<insert your api key here>',
opacity: 0.5
},
variants: {
@@ -394,7 +435,7 @@
* envirionments.
*/
url:
'//{s}.{base}.maps.cit.api.here.com/maptile/2.1/' +
'https://{s}.{base}.maps.cit.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: {
@@ -496,7 +537,7 @@
}
},
CartoDB: {
url: 'http://{s}.basemaps.cartocdn.com/{variant}/{z}/{x}/{y}.png',
url: 'https://cartodb-basemaps-{s}.global.ssl.fastly.net/{variant}/{z}/{x}/{y}{r}.png',
options: {
attribution: '{attribution.OpenStreetMap} &copy; <a href="http://cartodb.com/attributions">CartoDB</a>',
subdomains: 'abcd',
@@ -509,7 +550,11 @@
PositronOnlyLabels: 'light_only_labels',
DarkMatter: 'dark_all',
DarkMatterNoLabels: 'dark_nolabels',
DarkMatterOnlyLabels: 'dark_only_labels'
DarkMatterOnlyLabels: 'dark_only_labels',
Voyager: 'rastertiles/voyager',
VoyagerNoLabels: 'rastertiles/voyager_nolabels',
VoyagerOnlyLabels: 'rastertiles/voyager_only_labels',
VoyagerLabelsUnder: 'rastertiles/voyager_labels_under'
}
},
HikeBike: {
@@ -533,7 +578,7 @@
url: 'https://maps{s}.wien.gv.at/basemap/{variant}/normal/google3857/{z}/{y}/{x}.{format}',
options: {
maxZoom: 19,
attribution: 'Datenquelle: <a href="www.basemap.at">basemap.at</a>',
attribution: 'Datenquelle: <a href="https://www.basemap.at">basemap.at</a>',
subdomains: ['', '1', '2', '3', '4'],
format: 'png',
bounds: [[46.358770, 8.782379], [49.037872, 17.189532]],
@@ -563,8 +608,25 @@
}
}
},
nlmaps: {
url: 'https://geodata.nationaalgeoregister.nl/tiles/service/wmts/{variant}/EPSG:3857/{z}/{x}/{y}.png',
options: {
minZoom: 6,
maxZoom: 19,
bounds: [[50.5, 3.25], [54, 7.6]],
attribution: 'Kaartgegevens &copy; <a href="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',
}
}
},
NASAGIBS: {
url: '//map1.vis.earthdata.nasa.gov/wmts-webmerc/{variant}/default/{time}/{tilematrixset}{maxZoom}/{z}/{y}/{x}.{format}',
url: 'https://map1.vis.earthdata.nasa.gov/wmts-webmerc/{variant}/default/{time}/{tilematrixset}{maxZoom}/{z}/{y}/{x}.{format}',
options: {
attribution:
'Imagery provided by services from the Global Imagery Browse Services (GIBS), operated by the NASA/GSFC/Earth Science Data and Information System ' +
@@ -628,7 +690,7 @@
// z0-9 - 1:1m
// z10-11 - quarter inch (1:253440)
// z12-18 - one inch (1:63360)
url: '//nls-{s}.tileserver.com/nls/{z}/{x}/{y}.jpg',
url: 'https://nls-{s}.tileserver.com/nls/{z}/{x}/{y}.jpg',
options: {
attribution: '<a href="http://geo.nls.uk/maps/">National Library of Scotland Historic Maps</a>',
bounds: [[49.6, -12], [61.7, 3]],
@@ -660,6 +722,47 @@
white: 'white',
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: {
attribution: '<a target="_blank" href="https://www.geoportail.gouv.fr/">Geoportail France</a>',
bounds: [[-75, -180], [81, 180]],
minZoom: 2,
maxZoom: 18,
// 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'
},
variants: {
parcels: {
options : {
variant: 'CADASTRALPARCELS.PARCELS',
maxZoom: 20,
style : 'bdparcellaire',
format: 'image/png'
}
},
ignMaps: 'GEOGRAPHICALGRIDSYSTEMS.MAPS',
maps: 'GEOGRAPHICALGRIDSYSTEMS.MAPS.SCAN-EXPRESS.STANDARD',
orthos: {
options: {
maxZoom: 19,
variant: 'ORTHOIMAGERY.ORTHOPHOTOS'
}
}
}
}
};

File diff suppressed because one or more lines are too long

View File

@@ -1,6 +1,6 @@
{
"name": "leaflet-providers",
"version": "1.1.17",
"version": "1.3.1",
"description": "An extension to Leaflet that contains configurations for various free tile providers.",
"main": "leaflet-providers.js",
"repository": {
@@ -12,7 +12,8 @@
"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": "mversion patch -m",
"release-minor": "mversion minor -m"
},
"license": "BSD-2-Clause",
"bugs": {
@@ -25,13 +26,13 @@
"licence.md"
],
"devDependencies": {
"chai": "^2.3.0",
"chai": "^4.1.2",
"eslint": "^3.16.1",
"eslint-plugin-html": "^2.0.1",
"mocha": "^2.2.4",
"mocha-phantomjs-core": "^2.0.1",
"mversion": "^1.3.0",
"phantomjs-prebuilt": "^2.1.4",
"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": {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

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

View File

@@ -45,8 +45,10 @@
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer {
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
max-width: none !important;
max-height: none !important;
}
.leaflet-container.leaflet-touch-zoom {
@@ -55,7 +57,10 @@
}
.leaflet-container.leaflet-touch-drag {
-ms-touch-action: pinch-zoom;
}
/* Fallback for FF which doesn't support pinch-zoom */
touch-action: none;
touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
-ms-touch-action: none;
touch-action: none;
@@ -164,7 +169,6 @@
opacity: 0;
-webkit-transition: opacity 0.2s linear;
-moz-transition: opacity 0.2s linear;
-o-transition: opacity 0.2s linear;
transition: opacity 0.2s linear;
}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
@@ -181,14 +185,12 @@
.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);
-o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
-webkit-transition: none;
-moz-transition: none;
-o-transition: none;
transition: none;
}
@@ -205,6 +207,7 @@
.leaflet-grab {
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: grab;
}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
@@ -220,6 +223,7 @@
cursor: move;
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
cursor: grabbing;
}
/* marker & overlays interactivity */
@@ -490,7 +494,6 @@
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg);
}
.leaflet-popup-content-wrapper,

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

View File

@@ -3,7 +3,7 @@
"description":"Javascript libraries for the Leaflet maps integration for Contao",
"keywords":["contao", "maps", "leaflet"],
"type":"contao-module",
"license":"LGPL-3.0+",
"license":"LGPL-3.0-or-later",
"authors":[
{
"name":"David Molineus",
@@ -27,8 +27,8 @@
},
"extra":{
"branch-alias": {
"dev-master": "1.0.x-dev",
"dev-develop": "1.1.x-dev",
"dev-master": "1.3.x-dev",
"dev-develop": "1.4.x-dev",
"dev-support/0.7.x": "0.7.x-dev"
},
"contao": {

View File

@@ -1,9 +1,10 @@
var gulp = require('gulp');
const { series, parallel, src, dest } = require('gulp');
var del = require('del');
var rename = require('gulp-rename');
var uglify = require('gulp-uglify');
var merge = require('merge-stream');
var minifyCss = require('gulp-minify-css');
var minifyCss = require('gulp-clean-css');
var replace = require('gulp-replace');
var paths = [
@@ -29,16 +30,12 @@ var paths = [
dest: 'assets/leaflet-fullscreen',
css: 'Control.FullScreen.css',
js: 'Control.FullScreen.js'
},
{
dest: 'assets/leaflet-layer-overpass',
css: 'OverPassLayer.css'
}
];
gulp.task('clear-styles', function() {
function clearStyles (cb) {
var i, clear = [];
for (i = 0; i < paths.length; i++) {
if (paths[i].css) {
clear.push(paths[i].dest + '/*.min.css');
@@ -46,9 +43,11 @@ gulp.task('clear-styles', function() {
}
del(clear);
});
gulp.task('clear-scripts', function() {
cb();
}
function clearScripts (cb) {
var i, clear = [];
for (i = 0; i < paths.length; i++) {
@@ -58,45 +57,53 @@ gulp.task('clear-scripts', function() {
}
del(clear);
});
gulp.task('scripts', ['clear-scripts'], function() {
cb();
}
const scripts = series(clearScripts, function (cb) {
var i, stream, streams = [];
for (i = 0; i < paths.length; i++) {
if (paths[i].js) {
stream = gulp.src(paths[i].dest + '/' + paths[i].js)
stream = src(paths[i].dest + '/' + paths[i].js)
.pipe(rename(function (path) {
path.basename += '.min';
}))
.pipe(uglify())
.pipe(gulp.dest(paths[i].dest));
.pipe(dest(paths[i].dest));
streams.push(stream);
}
}
return merge.call(null, streams);
merge.call(null, streams);
cb();
});
gulp.task('styles', ['clear-styles'], function() {
const styles = series(clearStyles, function (cb) {
var i, stream, streams = [];
for (i = 0; i < paths.length; i++) {
if (paths[i].css) {
stream = gulp.src(paths[i].dest + '/' + paths[i].css)
stream = src(paths[i].dest + '/' + paths[i].css)
.pipe(rename(function (path) {
path.basename += '.min';
}))
.pipe(minifyCss())
.pipe(replace(/url\(([^"][^\)]+)\)/g, 'url(\'$1\')'))
.pipe(gulp.dest(paths[i].dest));
.pipe(dest(paths[i].dest));
streams.push(stream);
}
}
return merge.call(null, streams);
});
merge.call(null, streams);
gulp.task('default', ['scripts', 'styles']);
cb();
})
exports.scripts = scripts;
exports.styles = styles;
exports.default = parallel(scripts, styles);

View File

@@ -17,7 +17,7 @@
$GLOBALS['LEAFLET_LIBRARIES']['leaflet'] = array
(
'name' => 'Leaflet',
'version' => '1.2.0',
'version' => '1.3.4',
'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',
@@ -27,7 +27,7 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet'] = array
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-providers'] = array
(
'name' => 'Leaflet-providers',
'version' => '1.1.17',
'version' => '1.3.1',
'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.1.0',
'version' => '1.4.0',
'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.3',
'version' => '1.4.5',
'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.5.5',
'version' => '1.6.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,13 +85,23 @@ $GLOBALS['LEAFLET_LIBRARIES']['leaflet-control-geocoder'] = array
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-extra-markers'] = array
(
'name' => 'Leaflet Extra Markers',
'version' => '1.0.6',
'version' => '1.0.8',
'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',
'javascript' => 'assets/leaflet/libs/leaflet-extra-markers/js/leaflet.extra-markers.min.js'
);
$GLOBALS['LEAFLET_LIBRARIES']['leaflet-pm'] = array
(
'name' => 'leaflet.pm',
'version' => '0.25.0',
'license' => '<a href="https://github.com/codeofsumit/leaflet.pm/blob/develop/LICENSE" target="_blank">MIT</a>',
'homepage' => 'https://github.com/codeofsumit/leaflet.pm',
'css' => 'assets/leaflet/libs/leaflet-pm/leaflet.pm.css',
'javascript' => 'assets/leaflet/libs/leaflet-pm/leaflet.pm.min.js'
);
$GLOBALS['LEAFLET_LIBRARIES']['osmtogeojson'] = array
(
'name' => 'osmtogeojson',

View File

@@ -4,13 +4,12 @@
"description": "Libraries for Leaflet integration into Contao CMS =================================================",
"main": "gulpfile.js",
"dependencies": {
"del": "^2.2.2",
"gulp": "^3.9.1",
"gulp-minify-css": "^1.2.4",
"gulp-rename": "^1.2.2",
"gulp-replace": "^0.5.4",
"gulp-uglify": "^2.0.0",
"gulp-util": "^3.0.7",
"del": "^3.0.0",
"gulp": "^4.0.0",
"gulp-clean-css": "^3.10.0",
"gulp-rename": "^1.4.0",
"gulp-replace": "^1.0.0",
"gulp-uglify": "^3.0.0",
"merge-stream": "^1.0.0"
},
"devDependencies": {},