企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
- 地图坐标 http://api.map.baidu.com/lbsapi/getpoint/index.html ~~~ <div id="map" style=" width:90%; margin:0 auto;height:500px;"></div> <script src="//api.map.baidu.com/api?v=2.0&ak=M4eExM3AxIcxOdnFGciErtK3"></script> <script> var map = new BMap.Map("map"); var point = new BMap.Point(120.587034,31.293345); map.centerAndZoom(point, 17); var myIcon = new BMap.Icon("https://ss0.bdstatic.com/5aV1bjqh_Q23odCf/static/superman/img/logo_top_ca79a146.png", new BMap.Size(200,110)); var marker = new BMap.Marker(point, { icon: myIcon }); // 创建标注 map.addOverlay(marker); // 将标注添加到地图中 marker.setAnimation(BMAP_ANIMATION_BOUNCE); //跳动的动画 marker.setOffset(new BMap.Size(0, -55)); var sContent = "<h3 style='color: #0c5b90;font-size:18px; padding:10px 0;'>中国农业银行</h3>" + "<p style='margin-bottom: 0;'>地址:前进中路100号</p>"; marker.addEventListener("click", function () { map.openInfoWindow(new BMap.InfoWindow(sContent), point); //开启信息窗口 }); </script> ~~~ - 腾讯地图 ~~~ <script charset="utf-8" src="//map.qq.com/api/js?v=2.exp"></script> <script> var init = function() { var center = new qq.maps.LatLng(120,120); var map = new qq.maps.Map(document.getElementById('container'),{ center: center, zoom: 16 }); var infoWin = new qq.maps.InfoWindow({ map: map }); infoWin.open(); //tips 自定义内容 infoWin.setContent('<div style="width:200px;padding-top:10px;">内容</div>'); infoWin.setPosition(center); } </script> ~~~ 高德地图 ~~~ 浏览器js b4fb01539aeff5eb439643ad3c8be6c5 服务器端 6812110e232abd4f53d345bed23a90d3 https://restapi.amap.com/v3/ip?key=6812110e232abd4f53d345bed23a90d3&ip=114.218.66.167 { "status": "1", "info": "OK", "infocode": "10000", "province": "江苏省", "city": "苏州市", "adcode": "320500", "rectangle": "120.4473102,31.15503121;120.8443308,31.49484731" } ~~~ 百度地图 ~~~ https://api.map.baidu.com/location/ip?ip=110.87.83.15&ak=M4eExM3AxIcxOdnFGciErtK3&coor=bd09ll { "address": "CN|江苏|苏州|None|CHINANET|0|0", "content": { "address": "江苏省苏州市", "address_detail": { "city": "苏州市", "city_code": 224, "district": "", "province": "江苏省", "street": "", "street_number": "" }, "point": { "x": "120.61990712", "y": "31.31798737" } }, "status": 0 } ~~~ 腾讯地图 ~~~ https://apis.map.qq.com/ws/location/v1/ip?ip=202.115.81.246&key=ACEBZ-FDXWP-WFRDV-VGS5Q-S2Q5K-HQBNA { "status": 0, "message": "query ok", "result": { "ip": "114.218.66.167", "location": { "lat": 31.38475, "lng": 120.98181 }, "ad_info": { "nation": "中国", "province": "江苏省", "city": "苏州市", "district": "昆山市", "adcode": 320583 } } } ~~~