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
|
component.json
|
||||||
debug/local/
|
debug/local/
|
||||||
Gemfile.lock
|
Gemfile.lock
|
||||||
|
package-lock.json
|
||||||
|
yarn.lock
|
||||||
|
*.log
|
||||||
|
@ -8,6 +8,7 @@ addons:
|
|||||||
- dist
|
- dist
|
||||||
target_paths:
|
target_paths:
|
||||||
- content/leaflet/${NAME}
|
- content/leaflet/${NAME}
|
||||||
|
firefox: latest
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- ARTIFACTS_BUCKET=leafletjs-cdn
|
- ARTIFACTS_BUCKET=leafletjs-cdn
|
||||||
@ -20,6 +21,9 @@ env:
|
|||||||
XW1hzORAtSpTgTKkQwel5gRMDy6SotzeSRsVV2jQCn46VIMx8G/J5nOI+ImL
|
XW1hzORAtSpTgTKkQwel5gRMDy6SotzeSRsVV2jQCn46VIMx8G/J5nOI+ImL
|
||||||
yeoH12PhCR0h39dM7mq8TYJo5DHwvbotI5nQhpMruSt8eMFbym8nGiqQh806
|
yeoH12PhCR0h39dM7mq8TYJo5DHwvbotI5nQhpMruSt8eMFbym8nGiqQh806
|
||||||
fSJXkxmQ4MAjUdNFDIirBHhdZme8q3PueFzJ+5odFMvPGn/aITQ=
|
fSJXkxmQ4MAjUdNFDIirBHhdZme8q3PueFzJ+5odFMvPGn/aITQ=
|
||||||
|
script:
|
||||||
|
- npm test
|
||||||
|
- xvfb-run --server-args="-screen 0 1280x1024x16" npm run test-nolint -- --browsers Firefox
|
||||||
after_success:
|
after_success:
|
||||||
- npm run build
|
- npm run build
|
||||||
- cd dist && zip -x .DS_Store -r leaflet.zip . && cd ..
|
- 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))
|
(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)
|
## 1.3.0 (2018-01-15)
|
||||||
|
|
||||||
### API changes
|
### 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*.
|
* 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.
|
* 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 whether the bug can be reproduced in **other browsers**.
|
||||||
* Check if the bug occurs in the stable version, master, or both.
|
* 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,
|
* *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
|
### Setting up the Build System
|
||||||
|
|
||||||
The Leaflet build system uses [Node](http://nodejs.org/), and the [Jake](http://jakejs.com/) Javascript build tool.
|
The Leaflet build system uses [NodeJS](http://nodejs.org/).
|
||||||
To set up the Leaflet build system, install Node then run the following commands in the project root to install dependencies:
|
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
|
npm install
|
||||||
@ -125,13 +126,13 @@ install [PhantomJS](http://phantomjs.org/) (and make sure it's in your `PATH`),
|
|||||||
then run:
|
then run:
|
||||||
|
|
||||||
```
|
```
|
||||||
npm run test
|
npm test
|
||||||
```
|
```
|
||||||
|
|
||||||
To run all the tests in actual browsers at the same time, you can do:
|
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`.
|
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:
|
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.
|
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
|
Copyright (c) 2010-2011, CloudMade
|
||||||
All rights reserved.
|
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');
|
var packageDef = require('../package.json');
|
||||||
|
|
||||||
function buildDocs() {
|
function buildDocs() {
|
||||||
@ -34,4 +33,8 @@ function buildDocs() {
|
|||||||
fs.writeFileSync('dist/reference-' + packageDef.version + '.html', out);
|
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
|
// This script calculates the integrity hashes of the files in dist/ , and
|
||||||
// **overwrites** the values in the documentation.
|
// **overwrites** the values in the documentation.
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div class="footer">
|
<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>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,8 +3,9 @@
|
|||||||
import rollupGitVersion from 'rollup-plugin-git-version'
|
import rollupGitVersion from 'rollup-plugin-git-version'
|
||||||
import json from 'rollup-plugin-json'
|
import json from 'rollup-plugin-json'
|
||||||
import gitRev from 'git-rev-sync'
|
import gitRev from 'git-rev-sync'
|
||||||
|
import pkg from '../package.json'
|
||||||
|
|
||||||
let version = require('../package.json').version;
|
let {version} = pkg;
|
||||||
let release;
|
let release;
|
||||||
|
|
||||||
// Skip the git branch+rev in the banner when doing a release build
|
// 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
|
const banner = `/* @preserve
|
||||||
* Leaflet ${version}, a JS library for interactive maps. http://leafletjs.com
|
* 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 {
|
export default {
|
||||||
input: 'src/Leaflet.js',
|
input: 'src/Leaflet.js',
|
||||||
output: {
|
output: [
|
||||||
file: 'dist/leaflet-src.js',
|
{
|
||||||
format: 'umd',
|
file: pkg.main,
|
||||||
name: 'L',
|
format: 'umd',
|
||||||
banner: banner,
|
name: 'L',
|
||||||
sourcemap: true
|
banner: banner,
|
||||||
},
|
outro: outro,
|
||||||
|
sourcemap: true
|
||||||
|
},
|
||||||
|
{
|
||||||
|
file: pkg.module,
|
||||||
|
format: 'es',
|
||||||
|
banner: banner,
|
||||||
|
sourcemap: true
|
||||||
|
}
|
||||||
|
],
|
||||||
legacy: true, // Needed to create files loadable by IE8
|
legacy: true, // Needed to create files loadable by IE8
|
||||||
plugins: [
|
plugins: [
|
||||||
release ? json() : rollupGitVersion()
|
release ? json() : rollupGitVersion()
|
||||||
|
@ -9,7 +9,7 @@ const rev = gitRev.short();
|
|||||||
const version = require('../package.json').version + '+' + branch + '.' + rev;
|
const version = require('../package.json').version + '+' + branch + '.' + rev;
|
||||||
const banner = `/* @preserve
|
const banner = `/* @preserve
|
||||||
* Leaflet ${version}, a JS library for interactive maps. http://leafletjs.com
|
* 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>
|
</div>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
//Disable the hack fix
|
//Disable the hack fix
|
||||||
|
@ -26,13 +26,13 @@
|
|||||||
|
|
||||||
var map = L.map('map').setView([50.5, 0], 5);
|
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,
|
maxZoom: 19,
|
||||||
attribution: '© <a href="http://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
var OSM_BlackAndWhite = L.tileLayer('http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', {
|
var OSM_BlackAndWhite = L.tileLayer('http://{s}.tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png', {
|
||||||
maxZoom: 18,
|
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({
|
L.control.layers({
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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}),
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||||
osm2 = new L.TileLayer(osmUrl, {attribution: 'Hello world'});
|
osm2 = new L.TileLayer(osmUrl, {attribution: 'Hello world'});
|
||||||
|
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
var map = new L.Map('map', {zoom: 15, layers: [osm]});
|
var map = new L.Map('map', {zoom: 15, layers: [osm]});
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
latlng = new L.LatLng(50.5, 30.51);
|
latlng = new L.LatLng(50.5, 30.51);
|
||||||
|
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
<script>
|
<script>
|
||||||
map = L.map('map', { center: [0, 0], zoom: 3, maxZoom: 4 });
|
map = L.map('map', { center: [0, 0], zoom: 3, maxZoom: 4 });
|
||||||
|
|
||||||
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
attribution: '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
L.DomUtil.get('removeAdd').onclick = function() {
|
L.DomUtil.get('removeAdd').onclick = function() {
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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}),
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||||
latlng = new L.LatLng(50.5, 30.51);
|
latlng = new L.LatLng(50.5, 30.51);
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
var map = L.map('map')
|
var map = L.map('map')
|
||||||
|
@ -10,11 +10,21 @@
|
|||||||
<link rel="stylesheet" href="../css/screen.css" />
|
<link rel="stylesheet" href="../css/screen.css" />
|
||||||
|
|
||||||
<style>
|
<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 {
|
#map {
|
||||||
width: 400px;
|
width: 400px;
|
||||||
height: 300px;
|
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;
|
transform-origin: 0 0;
|
||||||
|
border-width: 30px 70px; /* displayed border-top-width = scaleY * 30px = 60px ; displayed border-left-width = scaleX * 70px = 105px */
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
@ -22,17 +32,34 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div id="map"></div>
|
<div id="wrapper">
|
||||||
|
<div id="map"></div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
var map = L.map('map')
|
var map = L.map('map')
|
||||||
.setView([50.5, 30.51], 15)
|
.setView([50.5, 30.51], 15)
|
||||||
.addLayer(osm);
|
.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>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
var map = L.map('map')
|
var map = L.map('map')
|
||||||
|
@ -55,8 +55,8 @@
|
|||||||
console.log('poly click');
|
console.log('poly click');
|
||||||
});
|
});
|
||||||
|
|
||||||
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
attribution: '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
@ -54,8 +54,8 @@
|
|||||||
console.log('poly click');
|
console.log('poly click');
|
||||||
});
|
});
|
||||||
|
|
||||||
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
attribution: '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||||
osm1 = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
osm1 = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||||
osm2 = 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));
|
bounds = new L.LatLngBounds(new L.LatLng(49.5, -11.3), new L.LatLng(61.2, 2.5));
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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}),
|
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));
|
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>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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}),
|
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));
|
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
|
CASE 1: no opacity set on any layers
|
||||||
**********/
|
**********/
|
||||||
// OSM Basemap
|
// OSM Basemap
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors';
|
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';
|
||||||
|
|
||||||
var osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: ''}).addTo(map1);
|
var osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: ''}).addTo(map1);
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
var map = L.map('map')
|
var map = L.map('map')
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
var map = L.map('map')
|
var map = L.map('map')
|
||||||
|
@ -21,8 +21,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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}),
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||||
latlng = new L.LatLng(50.5, 30.51);
|
latlng = new L.LatLng(50.5, 30.51);
|
||||||
|
|
||||||
|
@ -29,8 +29,8 @@
|
|||||||
|
|
||||||
var map = L.map('map').setView(center, 13);
|
var map = L.map('map').setView(center, 13);
|
||||||
|
|
||||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
L.polygon([[41.21, 9.42], [41.22, 9.40], [41.23, 9.40]]).addTo(map).bindTooltip('Default centered polygon tooltip');
|
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>
|
<script>
|
||||||
var map = new L.Map('map');
|
var map = new L.Map('map');
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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, {attribution: osmAttrib}),
|
osm = L.tileLayer(osmUrl, {attribution: osmAttrib}),
|
||||||
osm2 = L.tileLayer(osmUrl, {attribution: osmAttrib});
|
osm2 = L.tileLayer(osmUrl, {attribution: osmAttrib});
|
||||||
|
|
||||||
|
@ -59,8 +59,8 @@
|
|||||||
var sf = [37.77, -122.42],
|
var sf = [37.77, -122.42],
|
||||||
trd = [63.41, 10.41];
|
trd = [63.41, 10.41];
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
osmAttrib = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||||
osm1 = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
osm1 = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||||
osm2 = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
osm2 = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||||
center = L.latLng(63.41, 10.41);
|
center = L.latLng(63.41, 10.41);
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
// Check the 'center' setting of the scroll-wheel, double-click and touch-zoom
|
// Check the 'center' setting of the scroll-wheel, double-click and touch-zoom
|
||||||
// handlers
|
// handlers
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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, {minZoom: 14, attribution: osmAttrib}),
|
osm = L.tileLayer(osmUrl, {minZoom: 14, attribution: osmAttrib}),
|
||||||
latlng = new L.LatLng(51.1788409,-1.82618);
|
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 map = L.map('map').setView(L.latLng(50.5, 30.51), 0);
|
||||||
|
|
||||||
var osmAttrib = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
var osmAttrib = '© <a href="https://www.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),
|
osm = L.tileLayer("https://{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});
|
osm2 = L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png", {attribution: 'Hello world', minZoom: 5, maxZoom: 18});
|
||||||
|
|
||||||
L.control.layers({
|
L.control.layers({
|
||||||
'OSM (5-18)': osm2,
|
'OSM (5-18)': osm2,
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
}).setView(dc, 14);
|
}).setView(dc, 14);
|
||||||
|
|
||||||
var positron = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
|
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);
|
}).addTo(map);
|
||||||
|
|
||||||
var path = new L.Polyline([kyiv, trd, lnd, mad, dc, sf]).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});
|
map = new L.Map('map', {preferCanvas: true});
|
||||||
|
|
||||||
// create the tile layer with correct attribution
|
// 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 osmAttrib = 'Map data © OpenStreetMap contributors';
|
||||||
var osm = new L.TileLayer(osmUrl, { minZoom: 1, maxZoom: 17, attribution: osmAttrib, detectRetina: true });
|
var osm = new L.TileLayer(osmUrl, { minZoom: 1, maxZoom: 17, attribution: osmAttrib, detectRetina: true });
|
||||||
map.addLayer(osm);
|
map.addLayer(osm);
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
preferCanvas: true
|
preferCanvas: true
|
||||||
}).locate();
|
}).locate();
|
||||||
|
|
||||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
var vanillaLayer = new L.LayerGroup();
|
var vanillaLayer = new L.LayerGroup();
|
||||||
|
@ -15,8 +15,8 @@
|
|||||||
<div id="map"></div>
|
<div id="map"></div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
var map = L.map('map', {
|
var map = L.map('map', {
|
||||||
|
@ -33,8 +33,8 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
function makeMap(container, options) {
|
function makeMap(container, options) {
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
var map = L.map(container, options)
|
var map = L.map(container, options)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<script>
|
<script>
|
||||||
var map,
|
var map,
|
||||||
mapDiv,
|
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(){
|
var recreateMap = function(){
|
||||||
|
@ -20,8 +20,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
var map = L.map('map')
|
var map = L.map('map')
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
function addLayerAndMarker(map) {
|
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
|
maxZoom : 18
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
function addLayerAndMarkers(map) {
|
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
|
maxZoom : 18
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
|
@ -24,8 +24,8 @@
|
|||||||
profiler and examine times for _on, _off and fire.
|
profiler and examine times for _on, _off and fire.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
var map = L.map('map')
|
var map = L.map('map')
|
||||||
|
@ -47,8 +47,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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}),
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||||
latlng = new L.LatLng(39.05, 8.40);
|
latlng = new L.LatLng(39.05, 8.40);
|
||||||
|
|
||||||
|
@ -22,8 +22,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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}),
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||||
latlng = new L.LatLng(50.5, 30.51);
|
latlng = new L.LatLng(50.5, 30.51);
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
var map = L.map('map')
|
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) {
|
map.on('contextmenu', function (e) {
|
||||||
alert('The map has been right-clicked');
|
alert('The map has been right-clicked');
|
||||||
});
|
});
|
||||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
attribution: '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,8 +24,8 @@
|
|||||||
|
|
||||||
map.setView([51.505, -0.09], 13);
|
map.setView([51.505, -0.09], 13);
|
||||||
|
|
||||||
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
attribution: '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
var a_popup = L.popup().setContent('Previously created')
|
var a_popup = L.popup().setContent('Previously created')
|
||||||
|
@ -23,8 +23,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
attribution: '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||||
});
|
});
|
||||||
|
|
||||||
var map = L.map('map')
|
var map = L.map('map')
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<div id="map"></div>
|
<div id="map"></div>
|
||||||
<script>
|
<script>
|
||||||
var map = L.map('map').setView([51.505, -0.09], 13);
|
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) {
|
map.on('click', function(e) {
|
||||||
L.popup().setLatLng(e.latlng).setContent('Hello').openOn(map);
|
L.popup().setLatLng(e.latlng).setContent('Hello').openOn(map);
|
||||||
});
|
});
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
map = new L.Map('map');
|
map = new L.Map('map');
|
||||||
|
|
||||||
// create the tile layer with correct attribution
|
// 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 });
|
var osm = new L.TileLayer(osmUrl, { minZoom: 1, maxZoom: 17 });
|
||||||
map.addLayer(osm);
|
map.addLayer(osm);
|
||||||
map.fitBounds(new L.LatLngBounds([51,7],[51,7]));
|
map.fitBounds(new L.LatLngBounds([51,7],[51,7]));
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
var map = L.map('map', mapopts);
|
var map = L.map('map', mapopts);
|
||||||
|
|
||||||
var positron = L.tileLayer('http://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}.png', {
|
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({
|
var grid = L.gridLayer({
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
//In any map, set minZoom and/or maxZoom, plus bounceAtZoomLimits to false.
|
//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', {
|
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);
|
}).addTo(map);
|
||||||
|
|
||||||
var marker = L.marker(myCenter);
|
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>
|
<button onclick="boundsExtendLatLng()">Extend the bounds of the center rectangle with the lower left marker</button>
|
||||||
<script src="route.js"></script>
|
<script src="route.js"></script>
|
||||||
<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});
|
osm = new L.TileLayer(osmUrl, {maxZoom: 18});
|
||||||
|
|
||||||
var latLng = new L.LatLng(54.18815548107151, -7.657470703124999);
|
var latLng = new L.LatLng(54.18815548107151, -7.657470703124999);
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
<script src="geojson-sample.js"></script>
|
<script src="geojson-sample.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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}),
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}),
|
||||||
rectangle,
|
rectangle,
|
||||||
featureGroup;
|
featureGroup;
|
||||||
|
@ -51,8 +51,8 @@
|
|||||||
|
|
||||||
var map = L.map('map').setView([37.8, -96], 4);
|
var map = L.map('map').setView([37.8, -96], 4);
|
||||||
|
|
||||||
var osm = L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
var osm = L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
attribution: '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
zoom: 3,
|
zoom: 3,
|
||||||
preferCanvas: true
|
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,
|
minZoom: 1,
|
||||||
maxZoom: 17,
|
maxZoom: 17,
|
||||||
label: 'open street map'
|
label: 'open street map'
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://api.tiles.mapbox.com/v4/mapbox.light/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw',
|
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
var map = L.map('map', {preferCanvas: true})
|
var map = L.map('map', {preferCanvas: true})
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
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));
|
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";
|
// 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}),
|
osm = new L.TileLayer(osmUrl, {maxZoom: 18}),
|
||||||
map = new L.Map('map', {layers: [osm], center: new L.LatLng(51.505, -0.04), zoom: 13});
|
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>
|
<button onclick="map.fitBounds(poly.getBounds())">Zoom to polygon</button>
|
||||||
<script src="route.js"></script>
|
<script src="route.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
var poly_points = [
|
var poly_points = [
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
|
|
||||||
<script src="route.js"></script>
|
<script src="route.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
for (var i = 0, latlngs = [], len = route.length; i < len; i++) {
|
for (var i = 0, latlngs = [], len = route.length; i < len; i++) {
|
||||||
|
@ -16,8 +16,8 @@
|
|||||||
|
|
||||||
<script src="route.js"></script>
|
<script src="route.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
for (var i = 0, latlngs = [], len = route.length; i < len; i++) {
|
for (var i = 0, latlngs = [], len = route.length; i < len; i++) {
|
||||||
|
@ -34,8 +34,8 @@
|
|||||||
.bindPopup("I am a polygon.")
|
.bindPopup("I am a polygon.")
|
||||||
.addTo(map);
|
.addTo(map);
|
||||||
|
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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}).addTo(map);
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib}).addTo(map);
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
|
|
||||||
<script src="route.js"></script>
|
<script src="route.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
for (var i = 0, latlngs = [], len = route.length; i < len; i++) {
|
for (var i = 0, latlngs = [], len = route.length; i < len; i++) {
|
||||||
|
@ -13,8 +13,8 @@
|
|||||||
|
|
||||||
<script src="route.js"></script>
|
<script src="route.js"></script>
|
||||||
<script>
|
<script>
|
||||||
var osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
var osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||||
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});
|
osm = L.tileLayer(osmUrl, {maxZoom: 18, attribution: osmAttrib});
|
||||||
|
|
||||||
var svg = L.svg();
|
var svg = L.svg();
|
||||||
|
13808
dist/leaflet-src.js
vendored
13808
dist/leaflet-src.js
vendored
File diff suppressed because it is too large
Load Diff
1
dist/leaflet-src.js.map
vendored
1
dist/leaflet-src.js.map
vendored
File diff suppressed because one or more lines are too long
5
dist/leaflet.js
vendored
5
dist/leaflet.js
vendored
File diff suppressed because one or more lines are too long
1
dist/leaflet.js.map
vendored
1
dist/leaflet.js.map
vendored
File diff suppressed because one or more lines are too long
@ -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
|
markdown: kramdown
|
||||||
|
|
||||||
kramdown:
|
kramdown:
|
||||||
entity_output: as_input
|
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
|
# Integrity hashes for both leaflet.js and leaflet-src.js
|
||||||
# These will be shown in the downloads page
|
# These will be shown in the downloads page
|
||||||
# See https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
|
# See https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity
|
||||||
integrity_hash_css: "sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ=="
|
integrity_hash_css: "sha512-Rksm5RenBEKSKFjgI3a41vrjkw4EVPlJ3+OiI65vTjIdo9brlAacEuKOiQ5OFh7cOI1bkDwLqdLw3Zg0cRJAAQ=="
|
||||||
integrity_hash_source: "sha512-2h9aokfcaYW7k0VPn1JqbQDQCaNQRrZJwetlnQ88yJrtIzGLVW/2StdQKoE+TIVNNTUxf6SVa+2vW2KB2EXnnA=="
|
integrity_hash_source: "sha512-IkGU/uDhB9u9F8k+2OsA6XXoowIhOuQL1NTgNZHY1nkURnqEGlDZq3GsfmdJdKFe1k1zOc6YU2K7qY+hF9AodA=="
|
||||||
integrity_hash_uglified: "sha512-C7BBF9irt5R7hqbUm2uxtODlUVs+IsNu2UULGuZN7gM+k/mmeG4xvIEac01BtQa4YIkUpp23zZC4wIwuXaPMQA=="
|
integrity_hash_uglified: "sha512-/Nsx9X4HebavoBvEBuyp3I7od5tA0UzAxs+j83KgC8PU0kgB4XiK4Lfe4y4cgBtaRJQEIFCW+oC506aPT2L1zw=="
|
||||||
|
@ -21,10 +21,10 @@ bodyclass: post-page
|
|||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
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);
|
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||||
})();
|
})();
|
||||||
</script>
|
</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 == '' %}
|
{% if title == '' %}
|
||||||
<meta property="og:title" content="Leaflet — an open-source JavaScript library for interactive maps" />
|
<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: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="name" content="Leaflet">
|
||||||
<meta itemprop="description" content="Leaflet — a modern, lightweight open-source JavaScript library for mobile-friendly interactive maps.">
|
<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 %}
|
{% endif %}
|
||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<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 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/normalize.css" />
|
||||||
<link rel="stylesheet" href="{{ root }}docs/css/main.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>
|
<script src="{{ root }}docs/highlight/highlight.pack.js"></script>
|
||||||
<link rel="stylesheet" href="{{ root }}docs/highlight/styles/github-gist.css" />
|
<link rel="stylesheet" href="{{ root }}docs/highlight/styles/github-gist.css" />
|
||||||
@ -41,17 +41,17 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
ACCESS_TOKEN = 'pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw';
|
ACCESS_TOKEN = 'pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw';
|
||||||
MB_ATTR = 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
|
MB_ATTR = 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
||||||
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||||
'Imagery © <a href="http://mapbox.com">Mapbox</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;
|
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_URL = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
|
||||||
OSM_ATTRIB = '© <a href="http://openstreetmap.org/copyright">OpenStreetMap</a> contributors';
|
OSM_ATTRIB = '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors';
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body{% if page.bodyclass %} class="{{ page.bodyclass }}"{% endif %}>
|
<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>
|
<h3 class="tagline">an open-source JavaScript library<br> for mobile-friendly interactive maps</h3>
|
||||||
|
|
||||||
<ul class="nav">
|
<ul class="nav">
|
||||||
@ -105,13 +105,13 @@
|
|||||||
{{ content }}
|
{{ content }}
|
||||||
|
|
||||||
<div class="footer">
|
<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>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<nav class="ext-links">
|
<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 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>
|
<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>
|
</nav>
|
||||||
|
@ -84,11 +84,11 @@ If you have any issues also please log a bug on <a href="https://github.com/leaf
|
|||||||
Enjoy!<br />
|
Enjoy!<br />
|
||||||
Dave Leaver.
|
Dave Leaver.
|
||||||
|
|
||||||
<link rel="stylesheet" href="http://leaflet.github.io/Leaflet.markercluster/dist/MarkerCluster.css" />
|
<link rel="stylesheet" href="https://leaflet.github.io/Leaflet.markercluster/dist/MarkerCluster.css" />
|
||||||
<link rel="stylesheet" href="http://leaflet.github.io/Leaflet.markercluster/dist/MarkerCluster.Default.css" />
|
<link rel="stylesheet" href="https://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]-->
|
<!--[if lte IE 8]><link rel="stylesheet" href="https://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="https://leaflet.github.io/Leaflet.markercluster/dist/leaflet.markercluster-src.js"></script>
|
||||||
<script src="http://leaflet.github.io/Leaflet.markercluster/example/realworld.388.js"></script>
|
<script src="https://leaflet.github.io/Leaflet.markercluster/example/realworld.388.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
var mapbox = new L.TileLayer(MB_URL, {maxZoom: 18, attribution: MB_ATTR, id: 'examples.map-i875mjb7'}),
|
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);
|
var map = L.map('map').setView([175.30867, -37.77914], 13);
|
||||||
|
|
||||||
// add an OpenStreetMap tile layer
|
// add an OpenStreetMap tile layer
|
||||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
// Initialize the FeatureGroup to store editable layers
|
// 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,
|
Cheers,
|
||||||
Jacob Toye
|
Jacob Toye
|
||||||
|
|
||||||
<link rel="stylesheet" href="http://leaflet.github.com/Leaflet.draw/lib/leaflet/leaflet.css" />
|
<link rel="stylesheet" href="https://leaflet.github.io/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/leaflet.draw.css" />
|
||||||
<!--[if lte IE 8]>
|
<!--[if lte IE 8]>
|
||||||
<link rel="stylesheet" href="http://leaflet.github.com/Leaflet.draw/lib/leaflet/leaflet.ie.css" />
|
<link rel="stylesheet" href="https://leaflet.github.io/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/leaflet.draw.ie.css" />
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
<script src="http://leaflet.github.com/Leaflet.draw/libs/leaflet/leaflet.js"></script>
|
<script src="https://leaflet.github.io/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/leaflet.draw.js"></script>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.leaflet-bar {
|
.leaflet-bar {
|
||||||
@ -116,8 +116,8 @@ Jacob Toye
|
|||||||
var map = L.map('map').setView([-37.77914, 175.30867], 16);
|
var map = L.map('map').setView([-37.77914, 175.30867], 16);
|
||||||
|
|
||||||
// add an OpenStreetMap tile layer
|
// add an OpenStreetMap tile layer
|
||||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
// Initialize the FeatureGroup to store editable layers
|
// 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.
|
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).
|
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).
|
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!
|
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!
|
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 />
|
Love,<br />
|
||||||
Vladimir.
|
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!
|
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,
|
Best,
|
||||||
Iván & Vladimir & Yohan.
|
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);
|
.down().wait(500).moveBy(-200, 0, 1000).wait(500).up().wait(500);
|
||||||
</code></pre>
|
</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.
|
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)
|
* 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
|
### Changes in the API documentation
|
||||||
|
@ -47,4 +47,4 @@ And of course, let's celebrate!
|
|||||||
Love,<br>
|
Love,<br>
|
||||||
The Leaflet team.
|
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).
|
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?
|
### 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).
|
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>
|
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/).
|
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.
|
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>
|
Cheers,<br>
|
||||||
The Leaflet team.
|
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.
|
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>
|
Cheers,<br>
|
||||||
The Leaflet team.
|
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.
|
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.
|
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>
|
Cheers,<br>
|
||||||
The Leaflet team.
|
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>
|
<title>Leaflet Dev Blog</title>
|
||||||
|
|
||||||
<link href="http://leafletjs.com/atom.xml" rel="self"/>
|
<link href="https://leafletjs.com/atom.xml" rel="self"/>
|
||||||
<link href="http://leafletjs.com"/>
|
<link href="https://leafletjs.com"/>
|
||||||
|
|
||||||
<updated>{{ site.time | date_to_xmlschema }}</updated>
|
<updated>{{ site.time | date_to_xmlschema }}</updated>
|
||||||
<id>http://leafletjs.com/</id>
|
<id>https://leafletjs.com/</id>
|
||||||
|
|
||||||
<author>
|
<author>
|
||||||
<name>Vladimir Agafonkin</name>
|
<name>Vladimir Agafonkin</name>
|
||||||
@ -19,9 +19,9 @@ title: Leaflet Developer Blog Atom Feed
|
|||||||
{% for post in site.posts %}
|
{% for post in site.posts %}
|
||||||
<entry>
|
<entry>
|
||||||
<title>{{ post.title }}</title>
|
<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>
|
<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>
|
<content type="html">{{ post.content | xml_escape }}</content>
|
||||||
</entry>
|
</entry>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -12,8 +12,8 @@ bodyclass: download-page
|
|||||||
<th>Description</th>
|
<th>Description</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="http://cdn.leafletjs.com/leaflet/v1.3.0/leaflet.zip">Leaflet 1.3.0</a></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 15, 2018.</td>
|
<td>Stable version, released on January 18, 2018.</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td><a href="https://leafletjs-cdn.s3.amazonaws.com/content/leaflet/master/leaflet.zip">Leaflet 1.3-dev</a></td>
|
<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:
|
Here are the steps to set it up:
|
||||||
|
|
||||||
1. [Download and install Node](http://nodejs.org)
|
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>
|
<pre><code>npm install</code></pre>
|
||||||
|
|
||||||
Now that you have everything installed, from inside the Leaflet directory, run:
|
Now that you have everything installed, run `npm run build` inside the Leaflet directory.
|
||||||
<pre><code>npm run build</code></pre>
|
|
||||||
This will combine and compress the Leaflet source files, saving the build to the `dist` folder.
|
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',
|
cssFile: 'https://unpkg.com/leaflet/dist/leaflet.css',
|
||||||
css: 'body {\n\tmargin: 0;\n}\nhtml, body, #leaflet {\n\theight: 100%\n}',
|
css: 'body {\n\tmargin: 0;\n}\nhtml, body, #leaflet {\n\theight: 100%\n}',
|
||||||
jsFile: 'https://unpkg.com/leaflet/dist/leaflet-src.js',
|
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);
|
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', {
|
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
|
||||||
maxZoom: 18,
|
maxZoom: 18,
|
||||||
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
|
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
||||||
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||||
'Imagery © <a href="http://mapbox.com">Mapbox</a>',
|
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
||||||
id: 'mapbox.light'
|
id: 'mapbox.light'
|
||||||
}).addTo(map);
|
}).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', {
|
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
|
||||||
maxZoom: 18,
|
maxZoom: 18,
|
||||||
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
|
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
||||||
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||||
'Imagery © <a href="http://mapbox.com">Mapbox</a>',
|
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
||||||
id: 'mapbox.light'
|
id: 'mapbox.light'
|
||||||
}).addTo(map);
|
}).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', {
|
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoibWFwYm94IiwiYSI6ImNpejY4NXVycTA2emYycXBndHRqcmZ3N3gifQ.rJcFIG214AriISLbB6B5aw', {
|
||||||
maxZoom: 18,
|
maxZoom: 18,
|
||||||
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
|
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, ' +
|
||||||
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
'<a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
|
||||||
'Imagery © <a href="http://mapbox.com">Mapbox</a>',
|
'Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
||||||
id: 'mapbox.light'
|
id: 'mapbox.light'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
|
@ -5,8 +5,8 @@ title: Custom Icons Tutorial
|
|||||||
<script>
|
<script>
|
||||||
var map = L.map('map').setView([51.5, -0.09], 13);
|
var map = L.map('map').setView([51.5, -0.09], 13);
|
||||||
|
|
||||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
var LeafIcon = L.Icon.extend({
|
var LeafIcon = L.Icon.extend({
|
||||||
|
@ -5,8 +5,8 @@ title: Custom Icons Tutorial
|
|||||||
<script>
|
<script>
|
||||||
var map = L.map('map').setView([51.5, -0.09], 13);
|
var map = L.map('map').setView([51.5, -0.09], 13);
|
||||||
|
|
||||||
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
|
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
|
||||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
|
||||||
}).addTo(map);
|
}).addTo(map);
|
||||||
|
|
||||||
var LeafIcon = L.Icon.extend({
|
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({
|
L.TileLayer.Kitten = L.TileLayer.extend({
|
||||||
getTileUrl: function(coords) {
|
getTileUrl: function(coords) {
|
||||||
var i = Math.ceil( Math.random() * 4 );
|
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() {
|
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({
|
L.TileLayer.Kitten = L.TileLayer.extend({
|
||||||
getTileUrl: function(coords) {
|
getTileUrl: function(coords) {
|
||||||
var i = Math.ceil( Math.random() * 4 );
|
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() {
|
getAttribution: function() {
|
||||||
return "<a href='http://placekitten.com/attribution.html'>PlaceKitten</a>"
|
return "<a href='https://placekitten.com/attribution.html'>PlaceKitten</a>"
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user