我正在使用Angular UI地图,但似乎找不到可以更改样式选项的指令。Google的文档给出了一个使用Google对象的示例。我尝试使用getElementById获取地图,但这导致了大量与UI对象有关的错误。
我的控制器包含:
$scope.map = { center: { latitude: 42.99, longitude: -81.255 }, zoom: 14, bounds: {}};
虽然HTML是:
<div id="map_canvas">
<ui-gmap-google-map id='customMap' center="map.center" zoom="map.zoom" draggable="true" options="options" bounds="map.bounds">
<ui-gmap-markers models="eventMarkers" coords="'self'" idKey="'id'" icon="'icon'" click="'onClick'">
<ui-gmap-windows show="show">
<div ng-non-bindable>{{content}}</div>
</ui-gmap-windows>
</ui-gmap-markers>
</ui-gmap-google-map>
</div>
尝试在作用域中添加适当的代码来添加style
,但没有改变任何内容或引起任何错误。