Commit Graph

6582 Commits

Author SHA1 Message Date
iH8
87f81bcb01 Make editors use source instead of minified (#5887)
Make editors use source instead of minified
2017-10-31 18:45:34 +01:00
Arne Schubert
875ed3dfe1 Add a link to YAGA leaflet-ng2 demos (#5889) 2017-10-31 18:45:02 +01:00
ghybs
cf518ff1a5 Fix(Map): stopLocate on map.remove (#5893)
so that Geolocation handlers (namely _handleGeolocationResponse and _handleGeolocationError) do not try to access DOM elements which have been cleared by map.remove().
Of course developer should currently call map.stopLocate() manually before map.remove(), but it looks like he/she may forget it.
Check for _locationWatchId is not perfect (watch may have been already stopped), but calling stopLocate again does not harm. It prevents trying to access the Geolocation API if locate had never been called, even though doing so should not harm either.
2017-10-31 17:46:28 +02:00
ghybs
8dbc4fc9d7 Docs(Map): typo on Map Geolocation watch option (#5894) 2017-10-31 17:37:49 +02:00
Per Liedman
0bcccb0190 An event target is considered a marker if it has getLatLng and no or small radius (#5885)
Fixes #5635.
2017-10-30 19:39:33 +02:00
Alexander Musienko
50b77520b3 Stop animation before destroy map (#5876)
* Null ref fix:

TypeError: Cannot read property latLngToLayerPoint of null\n    at NewClass.update (http://my.uboro.eu/js/vendor/leaflet-1.2.0.js?t=1503882088:7295:23)\n    at NewClass.setLatLng (http://my.uboro.eu/js/vendor/leaflet-1.2.0.js?t=1503882088:7256:8)\n

* stop animation before destroy map
2017-10-30 19:38:49 +02:00
iH8
f6e1a9be91 Removed trailing spaces (#5890)
Removed trailing spaces
2017-10-30 16:30:12 +02:00
Per Liedman
c5cbbf8174 Clean up and document event propagation properties (#5880)
* Add sourceTarget and propagatedFrom to events

Also documents events' target, sourceTarget, propagatedFrom
and layer properties.

Fixes #4510.

* Use propagatedFrom, which is equivalent of the original code

* propagetedFrom -> propagatedFrom
2017-10-27 16:18:12 +02:00
Evgeniy Voynov
ce1326912e Added Leaflet.Canvas-Markers plugin (#5870) 2017-10-27 14:24:35 +02:00
scaddenp
118edb9a99 Fix for WMS on Leaflet when using Polar stereographic (#5618)
* Add new method to get NwSe.

Part of fix for https://github.com/Leaflet/Leaflet/issues/5617 for polar WMS systems. Added to bypass using an unsafe bounds object.

* Fix WMS getTileUrl for polar coordinates.

Part of fix for https://github.com/Leaflet/Leaflet/issues/5617 to fetch proper bbox coordinate on polar stereographic projections.

* Update TileLayer.WMS.js

* Update TileLayer.WMS.js

* Update GridLayer.js

* Update GridLayer.js

* Update TileLayer.WMS.js

* Updates to fix syntax/ style issues

Cut/paste error and buch of style stuff.

* Fix style errors

* More style issues

* Yet more style fixes

* More indentation complaints fixed

* Some more code style cleanup

* Even more code style / indentation

* Use bounds
2017-10-27 13:08:35 +02:00
iH8
59d1dea135 Removed master reference and standarized dates (#5882)
Removed master reference and standarized dates
2017-10-27 12:45:33 +02:00
Per Liedman
ca6aff0295 Add notes to classes which don't inherit Class (#5878)
* Add note about LatLng not inheriting Class

Fixes #3301.

* Add note about LatLngBounds, Bounds, Point, CRSs and projections not inheriting Class
2017-10-27 08:27:41 +02:00
Andrew
0f5507d2a7 Add license to route (#5879) 2017-10-26 23:30:08 +02:00
Per Liedman
4bbec02d14 Add license to route
Fixes #2721.
2017-10-26 23:16:20 +02:00
Andrew
c64ae48e1a Merge pull request #5877 from Leaflet/document-custom-options-data
Clarify that any option keys can be used
2017-10-26 22:37:33 +02:00
Per Liedman
fb613bcaed Clarify that any option keys can be used
Fixes #4001.
2017-10-26 22:32:01 +02:00
Per Liedman
d9846d106b Round pan offset towards zero (#5858)
* Add Point.trunc/_trunc

* Truncate pan offset instead of flooring

Fixes #5821
2017-10-26 15:35:35 +03:00
Andrew
f83b5347f5 skipIfNotTouch instead of overriding Browser.touch (#5869) 2017-10-26 15:34:31 +03:00
Andrew
b5cc500de6 update happen to 0.3.2 - fixes Popup tests in FF and Chrome (#5872) 2017-10-26 09:06:13 +02:00
iH8
1681cca369 Redirect to Plunker, Codepen and JSFiddle (#5868)
* Redirect to Plunker, Codepen and JSFiddle

Redirects to Plunker, Codepen or JSFiddle with corresponding template.
For usage in issuetemplate, issues, StackOverflow etc.
Usage Examples:
http://leafletjs.org/edit.html // Defaults to Plunker using latest
version
http://leafletjs.org/edit.html#provider:codepen;version:1.1.0 // Codepen
with version 1.1.0
http://leafletjs.org/edit.html#provider:jsfiddle;version:master //
JSFiddle with master version.

* To ES5 and file move

To ES5 and file move
2017-10-25 08:53:35 +02:00
Arne Schubert
1595b289ea Add YAGA leaflet-ng2 plugin (#5867) 2017-10-24 19:03:00 +02:00
Andrew
7e5cbceaa5 add icon popupAnchor option test for nonPhantom browsers (#5865) 2017-10-23 15:29:28 +02:00
Andrew
919ead4288 add namespace to svg factory (#5864) 2017-10-23 12:17:19 +02:00
iH8
14fc98cb52 Options for LayerGroup (#5792)
* Options for LayerGroup

Add options parameter to L.Layergroup.initialize and set options.

* Options for LayerGroup factory

Added options parameter to LayerGroup factory method and updated docs
2017-10-23 09:16:24 +02:00
Andrew
dd4667db61 Merge pull request #5859 from Leaflet/fix-circle-bounds-calc
Round circle radius in renderer instead of layer
2017-10-21 12:47:12 +02:00
Andrew
01f9274768 Merge pull request #5861 from danwild/plugin-leaflet-velocity
Add leaflet-velocity to plugin list
2017-10-21 11:13:05 +02:00
Dan Wild
6eb936d03d Added leaflet-velocity to plugin list 2017-10-21 09:27:50 +11:00
ghybs
47a9df194b plugins: add Leaflet.ActiveLayers plugin by vogdb (#5857)
Author already submitted another plugin (Leaflet.SelectLayers) himself some time ago (see commit 18e0061450)
2017-10-20 14:53:13 +02:00
Per Liedman
a9742e0d4b Round circle radius in renderer instead of layer
Makes bounds calculation more precise and zoom level independant.
Fixes #4582.
2017-10-20 14:51:48 +02:00
C Ganesh Sundar
38b3fdec80 Update docs for L.DomEvent.off() (#5855) 2017-10-20 08:29:21 +02:00
ghybs
4782eace28 Docs(MapPanes): add class names links to panes description (#5850)
* Docs(MapPanes): explicitly list layer types in overlayPane

"overlayPane" is the default pane for Layers (https://github.com/Leaflet/Leaflet/blob/v1.2.0/src/layer/Layer.js#L36), but it is overridden for many sub-classes (Marker, DivOverlay, GridLayer).
It would be easier to understand where things go if we explicitly list them in Map Panes section as well. It is almost the case, except for Image Overlay and Video Overlay.

* Docs(MapPanes): convert tooltip class name into code and hyperlink

for consistency with other class names.
2017-10-19 14:23:53 +02:00
Raymond Duckworth
e63370ab4c Small typo (#5849) 2017-10-19 09:07:55 +02:00
ghybs
c0bc8ffe71 Docs(Download): use proper links for CDN's list (#5847)
since they are not parsed by GitHub Markdown when used on Leaflet website.
2017-10-17 17:28:52 +03:00
ghybs
8094d607ec Docs(Download): add CDN alternatives (#5837)
* Docs(download): mention other CDN

so that developers know their possible alternatives and can decide by themselves which option they want to use for their project.
None of the 3 listed options require any work from Leaflet side (as of today) for new releases, they directly pull updated from npm registry.
cdnjs uses a configuration file in their repo to know which files to fetch from npm registry:
https://github.com/cdnjs/cdnjs/blob/master/ajax/libs/leaflet/package.json
In case the `dist/` folder changes, this configuration file requires manual modification (the community may directly send a PR to do so).

* Docs(download): add disclaimer about external CDN services

in order to try avoiding questions and/or complaints in case of CDN unavailability or any other issue.
2017-10-16 12:09:40 +03:00
Andrew
b54c2d4adf Fix TileLayer flyTo test (#5843)
* fix TileLayer flyTo test

* fix linter errors
2017-10-16 09:58:25 +03:00
Andrew
d76e5d0372 fix GridLayer flyTo test (#5846) 2017-10-16 09:57:56 +03:00
Maciej Kus
9084c4a8a3 Docs(imagePath): "absolute path" to "path" (#5835)
This simply removes the word "absolute" from the documentation of Icon.Default.imagePath. This path can be relative or absolute.

e.g. L.Icon.Default.imagePath = 'style/images/'; works just fine for me.
2017-10-11 18:31:45 +03:00
ghybs
5e696a5ba5 Docs(Changelog): fix GitHub URL's to "Leaflet/Leaflet" (#5836)
* Style(CHANGELOG): remove empty bullet point

* Docs(CHANGELOG): replace "leaflet" by "Leaflet" in GitHub URL's

"https://github.com/leaflet/leaflet" (without capitalized first letter) works as URL, but is not recognized by GitHub MarkDown parser (which simplifies URL's by simple "#XXX" style when referring to an issue or PR in the same repository, or "group/repo#XXX" in another repository).
Proper case is "Leaflet/Leaflet" (organization and project have capitalized first letter).
2017-10-11 09:49:53 +02:00
Moritz
45afd2d462 Add Leaflet Swoopy Plugin (#5834)
A plugin for creating customizable swoopy arrow annotations.
2017-10-10 12:44:55 +02:00
Andrew
bb1d94ac7f add space before className (#5830) 2017-10-10 12:43:34 +02:00
Andrew
93be1ae0a7 Use zoom parameter if passed (#5822) 2017-10-09 18:17:51 +02:00
Andrew
748905cbf5 Fix docs redirects (#5824)
* use redirected.html instead of jekyll-redirect-from

* modify redirected.html to preserve url hases

* fix links in zoom-levels example

- use relative links instead of absolute
- remove hardcoded version in lins and refer to latest version docs instead

* fix hash in choropleth example

* fix links in geojson example

 - use relative links instead of absolute

* fix absolute link in quick-start example

* fix link in video-overlay example

* fix link in map-panes example

* fix link in wms example

* fix link in geojson example

* fix relative reference links
2017-10-05 15:34:04 +02:00
Andrew
c5391e3fbb reset body margin to avoid scrollbars (#5823) 2017-10-04 16:33:04 +02:00
Rajesh Sharma
0f3aed37b9 use zoom parameter if passed 2017-10-04 17:49:40 +05:45
mynameisstephen
d2f6a6cdcd Fire 'zoomlevelschange' when calling setMinZoom & setMaxZoom. (#5230)
* Fire 'zoomlevelschange' when calling setMinZoom & setMaxZoom.

* rename variables

* make sure 'zoomlevelschange' won't be fired unnecessarily

* fix enabling zoom control after changing zoom levels

* always fire `zoomlevelschange` if minZoom/maxZoom changed

* remove trailing spaces
2017-10-04 14:02:45 +02:00
Andrew
000f457fcb Fix map styles in "Extending Leaflet" example (#5819)
* fix map height in extending example

* add html and body styles to tutorial_frame

* move js styles to css

* remove unnecessary styles from mobile/example.md
2017-10-04 00:04:01 +02:00
daverayment
11cbfa8095 Update DomPointer.js to revert typo (#5817)
Restore IE-specific pointerType check which was accidentally removed previously. Fixes #5798.
2017-10-03 16:43:12 +02:00
Fabrizio
d9655a1e9a Change Util.formatNum default to 6 decimals (#5492)
* Util.formatNum default to 6

Changed Util.formaNum default to 6 decimails.
Solved 0 decimals bug.
Added tests.
Can be useful for PR #5444

* Changed documentation

Changed documentation to 6 instead of 5
2017-10-02 18:36:59 +02:00
Andrew
78152c9804 Merge pull request #4506 from Leaflet/layer-id-public
Switch to public api for getting the layer id in debug
2017-10-01 19:16:45 +02:00
Andrew
3e3f9e89c4 [LayerGroup] Use eachLayer for iterations over layers (#5809)
* [LayerGroup] use eachLayer method instead of for...in

* [LayerGroup] use eachLayer method in getLayers method

* [LayerGroup] use eachLayer method in onAdd & onRemove methods

* [LayerGroup] invoke method fix

- use `eachLayer` method instead of for...in
- add unit test for `invoke` method

* revert invoke method change
2017-09-30 16:58:10 +03:00