In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "what is the javascript function used by Baidu Map". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "what is the javascript function used by Baidu Map"?
Collation of js functions used in Baidu Maps developed by javascript
/ / create and initialize map function: function initMap () {createMap (); / / create map setMapEvent (); / / set map event addMapControl (); / / add control addMarker () to map; / / add marker} / / create map function: function createMap () {var map = new BMap.Map ("container") / / create a map var point = new BMap.Point (116.395645 map.centerAndZoom 39.929986) in the Baidu map container; / / define a center point coordinate map.centerAndZoom (point,12); / / set the center point and coordinates of the map and display the map in the map container window.map = map / / store the map variable in the global} / / Map event setting function: function setMapEvent () {map.enableDragging (); / enable the map drag event, and enable (but not write) map.enableScrollWheelZoom (); / / enable the map wheel to zoom in and out of map.enableDoubleClickZoom (); / / enable mouse double click to zoom in, and enable (but not write) map.enableKeyboard () by default / / enable the keyboard keys to move the map around} / / add a function to the map control: function addMapControl () {/ / add a zoom control var ctrl_nav = new BMap.NavigationControl ({anchor:BMAP_ANCHOR_TOP_LEFT,type:BMAP_NAVIGATION_CONTROL_LARGE}); map.addControl (ctrl_nav) / / add thumbnail controls var ctrl_ove = new BMap.OverviewMapControl ({anchor:BMAP_ANCHOR_BOTTOM_RIGHT,isOpen:1}); map.addControl (ctrl_ove); / / add scale bar controls var ctrl_sca = new BMap.ScaleControl ({anchor:BMAP_ANCHOR_BOTTOM_LEFT}); map.addControl (ctrl_sca) to the map } / / Annotation points array var markerArr = [{title: "my Mark", content: "my remarks", point: "116.354539 | 39.970253", isOpen:0,icon: {were2l var 21LRO LRV 0LRO LRV 0LRO LRV 6LBRO}}]; / create marker function addMarker () {for (var item0teri)
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.