Eight outpatient department of oral hospital
Booking hotline: 010-123456 /
Address: No. 1 building, 1 Street, No.
{color:#CC5522.Iw_poi_title; font-size:14px; font-weight:bold; overflow:hidden; padding-right:13px; white-space:nowrap}
{font:12px Arial sans-serif,.Iw_poi_content; overflow:visible; padding-top:4px; white-space:-moz-pre-wrap; word-wrap:break-word}
/ / function createmap:
InitMap function () {
(createMap); / / create a map
(setMapEvent); / / setmapevent
(addMapControl); / / addmapcontrol
}
/ / create a map function:
CreateMap function () {
Var map = new BMap.Map ('dituContent'); / / create a map in Baidu map container
Var point = new BMap.Point (116.395645,39.929986); / / define a center point coordinates
Map.centerAndZoom (point, 12); / / center point and coordinate map set and map displayed on the map in the container
Window.map = map; / / map will be stored in the global variable
}
/ / function setmapevent:
SetMapEvent function () {
(map.enableDragging); / / enabled map drag events, enabled by default (not write)
(map.enableScrollWheelZoom); / / enabled map scroll wheel zoom
(map.enableDoubleClickZoom); / / enable mouse double-click to enlarge, enabled by default (not write)
(map.enableKeyboard); / / enabled keyboard arrow keys move the map
}
/ / function addmapcontrol:
AddMapControl function () {
/ / add controls to the map zoom
Ctrl_nav var = BMap.NavigationControl new ({anchor:BMAP_ANCHOR_TOP_LEFT, type:BMAP_NAVIGATION_CONTROL_LARGE});
Map.addControl (ctrl_nav);
/ / map. Addcontrol
Ctrl_ove var = BMap.OverviewMapControl new ({anchor:BMAP_ANCHOR_BOTTOM_RIGHT, isOpen:1});
Map.addControl (ctrl_ove);
/ / map. Addcontrol
Ctrl_sca new = BMap.ScaleControl var ({anchor:BMAP_ANCHOR_BOTTOM_LEFT});
Map.addControl (ctrl_sca);
}
(initMap); / / createmap