根据地址获取经纬度:
城市+地址
http://api.map.qq.com/geoc/?addr="+city+","+address+"&output=jsonp&fr=webapi&cb=soso.maps.ObjectLoader.cbgw31xe4y&t=1323668296402只有地址
http://api.map.qq.com/geoc/?addr="+address+"&output=jsonp&fr=webapi&cb=soso.maps.ObjectLoader.cbgw31xe4y&t=1323668296402根据经纬度获取地图
http://st.map.soso.com/api?size=160*200¢er=${y},${x}&zoom="+zoom+"&markers=${y},${x},S放大、缩小、上移、下移、左移、右移js
<script>
var zoom = 13;
var x=${x};
var y=${y};
function mapZoom() {
if (zoom >= 16) {
return;
}
zoom = zoom + 1;
var ditu = document.getElementById("ditu");
ditu.src = "http://st.map.soso.com/api?size=160*200¢er=${y},${x}&zoom="+zoom+"&markers=${y},${x},S";
ditu.reload();
}
function mapNarrow() {
if (zoom <= 9) {
return;
}
zoom = zoom - 1;
var ditu = document.getElementById("ditu");
ditu.src = "http://st.map.soso.com/api?size=160*200¢er=${y},${x}&zoom="+zoom+"&markers=${y},${x},S";
ditu.reload();
}
function mapleft() {
y = y - 0.004;
var ditu = document.getElementById("ditu");
ditu.src = "http://st.map.soso.com/api?size=160*200¢er="+y+","+x+"&zoom="+zoom+"&markers=${y},${x},S";
ditu.reload();
}
function mapright() {
y = y + 0.004;
var ditu = document.getElementById("ditu");
ditu.src = "http://st.map.soso.com/api?size=160*200¢er="+y+","+x+"&zoom="+zoom+"&markers=${y},${x},S";
ditu.reload();
}
function mapOn() {
x = x + 0.004;
var ditu = document.getElementById("ditu");
ditu.src = "http://st.map.soso.com/api?size=160*200¢er="+y+","+x+"&zoom="+zoom+"&markers=${y},${x},S";
ditu.reload();
}
function mapDown() {
x = x - 0.004;
var ditu = document.getElementById("ditu");
ditu.src = "http://st.map.soso.com/api?size=160*200¢er="+y+","+x+"&zoom="+zoom+"&markers=${y},${x},S";
ditu.reload();
}
</script>