Compare commits
92 Commits
carto
...
fix-gaps-i
Author | SHA1 | Date | |
---|---|---|---|
|
5aad78f5ac | ||
|
b507e21c51 | ||
|
d7f91d9a9d | ||
|
a5ca3d4c9d | ||
|
ba1b253126 | ||
|
4c9e7cac4c | ||
|
9eb260d9f7 | ||
|
e9ba7643d3 | ||
|
35e07a947c | ||
|
95b34edbba | ||
|
380c44fe04 | ||
|
9fda888df2 | ||
|
757e7b6833 | ||
|
7d6155b6f0 | ||
|
a9f9b14a55 | ||
|
079be526f4 | ||
|
d8aa452144 | ||
|
e54128cbae | ||
|
abeff4d543 | ||
|
bed7cd101e | ||
|
d557247d16 | ||
|
c2d12d0521 | ||
|
5993deb4c8 | ||
|
7c33eab7c5 | ||
|
8c3eaaf3e8 | ||
|
faa2bd0dac | ||
|
c5712fb9e9 | ||
|
0b6e0cd24b | ||
|
5161140e95 | ||
|
9f08a23f7f | ||
|
24a2512b1b | ||
|
95d6eca24c | ||
|
00cc6ff119 | ||
|
fb09dd24c4 | ||
|
f07bc77f7f | ||
|
60c6fa8a3e | ||
|
ad785f2cf6 | ||
|
74bd6e2933 | ||
|
525a98d20e | ||
|
3dea761920 | ||
|
ba891024d2 | ||
|
d00a355d6b | ||
|
7c6a7b0d6b | ||
|
bd8e8bc4a3 | ||
|
684415e3f4 | ||
|
770b88e89b | ||
|
50d5a0956e | ||
|
08068b77c3 | ||
|
a0ca28af29 | ||
|
4a4326a382 | ||
|
aaded0d926 | ||
|
bd89edd567 | ||
|
0e9797edce | ||
|
0b868472a2 | ||
|
9d12f4185d | ||
|
ac4753cb64 | ||
|
27989c55dd | ||
|
22d9cfee93 | ||
|
d68708d626 | ||
|
8a009fa662 | ||
|
fe9e0f2333 | ||
|
c49833d882 | ||
|
6471228260 | ||
|
4f80e78528 | ||
|
7f17c6fcfd | ||
|
5ffe207921 | ||
|
c7b5d1deba | ||
|
31575e8e7a | ||
|
6708981c74 | ||
|
05ba52e0ee | ||
|
018bac0e9e | ||
|
fa374e67a2 | ||
|
870365de4c | ||
|
224bb9372b | ||
|
e3b049cefd | ||
|
be8899c0e4 | ||
|
d188cc5ede | ||
|
d3175e807f | ||
|
3e8e76c790 | ||
|
c3a6a5b60a | ||
|
510c3e7ba7 | ||
|
ad8fc9c36b | ||
|
2dc70945f8 | ||
|
34251900ae | ||
|
b2cb8f79e8 | ||
|
80ee940e14 | ||
|
bb08848734 | ||
|
fb7af21d55 | ||
|
d74e3340a1 | ||
|
86099a8502 | ||
|
ae8a1a645a | ||
|
756dd14d3b |
3
.gitignore
vendored
3
.gitignore
vendored
@ -17,3 +17,6 @@ bower.json
|
||||
component.json
|
||||
debug/local/
|
||||
Gemfile.lock
|
||||
package-lock.json
|
||||
yarn.lock
|
||||
*.log
|
||||
|
@ -8,6 +8,7 @@ addons:
|
||||
- dist
|
||||
target_paths:
|
||||
- content/leaflet/${NAME}
|
||||
firefox: latest
|
||||
env:
|
||||
global:
|
||||
- ARTIFACTS_BUCKET=leafletjs-cdn
|
||||
@ -20,6 +21,9 @@ env:
|
||||
XW1hzORAtSpTgTKkQwel5gRMDy6SotzeSRsVV2jQCn46VIMx8G/J5nOI+ImL
|
||||
yeoH12PhCR0h39dM7mq8TYJo5DHwvbotI5nQhpMruSt8eMFbym8nGiqQh806
|
||||
fSJXkxmQ4MAjUdNFDIirBHhdZme8q3PueFzJ+5odFMvPGn/aITQ=
|
||||
script:
|
||||
- npm test
|
||||
- xvfb-run --server-args="-screen 0 1280x1024x16" npm run test-nolint -- --browsers Firefox
|
||||
after_success:
|
||||
- npm run build
|
||||
- cd dist && zip -x .DS_Store -r leaflet.zip . && cd ..
|
||||
|
@ -3,6 +3,13 @@ Leaflet Changelog
|
||||
|
||||
(all changes without author notice are by [@mourner](https://github.com/mourner))
|
||||
|
||||
## 1.3.1 (2018-01-18)
|
||||
|
||||
### Bug fixes
|
||||
|
||||
* Fix `L.TileLayer`regression, which caused incorrect tile URLs ([#6006](https://github.com/Leaflet/Leaflet/issues/6006) by [ghybs](https://github.com/ghybs))
|
||||
|
||||
|
||||
## 1.3.0 (2018-01-15)
|
||||
|
||||
### API changes
|
||||
|
@ -36,7 +36,7 @@ here are some tips for creating a helpful report that will make fixing it much e
|
||||
|
||||
* Write a **descriptive, specific title**. Bad: *Problem with polylines*. Good: *Doing X in IE9 causes Z*.
|
||||
* Include **browser, OS and Leaflet version** info in the description.
|
||||
* Create a **simple test case** that demonstrates the bug (e.g. using [Leaflet playground](http://playground-leaflet.rhcloud.com/)).
|
||||
* Create a **simple test case** that demonstrates the bug (e.g. using [Leaflet plunker](http://leafletjs.com/edit.html)).
|
||||
* Check whether the bug can be reproduced in **other browsers**.
|
||||
* Check if the bug occurs in the stable version, master, or both.
|
||||
* *Bonus tip:* if the bug only appears in the master version but the stable version is fine,
|
||||
@ -68,8 +68,9 @@ please consider submitting another pull request with the corresponding [document
|
||||
|
||||
### Setting up the Build System
|
||||
|
||||
The Leaflet build system uses [Node](http://nodejs.org/), and the [Jake](http://jakejs.com/) Javascript build tool.
|
||||
To set up the Leaflet build system, install Node then run the following commands in the project root to install dependencies:
|
||||
The Leaflet build system uses [NodeJS](http://nodejs.org/).
|
||||
To set up the Leaflet build system, install [NodeJS](https://nodejs.org/).
|
||||
Then run the following commands in the project root to install dependencies:
|
||||
|
||||
```
|
||||
npm install
|
||||
@ -125,13 +126,13 @@ install [PhantomJS](http://phantomjs.org/) (and make sure it's in your `PATH`),
|
||||
then run:
|
||||
|
||||
```
|
||||
npm run test
|
||||
npm test
|
||||
```
|
||||
|
||||
To run all the tests in actual browsers at the same time, you can do:
|
||||
|
||||
```
|
||||
npm run test -- --ff --chrome --safari --ie
|
||||
npm test -- --browsers Firefox,Chrome,Safari,IE
|
||||
```
|
||||
|
||||
To run the tests in a browser manually, open `spec/index.html`.
|
||||
@ -141,7 +142,7 @@ To run the tests in a browser manually, open `spec/index.html`.
|
||||
To generate a detailed report about test coverage (which helps tremendously when working on test improvements), run:
|
||||
|
||||
```
|
||||
npm run test -- --cov
|
||||
npm test -- --cov
|
||||
```
|
||||
|
||||
After that, open `coverage/<environment>/index.html` in a browser to see the report.
|
||||
|
107
Jakefile.js
107
Jakefile.js
@ -1,107 +0,0 @@
|
||||
/*
|
||||
Leaflet building, testing and linting scripts.
|
||||
|
||||
To use, install Node, then run the following commands in the project root:
|
||||
|
||||
npm install -g jake
|
||||
npm install
|
||||
|
||||
To check the code for errors and build Leaflet from source, run "jake".
|
||||
To run the tests, run "jake test". To build the documentation, run "jake docs".
|
||||
|
||||
For a custom build, open build/build.html in the browser and follow the instructions.
|
||||
*/
|
||||
|
||||
var buildDocs = require('./build/docs'),
|
||||
git = require('git-rev-sync'),
|
||||
path = require('path');
|
||||
|
||||
function hint(msg, args) {
|
||||
return function () {
|
||||
console.log(msg);
|
||||
jake.exec('node node_modules/eslint/bin/eslint.js ' + args,
|
||||
{printStdout: true}, function () {
|
||||
console.log('\tCheck passed.\n');
|
||||
complete();
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
// Returns the version string in package.json, plus a semver build metadata if
|
||||
// this is not an official release
|
||||
function calculateVersion(officialRelease) {
|
||||
|
||||
var version = require('./package.json').version;
|
||||
|
||||
if (officialRelease) {
|
||||
return version;
|
||||
} else {
|
||||
return version + '+' + git.short();
|
||||
}
|
||||
}
|
||||
|
||||
desc('Check Leaflet source for errors with ESLint');
|
||||
task('lint', {async: true}, hint('Checking for JS errors...', 'src'));
|
||||
|
||||
desc('Check Leaflet specs source for errors with ESLint');
|
||||
task('lintspec', {async: true}, hint('Checking for specs JS errors...', 'spec/suites'));
|
||||
|
||||
desc('Run PhantomJS tests');
|
||||
task('test', ['lint', 'lintspec'], {async: true}, function () {
|
||||
|
||||
var karma = require('karma'),
|
||||
testConfig = {configFile : path.join(__dirname, './spec/karma.conf.js')};
|
||||
|
||||
testConfig.browsers = ['PhantomJSCustom'];
|
||||
|
||||
function isArgv(optName) {
|
||||
return process.argv.indexOf(optName) !== -1;
|
||||
}
|
||||
|
||||
if (isArgv('--chrome')) {
|
||||
testConfig.browsers.push('Chrome');
|
||||
}
|
||||
if (isArgv('--safari')) {
|
||||
testConfig.browsers.push('Safari');
|
||||
}
|
||||
if (isArgv('--ff')) {
|
||||
testConfig.browsers.push('Firefox');
|
||||
}
|
||||
if (isArgv('--ie')) {
|
||||
testConfig.browsers.push('IE');
|
||||
}
|
||||
|
||||
if (isArgv('--cov')) {
|
||||
testConfig.preprocessors = {
|
||||
'src/**/*.js': 'coverage'
|
||||
};
|
||||
testConfig.coverageReporter = {
|
||||
type : 'html',
|
||||
dir : 'coverage/'
|
||||
};
|
||||
testConfig.reporters = ['coverage'];
|
||||
}
|
||||
|
||||
console.log('Running tests...');
|
||||
|
||||
var server = new karma.Server(testConfig, function(exitCode) {
|
||||
if (!exitCode) {
|
||||
console.log('\tTests ran successfully.\n');
|
||||
complete();
|
||||
} else {
|
||||
process.exit(exitCode);
|
||||
}
|
||||
});
|
||||
server.start();
|
||||
});
|
||||
|
||||
desc('Build documentation');
|
||||
task('docs', {}, function() {
|
||||
buildDocs();
|
||||
});
|
||||
|
||||
task('default', ['test', 'build']);
|
||||
|
||||
jake.addListener('complete', function () {
|
||||
process.exit();
|
||||
});
|
2
LICENSE
2
LICENSE
@ -1,4 +1,4 @@
|
||||
Copyright (c) 2010-2017, Vladimir Agafonkin
|
||||
Copyright (c) 2010-2018, Vladimir Agafonkin
|
||||
Copyright (c) 2010-2011, CloudMade
|
||||
All rights reserved.
|
||||
|
||||
|
7
build/docs.js
Normal file → Executable file
7
build/docs.js
Normal file → Executable file
@ -1,4 +1,3 @@
|
||||
|
||||
var packageDef = require('../package.json');
|
||||
|
||||
function buildDocs() {
|
||||
@ -34,4 +33,8 @@ function buildDocs() {
|
||||
fs.writeFileSync('dist/reference-' + packageDef.version + '.html', out);
|
||||
}
|
||||
|
||||
module.exports = buildDocs;
|
||||
if (require.main === module) {
|
||||
buildDocs();
|
||||
} else {
|
||||
module.exports = buildDocs;
|
||||
}
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
// This script calculates the integrity hashes of the files in dist/ , and
|
||||
// **overwrites** the values in the documentation.
|
||||
|
||||
|
@ -142,7 +142,7 @@
|
||||
|
||||
|
||||
<div class="footer">
|
||||
<p>© 2017 <a href="http://agafonkin.com/en">Vladimir Agafonkin</a>. Maps © <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors.</p>
|
||||
<p>© 2017 <a href="http://agafonkin.com/en">Vladimir Agafonkin</a>. Maps © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -3,8 +3,9 @@
|
||||
import rollupGitVersion from 'rollup-plugin-git-version'
|
||||
import json from 'rollup-plugin-json'
|
||||
import gitRev from 'git-rev-sync'
|
||||
import pkg from '../package.json'
|
||||
|
||||
let version = require('../package.json').version;
|
||||
let {version} = pkg;
|
||||
let release;
|
||||
|
||||
// Skip the git branch+rev in the banner when doing a release build
|
||||
@ -19,19 +20,37 @@ if (process.env.NODE_ENV === 'release') {
|
||||
|
||||
const banner = `/* @preserve
|
||||
* Leaflet ${version}, a JS library for interactive maps. http://leafletjs.com
|
||||
* (c) 2010-2017 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
||||
* (c) 2010-2018 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
||||
*/
|
||||
`;
|
||||
|
||||
const outro = `var oldL = window.L;
|
||||
exports.noConflict = function() {
|
||||
window.L = oldL;
|
||||
return this;
|
||||
}
|
||||
|
||||
// Always export us to window global (see #2364)
|
||||
window.L = exports;`;
|
||||
|
||||
export default {
|
||||
input: 'src/Leaflet.js',
|
||||
output: {
|
||||
file: 'dist/leaflet-src.js',
|
||||
format: 'umd',
|
||||
name: 'L',
|
||||
banner: banner,
|
||||
sourcemap: true
|
||||
},
|
||||
output: [
|
||||
{
|
||||
file: pkg.main,
|
||||
format: 'umd',
|
||||
name: 'L',
|
||||
banner: banner,
|
||||
outro: outro,
|
||||
sourcemap: true
|
||||
},
|
||||
{
|
||||
file: pkg.module,
|
||||
format: 'es',
|
||||
banner: banner,
|
||||
sourcemap: true
|
||||
}
|
||||
],
|
||||
legacy: true, // Needed to create files loadable by IE8
|
||||
plugins: [
|
||||
release ? json() : rollupGitVersion()
|
||||
|
@ -9,7 +9,7 @@ const rev = gitRev.short();
|
||||
const version = require('../package.json').version + '+' + branch + '.' + rev;
|
||||
const banner = `/* @preserve
|
||||
* Leaflet ${version}, a JS library for interactive maps. http://leafletjs.com
|
||||
* (c) 2010-2016 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
||||
* (c) 2010-2018 Vladimir Agafonkin, (c) 2010-2011 CloudMade
|
||||
*/
|
||||
`;
|
||||
|
||||
|
@ -24,8 +24,8 @@
|
||||
</div>
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
//Disable the hack fix
|
||||
|
@ -26,13 +26,13 @@
|
||||
|
||||
var map = L.map('map').setView([50.5, 0], 5);
|
||||
|
||||
var OSM_Mapnik = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
var OSM_Mapnik = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom: 19,
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
}).addTo(map);
|
||||
var OSM_BlackAndWhite = L.tileLayer('http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', {
|
||||
maxZoom: 18,
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||
});
|
||||
|
||||
L.control.layers({
|
||||
|
@ -15,8 +15,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
osm2 = new L.TileLayer(osmUrl, {attribution: 'Hello world'});
|
||||
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var map = new L.Map('map', {zoom: 15, layers: [osm]});
|
||||
|
@ -18,8 +18,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
latlng = new L.LatLng(50.5, 30.51);
|
||||
|
||||
|
@ -19,8 +19,8 @@
|
||||
<script>
|
||||
map = L.map('map', { center: [0, 0], zoom: 3, maxZoom: 4 });
|
||||
|
||||
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
}).addTo(map);
|
||||
|
||||
L.DomUtil.get('removeAdd').onclick = function() {
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
latlng = new L.LatLng(50.5, 30.51);
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var map = L.map('map')
|
||||
|
@ -10,11 +10,21 @@
|
||||
<link rel="stylesheet" href="../css/screen.css" />
|
||||
|
||||
<style>
|
||||
html, body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
#wrapper {
|
||||
transform: scale(.5, .25); /* scaleX0 = .5 ; scaleY0 = .25 */
|
||||
transform-origin: 0 0;
|
||||
padding: 40px 100px; /* displayed padding-top = scaleY0 * 40px = 10px ; displayed padding-left = scaleX0 * 100px = 50px */
|
||||
}
|
||||
#map {
|
||||
width: 400px;
|
||||
height: 300px;
|
||||
transform: scale(1.5, 1.5);
|
||||
transform: scale(3, 8); /* scaleX = .5 * 3 = 1.5 ; scaleY = .25 * 8 = 2 */
|
||||
transform-origin: 0 0;
|
||||
border-width: 30px 70px; /* displayed border-top-width = scaleY * 30px = 60px ; displayed border-left-width = scaleX * 70px = 105px */
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -22,17 +32,34 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="map"></div>
|
||||
<div id="wrapper">
|
||||
<div id="map"></div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var map = L.map('map')
|
||||
.setView([50.5, 30.51], 15)
|
||||
.addLayer(osm);
|
||||
|
||||
var mapContainer = map.getContainer();
|
||||
|
||||
var marker = L.marker([50.5, 30.51], {
|
||||
draggable: true
|
||||
}).addTo(map);
|
||||
|
||||
map.on('drag', function (event) {
|
||||
console.log('map:');
|
||||
console.log(L.DomEvent.getMousePosition(event.originalEvent, mapContainer));
|
||||
});
|
||||
marker.on('drag', function (event) {
|
||||
console.log('marker:');
|
||||
console.log(L.DomEvent.getMousePosition(event.originalEvent, mapContainer));
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
@ -18,8 +18,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var map = L.map('map')
|
||||
|
@ -55,8 +55,8 @@
|
||||
console.log('poly click');
|
||||
});
|
||||
|
||||
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
}).addTo(map);
|
||||
</script>
|
||||
</body>
|
||||
|
@ -54,8 +54,8 @@
|
||||
console.log('poly click');
|
||||
});
|
||||
|
||||
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
}).addTo(map);
|
||||
</script>
|
||||
</body>
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm1 = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
osm2 = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
bounds = new L.LatLngBounds(new L.LatLng(49.5, -11.3), new L.LatLng(61.2, 2.5));
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
bounds = new L.LatLngBounds(new L.LatLng(49.5, Number.NEGATIVE_INFINITY), new L.LatLng(61.2, Number.POSITIVE_INFINITY));
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
bounds = new L.LatLngBounds(new L.LatLng(49.5, -11.3), new L.LatLng(61.2, 2.5));
|
||||
|
||||
|
@ -81,8 +81,8 @@
|
||||
CASE 1: no opacity set on any layers
|
||||
**********/
|
||||
// OSM Basemap
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors';
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';
|
||||
|
||||
var osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: ''}).addTo(map1);
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var map = L.map('map')
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var map = L.map('map')
|
||||
|
@ -21,8 +21,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
latlng = new L.LatLng(50.5, 30.51);
|
||||
|
||||
|
@ -29,8 +29,8 @@
|
||||
|
||||
var map = L.map('map').setView(center, 13);
|
||||
|
||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
|
||||
L.polygon([[41.21, 9.42], [41.22, 9.40], [41.23, 9.40]]).addTo(map).bindTooltip('Default centered polygon tooltip');
|
||||
|
@ -16,8 +16,8 @@
|
||||
<script>
|
||||
var map = new L.Map('map');
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {attribution: osmAttrib}),
|
||||
osm2 = L.tileLayer(osmUrl, {attribution: osmAttrib});
|
||||
|
||||
|
@ -59,8 +59,8 @@
|
||||
var sf = [37.77, -122.42],
|
||||
trd = [63.41, 10.41];
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm1 = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
osm2 = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
center = L.latLng(63.41, 10.41);
|
||||
|
@ -18,8 +18,8 @@
|
||||
// Check the 'center' setting of the scroll-wheel, double-click and touch-zoom
|
||||
// handlers
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {minZoom: 14, attribution: osmAttrib}),
|
||||
latlng = new L.LatLng(51.1788409,-1.82618);
|
||||
|
||||
|
@ -19,9 +19,9 @@
|
||||
|
||||
var map = L.map('map').setView(L.latLng(50.5, 30.51), 0);
|
||||
|
||||
var osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {attribution: osmAttrib, minZoom: 0, maxZoom: 10}).addTo(map),
|
||||
osm2 = L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {attribution: 'Hello world', minZoom: 5, maxZoom: 18});
|
||||
var osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {attribution: osmAttrib, minZoom: 0, maxZoom: 10}).addTo(map),
|
||||
osm2 = L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {attribution: 'Hello world', minZoom: 5, maxZoom: 18});
|
||||
|
||||
L.control.layers({
|
||||
'OSM (5-18)': osm2,
|
||||
|
@ -58,7 +58,7 @@
|
||||
}).setView(dc, 14);
|
||||
|
||||
var positron = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>'
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>'
|
||||
}).addTo(map);
|
||||
|
||||
var path = new L.Polyline([kyiv, trd, lnd, mad, dc, sf]).addTo(map);
|
||||
|
@ -25,7 +25,7 @@
|
||||
map = new L.Map('map', {preferCanvas: true});
|
||||
|
||||
// create the tile layer with correct attribution
|
||||
var osmUrl = 'http://a.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
var osmAttrib = 'Map data © OpenStreetMap contributors';
|
||||
var osm = new L.TileLayer(osmUrl, { minZoom: 1, maxZoom: 17, attribution: osmAttrib, detectRetina: true });
|
||||
map.addLayer(osm);
|
||||
|
@ -19,8 +19,8 @@
|
||||
preferCanvas: true
|
||||
}).locate();
|
||||
|
||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
|
||||
var vanillaLayer = new L.LayerGroup();
|
||||
|
@ -15,8 +15,8 @@
|
||||
<div id="map"></div>
|
||||
|
||||
<script>
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var map = L.map('map', {
|
||||
|
@ -33,8 +33,8 @@
|
||||
<script>
|
||||
|
||||
function makeMap(container, options) {
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var map = L.map(container, options)
|
||||
|
@ -9,7 +9,7 @@
|
||||
<script>
|
||||
var map,
|
||||
mapDiv,
|
||||
osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png');
|
||||
osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png');
|
||||
|
||||
|
||||
var recreateMap = function(){
|
||||
|
@ -20,8 +20,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var map = L.map('map')
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
<script>
|
||||
function addLayerAndMarker(map) {
|
||||
var layer = new L.TileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
var layer = new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom : 18
|
||||
}).addTo(map);
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
<script>
|
||||
function addLayerAndMarkers(map) {
|
||||
var layer = new L.TileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
var layer = new L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
maxZoom : 18
|
||||
}).addTo(map);
|
||||
|
||||
|
@ -24,8 +24,8 @@
|
||||
profiler and examine times for _on, _off and fire.
|
||||
|
||||
*/
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var map = L.map('map')
|
||||
|
@ -47,8 +47,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
latlng = new L.LatLng(39.05, 8.40);
|
||||
|
||||
|
@ -22,8 +22,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
latlng = new L.LatLng(50.5, 30.51);
|
||||
|
||||
|
@ -17,8 +17,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var map = L.map('map')
|
||||
|
@ -22,8 +22,8 @@ var map = L.map('map').setView([36.9, -95.4], 5);
|
||||
map.on('contextmenu', function (e) {
|
||||
alert('The map has been right-clicked');
|
||||
});
|
||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
}).addTo(map);
|
||||
|
||||
|
||||
|
@ -24,8 +24,8 @@
|
||||
|
||||
map.setView([51.505, -0.09], 13);
|
||||
|
||||
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
}).addTo(map);
|
||||
|
||||
var a_popup = L.popup().setContent('Previously created')
|
||||
|
@ -23,8 +23,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
});
|
||||
|
||||
var map = L.map('map')
|
||||
|
@ -16,7 +16,7 @@
|
||||
<div id="map"></div>
|
||||
<script>
|
||||
var map = L.map('map').setView([51.505, -0.09], 13);
|
||||
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
|
||||
map.on('click', function(e) {
|
||||
L.popup().setLatLng(e.latlng).setContent('Hello').openOn(map);
|
||||
});
|
||||
|
@ -27,7 +27,7 @@
|
||||
map = new L.Map('map');
|
||||
|
||||
// create the tile layer with correct attribution
|
||||
var osmUrl = 'http://a.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
var osm = new L.TileLayer(osmUrl, { minZoom: 1, maxZoom: 17 });
|
||||
map.addLayer(osm);
|
||||
map.fitBounds(new L.LatLngBounds([51,7],[51,7]));
|
||||
|
@ -96,7 +96,7 @@
|
||||
var map = L.map('map', mapopts);
|
||||
|
||||
var positron = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>'
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>'
|
||||
})
|
||||
|
||||
var grid = L.gridLayer({
|
||||
|
@ -55,7 +55,7 @@
|
||||
//In any map, set minZoom and/or maxZoom, plus bounceAtZoomLimits to false.
|
||||
|
||||
var positron = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>'
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, © <a href="http://cartodb.com/attributions">CartoDB</a>'
|
||||
}).addTo(map);
|
||||
|
||||
var marker = L.marker(myCenter);
|
||||
|
@ -15,7 +15,7 @@
|
||||
<button onclick="boundsExtendLatLng()">Extend the bounds of the center rectangle with the lower left marker</button>
|
||||
<script src="route.js"></script>
|
||||
<script>
|
||||
var osmUrl = 'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osm = new L.TileLayer(osmUrl, {maxZoom: 18});
|
||||
|
||||
var latLng = new L.LatLng(54.18815548107151, -7.657470703124999);
|
||||
|
@ -18,8 +18,8 @@
|
||||
<script src="geojson-sample.js"></script>
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||
rectangle,
|
||||
featureGroup;
|
||||
|
@ -51,8 +51,8 @@
|
||||
|
||||
var map = L.map('map').setView([37.8, -96], 4);
|
||||
|
||||
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
}).addTo(map);
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
zoom: 3,
|
||||
preferCanvas: true
|
||||
});
|
||||
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
minZoom: 1,
|
||||
maxZoom: 17,
|
||||
label: 'open street map'
|
||||
|
@ -18,7 +18,7 @@
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://api.tiles.mapbox.com/v4/mapbox.light/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var map = L.map('map', {preferCanvas: true})
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
<script>
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var bounds = new L.LatLngBounds(new L.LatLng(54.559322, -5.767822), new L.LatLng(56.1210604, -3.021240));
|
||||
|
File diff suppressed because one or more lines are too long
@ -23,7 +23,7 @@
|
||||
// buffer += text + "\r\n";
|
||||
//}
|
||||
|
||||
var osmUrl = 'http://{s}.tile.osm.org/{z}/{x}/{y}.png',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osm = new L.TileLayer(osmUrl, {maxZoom: 18}),
|
||||
map = new L.Map('map', {layers: [osm], center: new L.LatLng(51.505, -0.04), zoom: 13});
|
||||
|
||||
|
@ -15,8 +15,8 @@
|
||||
<button onclick="map.fitBounds(poly.getBounds())">Zoom to polygon</button>
|
||||
<script src="route.js"></script>
|
||||
<script>
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var poly_points = [
|
||||
|
@ -18,8 +18,8 @@
|
||||
|
||||
<script src="route.js"></script>
|
||||
<script>
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
for (var i = 0, latlngs = [], len = route.length; i < len; i++) {
|
||||
|
@ -16,8 +16,8 @@
|
||||
|
||||
<script src="route.js"></script>
|
||||
<script>
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
for (var i = 0, latlngs = [], len = route.length; i < len; i++) {
|
||||
|
@ -34,8 +34,8 @@
|
||||
.bindPopup("I am a polygon.")
|
||||
.addTo(map);
|
||||
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}).addTo(map);
|
||||
|
||||
</script>
|
||||
|
@ -13,8 +13,8 @@
|
||||
|
||||
<script src="route.js"></script>
|
||||
<script>
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
for (var i = 0, latlngs = [], len = route.length; i < len; i++) {
|
||||
|
@ -13,8 +13,8 @@
|
||||
|
||||
<script src="route.js"></script>
|
||||
<script>
|
||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||
|
||||
var svg = L.svg();
|
||||
|
@ -1,15 +1,15 @@
|
||||
exclude: [build, debug, node_modules, spec, src, CNAME, Jakefile.js, reference-tpl.html, CHANGELOG.md, README.md, LICENSE, DOCS-TODO.md]
|
||||
exclude: [build, debug, node_modules, spec, src, CNAME, reference-tpl.html, CHANGELOG.md, README.md, LICENSE, DOCS-TODO.md]
|
||||
|
||||
markdown: kramdown
|
||||
|
||||
kramdown:
|
||||
entity_output: as_input
|
||||
|
||||
latest_leaflet_version: 1.3.0
|
||||
latest_leaflet_version: 1.3.1
|
||||
|
||||
# Integrity hashes for both leaflet.js and leaflet-src.js
|
||||
# These will be shown in the downloads page
|
||||
# See https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
|
||||
integrity_hash_css: "sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ=="
|
||||
integrity_hash_source: "sha512-2h9aokfcaYW7k0VPn1JqbQDQCaNQRrZJwetlnQ88yJrtIzGLVW/2StdQKoE+TIVNNTUxf6SVa+2vW2KB2EXnnA=="
|
||||
integrity_hash_uglified: "sha512-C7BBF9irt5R7hqbUm2uxtODlUVs+IsNu2UULGuZN7gM+k/mmeG4xvIEac01BtQa4YIkUpp23zZC4wIwuXaPMQA=="
|
||||
integrity_hash_source: "sha512-IkGU/uDhB9u9F8k+2OsA6XXoowIhOuQL1NTgNZHY1nkURnqEGlDZq3GsfmdJdKFe1k1zOc6YU2K7qY+hF9AodA=="
|
||||
integrity_hash_uglified: "sha512-/Nsx9X4HebavoBvEBuyp3I7od5tA0UzAxs+j83KgC8PU0kgB4XiK4Lfe4y4cgBtaRJQEIFCW+oC506aPT2L1zw=="
|
||||
|
@ -21,10 +21,10 @@ bodyclass: post-page
|
||||
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';
|
||||
dsq.src = 'https://' + disqus_shortname + '.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
|
||||
<a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
||||
<a href="https://disqus.com/" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
|
||||
|
||||
|
@ -10,11 +10,11 @@
|
||||
{% if title == '' %}
|
||||
<meta property="og:title" content="Leaflet — an open-source JavaScript library for interactive maps" />
|
||||
<meta property="og:description" content="Leaflet is a modern, lightweight open-source JavaScript library for mobile-friendly interactive maps." />
|
||||
<meta property="og:image" content="http://leafletjs.com/docs/images/logo.png" />
|
||||
<meta property="og:image" content="https://leafletjs.com/docs/images/logo.png" />
|
||||
|
||||
<meta itemprop="name" content="Leaflet">
|
||||
<meta itemprop="description" content="Leaflet — a modern, lightweight open-source JavaScript library for mobile-friendly interactive maps.">
|
||||
<meta itemprop="image" content="http://leafletjs.com/docs/images/logo.png">
|
||||
<meta itemprop="image" content="https://leafletjs.com/docs/images/logo.png">
|
||||
{% endif %}
|
||||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
@ -23,12 +23,12 @@
|
||||
|
||||
<link rel="shortcut icon" type="image/x-icon" href="{{ root }}docs/images/favicon.ico" />
|
||||
|
||||
<link href="http://leafletjs.com/atom.xml" type="application/atom+xml" rel="alternate" title="Leaflet Dev Blog Atom Feed" />
|
||||
<link href="https://leafletjs.com/atom.xml" type="application/atom+xml" rel="alternate" title="Leaflet Dev Blog Atom Feed" />
|
||||
|
||||
<link rel="stylesheet" href="{{ root }}docs/css/normalize.css" />
|
||||
<link rel="stylesheet" href="{{ root }}docs/css/main.css" />
|
||||
|
||||
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,300' rel='stylesheet' type='text/css'>
|
||||
<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,400italic,700,300' rel='stylesheet' type='text/css'>
|
||||
|
||||
<script src="{{ root }}docs/highlight/highlight.pack.js"></script>
|
||||
<link rel="stylesheet" href="{{ root }}docs/highlight/styles/github-gist.css" />
|
||||
@ -41,17 +41,17 @@
|
||||
|
||||
<script>
|
||||
ACCESS_TOKEN = 'pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw';
|
||||
MB_ATTR = 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
|
||||
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||
'Imagery © <a href="http://mapbox.com">Mapbox</a>';
|
||||
MB_ATTR = 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
||||
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>';
|
||||
MB_URL = 'https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=' + ACCESS_TOKEN;
|
||||
OSM_URL = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
OSM_ATTRIB = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors';
|
||||
OSM_URL = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||
OSM_ATTRIB = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';
|
||||
</script>
|
||||
</head>
|
||||
<body{% if page.bodyclass %} class="{{ page.bodyclass }}"{% endif %}>
|
||||
|
||||
<h1><a href="http://leafletjs.com"><img src="{{ root }}docs/images/logo.png" alt="Leaflet" width="300" /></a></h1>
|
||||
<h1><a href="https://leafletjs.com/"><img src="{{ root }}docs/images/logo.png" alt="Leaflet" width="300" /></a></h1>
|
||||
<h3 class="tagline">an open-source JavaScript library<br> for mobile-friendly interactive maps</h3>
|
||||
|
||||
<ul class="nav">
|
||||
@ -105,13 +105,13 @@
|
||||
{{ content }}
|
||||
|
||||
<div class="footer">
|
||||
<p>© 2017 <a href="http://agafonkin.com/en">Vladimir Agafonkin</a>. Maps © <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors.</p>
|
||||
<p>© 2017 <a href="http://agafonkin.com/en">Vladimir Agafonkin</a>. Maps © <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors.</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<nav class="ext-links">
|
||||
<a class="ext-link twitter" href="http://twitter.com/LeafletJS" title="Follow LeafletJS on Twitter"><img alt="Follow LeafletJS on Twitter" src="{{root}}docs/images/twitter-round.png" width="46" /></a>
|
||||
<a class="ext-link twitter" href="https://twitter.com/LeafletJS" title="Follow LeafletJS on Twitter"><img alt="Follow LeafletJS on Twitter" src="{{root}}docs/images/twitter-round.png" width="46" /></a>
|
||||
<a class="ext-link github" href="http://github.com/Leaflet/Leaflet" title="View Source on GitHub"><img alt="View Source on GitHub" src="{{root}}docs/images/github-round.png" width="46" /></a>
|
||||
<a class="ext-link forum" href="https://stackoverflow.com/questions/tagged/leaflet" title="Ask for help on Stack Overflow"><img alt="Leaflet questions on Stack Overflow" src="{{root}}docs/images/forum-round.png" width="46" /></a>
|
||||
</nav>
|
||||
|
@ -84,11 +84,11 @@ If you have any issues also please log a bug on <a href="https://github.com/leaf
|
||||
Enjoy!<br />
|
||||
Dave Leaver.
|
||||
|
||||
<link rel="stylesheet" href="http://leaflet.github.io/Leaflet.markercluster/dist/MarkerCluster.css" />
|
||||
<link rel="stylesheet" href="http://leaflet.github.io/Leaflet.markercluster/dist/MarkerCluster.Default.css" />
|
||||
<!--[if lte IE 8]><link rel="stylesheet" href="http://leaflet.github.io/Leaflet.markercluster/dist/MarkerCluster.Default.ie.css" /><![endif]-->
|
||||
<script src="http://leaflet.github.io/Leaflet.markercluster/dist/leaflet.markercluster-src.js"></script>
|
||||
<script src="http://leaflet.github.io/Leaflet.markercluster/example/realworld.388.js"></script>
|
||||
<link rel="stylesheet" href="https://leaflet.github.io/Leaflet.markercluster/dist/MarkerCluster.css" />
|
||||
<link rel="stylesheet" href="https://leaflet.github.io/Leaflet.markercluster/dist/MarkerCluster.Default.css" />
|
||||
<!--[if lte IE 8]><link rel="stylesheet" href="https://leaflet.github.io/Leaflet.markercluster/dist/MarkerCluster.Default.ie.css" /><![endif]-->
|
||||
<script src="https://leaflet.github.io/Leaflet.markercluster/dist/leaflet.markercluster-src.js"></script>
|
||||
<script src="https://leaflet.github.io/Leaflet.markercluster/example/realworld.388.js"></script>
|
||||
|
||||
<script>
|
||||
var mapbox = new L.TileLayer(MB_URL, {maxZoom: 18, attribution: MB_ATTR, id: 'examples.map-i875mjb7'}),
|
||||
|
@ -41,8 +41,8 @@ Leaflet.draw is very simple to drop into you Leaflet application. The following
|
||||
var map = L.map('map').setView([175.30867, -37.77914], 13);
|
||||
|
||||
// add an OpenStreetMap tile layer
|
||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
|
||||
// Initialize the FeatureGroup to store editable layers
|
||||
@ -96,14 +96,14 @@ I've had a great time implementing this plugin. I hope you enjoy using it. If yo
|
||||
Cheers,
|
||||
Jacob Toye
|
||||
|
||||
<link rel="stylesheet" href="http://leaflet.github.com/Leaflet.draw/lib/leaflet/leaflet.css" />
|
||||
<link rel="stylesheet" href="http://leaflet.github.com/Leaflet.draw/leaflet.draw.css" />
|
||||
<link rel="stylesheet" href="https://leaflet.github.io/Leaflet.draw/lib/leaflet/leaflet.css" />
|
||||
<link rel="stylesheet" href="https://leaflet.github.io/Leaflet.draw/leaflet.draw.css" />
|
||||
<!--[if lte IE 8]>
|
||||
<link rel="stylesheet" href="http://leaflet.github.com/Leaflet.draw/lib/leaflet/leaflet.ie.css" />
|
||||
<link rel="stylesheet" href="http://leaflet.github.com/Leaflet.draw/leaflet.draw.ie.css" />
|
||||
<link rel="stylesheet" href="https://leaflet.github.io/Leaflet.draw/lib/leaflet/leaflet.ie.css" />
|
||||
<link rel="stylesheet" href="https://leaflet.github.io/Leaflet.draw/leaflet.draw.ie.css" />
|
||||
<![endif]-->
|
||||
<script src="http://leaflet.github.com/Leaflet.draw/libs/leaflet/leaflet.js"></script>
|
||||
<script src="http://leaflet.github.com/Leaflet.draw/leaflet.draw.js"></script>
|
||||
<script src="https://leaflet.github.io/Leaflet.draw/libs/leaflet/leaflet.js"></script>
|
||||
<script src="https://leaflet.github.io/Leaflet.draw/leaflet.draw.js"></script>
|
||||
|
||||
<style>
|
||||
.leaflet-bar {
|
||||
@ -116,8 +116,8 @@ Jacob Toye
|
||||
var map = L.map('map').setView([-37.77914, 175.30867], 16);
|
||||
|
||||
// add an OpenStreetMap tile layer
|
||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
|
||||
// Initialize the FeatureGroup to store editable layers
|
||||
|
@ -7,7 +7,7 @@ authorsite: http://agafonkin.com/en
|
||||
---
|
||||
|
||||
One of the greatest things about Leaflet is its powerful plugin ecosystem.
|
||||
The [Leaflet plugins page](http://leafletjs.com/plugins.html) lists dozens of awesome plugins, and more are being added every week.
|
||||
The [Leaflet plugins page](https://leafletjs.com/plugins.html) lists dozens of awesome plugins, and more are being added every week.
|
||||
|
||||
This guide lists a number of best practices for publishing a Leaflet plugin that meets the quality standards of Leaflet itself. Also available [in the repo](https://github.com/Leaflet/Leaflet/blob/master/PLUGIN-GUIDE.md).
|
||||
|
||||
|
@ -10,7 +10,7 @@ I know this blog hasn't been updated for a long time — 1.5 years actually!
|
||||
|
||||
We're on the finishing line of releasing Leaflet 1.0 — the biggest and greatest Leaflet release _ever_. The latest stable version, 0.7.3, is already perfect, so you won't believe how much awesome stuff we've managed to pack into the upcoming release — 914 commits later! But I'll leave that for a separate `1.0-beta1` blog post after we fix [that one last issue](https://github.com/Leaflet/Leaflet/pull/3307).
|
||||
|
||||
Meanwhile, I'm happy to present you the new redesigned [Leaflet website](http://leafletjs.com/)! Now finally mobile-friendly, simple, clean, minimal and modern, just like the library itself. Also notice the floating menu when scrolling down the [Docs](/reference.html) and [Plugins](/plugins.html) pages, a highly requested feature that'll make navigation much easier. Big thanks to [Rowan Hogan](https://github.com/rowanhogan) for the help with the new design!
|
||||
Meanwhile, I'm happy to present you the new redesigned [Leaflet website](https://leafletjs.com/)! Now finally mobile-friendly, simple, clean, minimal and modern, just like the library itself. Also notice the floating menu when scrolling down the [Docs](/reference.html) and [Plugins](/plugins.html) pages, a highly requested feature that'll make navigation much easier. Big thanks to [Rowan Hogan](https://github.com/rowanhogan) for the help with the new design!
|
||||
|
||||
P.S. I recently made a quirky 13-minute video for the [Geospatial World Forum](http://www.geospatialworldforum.org/), sharing the fun story behind Leaflet and how it became what it is today. Watch it and share it with your geofriends so that we can make the GIS world fun again!
|
||||
|
||||
|
@ -54,7 +54,7 @@ I'm incredibly thankful to everyone who made this release possible — by us
|
||||
|
||||
Special thanks to [Iván Sánchez](https://github.com/IvanSanchez), [Yohan Boniface](https://github.com/yohanboniface), [John Firebaugh](https://github.com/jfirebaugh), [Dave Leaver](https://github.com/danzel), [Patrick Arlt](https://github.com/patrickarlt), [Per Liedman](https://github.com/perliedman), [Jake Wilson](https://github.com/Jakobud) and [Steve Kashishian](https://github.com/snkashis) for lots of amazing contributions and support throughout the last year. All these people are now a part of the core Leaflet team. Keep'em coming!
|
||||
|
||||
![](http://www.reactiongifs.com/r/msy.gif)
|
||||
![](https://www.reactiongifs.com/r/msy.gif)
|
||||
|
||||
Love,<br />
|
||||
Vladimir.
|
||||
|
@ -29,7 +29,7 @@ Help us help you by taking a minute to learn [how to write a good bug report](ht
|
||||
|
||||
Last but not least, huge thanks to everybody using Leaflet. Keep creating great maps!
|
||||
|
||||
**Note to plugin developers**: we encourage you to upgrade your plugins to be compatible with the latest beta release. The 1.0 API is pretty stable at this point and many users are starting to use the beta version in production. Additionally, as 1.0 final release approaches, we want to get more serious about the quality of plugins that get [on the official list](http://leafletjs.com/plugins.html), making sure they're maintained and compatible with recent Leaflet releases.
|
||||
**Note to plugin developers**: we encourage you to upgrade your plugins to be compatible with the latest beta release. The 1.0 API is pretty stable at this point and many users are starting to use the beta version in production. Additionally, as 1.0 final release approaches, we want to get more serious about the quality of plugins that get [on the official list](https://leafletjs.com/plugins.html), making sure they're maintained and compatible with recent Leaflet releases.
|
||||
|
||||
Best,
|
||||
Iván & Vladimir & Yohan.
|
||||
|
@ -75,7 +75,7 @@ f2.wait(100).moveTo(350, 200, 0)
|
||||
.down().wait(500).moveBy(-200, 0, 1000).wait(500).up().wait(500);
|
||||
</code></pre>
|
||||
|
||||
You can check this in the [live prosthetic-hand demos](http://leaflet.github.io/prosthetic-hand/demos/).
|
||||
You can check this in the [live prosthetic-hand demos](https://leaflet.github.io/prosthetic-hand/demos/).
|
||||
|
||||
The prosthetic-hand library is not perfect, and some types of events only work in some browsers, but it can help trigger mouse/touch/pointer events in a repeatable way, with adjustable timing, allowing developers to keep both hands at the debugger. The timing modes allow granular control of the events fired, allowing to run less iterations of the code for the same gesture, which in turn means a simpler, better understanding of what's going on.
|
||||
|
||||
|
@ -19,7 +19,7 @@ Leaflet 1.0-rc1 closes down on edge cases and API inconsistencies that were pres
|
||||
|
||||
* The first ever Microsoft Edge hack (handle inconsistent `dblclick` behaviour on Win10 touchscreens)
|
||||
|
||||
* Unit tests with `prosthetic-hand`, letting us be sure that touch interactions behave consistently. This has its [own blog post](http://leafletjs.com/2016/03/20/debugging-touch-interactions.html).
|
||||
* Unit tests with `prosthetic-hand`, letting us be sure that touch interactions behave consistently. This has its [own blog post](https://leafletjs.com/2016/03/20/debugging-touch-interactions.html).
|
||||
|
||||
|
||||
### Changes in the API documentation
|
||||
|
@ -47,4 +47,4 @@ And of course, let's celebrate!
|
||||
Love,<br>
|
||||
The Leaflet team.
|
||||
|
||||
![](http://www.reactiongifs.com/wp-content/uploads/2013/06/umad.gif)
|
||||
![](https://www.reactiongifs.com/wp-content/uploads/2013/06/umad.gif)
|
||||
|
@ -10,7 +10,7 @@ As part of our "we really promised a faster release cycle" vision, we are publis
|
||||
|
||||
Compared to 1.0.1, this release fixes about a dozen bugs, and a couple new options. The full list of changes can be found on [the changelog](https://github.com/Leaflet/Leaflet/blob/master/CHANGELOG.md).
|
||||
|
||||
As usual, check the [downloads page](http://leafletjs.com/download.html) to get this release.
|
||||
As usual, check the [downloads page](https://leafletjs.com/download.html) to get this release.
|
||||
|
||||
### Next plans?
|
||||
|
||||
|
@ -20,7 +20,7 @@ backported a few fixes for Internet Explorer 8, and some miscellaneous fixes.
|
||||
The full list of changes can be found on [the changelog](https://github.com/Leaflet/Leaflet/blob/master/CHANGELOG.md).
|
||||
|
||||
|
||||
As usual, check the [downloads page](http://leafletjs.com/download.html) to get this release.
|
||||
As usual, check the [downloads page](https://leafletjs.com/download.html) to get this release.
|
||||
|
||||
|
||||
Cheers,<br>
|
||||
|
@ -8,11 +8,11 @@ authorsite: http://www.liedman.net
|
||||
|
||||
We have released Leaflet version 1.1.0, the first version built with [ES6 modules](https://babeljs.io/learn-es2015/#ecmascript-2015-features-modules) - a big step forward ensuring Leaflet is up to date with how modern JavaScript is written. For users upgrading to this release, this change should not make a difference, while it offers the possibility to import individual parts of Leaflet individually if your app is built with ES6. As a consequence, 1.1.0 is also the first version built without Leaflet's now deprecated custom build system, in favor of using [Rollup](https://rollupjs.org/).
|
||||
|
||||
Also new in this release is the new `L.VideoOverlay` class, allowing [overlaying video on your maps](http://leafletjs.com/examples/video-overlay/).
|
||||
Also new in this release is the new `L.VideoOverlay` class, allowing [overlaying video on your maps](https://leafletjs.com/examples/video-overlay/).
|
||||
|
||||
We also managed to fix over 30 bugs with the help of about 20 different contributors: see the full [changelog](https://github.com/Leaflet/Leaflet/blob/master/CHANGELOG.md) for details.
|
||||
|
||||
To get the new release, update your dependencies in your favorite package manager, or check the [downloads page](http://leafletjs.com/download.html).
|
||||
To get the new release, update your dependencies in your favorite package manager, or check the [downloads page](https://leafletjs.com/download.html).
|
||||
|
||||
Cheers,<br>
|
||||
The Leaflet team.
|
||||
|
@ -12,7 +12,7 @@ For the future, we expect to work out a new recommendation for authoring Leaflet
|
||||
|
||||
As usual, we also managed to close off a number of other bugs and make a couple of minor improvements, all with the help of our many contributors - a big thank you to all who contributed to the release this summer! See the full [changelog](https://github.com/Leaflet/Leaflet/blob/master/CHANGELOG.md) for details.
|
||||
|
||||
To get the new release, update your dependencies in your favorite package manager, or check the [downloads page](http://leafletjs.com/download.html).
|
||||
To get the new release, update your dependencies in your favorite package manager, or check the [downloads page](https://leafletjs.com/download.html).
|
||||
|
||||
Cheers,<br>
|
||||
The Leaflet team.
|
||||
|
@ -11,7 +11,7 @@ Long awaited Leaflet 1.3.0 has just been released!
|
||||
This release contains a lot of bugfixes, improvements and a couple new options.
|
||||
Big thanks to all contributors who made this release possible! See the full [changelog](https://github.com/Leaflet/Leaflet/blob/master/CHANGELOG.md) for details.
|
||||
|
||||
To get the new release, update your dependencies in your favorite package manager, or check the [downloads page](http://leafletjs.com/download.html).
|
||||
To get the new release, update your dependencies in your favorite package manager, or check the [downloads page](https://leafletjs.com/download.html).
|
||||
|
||||
Cheers,<br>
|
||||
The Leaflet team.
|
||||
|
18
docs/_posts/2018-01-18-leaflet-1.3.1.md
Normal file
18
docs/_posts/2018-01-18-leaflet-1.3.1.md
Normal file
@ -0,0 +1,18 @@
|
||||
---
|
||||
layout: post
|
||||
title: Announcing Leaflet 1.3.1
|
||||
description: a new bugfix release
|
||||
author: Andrew Cherniavskii
|
||||
authorsite: https://github.com/cherniavskii
|
||||
---
|
||||
|
||||
Leaflet 1.3.1 has just been released!
|
||||
|
||||
This release fixes `L.TileLayer` regression, introduced in 1.3.0. Oops!
|
||||
|
||||
See [changelog](https://github.com/Leaflet/Leaflet/blob/master/CHANGELOG.md) for details.
|
||||
|
||||
To get the new release, update your dependencies in your favorite package manager, or check the [downloads page](https://leafletjs.com/download.html).
|
||||
|
||||
Cheers,<br>
|
||||
The Leaflet team.
|
@ -6,11 +6,11 @@ title: Leaflet Developer Blog Atom Feed
|
||||
|
||||
<title>Leaflet Dev Blog</title>
|
||||
|
||||
<link href="http://leafletjs.com/atom.xml" rel="self"/>
|
||||
<link href="http://leafletjs.com"/>
|
||||
<link href="https://leafletjs.com/atom.xml" rel="self"/>
|
||||
<link href="https://leafletjs.com"/>
|
||||
|
||||
<updated>{{ site.time | date_to_xmlschema }}</updated>
|
||||
<id>http://leafletjs.com/</id>
|
||||
<id>https://leafletjs.com/</id>
|
||||
|
||||
<author>
|
||||
<name>Vladimir Agafonkin</name>
|
||||
@ -19,9 +19,9 @@ title: Leaflet Developer Blog Atom Feed
|
||||
{% for post in site.posts %}
|
||||
<entry>
|
||||
<title>{{ post.title }}</title>
|
||||
<link href="http://leafletjs.com{{ post.url }}"/>
|
||||
<link href="https://leafletjs.com{{ post.url }}"/>
|
||||
<updated>{{ post.date | date_to_xmlschema }}</updated>
|
||||
<id>http://leafletjs.com{{ post.id }}</id>
|
||||
<id>https://leafletjs.com{{ post.id }}</id>
|
||||
<content type="html">{{ post.content | xml_escape }}</content>
|
||||
</entry>
|
||||
{% endfor %}
|
||||
|
@ -12,8 +12,8 @@ bodyclass: download-page
|
||||
<th>Description</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="http://cdn.leafletjs.com/leaflet/v1.3.0/leaflet.zip">Leaflet 1.3.0</a></td>
|
||||
<td>Stable version, released on January 15, 2018.</td>
|
||||
<td><a href="http://cdn.leafletjs.com/leaflet/v1.3.1/leaflet.zip">Leaflet 1.3.1</a></td>
|
||||
<td>Stable version, released on January 18, 2018.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><a href="https://leafletjs-cdn.s3.amazonaws.com/content/leaflet/master/leaflet.zip">Leaflet 1.3-dev</a></td>
|
||||
@ -89,10 +89,10 @@ which installs easily and works well across all major platforms.
|
||||
Here are the steps to set it up:
|
||||
|
||||
1. [Download and install Node](http://nodejs.org)
|
||||
2. Run the following commands in the command line:
|
||||
2. Run the following command in the command line:
|
||||
|
||||
<pre><code>npm install</code></pre>
|
||||
|
||||
Now that you have everything installed, from inside the Leaflet directory, run:
|
||||
<pre><code>npm run build</code></pre>
|
||||
Now that you have everything installed, run `npm run build` inside the Leaflet directory.
|
||||
This will combine and compress the Leaflet source files, saving the build to the `dist` folder.
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
cssFile: 'https://unpkg.com/leaflet/dist/leaflet.css',
|
||||
css: 'body {\n\tmargin: 0;\n}\nhtml, body, #leaflet {\n\theight: 100%\n}',
|
||||
jsFile: 'https://unpkg.com/leaflet/dist/leaflet-src.js',
|
||||
js: "var map = new L.Map('leaflet', {\n\tlayers: [\n\t\tnew L.TileLayer('//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {\n\t\t\t'attribution': 'Map data © <a href=\"http://openstreetmap.org\">OpenStreetMap</a> contributors'\n\t\t})\n\t],\n\tcenter: [0, 0],\n\tzoom: 0\n});"
|
||||
js: "var map = new L.Map('leaflet', {\n\tlayers: [\n\t\tnew L.TileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {\n\t\t\t'attribution': 'Map data © <a href=\"http://openstreetmap.org\">OpenStreetMap</a> contributors'\n\t\t})\n\t],\n\tcenter: [0, 0],\n\tzoom: 0\n});"
|
||||
};
|
||||
|
||||
var hash = location.hash.substr(1);
|
||||
|
@ -9,9 +9,9 @@ title: Choropleth Tutorial
|
||||
|
||||
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
|
||||
maxZoom: 18,
|
||||
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
|
||||
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||
'Imagery © <a href="http://mapbox.com">Mapbox</a>',
|
||||
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
||||
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
||||
id: 'mapbox.light'
|
||||
}).addTo(map);
|
||||
|
||||
|
@ -10,9 +10,9 @@ title: Choropleth Tutorial
|
||||
|
||||
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
|
||||
maxZoom: 18,
|
||||
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
|
||||
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||
'Imagery © <a href="http://mapbox.com">Mapbox</a>',
|
||||
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
||||
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
||||
id: 'mapbox.light'
|
||||
}).addTo(map);
|
||||
|
||||
|
@ -40,9 +40,9 @@ css: "#map {
|
||||
|
||||
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
|
||||
maxZoom: 18,
|
||||
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
|
||||
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||
'Imagery © <a href="http://mapbox.com">Mapbox</a>',
|
||||
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
||||
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
||||
id: 'mapbox.light'
|
||||
}).addTo(map);
|
||||
|
||||
|
@ -5,8 +5,8 @@ title: Custom Icons Tutorial
|
||||
<script>
|
||||
var map = L.map('map').setView([51.5, -0.09], 13);
|
||||
|
||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
|
||||
var LeafIcon = L.Icon.extend({
|
||||
|
@ -5,8 +5,8 @@ title: Custom Icons Tutorial
|
||||
<script>
|
||||
var map = L.map('map').setView([51.5, -0.09], 13);
|
||||
|
||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||
}).addTo(map);
|
||||
|
||||
var LeafIcon = L.Icon.extend({
|
||||
|
@ -20,10 +20,10 @@ Let's illustrate with a custom `L.TileLayer` that will display random kitten ima
|
||||
L.TileLayer.Kitten = L.TileLayer.extend({
|
||||
getTileUrl: function(coords) {
|
||||
var i = Math.ceil( Math.random() * 4 );
|
||||
return "http://placekitten.com/256/256?image=" + i;
|
||||
return "https://placekitten.com/256/256?image=" + i;
|
||||
},
|
||||
getAttribution: function() {
|
||||
return "<a href='http://placekitten.com/attribution.html'>PlaceKitten</a>"
|
||||
return "<a href='https://placekitten.com/attribution.html'>PlaceKitten</a>"
|
||||
}
|
||||
});
|
||||
|
||||
@ -46,10 +46,10 @@ For the KittenLayer, you should create a file like `L.KittenLayer.js` with:
|
||||
L.TileLayer.Kitten = L.TileLayer.extend({
|
||||
getTileUrl: function(coords) {
|
||||
var i = Math.ceil( Math.random() * 4 );
|
||||
return "http://placekitten.com/256/256?image=" + i;
|
||||
return "https://placekitten.com/256/256?image=" + i;
|
||||
},
|
||||
getAttribution: function() {
|
||||
return "<a href='http://placekitten.com/attribution.html'>PlaceKitten</a>"
|
||||
return "<a href='https://placekitten.com/attribution.html'>PlaceKitten</a>"
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -13,10 +13,10 @@ title: KittenLayer
|
||||
L.TileLayer.Kitten = L.TileLayer.extend({
|
||||
getTileUrl: function(coords) {
|
||||
var i = Math.ceil( Math.random() * 4 );
|
||||
return "http://placekitten.com/256/256?image=" + i;
|
||||
return "https://placekitten.com/256/256?image=" + i;
|
||||
},
|
||||
getAttribution: function() {
|
||||
return "<a href='http://placekitten.com/attribution.html'>PlaceKitten</a>"
|
||||
return "<a href='https://placekitten.com/attribution.html'>PlaceKitten</a>"
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -9,9 +9,9 @@ title: GeoJSON tutorial
|
||||
|
||||
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
|
||||
maxZoom: 18,
|
||||
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
|
||||
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||
'Imagery © <a href="http://mapbox.com">Mapbox</a>',
|
||||
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
||||
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
||||
id: 'mapbox.light'
|
||||
}).addTo(map);
|
||||
|
||||
|
@ -18,9 +18,9 @@
|
||||
|
||||
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
|
||||
maxZoom: 18,
|
||||
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
|
||||
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||
'Imagery © <a href="http://mapbox.com">Mapbox</a>',
|
||||
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
||||
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
||||
id: 'mapbox.light'
|
||||
}).addTo(map);
|
||||
|
||||
|
@ -5,17 +5,17 @@ title: Using GeoJSON with Leaflet
|
||||
|
||||
<h3>Using GeoJSON with Leaflet</h3>
|
||||
|
||||
<p>GeoJSON is becoming a very popular data format among many GIS technologies and services — it's simple, lightweight, straightforward, and Leaflet is quite good at handling it. In this example, you'll learn how to create and interact with map vectors created from <a href="http://geojson.org/">GeoJSON</a> objects.</p>
|
||||
<p>GeoJSON is becoming a very popular data format among many GIS technologies and services — it's simple, lightweight, straightforward, and Leaflet is quite good at handling it. In this example, you'll learn how to create and interact with map vectors created from <a href="https://tools.ietf.org/html/rfc7946">GeoJSON</a> objects.</p>
|
||||
|
||||
{% include frame.html url="example.html" %}
|
||||
|
||||
<h3>About GeoJSON</h3>
|
||||
|
||||
<p>According to <a href="http://geojson.org">http://geojson.org</a>:</p>
|
||||
<p>According to <a href="https://tools.ietf.org/html/rfc7946">GeoJSON Specification (RFC 7946)</a>:</p>
|
||||
|
||||
<blockquote>GeoJSON is a format for encoding a variety of geographic data structures. A GeoJSON object may represent a geometry, a feature, or a collection of features. GeoJSON supports the following geometry types: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection. Features in GeoJSON contain a geometry object and additional properties, and a feature collection represents a list of features.</blockquote>
|
||||
<blockquote>GeoJSON is a format for encoding a variety of geographic data structures […]. A GeoJSON object may represent a region of space (a Geometry), a spatially bounded entity (a Feature), or a list of Features (a FeatureCollection). GeoJSON supports the following geometry types: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, and GeometryCollection. Features in GeoJSON contain a Geometry object and additional properties, and a FeatureCollection contains a list of Features.</blockquote>
|
||||
|
||||
<p>Leaflet supports all of the GeoJSON types above, but <a href="http://geojson.org/geojson-spec.html#feature-objects">Features</a> and <a href="http://geojson.org/geojson-spec.html#feature-collection-objects">FeatureCollections</a> work best as they allow you to describe features with a set of properties. We can even use these properties to style our Leaflet vectors. Here's an example of a simple GeoJSON feature:</p>
|
||||
<p>Leaflet supports all of the GeoJSON types above, but <a href="https://tools.ietf.org/html/rfc7946#section-3.2">Features</a> and <a href="https://tools.ietf.org/html/rfc7946#section-3.3">FeatureCollections</a> work best as they allow you to describe features with a set of properties. We can even use these properties to style our Leaflet vectors. Here's an example of a simple GeoJSON feature:</p>
|
||||
|
||||
<pre><code>var geojsonFeature = {
|
||||
"type": "Feature",
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user