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
Issue description
I am inserting a searchbox on the map to search for addresses as you can see on this tutorial at (Google Maps API doc)[https://developers.google.com/maps/documentation/javascript/examples/places-searchbox].
In order to to that, I got the NativeMap and push the input element into the map using something like this:
this.gmaps.getNativeMap().then(map => {
let input = document.getElementById('my-search-box');
let searchBox = new google.maps.places.SearchBox(input);
map.controls[google.maps.ControlPosition.TOP_LEFT].push(input);
searchBox.addListener('places_changed', () => this.placesChanged(searchBox));
});
As the controls is not mapped on the object returned from map I always get the error message: Property 'controls' does not exist on type 'GoogleMap'.
but it works anyway.
As the controls property allows us to do cool stuff once we got the nativeMap, I think implement it could be nice for future releases.
angular2 & angular2-google-maps version
angular2 - 2.0.0-rc.6
angular2-google-maps 0.14.0
The text was updated successfully, but these errors were encountered:
Introduces a new directive that allows to easily add a searchbox to the map. Include a common functionality to center the map when clicking one result
Closessebholstein#1290Closessebholstein#630
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Issue description
I am inserting a searchbox on the map to search for addresses as you can see on this tutorial at (Google Maps API doc)[https://developers.google.com/maps/documentation/javascript/examples/places-searchbox].
In order to to that, I got the NativeMap and push the input element into the map using something like this:
As the
controls
is not mapped on the object returned from map I always get the error message:Property 'controls' does not exist on type 'GoogleMap'.
but it works anyway.
As the controls property allows us to do cool stuff once we got the nativeMap, I think implement it could be nice for future releases.
angular2 & angular2-google-maps version
angular2 - 2.0.0-rc.6
angular2-google-maps 0.14.0
The text was updated successfully, but these errors were encountered: