forked from leaflet-extras/leaflet-map
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathleaflet-point.html
46 lines (40 loc) · 883 Bytes
/
leaflet-point.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<link rel="import" href="../polymer/polymer.html">
<link rel="import" href="leaflet-core.html">
<script>
"use strict";
var leafletMap = leafletMap || {};
Polymer({
is: 'leaflet-point',
hostAttributes: {hidden: true},
properties: {
/**
* The point's longitude coordinate.
*
* @attribute longitude
* @type number
*/
longitude: {
type: Number,
value: null
},
/**
* The point's latitude coordinate.
*
* @attribute latitude
* @type number
*/
latitude: {
type: Number,
value: null
}
},
/**
* Returns the point as a Leaflet LatLng object.
*
* @return {L.LatLng} The LatLng object.
*/
getPosition: function() {
return new L.LatLng(this.latitude, this.longitude);
}
});
</script>