Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Side by Side Diff: lib/google_map.dart

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/google_chart.dart ('k') | lib/google_map.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update` 1 // DO NOT EDIT: auto-generated with `pub run custom_element_apigen:update`
2 2
3 /// Dart API for the polymer element `google_map`. 3 /// Dart API for the polymer element `google_map`.
4 @HtmlImport('google_map_nodart.html') 4 @HtmlImport('google_map_nodart.html')
5 library polymer_elements.lib.src.google_map.google_map; 5 library polymer_elements.lib.src.google_map.google_map;
6 6
7 import 'dart:html'; 7 import 'dart:html';
8 import 'dart:js' show JsArray, JsObject; 8 import 'dart:js' show JsArray, JsObject;
9 import 'package:web_components/web_components.dart'; 9 import 'package:web_components/web_components.dart';
10 import 'package:polymer_interop/polymer_interop.dart'; 10 import 'package:polymer_interop/polymer_interop.dart';
11 import 'iron_resizable_behavior.dart'; 11 import 'iron_resizable_behavior.dart';
12 import 'google_maps_api.dart'; 12 import 'google_maps_api.dart';
13 import 'iron_selector.dart';
13 import 'google_map_marker.dart'; 14 import 'google_map_marker.dart';
14 15
15 /// The `google-map` element renders a Google Map. 16 /// The `google-map` element renders a Google Map.
16 /// 17 ///
17 /// <b>Example</b>: 18 /// <b>Example</b>:
18 /// 19 ///
19 /// <style> 20 /// <style>
20 /// google-map { 21 /// google-map {
21 /// height: 600px; 22 /// height: 600px;
22 /// } 23 /// }
(...skipping 15 matching lines...) Expand all
38 /// var map = document.querySelector('google-map'); 39 /// var map = document.querySelector('google-map');
39 /// map.latitude = 37.77493; 40 /// map.latitude = 37.77493;
40 /// map.longitude = -122.41942; 41 /// map.longitude = -122.41942;
41 /// map.addEventListener('google-map-ready', function(e) { 42 /// map.addEventListener('google-map-ready', function(e) {
42 /// alert('Map loaded!'); 43 /// alert('Map loaded!');
43 /// }); 44 /// });
44 /// </script> 45 /// </script>
45 /// 46 ///
46 /// <b>Example</b> - with Google directions, using data-binding inside another P olymer element 47 /// <b>Example</b> - with Google directions, using data-binding inside another P olymer element
47 /// 48 ///
48 /// <google-map map="{{map}}" libraries="places"></google-map> 49 /// <google-map map="{{map}}"></google-map>
49 /// <google-map-directions map="{{map}}" 50 /// <google-map-directions map="{{map}}"
50 /// start-address="San Francisco" end-address="Mountain View"> 51 /// start-address="San Francisco" end-address="Mountain View">
51 /// </google-map-directions> 52 /// </google-map-directions>
52 @CustomElementProxy('google-map') 53 @CustomElementProxy('google-map')
53 class GoogleMap extends HtmlElement with CustomElementProxyMixin, PolymerBase, I ronResizableBehavior { 54 class GoogleMap extends HtmlElement with CustomElementProxyMixin, PolymerBase, I ronResizableBehavior {
54 GoogleMap.created() : super.created(); 55 GoogleMap.created() : super.created();
55 factory GoogleMap() => new Element.tag('google-map'); 56 factory GoogleMap() => new Element.tag('google-map');
56 57
57 /// Additional map options for google.maps.Map constructor. 58 /// Additional map options for google.maps.Map constructor.
58 /// Use to specify additional options we do not expose as 59 /// Use to specify additional options we do not expose as
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 /// 100 ///
100 /// Note: the Maps API defaults to the preffered language setting of the brows er. 101 /// Note: the Maps API defaults to the preffered language setting of the brows er.
101 /// Use this parameter to override that behavior. 102 /// Use this parameter to override that behavior.
102 String get language => jsElement[r'language']; 103 String get language => jsElement[r'language'];
103 set language(String value) { jsElement[r'language'] = value; } 104 set language(String value) { jsElement[r'language'] = value; }
104 105
105 /// A latitude to center the map on. 106 /// A latitude to center the map on.
106 num get latitude => jsElement[r'latitude']; 107 num get latitude => jsElement[r'latitude'];
107 set latitude(num value) { jsElement[r'latitude'] = value; } 108 set latitude(num value) { jsElement[r'latitude'] = value; }
108 109
109 /// A comma separated list (e.g. "places,geometry") of libraries to load
110 /// with this map. Defaults to "". For more information see
111 /// https://developers.google.com/maps/documentation/javascript/libraries.
112 String get libraries => jsElement[r'libraries'];
113 set libraries(String value) { jsElement[r'libraries'] = value; }
114
115 /// A longitude to center the map on. 110 /// A longitude to center the map on.
116 num get longitude => jsElement[r'longitude']; 111 num get longitude => jsElement[r'longitude'];
117 set longitude(num value) { jsElement[r'longitude'] = value; } 112 set longitude(num value) { jsElement[r'longitude'] = value; }
118 113
119 /// A Maps API object. 114 /// A Maps API object.
120 get map => jsElement[r'map']; 115 get map => jsElement[r'map'];
121 set map(value) { jsElement[r'map'] = (value is Map || (value is Iterable && va lue is! JsArray)) ? new JsObject.jsify(value) : value;} 116 set map(value) { jsElement[r'map'] = (value is Map || (value is Iterable && va lue is! JsArray)) ? new JsObject.jsify(value) : value;}
122 117
123 /// Map type to display. One of 'roadmap', 'satellite', 'hybrid', 'terrain'. 118 /// Map type to display. One of 'roadmap', 'satellite', 'hybrid', 'terrain'.
124 String get mapType => jsElement[r'mapType']; 119 String get mapType => jsElement[r'mapType'];
(...skipping 12 matching lines...) Expand all
137 set minZoom(num value) { jsElement[r'minZoom'] = value; } 132 set minZoom(num value) { jsElement[r'minZoom'] = value; }
138 133
139 /// When true, map mouse* events are automatically registered. 134 /// When true, map mouse* events are automatically registered.
140 bool get mouseEvents => jsElement[r'mouseEvents']; 135 bool get mouseEvents => jsElement[r'mouseEvents'];
141 set mouseEvents(bool value) { jsElement[r'mouseEvents'] = value; } 136 set mouseEvents(bool value) { jsElement[r'mouseEvents'] = value; }
142 137
143 /// When set, prevents the map from tilting (when the zoom level and viewport supports it). 138 /// When set, prevents the map from tilting (when the zoom level and viewport supports it).
144 bool get noAutoTilt => jsElement[r'noAutoTilt']; 139 bool get noAutoTilt => jsElement[r'noAutoTilt'];
145 set noAutoTilt(bool value) { jsElement[r'noAutoTilt'] = value; } 140 set noAutoTilt(bool value) { jsElement[r'noAutoTilt'] = value; }
146 141
142 /// The non-marker objects on the map.
143 List get objects => jsElement[r'objects'];
144 set objects(List value) { jsElement[r'objects'] = (value != null && value is! JsArray) ? new JsObject.jsify(value) : value;}
145
147 /// If true, sign-in is enabled. 146 /// If true, sign-in is enabled.
148 /// See https://developers.google.com/maps/documentation/javascript/signedin#e nable_sign_in 147 /// See https://developers.google.com/maps/documentation/javascript/signedin#e nable_sign_in
149 bool get signedIn => jsElement[r'signedIn']; 148 bool get signedIn => jsElement[r'signedIn'];
150 set signedIn(bool value) { jsElement[r'signedIn'] = value; } 149 set signedIn(bool value) { jsElement[r'signedIn'] = value; }
151 150
151 /// If set, all other info windows on markers are closed when opening a new on e.
152 bool get singleInfoWindow => jsElement[r'singleInfoWindow'];
153 set singleInfoWindow(bool value) { jsElement[r'singleInfoWindow'] = value; }
154
152 /// If set, custom styles can be applied to the map. 155 /// If set, custom styles can be applied to the map.
153 /// For style documentation see developers.google.com/maps/documentation/javas cript/reference#MapTypeStyle 156 /// For style documentation see developers.google.com/maps/documentation/javas cript/reference#MapTypeStyle
154 get styles => jsElement[r'styles']; 157 get styles => jsElement[r'styles'];
155 set styles(value) { jsElement[r'styles'] = (value is Map || (value is Iterable && value is! JsArray)) ? new JsObject.jsify(value) : value;} 158 set styles(value) { jsElement[r'styles'] = (value is Map || (value is Iterable && value is! JsArray)) ? new JsObject.jsify(value) : value;}
156 159
157 /// Version of the Google Maps API to use. 160 /// Version of the Google Maps API to use.
158 String get version => jsElement[r'version']; 161 String get version => jsElement[r'version'];
159 set version(String value) { jsElement[r'version'] = value; } 162 set version(String value) { jsElement[r'version'] = value; }
160 163
161 /// A zoom level to set the map to. 164 /// A zoom level to set the map to.
162 num get zoom => jsElement[r'zoom']; 165 num get zoom => jsElement[r'zoom'];
163 set zoom(num value) { jsElement[r'zoom'] = value; } 166 set zoom(num value) { jsElement[r'zoom'] = value; }
164 167
165 /// Clears all markers from the map. 168 /// Clears all markers from the map.
166 clear() => 169 clear() =>
167 jsElement.callMethod('clear', []); 170 jsElement.callMethod('clear', []);
168 171
169 /// Explicitly resizes the map, updating its center. This is useful if the 172 /// Explicitly resizes the map, updating its center. This is useful if the
170 /// map does not show after you have unhidden it. 173 /// map does not show after you have unhidden it.
171 resize() => 174 resize() =>
172 jsElement.callMethod('resize', []); 175 jsElement.callMethod('resize', []);
173 } 176 }
OLDNEW
« no previous file with comments | « lib/google_chart.dart ('k') | lib/google_map.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698