JavaScript API GL betaに複数のMarkerとInfoWindowを追加します.
74584 ワード
"Content-Type" content="text/html; charset=utf-8">
"width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" name="viewport" />
"yes" name="apple-mobile-web-app-capable" />
"black" name="apple-mobile-web-app-status-bar-style" />
"telephone=no" name="format-detection" />
Hello world!
class="mapContainer">
"container">
"</span><span style="color:#800000;">https://map.qq.com/api/gljs?v=1.exp&key=P3YBZ-MKDHX-XJU4P-7OEMU-X6Z25-EEBPH</span><span style="color:#800000;">"</span>>
<span style="color:#008000;">//</span><span style="color:#008000;"> , init, </span>
<span style="color:#000000;"> function initMap() {
</span><span style="color:#008000;">//</span><span style="color:#008000;">
</span><span style="color:#008000;">//</span><span style="color:#008000;">
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 27.56974,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 110.0016</span>
<span style="color:#0000ff;">var</span> center = <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">27.56974</span>, <span style="color:#800080;">110.0016</span><span style="color:#000000;">)
</span><span style="color:#008000;">//</span><span style="color:#008000;"> map , TMap.Map() </span>
<span style="color:#0000ff;">var</span> map = <span style="color:#0000ff;">new</span> TMap.Map(document.getElementById(<span style="color:#800000;">'</span><span style="color:#800000;">container</span><span style="color:#800000;">'</span><span style="color:#000000;">), {
center: center,</span><span style="color:#008000;">//</span><span style="color:#008000;"> </span>
zoom: <span style="color:#800080;">8.5</span>, <span style="color:#008000;">//</span><span style="color:#008000;"> </span>
pitch: <span style="color:#800080;">43.5</span>, <span style="color:#008000;">//</span><span style="color:#008000;"> </span>
rotation: <span style="color:#800080;">45</span> <span style="color:#008000;">//</span><span style="color:#008000;"> </span>
<span style="color:#000000;"> });
</span><span style="color:#008000;">//</span><span style="color:#008000;"> marker</span>
<span style="color:#0000ff;">var</span> marker = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.MultiMarker({
id: </span><span style="color:#800000;">"</span><span style="color:#800000;">marker-layer</span><span style="color:#800000;">"</span>, <span style="color:#008000;">//</span><span style="color:#008000;"> id</span>
<span style="color:#000000;"> map: map,
styles: { </span><span style="color:#008000;">//</span><span style="color:#008000;"> </span>
<span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.MarkerStyle({
</span><span style="color:#800000;">"</span><span style="color:#800000;">width</span><span style="color:#800000;">"</span>: <span style="color:#800080;">25</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">height</span><span style="color:#800000;">"</span>: <span style="color:#800080;">35</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">anchor</span><span style="color:#800000;">"</span>: { x: <span style="color:#800080;">16</span>, y: <span style="color:#800080;">32</span><span style="color:#000000;"> },
</span><span style="color:#800000;">"</span><span style="color:#800000;">src</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">./imgtest/markIcon.png</span><span style="color:#800000;">"</span><span style="color:#000000;">
})
},
geometries: [{ </span><span style="color:#008000;">//</span><span style="color:#008000;">
</span><span style="color:#008000;">//</span><span style="color:#008000;">
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 26.99078,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 111.27382</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">1</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">26.99078</span>, <span style="color:#800080;">111.27382</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;">
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 27.11402,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 111.03249</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">2</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">27.11402</span>, <span style="color:#800080;">111.03249</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;">
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 27.06038,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 110.57583</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">3</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">27.06038</span>, <span style="color:#800080;">110.57583</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;">
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 26.43346,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 110.85674</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">4</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">26.43346</span>, <span style="color:#800080;">110.85674</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;"> " ",
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 26.39156,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 110.32285</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">5</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">26.39156</span>, <span style="color:#800080;">110.32285</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;"> " "
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 29.39971,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 110.16428</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">6</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">29.39971</span>, <span style="color:#800080;">110.16428</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;"> " ",
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 28.45277,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 110.39388</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">7</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">28.45277</span>, <span style="color:#800080;">110.39388</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;"> " "
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 27.90834,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 110.59486</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">8</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">27.90834</span>, <span style="color:#800080;">110.59486</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;"> " "
</span><span style="color:#008000;">//</span><span style="color:#008000;">"lat": 27.86555,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 109.80256</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">9</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">27.86555</span>, <span style="color:#800080;">109.80256</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;"> " "
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 26.15794,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 109.78449</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">10</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">26.15794</span>, <span style="color:#800080;">109.78449</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "fullname": " "
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 28.21639,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 110.21965</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">11</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">28.21639</span>, <span style="color:#800080;">110.21965</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "fullname": " "
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 27.94843,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 109.59832</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">12</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">27.94843</span>, <span style="color:#800080;">109.59832</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "fullname": " "
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 28.70001,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 109.66054</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">13</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">28.70001</span>, <span style="color:#800080;">109.66054</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "fullname": " "
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 28.61711,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 109.95085</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">14</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">28.61711</span>, <span style="color:#800080;">109.95085</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "fullname": " "
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 29.00515,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 109.84807</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">15</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">29.00515</span>, <span style="color:#800080;">109.84807</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "fullname": " "
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 29.4579,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 109.44387</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">16</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">29.4579</span>, <span style="color:#800080;">109.44387</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "fullname": " "
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 28.57211,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 109.48224</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">17</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">28.57211</span>, <span style="color:#800080;">109.48224</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "fullname": " "
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 27.72663,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 111.32743</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">18</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">27.72663</span>, <span style="color:#800080;">111.32743</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
},{
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "fullname": " "
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lat": 27.69271,
</span><span style="color:#008000;">//</span><span style="color:#008000;"> "lng": 111.66446</span>
<span style="color:#800000;">"</span><span style="color:#800000;">id</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">19</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">styleId</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">,
</span><span style="color:#800000;">"</span><span style="color:#800000;">position</span><span style="color:#800000;">"</span>: <span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">27.69271</span>, <span style="color:#800080;">111.66446</span><span style="color:#000000;">),
</span><span style="color:#800000;">"</span><span style="color:#800000;">properties</span><span style="color:#800000;">"</span><span style="color:#000000;">: {
</span><span style="color:#800000;">"</span><span style="color:#800000;">title</span><span style="color:#800000;">"</span>: <span style="color:#800000;">"</span><span style="color:#800000;">marker</span><span style="color:#800000;">"</span><span style="color:#000000;">
}
}]
});
</span><span style="color:#008000;">//</span><span style="color:#008000;"> </span>
marker.on(<span style="color:#800000;">"</span><span style="color:#800000;">click</span><span style="color:#800000;">"</span><span style="color:#000000;">, function (evt) {
</span><span style="color:#0000ff;">var</span> markCenter = evt.geometry.position; <span style="color:#008000;">//</span><span style="color:#008000;">
</span><span style="color:#008000;">//</span><span style="color:#008000;"> infoWindow
</span><span style="color:#008000;">//</span><span style="color:#008000;">infoWindow.open(); </span><span style="color:#008000;">//</span><span style="color:#008000;">
</span><span style="color:#008000;">//</span><span style="color:#008000;">infoWindow.setPosition(evt.geometry.position);</span><span style="color:#008000;">//</span><span style="color:#008000;">
</span><span style="color:#008000;">//</span><span style="color:#008000;">infoWindow.setContent(evt.geometry.position.toString());</span><span style="color:#008000;">//</span><span style="color:#008000;"> </span>
<span style="color:#000000;"> console.log(evt.geometry.position.toString());
</span><span style="color:#008000;">//</span><span style="color:#008000;"> console.log(markCenter.getLat().toFixed(5))
</span><span style="color:#008000;">//</span><span style="color:#008000;"> console.log((parseFloat(markCenter.getLat().toFixed(5))+0.02).toFixed(5));
</span><span style="color:#008000;">//</span><span style="color:#008000;"> console.log(markCenter.getLng().toFixed(6))
</span><span style="color:#008000;">//</span><span style="color:#008000;"> console.log((parseFloat(markCenter.getLng().toFixed(6))+0.02).toFixed(6));</span>
<span style="color:#0000ff;">var</span> ne = <span style="color:#0000ff;">new</span> TMap.LatLng((parseFloat(markCenter.getLat().toFixed(<span style="color:#800080;">6</span>))+<span style="color:#800080;">0.04</span>).toFixed(<span style="color:#800080;">6</span>),(parseFloat(markCenter.getLng().toFixed(<span style="color:#800080;">6</span>))+<span style="color:#800080;">0.04</span>).toFixed(<span style="color:#800080;">6</span>));<span style="color:#008000;">//</span><span style="color:#008000;"> </span>
<span style="color:#0000ff;">var</span> sw = <span style="color:#0000ff;">new</span> TMap.LatLng((parseFloat(markCenter.getLat().toFixed(<span style="color:#800080;">6</span>))-<span style="color:#800080;">0.04</span>).toFixed(<span style="color:#800080;">6</span>),(parseFloat(markCenter.getLng().toFixed(<span style="color:#800080;">6</span>))-<span style="color:#800080;">0.04</span>).toFixed(<span style="color:#800080;">6</span>));<span style="color:#008000;">//</span><span style="color:#008000;">
</span><span style="color:#008000;">//</span><span style="color:#008000;"> console.log(ne);
</span><span style="color:#008000;">//</span><span style="color:#008000;"> console.log(sw);</span>
<span style="color:#0000ff;">var</span> latLngBounds = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.LatLngBounds(sw, ne)
map.fitBounds(latLngBounds); </span><span style="color:#008000;">//</span><span style="color:#008000;"> </span>
<span style="color:#000000;"> })
</span><span style="color:#008000;">//</span><span style="color:#008000;"> infoWindow
</span><span style="color:#008000;">//</span><span style="color:#008000;"> infoWindow</span>
<span style="color:#0000ff;">var</span> infoWindow1 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">26.99078</span>, <span style="color:#800080;">111.27382</span><span style="color:#000000;">),
content: </span><span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/1.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">,
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span> } <span style="color:#008000;">//</span><span style="color:#008000;"> position , Marker </span>
<span style="color:#000000;"> });
</span><span style="color:#0000ff;">var</span> infoWindow2 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">27.11402</span>, <span style="color:#800080;">111.03249</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span> }, <span style="color:#008000;">//</span><span style="color:#008000;"> position , Marker </span>
content: <span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
</span><span style="color:#0000ff;">var</span> infoWindow3 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">27.06038</span>, <span style="color:#800080;">110.57583</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span> }, <span style="color:#008000;">//</span><span style="color:#008000;"> position , Marker </span>
content: <span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
</span><span style="color:#0000ff;">var</span> infoWindow4 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">26.43346</span>, <span style="color:#800080;">110.85674</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span><span style="color:#000000;"> },
content: </span><span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
</span><span style="color:#0000ff;">var</span> infoWindow5 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">26.39156</span>, <span style="color:#800080;">110.32285</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span><span style="color:#000000;"> },
content: </span><span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
</span><span style="color:#0000ff;">var</span> infoWindow6 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">29.39971</span>, <span style="color:#800080;">110.16428</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span><span style="color:#000000;"> },
content: </span><span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
</span><span style="color:#0000ff;">var</span> infoWindow7 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">28.45277</span>, <span style="color:#800080;">110.39388</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span><span style="color:#000000;"> },
content: </span><span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
</span><span style="color:#0000ff;">var</span> infoWindow8 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">27.90834</span>, <span style="color:#800080;">110.59486</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span><span style="color:#000000;"> },
content: </span><span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
</span><span style="color:#0000ff;">var</span> infoWindow9 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">27.86555</span>, <span style="color:#800080;">109.80256</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span><span style="color:#000000;"> },
content: </span><span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
</span><span style="color:#0000ff;">var</span> infoWindow10 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">26.15794</span>, <span style="color:#800080;">109.78449</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span><span style="color:#000000;"> },
content: </span><span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
</span><span style="color:#0000ff;">var</span> infoWindow11 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">28.21639</span>, <span style="color:#800080;">110.21965</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span><span style="color:#000000;"> },
content: </span><span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
</span><span style="color:#0000ff;">var</span> infoWindow12 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">27.94843</span>, <span style="color:#800080;">109.59832</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span><span style="color:#000000;"> },
content: </span><span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
</span><span style="color:#0000ff;">var</span> infoWindow13 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">28.70001</span>, <span style="color:#800080;">109.66054</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span><span style="color:#000000;"> },
content: </span><span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
</span><span style="color:#0000ff;">var</span> infoWindow14 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">28.61711</span>, <span style="color:#800080;">109.95085</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span><span style="color:#000000;"> },
content: </span><span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
</span><span style="color:#0000ff;">var</span> infoWindow15 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">29.00515</span>, <span style="color:#800080;">109.84807</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span><span style="color:#000000;"> },
content: </span><span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
</span><span style="color:#0000ff;">var</span> infoWindow16 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">29.4579</span>, <span style="color:#800080;">109.44387</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span><span style="color:#000000;"> },
content: </span><span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
</span><span style="color:#0000ff;">var</span> infoWindow17 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">28.57211</span>, <span style="color:#800080;">109.48224</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span><span style="color:#000000;"> },
content: </span><span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
</span><span style="color:#0000ff;">var</span> infoWindow18 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">27.72663</span>, <span style="color:#800080;">111.32743</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span><span style="color:#000000;"> },
content: </span><span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
</span><span style="color:#0000ff;">var</span> infoWindow19 = <span style="color:#0000ff;">new</span><span style="color:#000000;"> TMap.InfoWindow({
map: map,
position: </span><span style="color:#0000ff;">new</span> TMap.LatLng(<span style="color:#800080;">27.69271</span>, <span style="color:#800080;">111.66446</span><span style="color:#000000;">),
offset: { x: </span><span style="color:#800080;">0</span>, y: -<span style="color:#800080;">8</span><span style="color:#000000;"> },
content: </span><span style="color:#800000;">"</span><span style="color:#800000;"><a href='#' target='_blank' style='text-decoration: none;color: #666;font-size: 12px;'><img src='./imgtest/2.png' width='50'><p> </p></a></span><span style="color:#800000;">"</span><span style="color:#000000;">
});
}
window.onload</span>=<span style="color:#000000;">function(){
initMap()
}
</span>
ps:Markerビューエリアをクリックして自動的に中央に位置します.転載先:https://www.cnblogs.com/Jayeblog/p/11534411.html