首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当我在OpenGTS中拖动google映射api OpenGTS时

当我在OpenGTS中拖动google映射api OpenGTS时
EN

Stack Overflow用户
提问于 2014-03-12 18:43:28
回答 1查看 954关注 0票数 0

我使用OpenGTS 2.5.3,我想使用goole映射作为提供程序映射。我在代码中插入了api v3键,并且出现了google映射,但是当我想要移动或拖动鼠标到地图上时,问题就会发生。地图移动不正确。我实际上只有我能移动和缩放1或2厘米。

有人能帮我吗?

这是我正在使用的OpenGTS的原始代码:

代码语言:javascript
复制
<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>

提前感谢!

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-03-13 18:12:07

我也遇到了同样的问题,每当我加载地图时,就很难用鼠标拖动它(使用按钮是可能的)。

我能够通过向googleMaps MapProvider部分添加以下参数来解决这个问题

代码语言:javascript
复制
<Property key="google.version">3</Property>

这迫使OpenGTS从一开始就使用Version3API。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22360992

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档