如何删除ngMap上的默认A B标记 [英] How to remove default A B markers on ngMap
问题描述
我在我的角度应用程序中使用ng-map。在我的地图中,我正在使用路线,但我不需要A和B点。请帮我隐藏这些标记。
i获得了一个解决方案
,但对ng-map没有帮助。
thts,我是如何应付的。
< ng-map zoom =14
center =1135 Karamea-Kohaihai Rd,Kahurangi国家公园,塔斯曼
style =height:90%>
<方向
draggable =true
panel =p2
travel-mode =DRIVING
origin =1135 Karamea-Kohaihai Rd,Kahurangi National Park,Tasman
destination =Pier St,Jackson Bay,West Coast,New ZelandsuppressMarkers ='true'>
< / directions>
< custom-marker id =start
position =1135 Karamea-Kohaihai Rd,Kahurangi国家公园,塔斯曼>
< div>开始点< / div>
< / custom-marker>
< custom-marker id =end
position =杰克逊湾,西海岸,新西兰的皮尔街>
< div>结束点< / div>
< / custom-marker>
< / ng-map>
或者我没有正确使用它。
请检查此 plunker 。
帮助
如果添加
$ b,标记图标不会显示$ b
suppress-markers =true
位于<方向>
中,如下所示。
< ng-map zoom =14
center =1135 Karamea-Kohaihai Rd,Kahurangi National Park,Tasman
style =height:90%>
<方向
draggable =true
suppress-markers =true
panel =p2
travel-mode =DRIVING
origin =1135 Karamea-Kohaihai Rd,Kahurangi国家公园,塔斯曼
destination =Pier St,Jackson Bay,West Coast,New ZelandsuppressMarkers ='true'>
< / directions>
< custom-marker id =start
position =1135 Karamea-Kohaihai Rd,Kahurangi国家公园,塔斯曼>
< div>开始点< / div>
< / custom-marker>
< custom-marker id =end
position =杰克逊湾,西海岸,新西兰的皮尔街>
< div>结束点< / div>
< / custom-marker>
< / ng-map>
或 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. or maybe i am not using it correctly.
check this plunker.
Help Marker Icons won't show up if You add OR 这篇关于如何删除ngMap上的默认A B标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
< var renderer = new google.maps.DirectionsRenderer(options);
In options.suppressMarkers = true;
ng-map.js
<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 Karamea-Kohaihai Rd, Kahurangi National Park, Tasman">
<div> Start point </div>
</custom-marker>
<custom-marker id="end"
position="Pier St, Jackson Bay, West Coast, New Zeland">
<div> Ends point </div>
</custom-marker>
</ng-map>
suppress-markers="true"
in <directions>
as below.<ng-map zoom="14"
center="1135 Karamea-Kohaihai Rd, Kahurangi National Park, Tasman"
style="height:90%" >
<directions
draggable="true"
suppress-markers="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 Karamea-Kohaihai Rd, Kahurangi National Park, Tasman">
<div> Start point </div>
</custom-marker>
<custom-marker id="end"
position="Pier St, Jackson Bay, West Coast, New Zeland">
<div> Ends point </div>
</custom-marker>
</ng-map>
options.suppressMarkers = true;
just before var renderer = new google.maps.DirectionsRenderer(options);
In ng-map.js