OLD | NEW |
(Empty) | |
| 1 <!-- Copyright (c) 2015 Google Inc. All rights reserved. --> |
| 2 |
| 3 <link rel="import" href="../polymer/polymer.html"> |
| 4 <link rel="import" href="../google-apis/google-maps-api.html"> |
| 5 |
| 6 <!-- |
| 7 The `google-map-point` element represents a point on a map. It's used as a child
of other |
| 8 google-map-* elements. |
| 9 |
| 10 <b>Example</b>—points defining a semi-translucent blue triangle: |
| 11 |
| 12 <google-map latitude="37.77493" longitude="-122.41942"> |
| 13 <google-map-poly closed fill-color="blue" fill-opacity=".5"> |
| 14 <google-map-point latitude="36.77493" longitude="-121.41942"></google-ma
p-point> |
| 15 <google-map-point latitude="38.77493" longitude="-122.41942"></google-ma
p-point> |
| 16 <google-map-point latitude="36.77493" longitude="-123.41942"></google-ma
p-point> |
| 17 </google-map-poly> |
| 18 </google-map> |
| 19 --> |
| 20 <script> |
| 21 Polymer({ |
| 22 is: 'google-map-point', |
| 23 |
| 24 hostAttributes: {hidden: true}, |
| 25 |
| 26 properties: { |
| 27 /** |
| 28 * The point's longitude coordinate. |
| 29 */ |
| 30 longitude: { |
| 31 type: Number, |
| 32 value: null |
| 33 }, |
| 34 |
| 35 /** |
| 36 * The point's latitude coordinate. |
| 37 */ |
| 38 latitude: { |
| 39 type: Number, |
| 40 value: null |
| 41 } |
| 42 }, |
| 43 |
| 44 /** |
| 45 * Returns the point as a Google Maps LatLng object. |
| 46 * |
| 47 * @return {google.maps.LatLnt} The LatLng object. |
| 48 */ |
| 49 getPosition: function() { |
| 50 return new google.maps.LatLng(this.latitude, this.longitude); |
| 51 } |
| 52 }); |
| 53 </script> |
OLD | NEW |