bdMap.js 917 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. function checkhHtml5()
  2. {
  3. if (typeof(Worker) === "undefined")
  4. {
  5. if(navigator.userAgent.indexOf("MSIE 9.0")<=0)
  6. {
  7. alert("请使用: chrome、firefox、safari、IE10 浏览器");
  8. }
  9. }
  10. }
  11. checkhHtml5();
  12. //初始化地图
  13. function initBdMap () {
  14. var map = new BMap.Map("mapContainer",{toolBarVisible:false});
  15. var point = new BMap.Point(116.404, 39.915);
  16. map.loaded = function () {
  17. console.log('map loaded')
  18. };
  19. var map = new BMap.Map('mapContainer');
  20. map.centerAndZoom(new BMap.Point(116.404, 40.10), 10);
  21. map.enableScrollWheelZoom(true);
  22. var mapStyle ={
  23. features: ["road", "building","water","land"],//隐藏地图上的poi
  24. style : "midnight" //设置地图风格为高端黑
  25. };
  26. map.setMapStyle(mapStyle);
  27. }
  28. // 宠物医院
  29. function initHospital() {
  30. console.log(hospitalData)
  31. }
  32. initBdMap();