You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
/**
* 离线API初始化, 请在加载map3.0.js之前引入
*/
/**
* 这是必须要确认的配置
* 瓦片图必须是png图像
*/
var bmapConfig = {
'tiles_path' : '' , //显示普通地图,为空默认在 tiles/ 目录
'tiles_satellite_path' : '' , //显示卫星影像,为空默认在 tiles_satellite/ ,只有底图没有地址标注
'tiles_hybrid_path' : '' //显示带有街道的卫星影像,为空默认在 tiles_hybrid/,需和卫星影像配合使用
} ;
//获得API主目录, 一般不需要修改
var scripts = document . getElementsByTagName ( "script" ) ;
var _JS _ _FILE _ _ = scripts [ scripts . length - 1 ] . getAttribute ( "src" ) ;
bmapConfig . home _dir = _JS _ _FILE _ _ . substr ( 0 , _JS _ _FILE _ _ . lastIndexOf ( "/" ) ) ;
if ( bmapConfig . tiles _path . length == 0 ) {
bmapConfig . tiles _path = bmapConfig . home _dir + "/tiles" ;
}
if ( bmapConfig . tiles _satellite _path . length == 0 ) {
bmapConfig . tiles _satellite _path = bmapConfig . home _dir + "/tiles_satellite" ;
}
if ( bmapConfig . tiles _hybrid _path . length == 0 ) {
bmapConfig . tiles _hybrid _path = bmapConfig . home _dir + "/tiles_hybird" ;
}
//调试日志,请保留
function bmapLog ( s ) {
if ( typeof console != 'undefined' )
console . log ( '>>> ' + s ) ;
}