index.html
<!DOCTYPE html>
<html>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>底图与地理投影 - 百度地图</title>
<link rel="icon" href="/examples/static/resource/image/favicon.png" />
<style type="text/css">
html,body{margin:0px;height:100%;width:100%}
.container{width:100%;height:100%}
</style>
<link rel="stylesheet" href="//rd.sz-map.com/libs/gm/gl/gl.min.css">
<script type="text/javascript" src="//rd.sz-map.com/libs/gm/gl/gl.min.js"></script>
<body>
<div id="map" class="container"></div>
<script>
function initMap() {
this.map = new GL.Map('map', {
center: "120.650847,31.3092434",
zoom: 12,
zoomControl: false,
scaleControl: false
});
// 百度默认提供了多种 style: normal,light,dark,redalert,googlelite,grassgreen,midnight,pink,darkgreen,bluish,grayscale,hardedge
var baseLayer = GL.LayerLookup.createBaiduTiledLayer(null, { style: 'normal' });
this.map.addBaseLayer(baseLayer);
}
GL.init(initMap, '/examples/static/conf.json');
</script>
</body>
</html>