angular-google-maps

angular-google-maps run function ONCE after initial map load

可紊 提交于 2019-12-04 06:42:41
using angular-google-maps to incorporate a google map into an app I need a command that will run a function ONCE after initial map load is complete - but only on the initial load, not after each map manipulation I can't use idle or tilesloaded since these are fired after every movement... The function I want to run needs to get map bounds to pull data off a server on initial page load - i want this to occur ONCE on initial load, then be a manual function using a refresh map-control - if i use idle or tilesloaded to fire this it will pull server data every time a user moves the map. Does anyone

angularjs google maps - markers with window - infowindow not showing

自闭症网瘾萝莉.ら 提交于 2019-12-04 05:26:43
Trying to get a app using angular-google-maps with: - multiple markers via the markers directive - a single infowindow via the window directive I've been through the API and multiple closed issues / questions on the git-hub site but just can't get it working... :-/ jsfiddle For simplicity, I'm declaring the markers manually (and they're displaying correctly): $scope.markers = [ { id: 0, coords: { latitude: 37.7749295, longitude: -122.4194155 }, data: 'restaurant' }, { id: 1, coords: { latitude: 37.79, longitude: -122.42 }, data: 'house' }, { id: 2, coords: { latitude: 37.77, longitude: -122.41

Why is ng-non-bindable required for <ui-gmap-windows> element in Angular Google Maps?

僤鯓⒐⒋嵵緔 提交于 2019-12-04 04:12:27
I have a question about the element of the Angular Google Maps plugin. The example source code in documentation for the Windows element uses the ng-non-bindable attribute for the <div> inside of the <ui-gmap-windows> element. Apparently, this is necessary in order for Angular bindings to render correctly on the page. This is not explicitly stated in the documentation, so I am wondering exactly why this attribute is necessary, especially since the official Angular documentation on ng-non-bindable makes it clear that Angular literals within annotated HTML elements will not be parsed by Angular.

Working example of angular-google-maps search function

半腔热情 提交于 2019-12-03 11:06:32
问题 Does anyone have an example of a working search box like the one the angular-google-maps-team is showing under 'search-box' on this site: https://angular-ui.github.io/angular-google-maps/#!/api If you write something it sure does find it in a dropdown, but when you press enter, the map doesn't respond. - How can you make the map move to the correct location when you hit enter? 回答1: html: <ui-gmap-google-map center="map.center" zoom="map.zoom" draggable="true"> <ui-gmap-search-box template=

How do I pass a value from a ui-gmap-windows InfoWindow/Marker to ui-sref?

南楼画角 提交于 2019-12-03 08:10:31
I am trying to create a link inside an InfoWindow on a Google Map, using the angular-google-maps module's ui-gmap-windows . In my HTML template, I have: <ui-gmap-google-map center='main.map.center' zoom='main.map.zoom' options='main.map.options'> <ui-gmap-markers models="main.markers" coords="'self'" icon="'icon'" options="'options'" click="'onClick'" fit="true"> <ui-gmap-windows show="'showWindow'" closeClick="'closeClick'" ng-cloak> <div class="mapinfowindow" data-ui-sref="display({id: id})"> <span class="itemname" data-ng-non-bindable>{{ title }}</span> </div> </ui-gmap-windows> </ui-gmap

How to wait for Angular Google Maps to append getGMap to the control object

﹥>﹥吖頭↗ 提交于 2019-11-30 03:06:51
问题 I've been trying to set up click event listeners on the google.maps.Map object that's created by the ui-gmap-google-map directive from the Angular Google Maps library. I need to do this dynamically, so it seems (by my brief testing at least) that using the events parameter on the ui-gmap-google-map directive won't work (because it seems to "read" the parameter value only once, but maybe I'm wrong about that). So I decided to use the control parameter, which augments the object named by the

Is there a way to set the bounds and Zoom level in AGM Map?

一曲冷凌霜 提交于 2019-11-28 21:22:22
问题 I am using AGM maps for my angular 4 application, there I am facing issues, I will be having the multiple markers which are fetched from api as an array of Latitude and Longitude. I want to set the zoom level exactly covering all the markers on the map. Even if one marker in one country and other in some other country also, It should set the zoom level on load to show all the markers on the map. Is there a way to do that in AGM angular maps? Could anyone please help me 回答1: Objectives We