You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-19Lines changed: 13 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,13 +1,13 @@
1
1
# leaflet-map
2
2
3
-
*leaflet-map* is a web-component which provides access to the [leaflet map](http://leafletjs.com)
3
+
*leaflet-map* is a web-component which provides access to the [leaflet map](http://leafletjs.com)
4
4
JavaScript library via html elements.
5
5
6
6
Please have a look at the [demo](https://leaflet-extras.github.io/leaflet-map/demo.html) or the [api documentation](https://leaflet-extras.github.io/leaflet-map/doc.html#leaflet-map).
7
7
8
-
Most of the options documented in the Leaflet reference are exported as html attributes.
8
+
Most of the options documented in the Leaflet reference are exported as html attributes.
9
9
All events are mapped into html events of the same name.</p>
10
-
For example use <leaflet-map latitude="51.505" longitude="-0.09" zoom="13"></leaflet-map>
10
+
For example use <leaflet-map latitude="51.505" longitude="-0.09" zoom="13"></leaflet-map>
11
11
to define the view and zoom level.
12
12
13
13
@@ -18,22 +18,23 @@ do not yet support web-components natively, yet.
18
18
19
19
## Quickstart Guide
20
20
21
-
Make leaflet maps using declarative [Polymer](http://polymer-project.org)web components.
21
+
Make leaflet maps using declarative web components.
22
22
To get started read the [documentation](http://leaflet-extras.github.io/leaflet-map/doc.html)
23
23
or checkout the [demo](http://leaflet-extras.github.io/leaflet-map/).
24
24
25
-
Install this web component using [Bower](http://bower.io):
25
+
Install this web component using [npm](https://npm.im/leaflet-element):
26
26
27
27
```
28
-
bower install leaflet-map
28
+
npm i -S leaflet-element
29
29
```
30
30
31
31
Import the main component and start creating your map:
Please have a look at the [change log](https://github.com/nhnb/leaflet-map/blob/master/CHANGES.md), for recent developments.
80
81
81
-
## Dependencies
82
-
83
-
leaflet-map depends on webcomponentsjs in ../webcomponentsjs, Polymer in ../polymer and leaflet in ../leaflet. If you use bower, those will be installed automatically at the right locations.
84
-
85
-
Please note that the pages have to be accessed via a webserver. file://-urls are not supported.
86
-
87
-
88
82
## Notes for implementing child elements
89
83
90
84
Child elements like markers or layers will be initialized by the surrounding container (the map or a layer)
91
85
by setting a "container" javascript property.
92
-
Therefore the child element should define a _containerChanged method and use that as initializer.
93
-
Don't forget to define a detached method to support removal of elements. The leaflet-marker element is a good template.
86
+
Therefore the child element should define a _containerChanged method and use that as initializer.
87
+
Don't forget to define a detached method to support removal of elements. The leaflet-marker element is a good template.
94
88
95
89
96
90
## License
97
91
98
-
leaflet-map is based on polymer and leaflet. Small parts of leaflet,
92
+
leaflet-map is based on polymer and leaflet. Small parts of leaflet,
99
93
especially the api documentation, have been copied into leaflet-map files.
0 commit comments