angular-google-maps

AGM Google maps imagery tiles not loading

二次信任 提交于 2019-12-11 10:45:32
问题 Imagery tiles do not load when the page loads...I have to take some action on the map i.e.(zoom,pan) then the tiles load AGM initialization in my module AgmCoreModule.forRoot({ apiKey: 'MyKey' }), My agm-map tag <agm-map [latitude]="lat" [longitude]="lng" [zoom]="zoom" [mapTypeId]="mapType" [mapTypeControl]="mapControls" [zoomControl]="mapControls" [streetViewControl]="mapControls"> </agm-map> How can I force tiles to load? 回答1: Make sure that when you are using AGM Angular google Maps that

angular-google-maps API key from backend

五迷三道 提交于 2019-12-11 07:11:56
问题 Generally, this question is about how to use some dynamic content from a backend inside a module.config function in AngularJS. Specifically, this question is regarding the GoogleMapApi provider in angular-google-maps In my Angular Application the Google Maps API key is stored in a Firebase backend. What I would like to do is to set the API key for the GoogleMapApiProvider .config(function(uiGmapGoogleMapApiProvider) { uiGmapGoogleMapApiProvider.configure({ key: 'your api key', }); }) I know

Callback on wrong scope

大城市里の小女人 提交于 2019-12-11 00:14:45
问题 I have an issue and can't remember how to get around it. I am subscribing to a callback from a third party directive but not being called back with the correct scope. And by that I mean that when it hits my controller this is actually some other scope I cant quite figure out so it cannot access any member variables. How do I get back to my controller scope? <ui-gmap-layer type="HeatmapLayer" onCreated="$ctrl.heatLayerCallback"></ui-gmap-layer> Component Controller: heatLayerCallback(heatLayer

angular-google-maps nemlogging error in ionic

纵然是瞬间 提交于 2019-12-10 20:00:23
问题 I get this error after install angular-google-maps library with Bower in my project. Uncaught Error: [$injector:modulerr] Failed to instantiate module starter due to: Error: [$injector:modulerr] Failed to instantiate module uiGmapgoogle-maps due to: Error: [$injector:modulerr] Failed to instantiate module uiGmapgoogle-maps.directives.api due to: Error: [$injector:modulerr] Failed to instantiate module uiGmapgoogle-maps.directives.api.models.parent due to: Error: [$injector:modulerr] Failed to

For angular google maps how do I remove the polyline?

早过忘川 提交于 2019-12-10 04:03:15
问题 For angular google maps how do I remove the polyline? I'm using angular version 1 with JavaScript in a directive using a templateUrl. Version: angular-google-maps 2.1.5 This is my current HTML: <ui-gmap-google-map center="config.map.center" zoom="config.map.zoom" options="config.map.options" events="config.map.events" draggable="true"> <ui-gmap-polygon path="compatiblePolygon" stroke="polygonConfig.stroke" fill="polygonConfig.fill" fit="true" static="false" visible="polygonConfig.visible"

angular-google-maps does now show correctly when it's hidden at start

心已入冬 提交于 2019-12-09 18:32:08
问题 When map starts hidden with ng-show/ng-hide, it does not show correctly once visible. Same trouble with a standard map, only we can send a resize to it since we have access to the map object. Here's a sample that starts with the map hidden. The button toggle the visibility of the map. <!doctype html> <html> <head> <style> .angular-google-map-container { width: 100%; height: 100px; } .mymap { width: 100%; height: 100px; } </style> </head> <body ng-app="app" ng-controller="myCtrl"> <button ng

How to get the new coordinates from Angular Google Maps? (Angular 6)

本秂侑毒 提交于 2019-12-08 09:13:21
问题 Background: Hello everyone, for the last days I am struggling with angular google maps (AGM) API. I am building something pretty simple, I have list of coordinates ( longitude and latitude ) which I am passing to AGM directive, everything work fine and I am able to see the points on the map, check out the image (line image and polygon image): Line Image: Polygon Image: This is my angular code to display the line and display the polygons. <agm-map #agmMap class="d-agm-map-container" [zoom]=

config angular-google-maps with ionic-framework

前提是你 提交于 2019-12-08 06:14:51
问题 I have started an ionic app for work, and one of the features of the cross platform arm is integrating a a Google map api. Currently I choose angular-google-maps Now I try config it with ionic like this: seems eveything is ok but why it dosen't work? <html ng-app="appMaps"> <head> <meta charset="utf-8"> <title>Map</title> <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"> <link href="//code.ionicframework.com/nightly/css/ionic.css" rel=

How to get paths of agm polygon when it is edited and dragged?

…衆ロ難τιáo~ 提交于 2019-12-06 19:08:05
问题 I am trying to get the updated polygon paths when the polygon is edited and dragged. I tried to do it like the code below. In my Typescript: @ViewChild(AgmPolygon) polygon: any; this.polygon.getPaths().then((x: any[]) => { x.forEach(y => { console.log('-'); y.forEach(z => console.log(z.lat(), z.lng())); }); }); I followed the following links also 1st link 2nd link. In my html: <agm-map [latitude]="lat" [fullscreenControl]="true" (mapClick)="mapClicked($event)" [longitude]="lng" [zoom]="8"

Angular-Google-Maps: How to use 'method' in the controller

佐手、 提交于 2019-12-06 14:01:15
问题 When I change my app from jQuery way to Angular way, I try to use Angular-Google-Maps. But I can't find where is the Google Map Objects(Map, Marker, Polygon...) and the approach to use Object 'method' (such like getMap() , getPath(), getPosition()..). If I need to get the position of the marker which is dragged, how can i do? just like I usually do ? marker = new google.maps.Marker(opts); postion = marker.getPosition(); 回答1: Edit: I found a way how to get the marker position when it was