如何在OpenLayers GeometryPoint上进行panTo / setCenter

时间:2014-04-07 13:18:25

标签: openlayers

首先,我是OpenLayers的新手。以下是用于表示通过OpenLayers呈现的地图上的几个图像的HTML片段。问题:使用下面的信息如何以编程方式将这些图像元素中的一个带入视图?即,我想我想在其中一个元素上 panTo setCenter 。这是测试脚本的一部分,我在其中找到图像,将它们逐个引入视图并对它们采取一些操作。 from投影是EPS6:4326,投影是EPS6:900913。谢谢。

<svg id="OpenLayers_Layer_Vector_98_svgRoot" style="display: block;" width="1663" height="301" viewBox="0 0 1663 301">
    <g id="OpenLayers_Layer_Vector_98_root" style="visibility: visible;" transform="translate(-33.02402040717425,-1.0000000016589183)">
    <g id="OpenLayers_Layer_Vector_98_vroot">
        <image id="OpenLayers_Geometry_Point_106" cx="458.11467034582165" cy="220.41962755130953" r="1" preserveAspectRatio="none" x="432" y="195" width="51.28563443264394" height="51.28563443264394" xlink:href="http://MyURL/service/maps/getDetails/../chart?cht=pc&chco=ee3324CC|ed8000CC&chd=t:78,22&chs=150x150&chf=bg,s,00000000,o,4,00000040" style="opacity: 1" fill="#000000" fill-opacity="1" stroke="#000000" stroke-opacity="1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
        <image id="OpenLayers_Geometry_Point_108" cx="622.4436271582672" cy="115.50492808134004" r="1" preserveAspectRatio="none" x="594" y="87" width="57.54611514812745" height="57.54611514812745" xlink:href="http://MyURL/service/maps/getDetails/../chart?cht=pc&chco=ee3324CC|ed8000CC&chd=t:0,100&chs=150x150&chf=bg,s,00000000,o,4,00000040" style="opacity: 1" fill="#000000" fill-opacity="1" stroke="#000000" stroke-opacity="1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
        <image id="OpenLayers_Geometry_Point_110" cx="437.6028635396797" cy="115.08515270121279" r="1" preserveAspectRatio="none" x="412" y="90" width="50.648406931246505" height="50.648406931246505" xlink:href="http://MyURL/service/maps/getDetails/../chart?cht=p&chco=ee3324CC|ed8000CC&chd=t:0,100&chs=150x150&chf=bg,s,00000000,o,4,00000040" style="opacity: 1" fill="#000000" fill-opacity="1" stroke="#000000" stroke-opacity="1" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
    </g>
        <g id="OpenLayers_Layer_Vector_98_troot"/>
    </g>
</svg>

0 个答案:

没有答案