Commit Graph

6564 Commits

Author SHA1 Message Date
Elias Ojala
3dea761920 leafletjs link 2018-05-04 15:19:15 +03:00
Elias Ojala
ba891024d2 osm link 2018-05-04 15:18:40 +03:00
Elias Ojala
d00a355d6b mapbox link 2018-05-04 15:17:41 +03:00
Elias Ojala
7c6a7b0d6b creativecommons https 2018-05-04 15:17:13 +03:00
Elias Ojala
bd8e8bc4a3 https some gifs 2018-05-04 15:15:50 +03:00
Elias Ojala
684415e3f4 cartocdn https 2018-05-04 15:14:45 +03:00
Elias Ojala
770b88e89b https 2018-05-04 15:14:00 +03:00
Elias Ojala
50d5a0956e http://leafletjs.com/ -> https://leafletjs.com/ 2018-05-04 15:08:47 +03:00
Elias Ojala
08068b77c3 Disqus 2018-05-04 15:08:29 +03:00
Vladimir Agafonkin
a0ca28af29 Create CNAME 2018-05-03 18:19:02 +03:00
Vladimir Agafonkin
4a4326a382 Delete CNAME 2018-05-03 18:18:53 +03:00
Sergej Orlov
aaded0d926 Fixed view bounds calculation in geolocation event handler (#6139) (#6140) 2018-04-27 17:26:44 +02:00
Jan Pieter Waagmeester
bd89edd567 Fix typo in LatLng docstring. (#6138) 2018-04-20 21:12:23 +02:00
Denys Dovhan
0e9797edce Refactor(gitignore): ignore package-lock.json and yarn.lock explicitly (#6127)
https://github.com/Leaflet/Leaflet/pull/6124#issuecomment-379366811
2018-04-10 10:28:11 +04:00
Baku
0b868472a2 Apply #5498 for Polygons too (#6119) 2018-04-06 23:32:07 +03:00
Denys Dovhan
9d12f4185d Add locks and logs to .gitignore. (#6124) 2018-04-06 23:21:37 +03:00
Iván Sánchez Ortega
ac4753cb64
docs: update playground link
fixes #6121
2018-04-06 12:50:07 +02:00
Anton Joy
27989c55dd Fix for memory leak in canvas renderer (#6117) 2018-04-05 15:24:38 +03:00
Supun Praneeth
22d9cfee93 plugins: add Leaflet.bezier (#6114)
* Leaflet.bezier added to  plugin list

This plugin draw a Bézier line between two point with an animated flight object.

* typo
2018-04-03 09:07:53 +02:00
Yasunori Kirimoto
d68708d626 Plugins: add tilelayer.mierune (#6107)
* 📝 Change plugins.md

- 📝 Change plugins.md

* Plugins: mierune Capitalization
2018-03-27 10:02:48 +02:00
elmarquis
8a009fa662 Plugins: Add leaflet.GestureHandling (#6098) 2018-03-19 16:06:16 +01:00
ghybs
fe9e0f2333
Fix(Draggable): compensate for container CSS scale (#6055)
* Test(MapDragSpec): add mouse drag with CSS scaled container

This test is failing as of this commit.

* Fix(Draggable): measure drag compensating for CSS scale

so that the computed offset (i.e. user drag length) is divided by the CSS scale applied on the `_element`'s container. Later on when `Draggable` updates the `_element`'s position, the latter is affected by the CSS scale by the browser.
Added a `getSizedParentNode` function in `DomUtil` in order to automatically retrieve the closest parent node in the DOM hierarchy tree that has a non null size (so that we can compute the scale in `DomEvent.getMousePosition`), without having to specify the parent node explicitly (which is ugly).

* Fix(getMousePosition): getBoundingClientRect is in page scale

therefore it must also be divided by the container scale in order to compute the relative position of the event in the scaled container.

* Test(MarkerDragSpec): add drag with CSS scaled container

this should pass automatically at this commit, thanks to the previous modification of Draggable.

* Debug(map-scaled): add draggable marker

as well as another CSS scaled wrapper, plus some border and padding, and debugging console logs, to make sure the computations of `getMousePosition` are correct (correctly removing the border width, and compensating for CSS scale).

* Docs(getMousePosition): explicitly exclude border

* Docs(DomUtil): add return value of getSizedParentNode

was missing in docstring.

* Feat(DomUtil): add getScale function

so that it can be used by DomEvent.getMousePosition and Draggable.

* Refactor(Draggable): cache container scale

to avoid triggering browser reflow continuously during _onMove, but only on drag start (_onDown).
By compensating for the scale within Draggable instead of delegating to DomEvent.getMousePosition, it also becomes possible to check first for the clickTolerance, so that we prevents user's small movement based on screen, irrespective of rendered scale.

* Test(Map+MarkerDrag): remove scale on initial movement

that is intended to overcome Draggable clickTolerance, since now it is based on screen pixels, irrespective of applied CSS scale on the map.
Thanks to the tolerance in the expected final position, this has no effect on the result of the test, even though the overall drag is now slightly shorter.

* Refactor(DomEvent): use DomUtil.getScale in getMousePosition

to factorize scale computation (also used within Draggable).
2018-03-16 19:46:44 +04:00
Mandy Kong
c49833d882 Plugins: Adding Leaflet-Shades (#6095) 2018-03-15 15:39:20 +01:00
Sumit Kumar
6471228260 plugins: minor leaflet.pm compatibility note (#6094) 2018-03-15 09:29:14 +01:00
haoming
4f80e78528 Plugins: add Leaflet.RoughCanvas (#6093)
Add a new *render* plugin which let users draw vector map in a sketchy, hand-drawn-like, style.
2018-03-14 09:06:36 +01:00
haoming
7f17c6fcfd Fix typo in comments in VideoOverlay.js (#6090)
The example comments are wrong which confuse reader.
2018-03-12 13:53:05 +01:00
Roman Zoller
5ffe207921 Use https everywhere for OSM links (#6082)
* Use https everywhere for OSM tile URLs

Use
https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png

instead of
http://{s}.tile.osm.org/{z}/{x}/{y}.png
http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png

* Use https everywhere for OSM attribution link

Use
https://www.openstreetmap.org/copyright

instead of
http://www.openstreetmap.org/copyright
http://osm.org/copyright
2018-03-12 08:46:20 +01:00
Andrew Cherniavskii
c7b5d1deba update ssri dependency to 5.2.2 (#6086) 2018-03-09 12:20:31 +01:00
Baku
31575e8e7a 2018 (#6076)
* 2018

* 2018

* 2018
2018-03-05 22:46:47 +02:00
Franz-Benjamin Mocnik
6708981c74 plugins: tweak line breaks (#6079) 2018-03-04 19:11:09 +01:00
Franz-Benjamin Mocnik
05ba52e0ee Plugins: add geogrid.js (ISEA3H geodetic grids) (#6078) 2018-03-04 19:04:55 +01:00
Matt Steele
018bac0e9e Docs(Polyline): closestLayerPoint add missing param doc (#6060)
as commented on PR #5701 (https://github.com/Leaflet/Leaflet/pull/5701#issuecomment-357726857)
2018-02-20 16:40:24 +04:00
ghybs
fa374e67a2 Fix(TileLayer.WMS & Canvas): get rid of calls to global L (#6048)
* Fix(TileLayerWMS): get rid of L.TileLayer global call

and rely on imported TileLayer instead.

* Fix(Canvas): get rid of L.stamp global call

and rely on imported Util.stamp instead.
2018-02-12 13:52:10 +01:00
ghybs
870365de4c Fix(MarkerDrag): get rid of L.DomUtil calls (#6047)
* Style(MarkerDrag): fix smart tab indentation

* Fix(MarkerDrag): get rid of L.DomUtil global call

and rely on imported DomUtil instead.
2018-02-12 13:51:37 +01:00
ghybs
224bb9372b
Test(MarkerDragSpec): remove commented code (#6049) 2018-02-12 16:39:15 +04:00
Andrew
e3b049cefd Chore(scripts): Remove jake dependency and use NPM scripts instead (#5828)
* run `docs` via npm

* add shebang line to integrity.js, so npm will resolve node binary automatically

* remove unnecessary build-jake npm script

* add test.js script as replacement of Jakefile.js

* remove Jakefile, remove jake from devDependencies

* update docs

* move scripts to separate directory

* change shebang line from nodejs to js

* change shebang line from js to node

* update docs

* use Karma cli instead of custom test script

* add pretest and test-nolint scripts, remove lint scripts from travis.ci

Run linting scripts in pretest script, this way test script will automatically trigger code linting.

Add test-nolint script to have possibility to run tests without triggering pretest script with linting. This is useful when running tests in different browsers and tere's no sense to lint code more than one time

* replace shebang lines with node executable in npm scripts

* remove note about nodejs symlink in CONTRIBUTING.md
2018-02-05 11:15:32 +04:00
Moritz
be8899c0e4 plugins: add Leaflet Truesize (#6039) 2018-02-02 14:03:28 +01:00
Rich Harris
d188cc5ede add pkg.module (#6021)
* add pkg.module version

* get tests to pass

* export noConflict
2018-02-01 10:42:54 -05:00
Dražen Tutić
d3175e807f Plugins: add EdgeScaleBar (#6036)
Add plugin EdgeScaleBar that draw scale bars along map edges in Web Mercator projection.
2018-01-31 16:32:03 +01:00
louMoxy
3e8e76c790 Fix race condition when removing canvas before it has rendered (#6033)
Fixes #6030: Cancel animation frame request before removing the map.
This fixes the bug where the the delayed call to _redraw is trying to get the drawing context which has already been destroyed.
2018-01-29 15:36:50 +01:00
Andrew
c3a6a5b60a Move external dependencies to node_modules (#6028)
* remove sinon from repo and add sinon and karma-sinon devDeps

* remove expect from repo and add karma-expect to devDeps instead

* fix path to sinon and expect in html file for browser testing

* include leaflet-src directly from dist instead of symlink pointing to it
2018-01-29 09:38:05 +04:00
ghybs
510c3e7ba7 Test(ImageOverlay+TileLayer): crossOrigin option add 5th test case (#6027)
when passing `crossOrigin: ''` (empty string) option, the `crossorigin` attribute should also be set an empty string value (valid keyword, with same effect as `"anonymous"` value). Need to add this test, because in JavaScript the empty string is a falsy value that could have been caught as `false` and led to no `crossorigin` attribute set.
2018-01-25 13:46:34 +01:00
Andrew
ad8fc9c36b Fix(GridLayer): Do not fire 'tileload' event if tile src is empty image (#6025)
* do not fire 'load' event if tile src is the empty image (i.e. L.Util.emptyImageUrl)

* add TileLayer setUrl test
2018-01-25 11:08:05 +04:00
ghybs
2dc70945f8 Test(ImageOverlay+TileLayer): crossOrigin option to IMG crossorigin attribute (#6022)
* Test(ImageOverlay): crossOrigin option to IMG crossorigin attribute

typical values: false (default), true => '', <string> => <string>
now that a string value can be passed to this option.

* Test(TileLayer): crossOrigin option to IMG crossorigin attribute

typical values: false (default), true => '', <string> => <string>
now that a string value can be passed to this option.

* Style(TileLayerSpec): remove commented code

* Style(TileLayerSpec): remove more commented code
2018-01-24 15:24:02 +01:00
Mjumbe Poe
34251900ae Respect the preferCanvas option in all panes (#6019)
When creating a renderer for a pane other than overlayPane, use the same logic as default to determine whether to create a canvas or svg renderer.
2018-01-23 19:52:10 +01:00
caleb logan
b2cb8f79e8 Feat(TileLayer+ImageOverlay): add 'use-credentials' CORS Option (#6016)
* Added support for crossorigin using a String besides a Boolean (typically set `crossOrigin: 'use-credentials' / 'anonymous' / '' / true / false (default))

* Changed boolean to result in empty string and updated docs
2018-01-23 16:50:08 +04:00
ghybs
80ee940e14 Docs(tutorials): map panes use more explicit tiles (#6018)
so that it is more obvious what the difference is between the base map, the labels, and when both are stacked.
The chosen tile is similar to the initial view of the result example below (example.html), and contains many labels.
2018-01-19 10:40:45 +01:00
Andrew
bb08848734
Merge pull request #6017 from Leaflet/pluginRotatedMarker
Docs(plugins): add Rotated Marker plugin
2018-01-19 09:05:59 +01:00
Jeffrey Warren
fb7af21d55 Docs(plugins): add leaflet-blurred-location plugin (#6015)
to "Map interaction > User interface" section.
2018-01-19 09:01:20 +04:00
ghybs
d74e3340a1
Docs(plugins): add Rotated Marker plugin
by Benjamin Becquet, who already submitted a few plugins on this list and mentioned this one in https://github.com/Leaflet/Leaflet/issues/143
Added into "Overlay Display > Markers & renderers" section.
2018-01-19 08:43:31 +04:00