Questions tagged [ng-map]

ng-map is a Google map AngularJS Directive. Its main features are everything in tag and attributes and it exposes all original Google Maps V3 api to the user.

ng-map is a Google map AngularJS Directive. Its main features are:

  • Everything in tag and attributes - Thus, basic users don't even have to know what Javascript is.

  • Expose all original Google Maps V3 api to the user - No hiding, no wraping, or whatsoever. By doing so, programmers don't need to learn how to use this module. You only need to know Google Maps V3 API.

Demos can be found here.

Documentation at: https://rawgit.com/allenhwkim/angularjs-google-maps/master/build/docs/index.html

Github link: https://github.com/allenhwkim/angularjs-google-maps

200 questions
1
vote
1 answer

NgMap set marker color

I'm using ng-map in my web application. In the map view, I display different positions using marker. I want to change the color of each marker depending the filed isOpned that I have inside the object from where I get the positions. I tried to add…
Ne AS
  • 1,490
  • 3
  • 26
  • 58
1
vote
2 answers

Clear Google Maps initial State

I'm using ngMap on a project where I have different maps on different views. I have one initial page where I show a map and draw a polygon and some markers. My controller is like this: $scope.showInitialMap = function( map ) { /*Resize image to…
Ellebkey
  • 2,201
  • 3
  • 22
  • 31
1
vote
1 answer

How to get new coordinates of the edited shape and calculate the center dynamically

I'm using ngmap in my application. I was able to display a polygon from its coordinates using shape. Now I want to make this polygon editable. I referenced this link and my polygon is now editable. The problem is that I can't find how can I get the…
Ne AS
  • 1,490
  • 3
  • 26
  • 58
1
vote
1 answer

Display an existing polygon while using draw mode of ngmap

I was able to do the same as this example in order to let the user draw a polygon and it works perfectly. Now I want to display an existing polygon inside the same map. How can I do that? To explain more: I have used the first example for the create…
Ne AS
  • 1,490
  • 3
  • 26
  • 58
1
vote
1 answer

how to set ng-map marker visibility?

I am trying to set ng-map marker visibility option via html attribute. I've been struggling with about two hours. Thank you in advance.
Alex Lavriv
  • 321
  • 1
  • 10
1
vote
1 answer

Getting coordinates from ngMap auto-complete

Google maps allows one to get the coordinates from the auto-complete library. I cannot seem to find a way of doing it with ngMap without involving the "controller as" syntax. I want to get the coordinates and output them to console with just…
user6451494
1
vote
1 answer

Shape object is undefined for ng-map

I'm currently trying to get a simple app up and running that uses NgMap to overlay custom polygons on a map of the United States. I have been following this example NgMap Simple Polygon. The largest difference I would have compared to this example…
dustyjuicebox
  • 267
  • 2
  • 9
1
vote
2 answers

How to set watcher in AngularJS component?

I am using NgMap to display google map and I need the ability to change center position from varios parts of site. I have markerService for that: angular.module('markerService') .factory('MarkerService', MarkerService); …
Kārlis Janisels
  • 1,265
  • 3
  • 18
  • 41
1
vote
1 answer

NgMap, how do I access the directions in a controller? map.directionsRenderers[0].directions is undefined in controller.

I'm using NgMap and I need to get the directions in a controller. I've tried the following: NgMap.getMap().then(function(map) { console.log(map.directionsRenderers[0].directions); }); But it is returning undefined. I also tried using…
JoshH2
  • 55
  • 6
1
vote
1 answer

ngMaps: InvalidValueError: setPlace: not an Object

I'm customizing a google map with ngmaps (https://ngmap.github.io), google maps api and angularJS. What I want is to bring the marker of a place, look in the documentation of the api of google maps…
Emily
  • 314
  • 2
  • 17
1
vote
2 answers

Unable to display multiple markers using ng-map

I am trying to use ng-map to display multiple markers dynamically as follows.
Satya Narayana
  • 454
  • 6
  • 20
1
vote
0 answers

Stopping ng-map stores previous street view

I have an ng-map issue when I follow the steps - Load map Drop the streetview person on map Return to map Place streetview in a different location At the final step Streetview initially shows the previous location before the new…
farrellmr
  • 1,815
  • 2
  • 15
  • 26
1
vote
0 answers

ReferenceError: google is not defined on reload

I am trying to use the googleplace autocomplete api and ng-map. The problem I run into is after I try to load the map and places with a directive. I am appending a script tag to the the body tag inside index.html. On first load, the returned google…
pro
  • 792
  • 7
  • 30
1
vote
1 answer

Ng-Maps change route color of direction renderer

I am trying to change the blue route to any other color, but unable to change it. plunker url: http://plnkr.co/edit/3ddUOUx7r91LJQqKP43e?p=preview angular.module('ngMap').run(function($rootScope, NgMap) { $rootScope.logLatLng = function(e)…
Sheetal
  • 1,368
  • 1
  • 9
  • 15
1
vote
1 answer

Open infowindow by clicking a button in AngularJS

I have used google map using AngularJs which is working fine. However, on clicking any marker infowindow opens but I need to open it by clicking a radio button outside the map, here is the code sample HTML
Kamran Khatti
  • 3,754
  • 1
  • 20
  • 31