ng-map

ng-map only opens remote KML file but not local file?

一世执手 提交于 2019-12-11 04:12:06
问题 I'm using Ionic and ng-map. I have to display different KMLs (one at a time and on user request). The KML loads on the map but only for remote KMLs. So this one works: <div style="height: 100%"> <ng-map center="41.876,-87.624" zoom="15" map-type-id="HYBRID" style="display:block; width: 100%; height:100%;"> <kml-layer url="http://googlemaps.github.io/js-v2-samples/ggeoxml/cta.kml"></kml-layer> </ng-map> </div> My local KMLs are in a kml folder inside www directory in my Ionic app. And I'm

How to render maps within ng-hide divs using ngMap without getting a gray rectangle

我怕爱的太早我们不能终老 提交于 2019-12-11 01:11:32
问题 The problem: Google Maps elements that are within divs that are initially rendered as ng-hidden come up as gray rectangles when they are ng-shown. I've put together this Plunker to demonstrate: https://plnkr.co/edit/emzlIT?p=preview Others have had success using google.maps.event.trigger(map,'resize') , but for me it is no help, perhaps because I have multiple maps hidden. On this plunker, 'resize' seems to make a difference, but not consistently. If you play with the Plunker and everything

ng-map show the best way between two points (waypoints) [closed]

元气小坏坏 提交于 2019-12-10 20:45:30
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 5 years ago . I am using Angularjs with IonicFramework and ng-map. I have read all the documentation here (link), but I don't find how can I show to the user the best way (or a simple way) to go to the user current position to another. I have read this too and this, but I would like to use

Using Event listeners with ngMap

喜夏-厌秋 提交于 2019-12-10 16:13:02
问题 I'm using Allenhwkim's wonderful ngMap in a project. I know that I need to use Maps Javascript v3 API to manipulate the map, which is going well except that I can't get any event listeners, e.g., $google.maps.event.addListener(markers[i], 'click', function()... to work Specifically, I'm trying to create an onClick event on my markers. Here's an example: http://plnkr.co/edit/HAcEfWl5LR9SGGqbcXcW?p=preview Here, I try to use an ng-click attribute on a marker directive. Still, I get nothing.

create a line between markers using ngmap

南楼画角 提交于 2019-12-06 16:12:06
问题 I am using ngmap and angular js to show a set of markers in a map without problem. I need paint a line that join these markers. My code: In view: <map center="{{markers[0].lat}},{{markers[0].lng}}" zoom="12"> <marker ng-repeat="pos in markers" position="{{pos.lat}}, {{pos.lng}}"></marker> </map> in my controller: var app = angular.module('Items', ['ngMap']) app.controller('CICtrl', function($scope){ $scope.markers = [{id:1, lat:37.772323, lng: -122.214897}, {id:2, lat:21.291982, lng: -157

Ng-map get address after dragging marker

 ̄綄美尐妖づ 提交于 2019-12-06 05:48:08
问题 I am using ng-map to use google map in angularjs. I want to get address safter drag end of marker. I have tried to find in their documentation but did not found for that. Their documentation is good but did not found what i wanted. After trying i got the lat and log after drag end. But i need the address. So what i have to do is to get address from marker or i can convert lat & long to address. But i did not find any code for geocoder to convert lat long to address. Here is the code from

How to draw polygon using hardcoded values in ngMap using angularjs

时光总嘲笑我的痴心妄想 提交于 2019-12-05 00:58:22
问题 I need to draw polygon on google maps using the hard coded values.I have used ngMap ( https://ngmap.github.io/ )and used drawing manager of ngMap to it, because i also want the user to draw polygon dynamically. if i use drawing manager,i am not able to draw polygon with hardcoded values. and also another thing , if the user put the marker on map. i need to get the co-ordinates of it. (for example:get the co-ordinates in alert box or console). can anyone please help me Plunker here: http:/

ng-map: How can I get the Marker object when I click it?

不打扰是莪最后的温柔 提交于 2019-12-03 20:09:47
问题 I am using the pretty cool ng-map library for angular, and I want to know how to access the underlying Marker Object referenced by ng-map marker directive So, I have this markup: <div id="map-search" data-tap-disabled="true"> <map zoom="15" disable-default-u-i="true"> <marker ng-repeat=" pos in positions" position="{{pos.latitude}}, {{pos.longitude}}" id="{{pos.index}}" on-click="pinClicked()"> </marker> </map> </div> I haven't found a straight-forward way of accessing the Google Maps Marker

How to draw polygon using hardcoded values in ngMap using angularjs

我怕爱的太早我们不能终老 提交于 2019-12-03 17:24:04
I need to draw polygon on google maps using the hard coded values.I have used ngMap ( https://ngmap.github.io/ )and used drawing manager of ngMap to it, because i also want the user to draw polygon dynamically. if i use drawing manager,i am not able to draw polygon with hardcoded values. and also another thing , if the user put the marker on map. i need to get the co-ordinates of it. (for example:get the co-ordinates in alert box or console). can anyone please help me Plunker here: http://plnkr.co/edit/keRsKthRAwX89WOWeYwZ?p=preview <ng-map zoom="12" center="28.623457, 77.196452" map-type-id=

How to remove default A B markers on ngMap

99封情书 提交于 2019-12-03 13:24:49
I am using ng-map in my angular application. in my map i am using directions but i don't need A and B points. please help me hide these markers. i got one solution but it's not helping in ng-map. thts,s how I apllied it. <ng-map zoom="14" center="1135 Karamea-Kohaihai Rd, Kahurangi National Park, Tasman" style="height:90%" > <directions draggable="true" panel="p2" travel-mode="DRIVING" origin="1135 Karamea-Kohaihai Rd, Kahurangi National Park, Tasman" destination="Pier St, Jackson Bay, West Coast, New Zeland" suppressMarkers='true'> </directions> <custom-marker id="start" position="1135