<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=(需要自己去高德官网获取)"></script><script type="text/javascript"> var map = new AMap.Map('mapContainer', { resizeEnable: true }) map.plugin…
所需东西:高德地图的key 注意:这个key是 web服务的key  和js的key不是一个key(若没有则自行创建,创建教程在文末) 高德地图的api文档:https://lbs.amap.com/api/webservice/guide/api/ipconfig/ 新建工具类如下:(调用时传IP地址即可获取对应城市编码或其他信息) package com.test.utils.gaode; import com.alibaba.fastjson.JSONException; import c…
<!DOCTYPE html> <html lang="zh-cmn-Hans">     <meta charset="UTF-8">     <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">     <title>HTML5页面直接调用百度地图AP…
<!DOCTYPE html> <html lang="zh-cmn-Hans"> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0"> <title>HTML5页面直接调用百度地图API,获取当前位置,直接导…
前言: 最近项目中用到了全国省市区三级信息,但是网上找到的信息都是比较旧的信息.与现在最新的地区信息匹配不上.后来想到高德地图上可能有这些信息.所以解析了一下api接口,生成了相关省市区的sql信息.(注意:这里面没有港台地区)具体的请参看高德地图文档. alibaba.fastjson解析+mysql表 1.高德地图api调用接口说明文档:https://lbs.amap.com/api/webservice/guide/api/district/#limit 具体数据接口: https://…
1 申请密匙 注册百度地图API:http://lbsyun.baidu.com/index.php?title=webapi 点击左侧 “获取密匙” ,经过填写个人信息.邮箱注册等,成功之后在开放平台上点击“创建应用”,填写相关信息,在这里特别说明的是,在IP白名单框里,如果不清楚自己的IP地址,最好设置为:*.提交后,在你创建应用的访问应用(AK)那一栏就是你的密钥. 2 构造经纬度获取函数 使用百度Web服务API下的Geocoding API接口来获取你所需要地址的经纬度坐标接口文档见:…
1.建立行政区规划清单表 use edw; drop table if exists dim_prov_city_adcode; create table if not exists dim_prov_city_adcode ( prov_nm ), city_nm ), county_nm ), prov_code ), county_code ), adcode ), alias_nm ) ) ENGINE=InnoDB default CHARSET=utf8; --alter table…
<!DOCTYPE html> <html>     <head>         <meta charset="UTF-8">                  <script src="http://cdn.bootcss.com/jquery/2.1.1/jquery.min.js"></script>         <!--调用百度地图api-->         <…
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <style type…
var city = $('#city')[0].value; AMap.plugin(['AMap.Autocomplete'],function(){ var autoOptions = { city: city, input: community, }; autocomplete= new AMap.Autocomplete(autoOptions); AMap.event.addListener(autocomplete, "select", function(e){ $('#…