离线地图解决方案(一):加载瓦片地图
当前主流的在线地图有百度、高德、天地图、腾讯地图、google地图等。针对局域网内网内脱离要脱离互联网访问的应用,需要下载这些主流厂商的瓦片数据。网上有很多地图下载器软件可以下载地图瓦片,可以通过各种方式获取到这些地图厂商的瓦片数据。
加载高德离线瓦片数据:

加载高德街道瓦片:

加载瓦片地图代码:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<title>加载高德影像</title>
<link rel="stylesheet" href="plugin/ol3/css/ol.css" type="text/css" />
<style>
html, body, #div_gis {
width: 100%;
height: 100%;
overflow: hidden;
margin: 0;
font-family: "微软雅黑";
}
</style>
<script type="text/javascript" src="plugin/ol3/build/ol-debug.js"></script>
<script type="text/javascript" src="js/Config.js"></script>
<script type="text/javascript" src="js/PrivateFunction.js"></script>
</head>
<body>
<div id="div_gis">
</div>
</body>
</html>
<script type="text/javascript">
LoadGaodeTileMap(1, 'div_gis', 1, 11, 8, 103.964571, 30.245677);
</script>
前端采用openlayers,对地图加载进行了二次封装,如有需要请联系qq:8313632
浙公网安备 33010602011771号