map {
width: 100%;
position: fixed;
top: 0px;
bottom: 0px;
line-height: 200px;
text-align: center;
background: #FFFFFF;
}
let map = null;
mui.init();
mui.plusReady(function() {
map = new plus.maps.Map('map');
map.showUserLocation(true);
// map.getUserLocation(function(state, point) {
// if(0 == state) {
// createMarker(point);
// }
// });
plus.geolocation.getCurrentPosition(function(p) {
let point = new plus.maps.Point(p.coords.longitude, p.coords.latitude);
createMarker(point);
map.centerAndZoom(point, 19);
}, function(e) {}, {provider: "baidu"});
});
function createMarker(point) {
let marker=new plus.maps.Marker(point);
marker.setIcon("marker.png");
map.addOverlay(marker);
console.log(point.getLng() + ',' + point.getLat());
}