1. First to register a gold map, and then become a developer
2. Get your own key value in the console
3. Add the following code to the page where you want to display the map
<script type= "Text/javascript" src= "Https://cache.amap.com/lbs/static/addToolbar.js" ></script>
<script src= "//webapi.amap.com/ui/1.0/main.js" ></script>
<div id= "Container" style= "height:600px" ></div>
<script>
var ToolBar;
var custommarker = new Amap.marker ({
Offset:new Amap.pixel (-14,-34),//position relative to base point
Icon:new Amap.icon ({//Complex icon
Size:new Amap.size (27, 36),//Icon size
Image: "Http://webapi.amap.com/images/custom_a_j.png",//Large map address
Imageoffset:new Amap.pixel (-28, 0)//drawing position relative to large map
})
});
var map = new Amap.map (' container ', {
Resizeenable:true,
Zoom:11,
Center: [116.397428, 39.90923]
});
Amap.plugin ([' Amap.toolbar ', ' amap.scale ', ' Amap.overview '),
function () {
Map.addcontrol (New Amap.toolbar ());
Map.addcontrol (New Amap.scale ());
Map.addcontrol (New Amap.overview ({isopen:true}));
});
</script>
4. Add a page header after login
<link rel= "stylesheet" href= "Http://cache.amap.com/lbs/static/main1119.css"/>
<script src= "http://webapi.amap.com/maps?v=1.4.2&key= your Key value" ></script>
Upload a german map-express frame