我正在使用OpenGTS 2.5.3,我想将goole地图用作提供者地图。我在代码中插入了api v3键并显示了谷歌地图,但是当我想在地图上移动或拖动鼠标时会出现问题。地图不能正确移动。事实上,我只能移动和缩放1或2厘米。
有人可以帮助我吗?
这是我正在使用的OpenGTS的原始代码:
<MapProvider name="googleMaps"
active="${Domain.MapProvider.active=true}"
class="org.opengts.war.maps.jsmap.GoogleMaps"
key="${Domain.MapProvider.key=MY API KEY}"
rtPropPrefix="Domain.MapProvider.">
<Property key="map.fillFrame">true</Property>
<!-- <Property key="map.width">680</Property> --> <!-- map width -->
<!-- <Property key="map.height">470</Property> --> <!-- map width -->
<Property key="scrollWheelZoom">false</Property> <!-- enable/disable scroll wheel zoom -->
<!-- <Property key="google.mapcontrol">http://maps.google.com/maps?file=api&v=2&sensor=true&key=...</Property> -->
<Property key="google.sensor">true</Property>
<!-- default zoom/location -->
<Property key="default.zoom">4</Property> <!-- default zoom when no pushpins are displayed -->
<Property key="default.lat">39.0000</Property> <!-- default latitude when no pushpins are displayed -->
<Property key="default.lon">-96.5000</Property> <!-- default longitude when no pushpins are displayed -->
<!-- Geozone map size/config -->
<!-- <Property key="zone.map.width">630</Property> -->
<!-- <Property key="zone.map.height">540</Property> -->
<Property key="zone.map.multipoint">false</Property> <!-- [true|false] false==1 point, true=6 points -->
<Property key="zone.map.polygon">true</Property> <!-- [true|false] display polygon option -->
<Property key="zone.map.corridor">false</Property> <!-- [true|false] display corridor option (not supported) -->
<!-- include target geozones on map (a pushpin must be in the Geozone for it to be displayed) -->
<Property key="map.includeGeozones">false</Property>
<!-- route line -->
<Property key="map.routeLine">true</Property> <!-- include travel route line -->
<Property key="map.routeLine.color">#FF2222</Property> <!-- include travel route line color -->
<Property key="map.routeLine.arrows">false</Property> <!-- include travel route line arrows (GoogleMaps only - always blue) -->
<!-- replay -->
<Property key="replay.enable">true</Property> <!-- enable/disable replay -->
<Property key="replay.interval">1200</Property> <!-- replay interval (in milliseconds) -->
<Property key="replay.singlePushpin">false</Property> <!-- show only single pushpin during replay -->
<!-- auto update -->
<Property key="auto.enable">false</Property>
<Property key="auto.interval">20</Property>
<Property key="auto.count">10</Property>
<!-- use default pushpins -->
<Pushpins includeDefault="true"/>
<!-- legend -->
<Legend type="device" includeDefault="true"/>
<Legend type="fleet" includeDefault="true"/>
</MapProvider>
提前致谢!
答案 0 :(得分:0)
我有同样的问题,每当我加载地图时,用鼠标拖动它真的很困难(可以使用按钮)。
我能够通过将以下参数添加到googleMaps MapProvider部分来解决问题
<Property key="google.version">3</Property>
这迫使OpenGTS从一开始就使用版本3 api。