diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls1d3.gif b/static/BMap/images/mapctrls1d3.gif deleted file mode 100644 index 522c6f8..0000000 --- a/static/BMap/images/mapctrls1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls1d3.gif b/static/BMap/images/mapctrls1d3.gif deleted file mode 100644 index 522c6f8..0000000 --- a/static/BMap/images/mapctrls1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls2d0.png b/static/BMap/images/mapctrls2d0.png deleted file mode 100644 index fc6b518..0000000 --- a/static/BMap/images/mapctrls2d0.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls1d3.gif b/static/BMap/images/mapctrls1d3.gif deleted file mode 100644 index 522c6f8..0000000 --- a/static/BMap/images/mapctrls1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls2d0.png b/static/BMap/images/mapctrls2d0.png deleted file mode 100644 index fc6b518..0000000 --- a/static/BMap/images/mapctrls2d0.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/marker_red_sprite.png b/static/BMap/images/marker_red_sprite.png deleted file mode 100644 index 38a5900..0000000 --- a/static/BMap/images/marker_red_sprite.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls1d3.gif b/static/BMap/images/mapctrls1d3.gif deleted file mode 100644 index 522c6f8..0000000 --- a/static/BMap/images/mapctrls1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls2d0.png b/static/BMap/images/mapctrls2d0.png deleted file mode 100644 index fc6b518..0000000 --- a/static/BMap/images/mapctrls2d0.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/marker_red_sprite.png b/static/BMap/images/marker_red_sprite.png deleted file mode 100644 index 38a5900..0000000 --- a/static/BMap/images/marker_red_sprite.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/openhand.cur b/static/BMap/images/openhand.cur deleted file mode 100644 index cb444f9..0000000 --- a/static/BMap/images/openhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls1d3.gif b/static/BMap/images/mapctrls1d3.gif deleted file mode 100644 index 522c6f8..0000000 --- a/static/BMap/images/mapctrls1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls2d0.png b/static/BMap/images/mapctrls2d0.png deleted file mode 100644 index fc6b518..0000000 --- a/static/BMap/images/mapctrls2d0.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/marker_red_sprite.png b/static/BMap/images/marker_red_sprite.png deleted file mode 100644 index 38a5900..0000000 --- a/static/BMap/images/marker_red_sprite.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/openhand.cur b/static/BMap/images/openhand.cur deleted file mode 100644 index cb444f9..0000000 --- a/static/BMap/images/openhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.jpg b/static/BMap/images/simulator.jpg deleted file mode 100644 index 7eccb40..0000000 --- a/static/BMap/images/simulator.jpg +++ /dev/null Binary files differ diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls1d3.gif b/static/BMap/images/mapctrls1d3.gif deleted file mode 100644 index 522c6f8..0000000 --- a/static/BMap/images/mapctrls1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls2d0.png b/static/BMap/images/mapctrls2d0.png deleted file mode 100644 index fc6b518..0000000 --- a/static/BMap/images/mapctrls2d0.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/marker_red_sprite.png b/static/BMap/images/marker_red_sprite.png deleted file mode 100644 index 38a5900..0000000 --- a/static/BMap/images/marker_red_sprite.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/openhand.cur b/static/BMap/images/openhand.cur deleted file mode 100644 index cb444f9..0000000 --- a/static/BMap/images/openhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.jpg b/static/BMap/images/simulator.jpg deleted file mode 100644 index 7eccb40..0000000 --- a/static/BMap/images/simulator.jpg +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.png b/static/BMap/images/simulator.png deleted file mode 100644 index 981b8d7..0000000 --- a/static/BMap/images/simulator.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls1d3.gif b/static/BMap/images/mapctrls1d3.gif deleted file mode 100644 index 522c6f8..0000000 --- a/static/BMap/images/mapctrls1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls2d0.png b/static/BMap/images/mapctrls2d0.png deleted file mode 100644 index fc6b518..0000000 --- a/static/BMap/images/mapctrls2d0.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/marker_red_sprite.png b/static/BMap/images/marker_red_sprite.png deleted file mode 100644 index 38a5900..0000000 --- a/static/BMap/images/marker_red_sprite.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/openhand.cur b/static/BMap/images/openhand.cur deleted file mode 100644 index cb444f9..0000000 --- a/static/BMap/images/openhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.jpg b/static/BMap/images/simulator.jpg deleted file mode 100644 index 7eccb40..0000000 --- a/static/BMap/images/simulator.jpg +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.png b/static/BMap/images/simulator.png deleted file mode 100644 index 981b8d7..0000000 --- a/static/BMap/images/simulator.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/st-close.png b/static/BMap/images/st-close.png deleted file mode 100644 index b516fa2..0000000 --- a/static/BMap/images/st-close.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls1d3.gif b/static/BMap/images/mapctrls1d3.gif deleted file mode 100644 index 522c6f8..0000000 --- a/static/BMap/images/mapctrls1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls2d0.png b/static/BMap/images/mapctrls2d0.png deleted file mode 100644 index fc6b518..0000000 --- a/static/BMap/images/mapctrls2d0.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/marker_red_sprite.png b/static/BMap/images/marker_red_sprite.png deleted file mode 100644 index 38a5900..0000000 --- a/static/BMap/images/marker_red_sprite.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/openhand.cur b/static/BMap/images/openhand.cur deleted file mode 100644 index cb444f9..0000000 --- a/static/BMap/images/openhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.jpg b/static/BMap/images/simulator.jpg deleted file mode 100644 index 7eccb40..0000000 --- a/static/BMap/images/simulator.jpg +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.png b/static/BMap/images/simulator.png deleted file mode 100644 index 981b8d7..0000000 --- a/static/BMap/images/simulator.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/st-close.png b/static/BMap/images/st-close.png deleted file mode 100644 index b516fa2..0000000 --- a/static/BMap/images/st-close.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/well-gas.svg b/static/BMap/images/well-gas.svg deleted file mode 100644 index 50cdd83..0000000 --- a/static/BMap/images/well-gas.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls1d3.gif b/static/BMap/images/mapctrls1d3.gif deleted file mode 100644 index 522c6f8..0000000 --- a/static/BMap/images/mapctrls1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls2d0.png b/static/BMap/images/mapctrls2d0.png deleted file mode 100644 index fc6b518..0000000 --- a/static/BMap/images/mapctrls2d0.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/marker_red_sprite.png b/static/BMap/images/marker_red_sprite.png deleted file mode 100644 index 38a5900..0000000 --- a/static/BMap/images/marker_red_sprite.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/openhand.cur b/static/BMap/images/openhand.cur deleted file mode 100644 index cb444f9..0000000 --- a/static/BMap/images/openhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.jpg b/static/BMap/images/simulator.jpg deleted file mode 100644 index 7eccb40..0000000 --- a/static/BMap/images/simulator.jpg +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.png b/static/BMap/images/simulator.png deleted file mode 100644 index 981b8d7..0000000 --- a/static/BMap/images/simulator.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/st-close.png b/static/BMap/images/st-close.png deleted file mode 100644 index b516fa2..0000000 --- a/static/BMap/images/st-close.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/well-gas.svg b/static/BMap/images/well-gas.svg deleted file mode 100644 index 50cdd83..0000000 --- a/static/BMap/images/well-gas.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-heat.svg b/static/BMap/images/well-heat.svg deleted file mode 100644 index baee123..0000000 --- a/static/BMap/images/well-heat.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls1d3.gif b/static/BMap/images/mapctrls1d3.gif deleted file mode 100644 index 522c6f8..0000000 --- a/static/BMap/images/mapctrls1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls2d0.png b/static/BMap/images/mapctrls2d0.png deleted file mode 100644 index fc6b518..0000000 --- a/static/BMap/images/mapctrls2d0.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/marker_red_sprite.png b/static/BMap/images/marker_red_sprite.png deleted file mode 100644 index 38a5900..0000000 --- a/static/BMap/images/marker_red_sprite.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/openhand.cur b/static/BMap/images/openhand.cur deleted file mode 100644 index cb444f9..0000000 --- a/static/BMap/images/openhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.jpg b/static/BMap/images/simulator.jpg deleted file mode 100644 index 7eccb40..0000000 --- a/static/BMap/images/simulator.jpg +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.png b/static/BMap/images/simulator.png deleted file mode 100644 index 981b8d7..0000000 --- a/static/BMap/images/simulator.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/st-close.png b/static/BMap/images/st-close.png deleted file mode 100644 index b516fa2..0000000 --- a/static/BMap/images/st-close.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/well-gas.svg b/static/BMap/images/well-gas.svg deleted file mode 100644 index 50cdd83..0000000 --- a/static/BMap/images/well-gas.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-heat.svg b/static/BMap/images/well-heat.svg deleted file mode 100644 index baee123..0000000 --- a/static/BMap/images/well-heat.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-power.svg b/static/BMap/images/well-power.svg deleted file mode 100644 index e731bcd..0000000 --- a/static/BMap/images/well-power.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls1d3.gif b/static/BMap/images/mapctrls1d3.gif deleted file mode 100644 index 522c6f8..0000000 --- a/static/BMap/images/mapctrls1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls2d0.png b/static/BMap/images/mapctrls2d0.png deleted file mode 100644 index fc6b518..0000000 --- a/static/BMap/images/mapctrls2d0.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/marker_red_sprite.png b/static/BMap/images/marker_red_sprite.png deleted file mode 100644 index 38a5900..0000000 --- a/static/BMap/images/marker_red_sprite.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/openhand.cur b/static/BMap/images/openhand.cur deleted file mode 100644 index cb444f9..0000000 --- a/static/BMap/images/openhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.jpg b/static/BMap/images/simulator.jpg deleted file mode 100644 index 7eccb40..0000000 --- a/static/BMap/images/simulator.jpg +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.png b/static/BMap/images/simulator.png deleted file mode 100644 index 981b8d7..0000000 --- a/static/BMap/images/simulator.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/st-close.png b/static/BMap/images/st-close.png deleted file mode 100644 index b516fa2..0000000 --- a/static/BMap/images/st-close.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/well-gas.svg b/static/BMap/images/well-gas.svg deleted file mode 100644 index 50cdd83..0000000 --- a/static/BMap/images/well-gas.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-heat.svg b/static/BMap/images/well-heat.svg deleted file mode 100644 index baee123..0000000 --- a/static/BMap/images/well-heat.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-power.svg b/static/BMap/images/well-power.svg deleted file mode 100644 index e731bcd..0000000 --- a/static/BMap/images/well-power.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-rain.svg b/static/BMap/images/well-rain.svg deleted file mode 100644 index f2ef906..0000000 --- a/static/BMap/images/well-rain.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls1d3.gif b/static/BMap/images/mapctrls1d3.gif deleted file mode 100644 index 522c6f8..0000000 --- a/static/BMap/images/mapctrls1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls2d0.png b/static/BMap/images/mapctrls2d0.png deleted file mode 100644 index fc6b518..0000000 --- a/static/BMap/images/mapctrls2d0.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/marker_red_sprite.png b/static/BMap/images/marker_red_sprite.png deleted file mode 100644 index 38a5900..0000000 --- a/static/BMap/images/marker_red_sprite.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/openhand.cur b/static/BMap/images/openhand.cur deleted file mode 100644 index cb444f9..0000000 --- a/static/BMap/images/openhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.jpg b/static/BMap/images/simulator.jpg deleted file mode 100644 index 7eccb40..0000000 --- a/static/BMap/images/simulator.jpg +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.png b/static/BMap/images/simulator.png deleted file mode 100644 index 981b8d7..0000000 --- a/static/BMap/images/simulator.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/st-close.png b/static/BMap/images/st-close.png deleted file mode 100644 index b516fa2..0000000 --- a/static/BMap/images/st-close.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/well-gas.svg b/static/BMap/images/well-gas.svg deleted file mode 100644 index 50cdd83..0000000 --- a/static/BMap/images/well-gas.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-heat.svg b/static/BMap/images/well-heat.svg deleted file mode 100644 index baee123..0000000 --- a/static/BMap/images/well-heat.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-power.svg b/static/BMap/images/well-power.svg deleted file mode 100644 index e731bcd..0000000 --- a/static/BMap/images/well-power.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-rain.svg b/static/BMap/images/well-rain.svg deleted file mode 100644 index f2ef906..0000000 --- a/static/BMap/images/well-rain.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-sewage.svg b/static/BMap/images/well-sewage.svg deleted file mode 100644 index a9a1662..0000000 --- a/static/BMap/images/well-sewage.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls1d3.gif b/static/BMap/images/mapctrls1d3.gif deleted file mode 100644 index 522c6f8..0000000 --- a/static/BMap/images/mapctrls1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls2d0.png b/static/BMap/images/mapctrls2d0.png deleted file mode 100644 index fc6b518..0000000 --- a/static/BMap/images/mapctrls2d0.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/marker_red_sprite.png b/static/BMap/images/marker_red_sprite.png deleted file mode 100644 index 38a5900..0000000 --- a/static/BMap/images/marker_red_sprite.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/openhand.cur b/static/BMap/images/openhand.cur deleted file mode 100644 index cb444f9..0000000 --- a/static/BMap/images/openhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.jpg b/static/BMap/images/simulator.jpg deleted file mode 100644 index 7eccb40..0000000 --- a/static/BMap/images/simulator.jpg +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.png b/static/BMap/images/simulator.png deleted file mode 100644 index 981b8d7..0000000 --- a/static/BMap/images/simulator.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/st-close.png b/static/BMap/images/st-close.png deleted file mode 100644 index b516fa2..0000000 --- a/static/BMap/images/st-close.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/well-gas.svg b/static/BMap/images/well-gas.svg deleted file mode 100644 index 50cdd83..0000000 --- a/static/BMap/images/well-gas.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-heat.svg b/static/BMap/images/well-heat.svg deleted file mode 100644 index baee123..0000000 --- a/static/BMap/images/well-heat.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-power.svg b/static/BMap/images/well-power.svg deleted file mode 100644 index e731bcd..0000000 --- a/static/BMap/images/well-power.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-rain.svg b/static/BMap/images/well-rain.svg deleted file mode 100644 index f2ef906..0000000 --- a/static/BMap/images/well-rain.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-sewage.svg b/static/BMap/images/well-sewage.svg deleted file mode 100644 index a9a1662..0000000 --- a/static/BMap/images/well-sewage.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/js/apiv1.3.min.js b/static/BMap/js/apiv1.3.min.js deleted file mode 100644 index 63c0ac1..0000000 --- a/static/BMap/js/apiv1.3.min.js +++ /dev/null @@ -1,6424 +0,0 @@ -window.BMAP_AUTHENTIC_KEY = ""; -(function() { - var b2, a8 = b2 = a8 || { - version : "1.3.4" - }; - a8.guid = "$BAIDU$"; - window[a8.guid] = window[a8.guid] || {}; - a8.object = a8.object || {}; - a8.extend = a8.object.extend = function(cM, T) { - for ( var cL in T) { - if (T.hasOwnProperty(cL)) { - cM[cL] = T[cL] - } - } - return cM - }; - a8.dom = a8.dom || {}; - a8.dom.g = function(T) { - if ("string" == typeof T || T instanceof String) { - return document.getElementById(T) - } else { - if (T && T.nodeName && (T.nodeType == 1 || T.nodeType == 9)) { - return T - } - } - return null - }; - a8.g = a8.G = a8.dom.g; - a8.dom.hide = function(T) { - T = a8.dom.g(T); - T.style.display = "none"; - return T - }; - a8.hide = a8.dom.hide; - a8.lang = a8.lang || {}; - a8.lang.isString = function(T) { - return "[object String]" == Object.prototype.toString.call(T) - }; - a8.isString = a8.lang.isString; - a8.dom._g = function(T) { - if (a8.lang.isString(T)) { - return document.getElementById(T) - } - return T - }; - a8._g = a8.dom._g; - a8.dom.contains = function(T, cL) { - var cM = a8.dom._g; - T = cM(T); - cL = cM(cL); - return T.contains ? T != cL && T.contains(cL) : !!(T - .compareDocumentPosition(cL) & 16) - }; - a8.browser = a8.browser || {}; - if (/msie (\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.ie = a8.ie = document.documentMode || +RegExp["\x241"] - } - a8.dom._NAME_ATTRS = (function() { - var T = { - cellpadding : "cellPadding", - cellspacing : "cellSpacing", - colspan : "colSpan", - rowspan : "rowSpan", - valign : "vAlign", - usemap : "useMap", - frameborder : "frameBorder" - }; - if (a8.browser.ie < 8) { - T["for"] = "htmlFor"; - T["class"] = "className" - } else { - T.htmlFor = "for"; - T.className = "class" - } - return T - })(); - a8.dom.setAttr = function(cL, T, cM) { - cL = a8.dom.g(cL); - if ("style" == T) { - cL.style.cssText = cM - } else { - T = a8.dom._NAME_ATTRS[T] || T; - cL.setAttribute(T, cM) - } - return cL - }; - a8.setAttr = a8.dom.setAttr; - a8.dom.setAttrs = function(cM, T) { - cM = a8.dom.g(cM); - for ( var cL in T) { - a8.dom.setAttr(cM, cL, T[cL]) - } - return cM - }; - a8.setAttrs = a8.dom.setAttrs; - a8.string = a8.string || {}; - (function() { - var T = new RegExp( - "(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+\x24)", "g"); - a8.string.trim = function(cL) { - return String(cL).replace(T, "") - } - })(); - a8.trim = a8.string.trim; - a8.string.format = function(cM, T) { - cM = String(cM); - var cL = Array.prototype.slice.call(arguments, 1), cN = Object.prototype.toString; - if (cL.length) { - cL = cL.length == 1 ? (T !== null - && (/\[object Array\]|\[object Object\]/.test(cN.call(T))) ? T - : cL) - : cL; - return cM.replace(/#\{(.+?)\}/g, function(cO, cQ) { - var cP = cL[cQ]; - if ("[object Function]" == cN.call(cP)) { - cP = cP(cQ) - } - return ("undefined" == typeof cP ? "" : cP) - }) - } - return cM - }; - a8.format = a8.string.format; - a8.dom.removeClass = function(cP, cQ) { - cP = a8.dom.g(cP); - var cN = cP.className.split(/\s+/), cR = cQ.split(/\s+/), cL, T = cR.length, cM, cO = 0; - for (; cO < T; ++cO) { - for (cM = 0, cL = cN.length; cM < cL; ++cM) { - if (cN[cM] == cR[cO]) { - cN.splice(cM, 1); - break - } - } - } - cP.className = cN.join(" "); - return cP - }; - a8.removeClass = a8.dom.removeClass; - a8.dom.insertHTML = function(cN, T, cM) { - cN = a8.dom.g(cN); - var cL, cO; - if (cN.insertAdjacentHTML) { - cN.insertAdjacentHTML(T, cM) - } else { - cL = cN.ownerDocument.createRange(); - T = T.toUpperCase(); - if (T == "AFTERBEGIN" || T == "BEFOREEND") { - cL.selectNodeContents(cN); - cL.collapse(T == "AFTERBEGIN") - } else { - cO = T == "BEFOREBEGIN"; - cL[cO ? "setStartBefore" : "setEndAfter"](cN); - cL.collapse(cO) - } - cL.insertNode(cL.createContextualFragment(cM)) - } - return cN - }; - a8.insertHTML = a8.dom.insertHTML; - a8.dom.show = function(T) { - T = a8.dom.g(T); - T.style.display = ""; - return T - }; - a8.show = a8.dom.show; - a8.dom.getDocument = function(T) { - T = a8.dom.g(T); - return T.nodeType == 9 ? T : T.ownerDocument || T.document - }; - a8.dom.addClass = function(cP, cQ) { - cP = a8.dom.g(cP); - var cL = cQ.split(/\s+/), T = cP.className, cO = " " + T + " ", cN = 0, cM = cL.length; - for (; cN < cM; cN++) { - if (cO.indexOf(" " + cL[cN] + " ") < 0) { - T += " " + cL[cN] - } - } - cP.className = T; - return cP - }; - a8.addClass = a8.dom.addClass; - a8.dom._styleFixer = a8.dom._styleFixer || {}; - a8.dom._styleFilter = a8.dom._styleFilter || []; - a8.dom._styleFilter.filter = function(cL, cO, cP) { - for ( var T = 0, cN = a8.dom._styleFilter, cM; cM = cN[T]; T++) { - if (cM = cM[cP]) { - cO = cM(cL, cO) - } - } - return cO - }; - a8.string.toCamelCase = function(T) { - if (T.indexOf("-") < 0 && T.indexOf("_") < 0) { - return T - } - return T.replace(/[-_][^-_]/g, function(cL) { - return cL.charAt(1).toUpperCase() - }) - }; - a8.dom.getStyle = function(cM, cL) { - var cP = a8.dom; - cM = cP.g(cM); - cL = a8.string.toCamelCase(cL); - var cO = cM.style[cL]; - if (!cO) { - var T = cP._styleFixer[cL], cN = cM.currentStyle - || (a8.browser.ie ? cM.style : getComputedStyle(cM, null)); - cO = T && T.get ? T.get(cM, cN) : cN[T || cL] - } - if (T = cP._styleFilter) { - cO = T.filter(cL, cO, "get") - } - return cO - }; - a8.getStyle = a8.dom.getStyle; - if (/opera\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.opera = +RegExp["\x241"] - } - a8.browser.isWebkit = /webkit/i.test(navigator.userAgent); - a8.browser.isGecko = /gecko/i.test(navigator.userAgent) - && !/like gecko/i.test(navigator.userAgent); - a8.browser.isStrict = document.compatMode == "CSS1Compat"; - a8.dom.getPosition = function(T) { - T = a8.dom.g(T); - var cT = a8.dom.getDocument(T), cN = a8.browser, cQ = a8.dom.getStyle, cM = cN.isGecko > 0 - && cT.getBoxObjectFor - && cQ(T, "position") == "absolute" - && (T.style.top === "" || T.style.left === ""), cR = { - left : 0, - top : 0 - }, cP = (cN.ie && !cN.isStrict) ? cT.body : cT.documentElement, cU, cL; - if (T == cP) { - return cR - } - if (T.getBoundingClientRect) { - cL = T.getBoundingClientRect(); - cR.left = Math.floor(cL.left) - + Math.max(cT.documentElement.scrollLeft, - cT.body.scrollLeft); - cR.top = Math.floor(cL.top) - + Math.max(cT.documentElement.scrollTop, cT.body.scrollTop); - cR.left -= cT.documentElement.clientLeft; - cR.top -= cT.documentElement.clientTop; - var cS = cT.body, cV = parseInt(cQ(cS, "borderLeftWidth")), cO = parseInt(cQ( - cS, "borderTopWidth")); - if (cN.ie && !cN.isStrict) { - cR.left -= isNaN(cV) ? 2 : cV; - cR.top -= isNaN(cO) ? 2 : cO - } - } else { - cU = T; - do { - cR.left += cU.offsetLeft; - cR.top += cU.offsetTop; - if (cN.isWebkit > 0 && cQ(cU, "position") == "fixed") { - cR.left += cT.body.scrollLeft; - cR.top += cT.body.scrollTop; - break - } - cU = cU.offsetParent - } while (cU && cU != T); - if (cN.opera > 0 - || (cN.isWebkit > 0 && cQ(T, "position") == "absolute")) { - cR.top -= cT.body.offsetTop - } - cU = T.offsetParent; - while (cU && cU != cT.body) { - cR.left -= cU.scrollLeft; - if (!cN.opera || cU.tagName != "TR") { - cR.top -= cU.scrollTop - } - cU = cU.offsetParent - } - } - return cR - }; - if (/firefox\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.firefox = +RegExp["\x241"] - } - (function() { - var T = navigator.userAgent; - if (/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(T) - && !/chrome/i.test(T)) { - a8.browser.safari = +(RegExp["\x241"] || RegExp["\x242"]) - } - })(); - if (/chrome\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.chrome = +RegExp["\x241"] - } - a8.array = a8.array || {}; - a8.array.each = function(cP, cN) { - var cM, cO, cL, T = cP.length; - if ("function" == typeof cN) { - for (cL = 0; cL < T; cL++) { - cO = cP[cL]; - cM = cN.call(cP, cO, cL); - if (cM === false) { - break - } - } - } - return cP - }; - a8.each = a8.array.each; - a8.lang.guid = function() { - return "TANGRAM__" + (window[a8.guid]._counter++).toString(36) - }; - window[a8.guid]._counter = window[a8.guid]._counter || 1; - window[a8.guid]._instances = window[a8.guid]._instances || {}; - a8.lang.isFunction = function(T) { - return "[object Function]" == Object.prototype.toString.call(T) - }; - a8.lang.Class = function(T) { - this.guid = T || a8.lang.guid(); - window[a8.guid]._instances[this.guid] = this - }; - window[a8.guid]._instances = window[a8.guid]._instances || {}; - a8.lang.Class.prototype.dispose = function() { - delete window[a8.guid]._instances[this.guid]; - for ( var T in this) { - if (!a8.lang.isFunction(this[T])) { - delete this[T] - } - } - this.disposed = true - }; - a8.lang.Class.prototype.toString = function() { - return "[object " + (this._className || "Object") + "]" - }; - a8.lang.Event = function(T, cL) { - this.type = T; - this.returnValue = true; - this.target = cL || null; - this.currentTarget = null - }; - a8.lang.Class.prototype.addEventListener = function(cN, cM, cL) { - if (!a8.lang.isFunction(cM)) { - return - } - !this.__listeners && (this.__listeners = {}); - var T = this.__listeners, cO; - if (typeof cL == "string" && cL) { - if (/[^\w\-]/.test(cL)) { - throw ("nonstandard key:" + cL) - } else { - cM.hashCode = cL; - cO = cL - } - } - cN.indexOf("on") != 0 && (cN = "on" + cN); - typeof T[cN] != "object" && (T[cN] = {}); - cO = cO || a8.lang.guid(); - cM.hashCode = cO; - T[cN][cO] = cM - }; - a8.lang.Class.prototype.removeEventListener = function(cM, cL) { - if (a8.lang.isFunction(cL)) { - cL = cL.hashCode - } else { - if (!a8.lang.isString(cL)) { - return - } - } - !this.__listeners && (this.__listeners = {}); - cM.indexOf("on") != 0 && (cM = "on" + cM); - var T = this.__listeners; - if (!T[cM]) { - return - } - T[cM][cL] && delete T[cM][cL] - }; - a8.lang.Class.prototype.dispatchEvent = function(cN, T) { - if (a8.lang.isString(cN)) { - cN = new a8.lang.Event(cN) - } - !this.__listeners && (this.__listeners = {}); - T = T || {}; - for ( var cM in T) { - cN[cM] = T[cM] - } - var cM, cL = this.__listeners, cO = cN.type; - cN.target = cN.target || this; - cN.currentTarget = this; - cO.indexOf("on") != 0 && (cO = "on" + cO); - a8.lang.isFunction(this[cO]) && this[cO].apply(this, arguments); - if (typeof cL[cO] == "object") { - for (cM in cL[cO]) { - cL[cO][cM].apply(this, arguments) - } - } - return cN.returnValue - }; - a8.lang.inherits = function(cQ, cO, cN) { - var cM, cP, T = cQ.prototype, cL = new Function(); - cL.prototype = cO.prototype; - cP = cQ.prototype = new cL(); - for (cM in T) { - cP[cM] = T[cM] - } - cQ.prototype.constructor = cQ; - cQ.superClass = cO.prototype; - if ("string" == typeof cN) { - cP._className = cN - } - }; - a8.inherits = a8.lang.inherits; - a8.lang.instance = function(T) { - return window[a8.guid]._instances[T] || null - }; - a8.platform = a8.platform || {}; - a8.platform.isMacintosh = /macintosh/i.test(navigator.userAgent); - a8.platform.isWindows = /windows/i.test(navigator.userAgent); - a8.platform.isX11 = /x11/i.test(navigator.userAgent); - a8.platform.isAndroid = /android/i.test(navigator.userAgent); - a8.platform.isIpad = /ipad/i.test(navigator.userAgent); - a8.platform.isIphone = /iphone/i.test(navigator.userAgent); - a8.lang.Event.prototype.inherit = function(cM) { - var cL = this; - this.domEvent = cM = window.event || cM; - cL.clientX = cM.clientX || cM.pageX; - cL.clientY = cM.clientY || cM.pageY; - cL.offsetX = cM.offsetX || cM.layerX; - cL.offsetY = cM.offsetY || cM.layerY; - cL.screenX = cM.screenX; - cL.screenY = cM.screenY; - cL.ctrlKey = cM.ctrlKey || cM.metaKey; - cL.shiftKey = cM.shiftKey; - cL.altKey = cM.altKey; - if (cM.touches) { - cL.touches = []; - for ( var T = 0; T < cM.touches.length; T++) { - cL.touches.push( { - clientX : cM.touches[T].clientX, - clientY : cM.touches[T].clientY, - screenX : cM.touches[T].screenX, - screenY : cM.touches[T].screenY, - pageX : cM.touches[T].pageX, - pageY : cM.touches[T].pageY, - target : cM.touches[T].target, - identifier : cM.touches[T].identifier - }) - } - } - if (cM.changedTouches) { - cL.changedTouches = []; - for ( var T = 0; T < cM.changedTouches.length; T++) { - cL.changedTouches.push( { - clientX : cM.changedTouches[T].clientX, - clientY : cM.changedTouches[T].clientY, - screenX : cM.changedTouches[T].screenX, - screenY : cM.changedTouches[T].screenY, - pageX : cM.changedTouches[T].pageX, - pageY : cM.changedTouches[T].pageY, - target : cM.changedTouches[T].target, - identifier : cM.changedTouches[T].identifier - }) - } - } - if (cM.targetTouches) { - cL.targetTouches = []; - for ( var T = 0; T < cM.targetTouches.length; T++) { - cL.targetTouches.push( { - clientX : cM.targetTouches[T].clientX, - clientY : cM.targetTouches[T].clientY, - screenX : cM.targetTouches[T].screenX, - screenY : cM.targetTouches[T].screenY, - pageX : cM.targetTouches[T].pageX, - pageY : cM.targetTouches[T].pageY, - target : cM.targetTouches[T].target, - identifier : cM.targetTouches[T].identifier - }) - } - } - cL.rotation = cM.rotation; - cL.scale = cM.scale; - return cL - }; - a8.lang.decontrol = function(cL) { - var T = window[a8.guid]; - T._instances && (delete T._instances[cL]) - }; - a8.event = {}; - a8.on = a8.event.on = function(cM, cL, T) { - if (!(cM = a8.g(cM))) { - return cM - } - cL = cL.replace(/^on/, ""); - if (cM.addEventListener) { - cM.addEventListener(cL, T, false) - } else { - if (cM.attachEvent) { - cM.attachEvent("on" + cL, T) - } - } - return cM - }; - a8.un = a8.event.un = function(cM, cL, T) { - if (!(cM = a8.g(cM))) { - return cM - } - cL = cL.replace(/^on/, ""); - if (cM.removeEventListener) { - cM.removeEventListener(cL, T, false) - } else { - if (cM.detachEvent) { - cM.detachEvent("on" + cL, T) - } - } - return cM - }; - a8.dom.hasClass = function(cM, cL) { - if (!cM || !cM.className || typeof cM.className != "string") { - return false - } - var T = -1; - try { - T = cM.className == cL - || cM.className.search(new RegExp("(\\s|^)" + cL - + "(\\s|$)")) - } catch (cN) { - return false - } - return T > -1 - }; - window.BMap = window.BMap || {}; - window.BMap.version = "1.3"; - window.BMap._register = []; - window.BMap.register = function(T) { - this._register.push(T) - }; - window.BMap.apiLoad = window.BMap.apiLoad || function() { - }; - var bJ = window.BMAP_AUTHENTIC_KEY; - window.BMAP_AUTHENTIC_KEY = null; - function bz(cN, cP) { - cN = a8.g(cN); - if (!cN) { - return - } - var cO = this; - a8.lang.Class.call(cO); - cO.config = { - clickInterval : 200, - enableDragging : true, - enableKeyboard : false, - enableDblclickZoom : true, - enableContinuousZoom : false, - enableWheelZoom : false, - enableMouseDown : true, - enablePinchToZoom : true, - enableAutoResize : true, - fps : 25, - zoomerDuration : 240, - actionDuration : 450, - defaultCursor : cc.defaultCursor, - draggingCursor : cc.draggingCursor, - isOverviewMap : false, - minZoom : 1, - maxZoom : 18, - mapType : BMAP_NORMAL_MAP, - restrictBounds : false, - drawer : BMAP_SYS_DRAWER, - enableInertialDragging : false, - drawMargin : 500, - enableHighResolution : false - }; - a8.extend(cO.config, cP || {}); - if (cO.highResolutionEnabled()) { - var cR = document.querySelector("meta[name=viewport]"); - cR.content = "initial-scale=0.5, minimum-scale=0.5, maximum-scale=0.5, user-scalable=no, target-densitydpi=high-dpi" - } - cO.container = cN; - cO._setStyle(cN); - cN.unselectable = "on"; - cN.innerHTML = ""; - cN.appendChild(cO.render()); - var cL = cO.getSize(); - cO.width = cL.width; - cO.height = cL.height; - cO.offsetX = 0; - cO.offsetY = 0; - cO.platform = cN.firstChild; - cO.maskLayer = cO.platform.firstChild; - cO.maskLayer.style.width = cO.width + "px"; - cO.maskLayer.style.height = cO.height + "px"; - cO._panes = {}; - cO.centerPoint = new cd(0, 0); - cO.mercatorCenter = new cd(0, 0); - cO.zoomLevel = 1; - cO.lastLevel = 0; - cO.defaultZoomLevel = null; - cO.defaultCenter = null; - cO.currentCity = ""; - cO.cityCode = ""; - cO._hotspots = {}; - cO.currentOperation = 0; - cP = cP || {}; - var cQ = cO.mapType = cO.config.mapType; - cO.projection = cQ.getProjection(); - if (cQ === BMAP_PERSPECTIVE_MAP) { - _addStat(5002) - } - if (cQ === BMAP_SATELLITE_MAP || cQ === BMAP_HYBRID_MAP) { - _addStat(5003) - } - var T = cO.config; - T.userMinZoom = cP.minZoom; - T.userMaxZoom = cP.maxZoom; - cO._checkZoom(); - cO.temp = { - operating : false, - arrow : 0, - lastDomMoveTime : 0, - lastLoadTileTime : 0, - lastMovingTime : 0, - canKeyboard : false, - registerIndex : -1, - curSpots : [] - }; - cO.platform.style.cursor = cO.config.defaultCursor; - for ( var cM = 0; cM < BMap._register.length; cM++) { - BMap._register[cM](cO) - } - cO.temp.registerIndex = cM; - cO._bind(); - cA.load("map", function() { - cO._draw() - }); - if (bO()) { - cA.load("oppc", function() { - cO._asyncRegister() - }) - } - if (aA()) { - cA.load("opmb", function() { - cO._asyncRegister() - }) - } - cN = null - } - a8.lang.inherits(bz, a8.lang.Class, "Map"); - a8 - .extend( - bz.prototype, - { - render : function() { - var T = aa("div"); - var cN = T.style; - cN.overflow = "visible"; - cN.position = "absolute"; - cN.zIndex = "0"; - cN.top = cN.left = "0px"; - var cL = aa("div", { - "class" : "BMap_mask" - }); - var cM = cL.style; - cM.position = "absolute"; - cM.top = cM.left = "0px"; - cM.zIndex = "9"; - cM.overflow = "hidden"; - cM.WebkitUserSelect = "none"; - T.appendChild(cL); - return T - }, - _setStyle : function(cL) { - var T = cL.style; - T.overflow = "hidden"; - if (aJ(cL).position != "absolute") { - T.position = "relative"; - T.zIndex = 0 - } - T.backgroundColor = "#F3F1EC"; - T.color = "#000"; - T.textAlign = "left" - }, - _bind : function() { - var T = this; - T._watchSize = function() { - var cL = T.getSize(); - if (T.width != cL.width - || T.height != cL.height) { - var cN = new aH(T.width, T.height); - var cO = new bg("onbeforeresize"); - cO.size = cN; - T.dispatchEvent(cO); - T._updateCenterPoint( - (cL.width - T.width) / 2, - (cL.height - T.height) / 2); - T.maskLayer.style.width = (T.width = cL.width) - + "px"; - T.maskLayer.style.height = (T.height = cL.height) - + "px"; - var cM = new bg("onresize"); - cM.size = cL; - T.dispatchEvent(cM) - } - }; - if (T.config.enableAutoResize) { - T.temp.autoResizeTimer = setInterval( - T._watchSize, 80) - } - }, - _updateCenterPoint : function(cN, cL, cR, cQ) { - var cO = this.getMapType().getZoomUnits( - this.getZoom()); - var cS = this.projection; - var cP = true; - if (cR && cd.isInRange(cR)) { - this.centerPoint = new cd(cR.lng, cR.lat); - cP = false - } - var cM = (cR && cQ) ? cS.lngLatToMercator(cR, - this.currentCity) : this.mercatorCenter; - if (cM) { - this.mercatorCenter = new cd(cM.lng + cN * cO, - cM.lat - cL * cO); - var T = cS.mercatorToLngLat( - this.mercatorCenter, this.currentCity); - if (T && cP) { - this.centerPoint = T - } - } - }, - zoomTo : function(cN, cL) { - if (!aK(cN)) { - return - } - cN = this._getProperZoom(cN).zoom; - if (cN == this.zoomLevel) { - return - } - this.lastLevel = this.zoomLevel; - this.zoomLevel = cN; - var cM; - if (cL) { - cM = cL - } else { - if (this.getInfoWindow()) { - cM = this.getInfoWindow().getPosition() - } - } - if (cM) { - var T = this.pointToPixel(cM, this.lastLevel); - this._updateCenterPoint(this.width / 2 - T.x, - this.height / 2 - T.y, - this.pixelToPoint(T, this.lastLevel), - true) - } - this.dispatchEvent(new bg("onzoomstart")); - this.dispatchEvent(new bg("onzoomstartcode")) - }, - setZoom : function(T) { - this.zoomTo(T) - }, - zoomIn : function(T) { - this.zoomTo(this.zoomLevel + 1, T) - }, - zoomOut : function(T) { - this.zoomTo(this.zoomLevel - 1, T) - }, - panTo : function(T, cL) { - if (!(T instanceof cd)) { - return - } - this.mercatorCenter = this.projection - .lngLatToMercator(T, this.currentCity); - if (cd.isInRange(T)) { - this.centerPoint = new cd(T.lng, T.lat) - } else { - this.centerPoint = this.projection - .mercatorToLngLat(this.mercatorCenter, - this.currentCity) - } - }, - panBy : function(cL, T) { - cL = Math.round(cL) || 0; - T = Math.round(T) || 0; - this._updateCenterPoint(-cL, -T) - }, - addControl : function(T) { - if (T && I(T._i)) { - T._i(this); - this.dispatchEvent(new bg("onaddcontrol", T)) - } - }, - removeControl : function(T) { - if (T && I(T.remove)) { - T.remove(); - this - .dispatchEvent(new bg( - "onremovecontrol", T)) - } - }, - addContextMenu : function(T) { - if (T && I(T.initialize)) { - T.initialize(this); - this - .dispatchEvent(new bg( - "onaddcontextmenu", T)) - } - }, - removeContextMenu : function(T) { - if (T && I(T.remove)) { - this.dispatchEvent(new bg( - "onremovecontextmenu", T)); - T.remove() - } - }, - addOverlay : function(T) { - if (T && I(T._i)) { - T._i(this); - this.dispatchEvent(new bg("onaddoverlay", T)) - } - }, - removeOverlay : function(T) { - if (T && I(T.remove)) { - T.remove(); - this - .dispatchEvent(new bg( - "onremoveoverlay", T)) - } - }, - clearOverlays : function() { - this.dispatchEvent(new bg("onclearoverlays")) - }, - addTileLayer : function(T) { - if (T) { - this.dispatchEvent(new bg("onaddtilelayer", T)) - } - }, - removeTileLayer : function(T) { - if (T) { - this.dispatchEvent(new bg("onremovetilelayer", - T)) - } - }, - setMapType : function(cL) { - if (this.mapType === cL) { - return - } - var cM = new bg("onsetmaptype"); - var T = this.mapType; - cM.preMapType = T; - this.mapType = this.config.mapType = cL; - this.projection = this.mapType.getProjection(); - this._updateCenterPoint(0, 0, this.getCenter(), - true); - this._checkZoom(); - var cN = this._getProperZoom(this.getZoom()).zoom; - this.zoomTo(cN); - this.dispatchEvent(cM); - var cM = new bg("onmaptypechange"); - cM.zoomLevel = cN; - cM.mapType = cL; - this.dispatchEvent(cM); - if (cL === BMAP_SATELLITE_MAP - || cL === BMAP_HYBRID_MAP) { - _addStat(5003) - } - }, - setCenter : function(T) { - var cM = this; - if (T instanceof cd) { - cM.panTo(T, { - noAnimation : true - }) - } else { - if (b3(T)) { - var cL = this._getLocal(); - cL.setSearchCompleteCallback(function(cN) { - if (cL.getStatus() == 0 - && cL._json.result.type == 2) { - cM.setCenter(cN.getPoi(0).point); - if (BMAP_PERSPECTIVE_MAP - .getCityName(T)) { - cM.setCurrentCity(T) - } - } - }); - cL.search(T) - } - } - }, - centerAndZoom : function(T, cM) { - var cL = this; - if (b3(T)) { - var cP = cL._getLocal(); - cP - .setSearchCompleteCallback(function(cQ) { - if (cP.getStatus() == 0 - && cP._json.result.type == 2) { - var cS = cQ.getPoi(0).point; - var cR = cM - || S - .getBestLevel( - cP._json.content.level, - cL); - cL.centerAndZoom(cS, cR); - if (BMAP_PERSPECTIVE_MAP - .getCityName(T)) { - cL.setCurrentCity(T) - } - } - }); - cP.search(T); - return - } - if (!(T instanceof cd) || !cM) { - return - } - cM = cL._getProperZoom(cM).zoom; - cL.lastLevel = cL.zoomLevel || cM; - cL.zoomLevel = cM; - cL.centerPoint = new cd(T.lng, T.lat); - cL.mercatorCenter = cL.projection.lngLatToMercator( - cL.centerPoint, cL.currentCity); - cL.defaultZoomLevel = cL.defaultZoomLevel - || cL.zoomLevel; - cL.defaultCenter = cL.defaultCenter - || cL.centerPoint; - var cO = new bg("onload"); - var cN = new bg("onloadcode"); - cO.point = new cd(T.lng, T.lat); - cO.pixel = cL.pointToPixel(cL.centerPoint, - cL.zoomLevel); - cO.zoom = cM; - if (!cL.loaded) { - cL.loaded = true; - cL.dispatchEvent(cO) - } - cL.dispatchEvent(cN); - cL.dispatchEvent(new bg("onmoveend")); - if (cL.lastLevel != cL.zoomLevel) { - cL.dispatchEvent(new bg("onzoomend")) - } - }, - _getLocal : function() { - if (!this.temp.local) { - this.temp.local = new a4(1) - } - return this.temp.local - }, - reset : function() { - this.centerAndZoom(this.defaultCenter, - this.defaultZoomLevel, true) - }, - enableDragging : function() { - this.config.enableDragging = true - }, - disableDragging : function() { - this.config.enableDragging = false - }, - enableInertialDragging : function() { - this.config.enableInertialDragging = true - }, - disableInertialDragging : function() { - this.config.enableInertialDragging = false - }, - enableScrollWheelZoom : function() { - this.config.enableWheelZoom = true - }, - disableScrollWheelZoom : function() { - this.config.enableWheelZoom = false - }, - enableContinuousZoom : function() { - this.config.enableContinuousZoom = true - }, - disableContinuousZoom : function() { - this.config.enableContinuousZoom = false - }, - enableDoubleClickZoom : function() { - this.config.enableDblclickZoom = true - }, - disableDoubleClickZoom : function() { - this.config.enableDblclickZoom = false - }, - enableKeyboard : function() { - this.config.enableKeyboard = true - }, - disableKeyboard : function() { - this.config.enableKeyboard = false - }, - enablePinchToZoom : function() { - this.config.enablePinchToZoom = true - }, - disablePinchToZoom : function() { - this.config.enablePinchToZoom = false - }, - enableAutoResize : function() { - this.config.enableAutoResize = true; - this._watchSize(); - if (!this.temp.autoResizeTimer) { - this.temp.autoResizeTimer = setInterval( - this._watchSize, 80) - } - }, - disableAutoResize : function() { - this.config.enableAutoResize = false; - if (this.temp.autoResizeTimer) { - clearInterval(this.temp.autoResizeTimer); - this.temp.autoResizeTimer = null - } - }, - getSize : function() { - return new aH(this.container.clientWidth, - this.container.clientHeight) - }, - getCenter : function() { - return this.centerPoint - }, - getZoom : function() { - return this.zoomLevel - }, - checkResize : function() { - this._watchSize() - }, - _getProperZoom : function(cM) { - var cL = this.config.minZoom, T = this.config.maxZoom, cN = false; - if (cM < cL) { - cN = true; - cM = cL - } - if (cM > T) { - cN = true; - cM = T - } - return { - zoom : cM, - exceeded : cN - } - }, - getContainer : function() { - return this.container - }, - pointToPixel : function(T, cL) { - cL = cL || this.getZoom(); - return this.projection.pointToPixel(T, cL, - this.mercatorCenter, this.getSize(), - this.currentCity) - }, - pixelToPoint : function(T, cL) { - cL = cL || this.getZoom(); - return this.projection.pixelToPoint(T, cL, - this.mercatorCenter, this.getSize(), - this.currentCity) - }, - pointToOverlayPixel : function(T, cM) { - if (!T) { - return - } - var cN = new cd(T.lng, T.lat); - var cL = this.pointToPixel(cN, cM); - cL.x -= this.offsetX; - cL.y -= this.offsetY; - return cL - }, - overlayPixelToPoint : function(T, cM) { - if (!T) { - return - } - var cL = new bu(T.x, T.y); - cL.x += this.offsetX; - cL.y += this.offsetY; - return this.pixelToPoint(cL, cM) - }, - getBounds : function() { - if (!this.isLoaded()) { - return new bN() - } - var cL = arguments[0] || {}, cN = cL.margins - || [ 0, 0, 0, 0 ], T = cL.zoom || null, cO = this - .pixelToPoint( { - x : cN[3], - y : this.height - cN[2] - }, T), cM = this.pixelToPoint( { - x : this.width - cN[1], - y : cN[0] - }, T); - return new bN(cO, cM) - }, - isLoaded : function() { - return !!this.loaded - }, - _getBestLevel : function(cL, cM) { - var cP = this.getMapType(); - var cR = cM.margins || [ 10, 10, 10, 10 ], cO = cM.zoomFactor || 0, cS = cR[1] - + cR[3], cQ = cR[0] + cR[2], T = cP - .getMinZoom(), cU = cP.getMaxZoom(); - for ( var cN = cU; cN >= T; cN--) { - var cT = this.getMapType().getZoomUnits(cN); - if (cL.toSpan().lng / cT < this.width - cS - && cL.toSpan().lat / cT < this.height - - cQ) { - break - } - } - cN += cO; - if (cN < T) { - cN = T - } - if (cN > cU) { - cN = cU - } - return cN - }, - getViewport : function(cT, cL) { - var cX = { - center : this.getCenter(), - zoom : this.getZoom() - }; - if (!cT || !cT instanceof bN && cT.length == 0 - || cT instanceof bN && cT.isEmpty()) { - return cX - } - var cV = []; - if (cT instanceof bN) { - cV.push(cT.getNorthEast()); - cV.push(cT.getSouthWest()) - } else { - cV = cT.slice(0) - } - cL = cL || {}; - var cP = []; - for ( var cQ = 0, cO = cV.length; cQ < cO; cQ++) { - cP.push(this.projection.lngLatToMercator( - cV[cQ], this.currentCity)) - } - var cM = new bN(); - for ( var cQ = cP.length - 1; cQ >= 0; cQ--) { - cM.extend(cP[cQ]) - } - if (cM.isEmpty()) { - return cX - } - var T = cM.getCenter(); - var cW = this._getBestLevel(cM, cL); - if (cL.margins) { - var cS = cL.margins, cR = (cS[1] - cS[3]) / 2, cU = (cS[0] - cS[2]) / 2, cN = this - .getMapType().getZoomUnits(cW); - T.lng = T.lng + cN * cR; - T.lat = T.lat + cN * cU - } - T = this.projection.mercatorToLngLat(T, - this.currentCity); - return { - center : T, - zoom : cW - } - }, - setViewport : function(cL, cO) { - var T; - if (cL && cL.center) { - T = cL - } else { - T = this.getViewport(cL, cO) - } - cO = cO || {}; - var cM = cO.delay || 200; - if (T.zoom == this.zoomLevel - && cO.enableAnimation != false) { - var cN = this; - setTimeout(function() { - cN.panTo(T.center, { - duration : 210 - }) - }, cM) - } else { - this.centerAndZoom(T.center, T.zoom) - } - }, - getPanes : function() { - return this._panes - }, - getInfoWindow : function() { - if (this.temp.infoWin && this.temp.infoWin.isOpen()) { - return this.temp.infoWin - } - return null - }, - getDistance : function(cM, T) { - if (!cM || !T) { - return - } - var cL = 0; - cL = ba.getDistanceByLL(cM, T); - return cL - }, - getOverlays : function() { - var cN = [], cO = this._overlays, cM = this._customOverlays; - if (cO) { - for ( var cL in cO) { - if (cO[cL] instanceof Y) { - cN.push(cO[cL]) - } - } - } - if (cM) { - for ( var cL = 0, T = cM.length; cL < T; cL++) { - cN.push(cM[cL]) - } - } - return cN - }, - getMapType : function() { - return this.mapType - }, - _asyncRegister : function() { - for ( var T = this.temp.registerIndex; T < BMap._register.length; T++) { - BMap._register[T](this) - } - this.temp.registerIndex = T - }, - setCurrentCity : function(T) { - this.currentCity = BMAP_PERSPECTIVE_MAP - .getCityName(T); - this.cityCode = BMAP_PERSPECTIVE_MAP - .getCityCode(this.currentCity) - }, - setDefaultCursor : function(T) { - if (a8.browser.firefox && T.indexOf("url") == 0) { - T = T += ", -moz-grab" - } - this.config.defaultCursor = T; - if (this.platform) { - this.platform.style.cursor = this.config.defaultCursor - } - }, - getDefaultCursor : function() { - return this.config.defaultCursor - }, - setDraggingCursor : function(T) { - if (a8.browser.firefox && T.indexOf("url") == 0) { - T = T += ", -moz-grabbing" - } - this.config.draggingCursor = T - }, - getDraggingCursor : function() { - return this.config.draggingCursor - }, - highResolutionEnabled : function() { - return this.config.enableHighResolution - && window.devicePixelRatio > 1 - }, - addHotspot : function(cL) { - if (cL instanceof cm) { - this._hotspots[cL.guid] = cL; - cL.initialize(this) - } - var T = this; - cA.load("hotspot", function() { - T._asyncRegister() - }) - }, - removeHotspot : function(T) { - if (this._hotspots[T.guid]) { - delete this._hotspots[T.guid] - } - }, - clearHotspots : function() { - this._hotspots = {} - }, - _checkZoom : function() { - var cL = this.mapType.getMinZoom(); - var cM = this.mapType.getMaxZoom(); - var T = this.config; - T.minZoom = T.userMinZoom || cL; - T.maxZoom = T.userMaxZoom || cM; - if (T.minZoom < cL) { - T.minZoom = cL - } - if (T.maxZoom > cM) { - T.maxZoom = cM - } - }, - setMinZoom : function(T) { - if (T > this.config.maxZoom) { - T = this.config.maxZoom - } - this.config.userMinZoom = T; - this._updateZoom() - }, - setMaxZoom : function(T) { - if (T < this.config.minZoom) { - T = this.config.minZoom - } - this.config.userMaxZoom = T; - this._updateZoom() - }, - _updateZoom : function() { - this._checkZoom(); - var T = this.config; - if (this.zoomLevel < T.minZoom) { - this.setZoom(T.minZoom) - } else { - if (this.zoomLevel > T.maxZoom) { - this.setZoom(T.maxZoom) - } - } - var cL = new bg("onzoomspanchange"); - cL.minZoom = T.minZoom; - cL.maxZoom = T.maxZoom; - this.dispatchEvent(cL) - } - }); - window.BMAP_API_VERSION = "1.3"; - window.BMAP_COORD_LNGLAT = 0; - window.BMAP_COORD_MERCATOR = 1; - window.BMAP_SYS_DRAWER = 0; - window.BMAP_SVG_DRAWER = 1; - window.BMAP_VML_DRAWER = 2; - window.BMAP_CANVAS_DRAWER = 3; - window._addStat = function(cP, cO) { - if (!cP) { - return - } - cO = cO || {}; - var cN = ""; - for ( var cL in cO) { - cN = cN + "&" + cL + "=" + encodeURIComponent(cO[cL]) - } - var cQ = function(cR) { - if (!cR) { - return - } - _addStat._sending = true; - setTimeout(function() { - _addStat._img.src = cc.imgPath + "blank.gif?" + cR.src - }, 50) - }; - var T = function() { - var cR = _addStat._reqQueue.shift(); - if (cR) { - cQ(cR) - } - }; - var cM = (Math.random() * 100000000).toFixed(0); - if (_addStat._sending) { - _addStat._reqQueue.push( { - src : "t=" + cM + "&code=" + cP + cN - }) - } else { - cQ( { - src : "t=" + cM + "&code=" + cP + cN - }) - } - if (!_addStat._binded) { - a8.on(_addStat._img, "load", function() { - _addStat._sending = false; - T() - }); - a8.on(_addStat._img, "error", function() { - _addStat._sending = false; - T() - }); - _addStat._binded = true - } - }; - window._addStat._reqQueue = []; - window._addStat._img = new Image(); - _addStat(5000, { - v : BMap.version - }); - function g(cN) { - var T = { - duration : 1000, - fps : 30, - delay : 0, - transition : aw.linear, - onStop : function() { - } - }; - this._anis = []; - if (cN) { - for ( var cL in cN) { - T[cL] = cN[cL] - } - } - this._opts = T; - if (aK(T.delay)) { - var cM = this; - setTimeout(function() { - cM.start() - }, T.delay) - } else { - if (T.delay != g.INFINITE) { - this.start() - } - } - } - g.INFINITE = "INFINITE"; - g.prototype.start = function() { - this._beginTime = aE(); - this._endTime = this._beginTime + this._opts.duration; - this._launch() - }; - g.prototype.add = function(T) { - this._anis.push(T) - }; - g.prototype._launch = function() { - var cM = this; - var T = aE(); - if (T >= cM._endTime) { - if (I(cM._opts.render)) { - cM._opts.render(cM._opts.transition(1)) - } - if (I(cM._opts.finish)) { - cM._opts.finish() - } - if (cM._anis.length > 0) { - var cL = cM._anis[0]; - cL._anis = [].concat(cM._anis.slice(1)); - cL.start() - } - return - } - cM.schedule = cM._opts.transition((T - cM._beginTime) - / cM._opts.duration); - if (I(cM._opts.render)) { - cM._opts.render(cM.schedule) - } - if (!cM.terminative) { - cM._timer = setTimeout(function() { - cM._launch() - }, 1000 / cM._opts.fps) - } - }; - g.prototype.stop = function(cL) { - this.terminative = true; - for ( var T = 0; T < this._anis.length; T++) { - this._anis[T].stop(); - this._anis[T] = null - } - this._anis.length = 0; - if (this._timer) { - clearTimeout(this._timer); - this._timer = null - } - this._opts.onStop(this.schedule); - if (cL) { - this._endTime = this._beginTime; - this._launch() - } - }; - g.prototype.cancel = function() { - if (this._timer) { - clearTimeout(this._timer) - } - this._endTime = this._beginTime; - this.schedule = 0 - }; - g.prototype.setFinishCallback = function(T) { - if (this._anis.length > 0) { - this._anis[this._anis.length - 1]._opts.finish = T - } else { - this._opts.finish = T - } - }; - var aw = { - linear : function(T) { - return T - }, - reverse : function(T) { - return 1 - T - }, - easeInQuad : function(T) { - return T * T - }, - easeInCubic : function(T) { - return Math.pow(T, 3) - }, - easeOutQuad : function(T) { - return -(T * (T - 2)) - }, - easeOutCubic : function(T) { - return Math.pow((T - 1), 3) + 1 - }, - easeInOutQuad : function(T) { - if (T < 0.5) { - return T * T * 2 - } else { - return -2 * (T - 2) * T - 1 - } - return - }, - easeInOutCubic : function(T) { - if (T < 0.5) { - return Math.pow(T, 3) * 4 - } else { - return Math.pow(T - 1, 3) * 4 + 1 - } - }, - easeInOutSine : function(T) { - return (1 - Math.cos(Math.PI * T)) / 2 - } - }; - aw["ease-in"] = aw.easeInQuad; - aw["ease-out"] = aw.easeOutQuad; - var m = !!(window.BMAP_PROTOCOL == "https"); - var x = m ? "https://sapi.map.baidu.com/" : "http://api.map.baidu.com/"; - var cc = { - imgPath : "static/BMap/images/", //******* �Ķ�ͼƬimages·�� ******* - cityNames : { - "\u5317\u4eac" : "bj", - "\u4e0a\u6d77" : "sh", - "\u6df1\u5733" : "sz", - "\u5e7f\u5dde" : "gz" - }, - fontFamily : "arial,sans-serif" - }; - if (a8.browser.firefox) { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur),crosshair", - defaultCursor : "-moz-grab", - draggingCursor : "-moz-grabbing" - }); - if (a8.platform.isWindows) { - cc.fontFamily = "arial,simsun,sans-serif" - } - } else { - if (a8.browser.chrome || a8.browser.safari) { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur) 2 6,crosshair", - defaultCursor : "url(" + cc.imgPath - + "openhand.cur) 8 8,default", - draggingCursor : "url(" + cc.imgPath - + "closedhand.cur) 8 8,move" - }) - } else { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur),crosshair", - defaultCursor : "url(" + cc.imgPath + "openhand.cur),default", - draggingCursor : "url(" + cc.imgPath + "closedhand.cur),move" - }) - } - } - function av(cM, cL, T) { - this.id = cM; - this.bounds = cL; - this.content = T - } - var bn = { - undo : 1, - redo : 2, - zoom : 4, - drag : 8, - move : 16, - mousewheel : 32, - toolbarOperation : 64, - stdMapCtrlDrag : 128, - dblclick : 256 - }; - function bI(cM, T) { - var cL = cM.style; - cL.left = T[0] + "px"; - cL.top = T[1] + "px" - } - function cw(T) { - if (a8.browser.ie > 0) { - T.unselectable = "on" - } else { - T.style.MozUserSelect = "none" - } - } - function y(T) { - return T && T.parentNode && T.parentNode.nodeType != 11 - } - function at(cL, T) { - a8.dom.insertHTML(cL, "beforeEnd", T); - return cL.lastChild - } - function bY(T) { - var cL = { - left : 0, - top : 0 - }; - while (T && T.offsetParent) { - cL.left += T.offsetLeft; - cL.top += T.offsetTop; - T = T.offsetParent - } - return cL - } - function aP(T) { - var T = window.event || T; - T.stopPropagation ? T.stopPropagation() : T.cancelBubble = true - } - function cC(T) { - var T = window.event || T; - T.preventDefault ? T.preventDefault() : T.returnValue = false; - return false - } - function co(T) { - aP(T); - return cC(T) - } - function cG() { - var T = document.documentElement, cL = document.body; - if (T && (T.scrollTop || T.scrollLeft)) { - return [ T.scrollTop, T.scrollLeft ] - } else { - if (cL) { - return [ cL.scrollTop, cL.scrollLeft ] - } else { - return [ 0, 0 ] - } - } - } - function ct(cL, T) { - if (!cL || !T) { - return - } - return Math.round(Math.sqrt(Math.pow(cL.x - T.x, 2) - + Math.pow(cL.y - T.y, 2))) - } - function O(T, cM) { - var cL = []; - cM = cM || function(cO) { - return cO - }; - for ( var cN in T) { - cL.push(cN + "=" + cM(T[cN])) - } - return cL.join("&") - } - function aa(cL, T, cM) { - var cN = document.createElement(cL); - if (cM) { - cN = document.createElementNS(cM, cL) - } - return a8.dom.setAttrs(cN, T || {}) - } - function aJ(T) { - if (T.currentStyle) { - return T.currentStyle - } else { - if (T.ownerDocument && T.ownerDocument.defaultView) { - return T.ownerDocument.defaultView.getComputedStyle(T, null) - } - } - } - function I(T) { - return typeof T == "function" - } - function aK(T) { - return typeof T == "number" - } - function b3(T) { - return typeof T == "string" - } - function ch(T) { - return typeof T != "undefined" - } - function cJ(T) { - return typeof T == "object" - } - function aY(T) { - return "[object Array]" == Object.prototype.toString.call(T) - } - var cf = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - function bV(cN) { - var cL = ""; - var cU, cS, cQ = ""; - var cT, cR, cP, cO = ""; - var cM = 0; - var T = /[^A-Za-z0-9\+\/\=]/g; - if (!cN || T.exec(cN)) { - return cN - } - cN = cN.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - do { - cT = cf.indexOf(cN.charAt(cM++)); - cR = cf.indexOf(cN.charAt(cM++)); - cP = cf.indexOf(cN.charAt(cM++)); - cO = cf.indexOf(cN.charAt(cM++)); - cU = (cT << 2) | (cR >> 4); - cS = ((cR & 15) << 4) | (cP >> 2); - cQ = ((cP & 3) << 6) | cO; - cL = cL + String.fromCharCode(cU); - if (cP != 64) { - cL = cL + String.fromCharCode(cS) - } - if (cO != 64) { - cL = cL + String.fromCharCode(cQ) - } - cU = cS = cQ = ""; - cT = cR = cP = cO = "" - } while (cM < cN.length); - return cL - } - var bg = a8.lang.Event; - function aA() { - return !!(a8.platform.isIphone || a8.platform.isIpad || a8.platform.isAndroid) - } - function bO() { - return !!(a8.platform.isWindows || a8.platform.isMacintosh || a8.platform.isX11) - } - function aE() { - return (new Date).getTime() - } - var cx = { - request : function(cL) { - var T = aa("script", { - src : cL, - type : "text/javascript", - charset : "utf-8" - }); - if (T.addEventListener) { - T.addEventListener("load", function(cN) { - var cM = cN.target; - cM.parentNode.removeChild(cM) - }, false) - } else { - if (T.attachEvent) { - T - .attachEvent( - "onreadystatechange", - function(cN) { - var cM = window.event.srcElement; - if (cM - && (cM.readyState == "loaded" || cM.readyState == "complete")) { - cM.parentNode.removeChild(cM) - } - }) - } - } - setTimeout(function() { - document.getElementsByTagName("head")[0].appendChild(T); - T = null - }, 1) - } - }; - function cA() { - } - a8.object.extend(cA, { - Request : { - INITIAL : -1, - WAITING : 0, - COMPLETED : 1 - }, - Dependency : { - control : [], - marker : [], - poly : [ "marker" ], - infowindow : [ "marker" ], - menu : [], - oppc : [], - opmb : [], - scommon : [], - local : [ "scommon" ], - route : [ "scommon" ], - othersearch : [ "scommon" ], - autocomplete : [ "scommon" ], - buslinesearch : [ "route" ], - hotspot : [] - }, - preLoaded : {}, - Config : { - _baseUrl : "js/", //x + "getmodules?v=1.3", //******* �Ķ���Դ��map,oppc,tile,control��·�� ******* - _timeout : 5000 - }, - delayFlag : false, - Module : { - _modules : {}, - _arrMdls : [] - }, - load : function(cL, cN) { - var T = this.current(cL); - if (T._status == this.Request.COMPLETED) { - return - } else { - if (T._status == this.Request.INITIAL) { - this.combine(cL); - this.pushUniqueMdl(cL); - var cM = this; - if (cM.delayFlag == false) { - cM.delayFlag = true; - window.setTimeout(function() { - var cO = cM.Config._baseUrl + "/modules" //"&mod=" - //+ cM.Module._arrMdls.join(","); - cx.request(cO); - cM.Module._arrMdls.length = 0; - cM.delayFlag = false - }, 1) - } - T._status = this.Request.WAITING - } - T._callbacks.push(cN) - } - }, - combine : function(T) { - if (T && this.Dependency[T]) { - var cM = this.Dependency[T]; - for ( var cL = 0; cL < cM.length; cL++) { - this.combine(cM[cL]); - if (!this.Module._modules[cM[cL]]) { - this.pushUniqueMdl(cM[cL]) - } - } - } - }, - pushUniqueMdl : function(cL) { - for ( var T = 0; T < this.Module._arrMdls.length; T++) { - if (this.Module._arrMdls[T] == cL) { - return - } - } - this.Module._arrMdls.push(cL) - }, - run : function(cM, cO) { - var cL = this.current(cM); - try { - eval(cO) - } catch (cP) { - return - } - cL._status = this.Request.COMPLETED; - for ( var cN = 0, T = cL._callbacks.length; cN < T; cN++) { - cL._callbacks[cN]() - } - cL._callbacks.length = 0 - }, - check : function(cL, cM) { - var T = this; - T.timeout = setTimeout(function() { - var cN = T.Module._modules[cL]._status; - if (cN != T.Request.COMPLETED) { - T.remove(cL); - T.load(cL, cM) - } else { - clearTimeout(T.timeout) - } - }, T.Config._timeout) - }, - current : function(cL) { - var T; - if (!this.Module._modules[cL]) { - this.Module._modules[cL] = {}; - this.Module._modules[cL]._status = this.Request.INITIAL; - this.Module._modules[cL]._callbacks = [] - } - T = this.Module._modules[cL]; - return T - }, - remove : function(cL) { - var T = this.current(cL); - delete T - } - }); - window._jsload = function(T, cL) { - cA.run(T, cL) - }; - function bu(T, cL) { - this.x = T || 0; - this.y = cL || 0 - } - bu.prototype.equals = function(T) { - return T && T.x == this.x && T.y == this.y - }; - function aH(cL, T) { - this.width = cL || 0; - this.height = T || 0 - } - aH.prototype.equals = function(T) { - return T && this.width == T.width && this.height == T.height - }; - function cm(T, cL) { - if (!T) { - return - } - this._position = T; - this.guid = "spot" + (cm.guid++); - cL = cL || {}; - this._text = cL.text || ""; - this._offsets = cL.offsets ? cL.offsets.slice(0) : [ 5, 5, 5, 5 ]; - this._userData = cL.userData || null; - this._minZoom = cL.minZoom || null; - this._maxZoom = cL.maxZoom || null - } - cm.guid = 0; - a8.extend(cm.prototype, { - initialize : function(T) { - if (this._minZoom == null) { - this._minZoom = T.config.minZoom - } - if (this._maxZoom == null) { - this._maxZoom = T.config.maxZoom - } - }, - setPosition : function(T) { - if (T instanceof cd) { - this._position = T - } - }, - getPosition : function() { - return this._position - }, - setText : function(T) { - this._text = T - }, - getText : function() { - return this._text - }, - setUserData : function(T) { - this._userData = T - }, - getUserData : function() { - return this._userData - } - }); - function cp() { - this._map = null; - this._container; - this._type = "control"; - this.blockInfoWindow = true; - this._visible = true - } - a8.lang.inherits(cp, a8.lang.Class, "Control"); - a8 - .extend( - cp.prototype, - { - initialize : function(T) { - this._map = T; - if (this._container) { - T.container.appendChild(this._container); - return this._container - } - return - }, - _i : function(T) { - if (!this._container && this.initialize - && I(this.initialize)) { - this._container = this.initialize(T) - } - this._opts = this._opts || { - printable : false - }; - this._setStyle(); - this._setPosition(); - if (this._container) { - this._container._jsobj = this - } - }, - _setStyle : function() { - var cL = this._container; - if (cL) { - var T = cL.style; - T.position = "absolute"; - T.zIndex = this._cZIndex || "10"; - T.MozUserSelect = "none"; - T.WebkitTextSizeAdjust = "none"; - if (!this._opts.printable) { - a8.dom.addClass(cL, "BMap_noprint") - } - a8.on(cL, "contextmenu", co) - } - }, - remove : function() { - this._map = null; - if (!this._container) { - return - } - this._container.parentNode - && this._container.parentNode - .removeChild(this._container); - this._container._jsobj = null; - this._container = null - }, - _render : function() { - this._container = at(this._map.container, - "
"); - if (this._visible == false) { - a8.dom.hide(this._container) - } - return this._container - }, - _setPosition : function() { - this.setAnchor(this._opts.anchor) - }, - setAnchor : function(cN) { - if (this.anchorFixed || !aK(cN) || isNaN(cN) - || cN < BMAP_ANCHOR_TOP_LEFT - || cN > BMAP_ANCHOR_BOTTOM_RIGHT) { - cN = this.defaultAnchor - } - this._opts = this._opts || { - printable : false - }; - this._opts.offset = this._opts.offset - || this.defaultOffset; - var cM = this._opts.anchor; - this._opts.anchor = cN; - if (!this._container) { - return - } - var cP = this._container; - var T = this._opts.offset.width; - var cO = this._opts.offset.height; - cP.style.left = cP.style.top = cP.style.right = cP.style.bottom = "auto"; - switch (cN) { - case BMAP_ANCHOR_TOP_LEFT: - cP.style.top = cO + "px"; - cP.style.left = T + "px"; - break; - case BMAP_ANCHOR_TOP_RIGHT: - cP.style.top = cO + "px"; - cP.style.right = T + "px"; - break; - case BMAP_ANCHOR_BOTTOM_LEFT: - cP.style.bottom = cO + "px"; - cP.style.left = T + "px"; - break; - case BMAP_ANCHOR_BOTTOM_RIGHT: - cP.style.bottom = cO + "px"; - cP.style.right = T + "px"; - break; - default: - break - } - var cL = [ "TL", "TR", "BL", "BR" ]; - a8.dom.removeClass(this._container, "anchor" - + cL[cM]); - a8.dom.addClass(this._container, "anchor" + cL[cN]) - }, - getAnchor : function() { - return this._opts.anchor - }, - setOffset : function(T) { - if (!(T instanceof aH)) { - return - } - this._opts = this._opts || { - printable : false - }; - this._opts.offset = new aH(T.width, T.height); - if (!this._container) { - return - } - this.setAnchor(this._opts.anchor) - }, - getOffset : function() { - return this._opts.offset - }, - getDom : function() { - return this._container - }, - show : function() { - if (this._visible == true) { - return - } - this._visible = true; - if (this._container) { - a8.dom.show(this._container) - } - }, - hide : function() { - if (this._visible == false) { - return - } - this._visible = false; - if (this._container) { - a8.dom.hide(this._container) - } - }, - isPrintable : function() { - return !!this._opts.printable - }, - isVisible : function() { - if (!this._container && !this._map) { - return false - } - return !!this._visible - } - }); - window.BMAP_ANCHOR_TOP_LEFT = 0; - window.BMAP_ANCHOR_TOP_RIGHT = 1; - window.BMAP_ANCHOR_BOTTOM_LEFT = 2; - window.BMAP_ANCHOR_BOTTOM_RIGHT = 3; - window.BMAP_NAVIGATION_CONTROL_LARGE = 0; - window.BMAP_NAVIGATION_CONTROL_SMALL = 1; - window.BMAP_NAVIGATION_CONTROL_PAN = 2; - window.BMAP_NAVIGATION_CONTROL_ZOOM = 3; - function L(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false, - showZoomInfo : true - }; - a8.object.extend(this._opts, T); - this.defaultAnchor = BMAP_ANCHOR_TOP_LEFT; - this.defaultOffset = new aH(10, 10); - this.setAnchor(T.anchor); - this.setType(T.type); - this._asyncLoadCode() - } - a8.lang.inherits(L, cp, "NavigationControl"); - a8.extend(L.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setType : function(T) { - if (aK(T) && T >= BMAP_NAVIGATION_CONTROL_LARGE - && T <= BMAP_NAVIGATION_CONTROL_ZOOM) { - this._opts.type = T - } else { - this._opts.type = BMAP_NAVIGATION_CONTROL_LARGE - } - }, - getType : function() { - return this._opts.type - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function am(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - a8.object.extend(this._opts, T); - this._copyrightCollection = []; - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_LEFT; - this.defaultOffset = new aH(5, 2); - this.setAnchor(T.anchor); - this._canShow = true; - this.blockInfoWindow = false; - this._asyncLoadCode() - } - a8.lang.inherits(am, cp, "CopyrightControl"); - a8.object - .extend( - am.prototype, - { - initialize : function(T) { - this._map = T; - return this._container - }, - addCopyright : function(cM) { - if (!cM || !aK(cM.id) || isNaN(cM.id)) { - return - } - var T = { - bounds : null, - content : "" - }; - for ( var cL in cM) { - T[cL] = cM[cL] - } - var cN = this.getCopyright(cM.id); - if (cN) { - for ( var cO in T) { - cN[cO] = T[cO] - } - } else { - this._copyrightCollection.push(T) - } - }, - getCopyright : function(cM) { - for ( var cL = 0, T = this._copyrightCollection.length; cL < T; cL++) { - if (this._copyrightCollection[cL].id == cM) { - return this._copyrightCollection[cL] - } - } - }, - getCopyrightCollection : function() { - return this._copyrightCollection - }, - removeCopyright : function(cM) { - for ( var cL = 0, T = this._copyrightCollection.length; cL < T; cL++) { - if (this._copyrightCollection[cL].id == cM) { - r = this._copyrightCollection.splice(cL, 1); - cL--; - T = this._copyrightCollection.length - } - } - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function cK(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - this._opts = a8.extend(a8.extend(this._opts, { - size : new aH(150, 150), - padding : 5, - isOpen : false, - zoomInterval : 4 - }), T); - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_RIGHT; - this.defaultOffset = new aH(0, 0); - this._btnWidth = 13; - this._btnHeight = 13; - this.setAnchor(T.anchor); - this.setSize(this._opts.size); - this._asyncLoadCode() - } - a8.lang.inherits(cK, cp, "OverviewMapControl"); - a8.extend(cK.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setAnchor : function(T) { - cp.prototype.setAnchor.call(this, T) - }, - changeView : function() { - this.changeView._running = true; - this._opts.isOpen = !this._opts.isOpen; - if (!this._container) { - this.changeView._running = false - } - }, - setSize : function(T) { - if (!(T instanceof aH)) { - T = new aH(150, 150) - } - T.width = T.width > 0 ? T.width : 150; - T.height = T.height > 0 ? T.height : 150; - this._opts.size = T - }, - getSize : function() { - return this._opts.size - }, - isOpen : function() { - return this._opts.isOpen - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function bK(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - this._opts = a8.object.extend(a8.object.extend(this._opts, { - color : "black", - unit : "metric" - }), T); - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_LEFT; - this.defaultOffset = new aH(81, 18); - this.setAnchor(T.anchor); - this._units = { - metric : { - name : "metric", - conv : 1, - incon : 1000, - u1 : "\u7c73", - u2 : "\u516c\u91cc" - }, - us : { - name : "us", - conv : 3.2808, - incon : 5280, - u1 : "\u82f1\u5c3a", - u2 : "\u82f1\u91cc" - } - }; - if (!this._units[this._opts.unit]) { - this._opts.unit = "metric" - } - this._scaleText = null; - this._numberArray = {}; - this._asyncLoadCode() - } - window.BMAP_UNIT_METRIC = "metric"; - window.BMAP_UNIT_IMPERIAL = "us"; - a8.lang.inherits(bK, cp, "ScaleControl"); - a8.object.extend(bK.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setColor : function(T) { - this._opts.color = T + "" - }, - getColor : function() { - return this._opts.color - }, - setUnit : function(T) { - this._opts.unit = this._units[T] && this._units[T].name - || this._opts.unit - }, - getUnit : function() { - return this._opts.unit - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - window.BMAP_MAPTYPE_CONTROL_HORIZONTAL = 0; - window.BMAP_MAPTYPE_CONTROL_DROPDOWN = 1; - function aL(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false, - mapTypes : [ BMAP_NORMAL_MAP, BMAP_SATELLITE_MAP, BMAP_HYBRID_MAP, - BMAP_PERSPECTIVE_MAP ], - type : BMAP_MAPTYPE_CONTROL_HORIZONTAL - }; - this.defaultAnchor = BMAP_ANCHOR_TOP_RIGHT; - this.defaultOffset = new aH(10, 10); - this.setAnchor(T.anchor); - this._opts = a8.extend(a8.extend(this._opts, { - offset : this.defaultOffset, - enableSwitch : true - }), T); - if (aY(T.mapTypes)) { - this._opts.mapTypes = T.mapTypes.slice(0) - } - this._asyncLoadCode() - } - a8.lang.inherits(aL, cp, "MapTypeControl"); - a8.object.extend(aL.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function cz(cL) { - a8.lang.Class.call(this); - this._opts = { - container : null, - cursor : "default" - }; - this._opts = a8.extend(this._opts, cL); - this._type = "contextmenu"; - this._map = null; - this._container; - this._shadow; - this._left = 0; - this._top = 0; - this._items = []; - this._rItems = []; - this._dividers = []; - this.curPixel = null; - this.curPoint = null; - this._isOpen = false; - var T = this; - cA.load("menu", function() { - T._draw() - }) - } - a8.lang.inherits(cz, a8.lang.Class, "ContextMenu"); - a8.object.extend(cz.prototype, { - initialize : function(cL, T) { - this._map = cL; - this._overlay = T || null - }, - remove : function() { - this._map = this._overlay = null - }, - addItem : function(cM) { - if (!cM || cM._type != "menuitem" || cM._text == "" - || cM._width <= 0) { - return - } - for ( var cL = 0, T = this._items.length; cL < T; cL++) { - if (this._items[cL] === cM) { - return - } - } - this._items.push(cM); - this._rItems.push(cM) - }, - removeItem : function(cM) { - if (!cM || cM._type != "menuitem") { - return - } - for ( var cL = 0, T = this._items.length; cL < T; cL++) { - if (this._items[cL] === cM) { - this._items[cL].remove(); - this._items.splice(cL, 1); - T-- - } - } - for ( var cL = 0, T = this._rItems.length; cL < T; cL++) { - if (this._rItems[cL] === cM) { - this._rItems[cL].remove(); - this._rItems.splice(cL, 1); - T-- - } - } - }, - addSeparator : function() { - this._items.push( { - _type : "divider", - _dIndex : this._dividers.length - }); - this._dividers.push( { - dom : null - }) - }, - removeSeparator : function(cL) { - if (!this._dividers[cL]) { - return - } - for ( var cM = 0, T = this._items.length; cM < T; cM++) { - if (this._items[cM] && this._items[cM]._type == "divider" - && this._items[cM]._dIndex == cL) { - this._items.splice(cM, 1); - T-- - } - if (this._items[cM] && this._items[cM]._type == "divider" - && this._items[cM]._dIndex > cL) { - this._items[cM]._dIndex-- - } - } - this._dividers.splice(cL, 1) - }, - getDom : function() { - return this._container - }, - show : function() { - if (this._isOpen == true) { - return - } - this._isOpen = true - }, - hide : function() { - if (this._isOpen == false) { - return - } - this._isOpen = false - }, - setCursor : function(T) { - if (!T) { - return - } - this._opts.cursor = T - }, - getItem : function(T) { - return this._rItems[T] - } - }); - function be(cM, cN, cL) { - if (!cM || !I(cN)) { - return - } - a8.lang.Class.call(this); - this._opts = { - width : 100, - id : "" - }; - cL = cL || {}; - this._opts.width = (cL.width * 1) ? cL.width : 100; - this._opts.id = cL.id ? cL.id : ""; - this._text = cM + ""; - this._callback = cN; - this._map = null; - this._type = "menuitem"; - this._contextmenu = null; - this._container = null; - this._enabled = true; - var T = this; - cA.load("menu", function() { - T._draw() - }) - } - a8.lang.inherits(be, a8.lang.Class, "MenuItem"); - a8.object.extend(be.prototype, { - initialize : function(T, cL) { - this._map = T; - this._contextmenu = cL - }, - remove : function() { - this._contextmenu = null; - this._map = null - }, - setText : function(T) { - if (!T) { - return - } - this._text = T + "" - }, - getDom : function() { - return this._container - }, - enable : function() { - this._enabled = true - }, - disable : function() { - this._enabled = false - } - }); - function bN(T, cL) { - if (T && !cL) { - cL = T - } - this._sw = this._ne = null; - this._swLng = this._swLat = null; - this._neLng = this._neLat = null; - if (T) { - this._sw = new cd(T.lng, T.lat); - this._ne = new cd(cL.lng, cL.lat); - this._swLng = T.lng; - this._swLat = T.lat; - this._neLng = cL.lng; - this._neLat = cL.lat - } - } - a8.object.extend(bN.prototype, { - isEmpty : function() { - return !this._sw || !this._ne - }, - equals : function(T) { - if (!(T instanceof bN) || this.isEmpty()) { - return false - } - return this.getSouthWest().equals(T.getSouthWest()) - && this.getNorthEast().equals(T.getNorthEast()) - }, - getSouthWest : function() { - return this._sw - }, - getNorthEast : function() { - return this._ne - }, - containsBounds : function(T) { - if (!(T instanceof bN) || this.isEmpty() || T.isEmpty()) { - return false - } - return (T._swLng > this._swLng && T._neLng < this._neLng - && T._swLat > this._swLat && T._neLat < this._neLat) - }, - getCenter : function() { - if (this.isEmpty()) { - return null - } - return new cd((this._swLng + this._neLng) / 2, - (this._swLat + this._neLat) / 2) - }, - intersects : function(cM) { - if (!(cM instanceof bN)) { - return null - } - if (Math.max(cM._swLng, cM._neLng) < Math.min(this._swLng, - this._neLng) - || Math.min(cM._swLng, cM._neLng) > Math.max(this._swLng, - this._neLng) - || Math.max(cM._swLat, cM._neLat) < Math.min(this._swLat, - this._neLat) - || Math.min(cM._swLat, cM._neLat) > Math.max(this._swLat, - this._neLat)) { - return null - } - var cO = Math.max(this._swLng, cM._swLng); - var cL = Math.min(this._neLng, cM._neLng); - var cN = Math.max(this._swLat, cM._swLat); - var T = Math.min(this._neLat, cM._neLat); - return new bN(new cd(cO, cN), new cd(cL, T)) - }, - containsPoint : function(T) { - if (!(T instanceof cd) || this.isEmpty()) { - return false - } - return (T.lng >= this._swLng && T.lng <= this._neLng - && T.lat >= this._swLat && T.lat <= this._neLat) - }, - extend : function(T) { - if (!(T instanceof cd)) { - return - } - var cL = T.lng, cM = T.lat; - if (!this._sw) { - this._sw = new cd(0, 0) - } - if (!this._ne) { - this._ne = new cd(0, 0) - } - if (!this._swLng || this._swLng > cL) { - this._sw.lng = this._swLng = cL - } - if (!this._neLng || this._neLng < cL) { - this._ne.lng = this._neLng = cL - } - if (!this._swLat || this._swLat > cM) { - this._sw.lat = this._swLat = cM - } - if (!this._neLat || this._neLat < cM) { - this._ne.lat = this._neLat = cM - } - }, - toSpan : function() { - if (this.isEmpty()) { - return new cd(0, 0) - } - return new cd(Math.abs(this._neLng - this._swLng), Math - .abs(this._neLat - this._swLat)) - } - }); - function cd(T, cL) { - if (isNaN(T)) { - T = bV(T); - T = isNaN(T) ? 0 : T - } - if (b3(T)) { - T = parseFloat(T) - } - if (isNaN(cL)) { - cL = bV(cL); - cL = isNaN(cL) ? 0 : cL - } - if (b3(cL)) { - cL = parseFloat(cL) - } - this.lng = T; - this.lat = cL - } - cd.isInRange = function(T) { - return T && T.lng <= 180 && T.lng >= -180 && T.lat <= 74 - && T.lat >= -74 - }; - cd.prototype.equals = function(T) { - return T && this.lat == T.lat && this.lng == T.lng - }; - function bd() { - } - bd.prototype.lngLatToPoint = function() { - throw "lngLatToPoint\u65b9\u6cd5\u672a\u5b9e\u73b0" - }; - bd.prototype.pointToLngLat = function() { - throw "pointToLngLat\u65b9\u6cd5\u672a\u5b9e\u73b0" - }; - function b6() { - } - a8 - .extend( - b6, - { - num : { - bj : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 6) - }, - gz : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - }, - sz : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - }, - sh : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - } - }, - correct_pts : { - bj : [ { - j : 116.305687, - w : 39.990912, - utm_x : 12947230.73, - utm_y : 4836903.65, - x : 630412, - y : 547340 - }, { - j : 116.381837, - w : 40.000198, - utm_x : 12955707.8, - utm_y : 4838247.62, - x : 667412, - y : 561832 - }, { - j : 116.430651, - w : 39.995216, - utm_x : 12961141.81, - utm_y : 4837526.55, - x : 686556, - y : 573372 - }, { - j : 116.474111, - w : 39.976323, - utm_x : 12965979.81, - utm_y : 4834792.55, - x : 697152, - y : 586816 - }, { - j : 116.280328, - w : 39.953159, - utm_x : 12944407.75, - utm_y : 4831441.53, - x : 603272, - y : 549976 - }, { - j : 116.316117, - w : 39.952496, - utm_x : 12948391.8, - utm_y : 4831345.64, - x : 618504, - y : 557872 - }, { - j : 116.350477, - w : 39.938107, - utm_x : 12952216.78, - utm_y : 4829264.65, - x : 627044, - y : 568220 - }, { - j : 116.432025, - w : 39.947158, - utm_x : 12961294.76, - utm_y : 4830573.59, - x : 666280, - y : 584016 - }, { - j : 116.46873, - w : 39.949516, - utm_x : 12965380.79, - utm_y : 4830914.63, - x : 683328, - y : 591444 - }, { - j : 116.280077, - w : 39.913823, - utm_x : 12944379.8, - utm_y : 4825753.62, - x : 586150, - y : 558552 - }, { - j : 116.308625, - w : 39.91374, - utm_x : 12947557.79, - utm_y : 4825741.62, - x : 598648, - y : 564732 - }, { - j : 116.369853, - w : 39.912979, - utm_x : 12954373.73, - utm_y : 4825631.62, - x : 624561, - y : 578039 - }, { - j : 116.433552, - w : 39.914694, - utm_x : 12961464.75, - utm_y : 4825879.53, - x : 652972, - y : 591348 - }, { - j : 116.457034, - w : 39.914273, - utm_x : 12964078.78, - utm_y : 4825818.67, - x : 663028, - y : 596444 - }, { - j : 116.490927, - w : 39.914127, - utm_x : 12967851.77, - utm_y : 4825797.57, - x : 677968, - y : 604188 - }, { - j : 116.483839, - w : 39.877198, - utm_x : 12967062.73, - utm_y : 4820460.67, - x : 658596, - y : 610312 - }, { - j : 116.405777, - w : 39.864461, - utm_x : 12958372.82, - utm_y : 4818620.62, - x : 619256, - y : 596088 - }, { - j : 116.35345, - w : 39.859774, - utm_x : 12952547.74, - utm_y : 4817943.6, - x : 594633, - y : 585851 - }, { - j : 116.403818, - w : 39.9141, - utm_x : 12958154.74, - utm_y : 4825793.66, - x : 639699, - y : 585226 - }, { - j : 116.318111, - w : 39.891101, - utm_x : 12948613.78, - utm_y : 4822469.56, - x : 592856, - y : 571480 - }, { - j : 116.413047, - w : 39.907238, - utm_x : 12959182.12, - utm_y : 4824801.76, - x : 640680, - y : 588704 - }, { - j : 116.390843, - w : 39.906113, - utm_x : 12956710.35, - utm_y : 4824639.16, - x : 630620, - y : 584108 - }, { - j : 116.446527, - w : 39.899438, - utm_x : 12962909.14, - utm_y : 4823674.4, - x : 651752, - y : 597416 - }, { - j : 116.388665, - w : 39.95527, - utm_x : 12956467.9, - utm_y : 4831746.87, - x : 650656, - y : 572800 - }, { - j : 116.398343, - w : 39.939704, - utm_x : 12957545.26, - utm_y : 4829495.6, - x : 648036, - y : 578452 - }, { - j : 116.355101, - w : 39.973581, - utm_x : 12952731.53, - utm_y : 4834395.82, - x : 643268, - y : 560944 - }, { - j : 116.380727, - w : 39.88464, - utm_x : 12955584.23, - utm_y : 4821535.94, - x : 616920, - y : 586496 - }, { - j : 116.360843, - w : 39.946452, - utm_x : 12953370.73, - utm_y : 4830471.48, - x : 635293, - y : 568765 - }, { - j : 116.340955, - w : 39.973421, - utm_x : 12951156.79, - utm_y : 4834372.67, - x : 638420, - y : 558632 - }, { - j : 116.322585, - w : 40.023941, - utm_x : 12949111.83, - utm_y : 4841684.79, - x : 652135, - y : 543802 - }, { - j : 116.356486, - w : 39.883341, - utm_x : 12952885.71, - utm_y : 4821348.24, - x : 606050, - y : 581443 - }, { - j : 116.339592, - w : 39.992259, - utm_x : 12951005.06, - utm_y : 4837098.59, - x : 645664, - y : 554400 - }, { - j : 116.3778, - w : 39.86392, - utm_x : 12955258.4, - utm_y : 4818542.48, - x : 606848, - y : 590328 - }, { - j : 116.377354, - w : 39.964124, - utm_x : 12955208.75, - utm_y : 4833027.64, - x : 649911, - y : 568581 - }, { - j : 116.361837, - w : 39.963897, - utm_x : 12953481.39, - utm_y : 4832994.8, - x : 643286, - y : 565175 - }, { - j : 116.441397, - w : 39.939403, - utm_x : 12962338.06, - utm_y : 4829452.07, - x : 666772, - y : 587728 - }, { - j : 116.359176, - w : 40.006631, - utm_x : 12953185.16, - utm_y : 4839178.78, - x : 660440, - y : 555411 - } ], - sz : [ { - w : 22.498861, - utm_x : 12677279.029193671, - utm_y : 2555027.9501714734, - j : 113.880696, - y : 1104472, - x : 947240 - }, { - w : 22.500706, - utm_x : 12683920.978881944, - utm_y : 2555248.973138607, - j : 113.940361, - y : 1122320, - x : 974864 - }, { - w : 22.576848, - utm_x : 12675897.984563945, - utm_y : 2564373.058056766, - j : 113.86829, - y : 1074048, - x : 979136 - }, { - w : 22.55689, - utm_x : 12680064.05051775, - utm_y : 2561981.0013635466, - j : 113.905714, - y : 1092484, - x : 986240 - }, { - w : 22.58066, - utm_x : 12678671.98513852, - utm_y : 2564829.983373251, - j : 113.893209, - y : 1080528, - x : 992088 - }, { - w : 22.595751, - utm_x : 12678298.949465925, - utm_y : 2566638.9913895614, - j : 113.889858, - y : 1074484, - x : 997960 - }, { - w : 22.557499, - utm_x : 12684523.001238672, - utm_y : 2562053.9875916084, - j : 113.945769, - y : 1104696, - x : 1004564 - }, { - w : 22.648419, - utm_x : 12676422.97299485, - utm_y : 2572954.0513219936, - j : 113.873006, - y : 1051384, - x : 1015916 - }, { - w : 22.562664, - utm_x : 12690460.958807131, - utm_y : 2562673.0054078405, - j : 113.99911, - y : 1119860, - x : 1030228 - }, { - w : 22.646618, - utm_x : 12683008.037804369, - utm_y : 2572738.0652955617, - j : 113.93216, - y : 1070324, - x : 1041496 - }, { - w : 22.571091, - utm_x : 12695789.992135335, - utm_y : 2563683.019582462, - j : 114.046981, - y : 1131924, - x : 1055628 - }, { - w : 22.704467, - utm_x : 12682276.994753957, - utm_y : 2579677.075645295, - j : 113.925593, - y : 1048536, - x : 1066348 - }, { - w : 22.547152, - utm_x : 12702917.96800879, - utm_y : 2560813.9850610085, - j : 114.111012, - y : 1160352, - x : 1072596 - }, { - w : 22.546192, - utm_x : 12704502.952164687, - utm_y : 2560698.9417545213, - j : 114.12525, - y : 1165256, - x : 1078452 - }, { - w : 22.5714, - utm_x : 12702350.00978689, - utm_y : 2563720.0558210905, - j : 114.10591, - y : 1150556, - x : 1081960 - }, { - w : 22.555004, - utm_x : 12704883.001041513, - utm_y : 2561754.9738317807, - j : 114.128664, - y : 1163304, - x : 1084172 - }, { - w : 22.551925, - utm_x : 12706255.028694374, - utm_y : 2561385.978019464, - j : 114.140989, - y : 1168216, - x : 1088116 - }, { - w : 22.693756, - utm_x : 12690318.02302569, - utm_y : 2578392.0635360866, - j : 113.997826, - y : 1075100, - x : 1092860 - }, { - w : 22.573769, - utm_x : 12705731.042149788, - utm_y : 2564004.003107545, - j : 114.136282, - y : 1159404, - x : 1096572 - }, { - w : 22.583238, - utm_x : 12706369.021093281, - utm_y : 2565139.002548978, - j : 114.142013, - y : 1157896, - x : 1103632 - }, { - w : 22.605844, - utm_x : 12704694.980375737, - utm_y : 2567848.984570506, - j : 114.126975, - y : 1145540, - x : 1107972 - }, { - w : 22.637228, - utm_x : 12702545.043656897, - utm_y : 2571612.010208761, - j : 114.107662, - y : 1128764, - x : 1114460 - }, { - w : 22.62496, - utm_x : 12707132.013185183, - utm_y : 2570140.9407190788, - j : 114.148867, - y : 1145732, - x : 1127028 - }, { - w : 22.644524, - utm_x : 12707016.01701364, - utm_y : 2572486.9446672536, - j : 114.147825, - y : 1138800, - x : 1135876 - }, { - w : 22.640188, - utm_x : 12711515.0431873, - utm_y : 2571966.966986786, - j : 114.18824, - y : 1152692, - x : 1151836 - }, { - w : 22.59807, - utm_x : 12720011.039168343, - utm_y : 2566916.995355996, - j : 114.26456, - y : 1191212, - x : 1165180 - }, { - w : 22.668221, - utm_x : 12714081.987256048, - utm_y : 2575329.007304823, - j : 114.211299, - y : 1150576, - x : 1175404 - }, { - w : 22.702591, - utm_x : 12717292.031020584, - utm_y : 2579452.0022288463, - j : 114.240135, - y : 1148204, - x : 1204600 - }, { - w : 22.731786, - utm_x : 12717795.9798388, - utm_y : 2582955.0308636553, - j : 114.244662, - y : 1139532, - x : 1220540 - }, { - w : 22.727494, - utm_x : 12720675.957721734, - utm_y : 2582439.9980541077, - j : 114.270533, - y : 1148992, - x : 1230084 - }, { - w : 22.716335, - utm_x : 12725500.040345404, - utm_y : 2581101.0132384477, - j : 114.313868, - y : 1166316, - x : 1244102 - } ], - gz : [ { - j : 113.335098, - w : 23.147289, - utm_x : 12616542.68, - utm_y : 2632892.7, - x : 1129109, - y : 1073920 - }, { - j : 113.320932, - w : 23.146956, - utm_x : 12614965.71, - utm_y : 2632852.62, - x : 1125620, - y : 1071640 - }, { - j : 113.321435, - w : 23.140119, - utm_x : 12615021.7, - utm_y : 2632029.65, - x : 1124032, - y : 1072882 - }, { - j : 113.321471, - w : 23.119165, - utm_x : 12615025.71, - utm_y : 2629507.68, - x : 1118932, - y : 1076530 - }, { - j : 113.340201, - w : 23.118616, - utm_x : 12617110.75, - utm_y : 2629441.61, - x : 1123238, - y : 1079667 - }, { - j : 113.358068, - w : 23.116323, - utm_x : 12619099.71, - utm_y : 2629165.66, - x : 1126968, - y : 1083116 - }, { - j : 113.357529, - w : 23.131271, - utm_x : 12619039.71, - utm_y : 2630964.68, - x : 1130508, - y : 1080440 - }, { - j : 113.365811, - w : 23.150595, - utm_x : 12619961.67, - utm_y : 2633290.66, - x : 1137205, - y : 1078567 - }, { - j : 113.294145, - w : 23.118467, - utm_x : 12611983.76, - utm_y : 2629423.68, - x : 1112245, - y : 1072043 - }, { - j : 113.28615, - w : 23.121525, - utm_x : 12611093.75, - utm_y : 2629791.7, - x : 1110993, - y : 1070197 - }, { - j : 113.307152, - w : 23.055497, - utm_x : 12613431.71, - utm_y : 2621847.21, - x : 1100144, - y : 1085123 - }, { - j : 113.333445, - w : 23.052687, - utm_x : 12616358.66, - utm_y : 2621509.2, - x : 1105784, - y : 1089948 - }, { - j : 113.347476, - w : 23.048755, - utm_x : 12617920.6, - utm_y : 2621036.24, - x : 1108099, - y : 1093064 - }, { - j : 113.385774, - w : 23.036574, - utm_x : 12622183.96, - utm_y : 2619571.12, - x : 1113850, - y : 1101834 - }, { - j : 113.364185, - w : 22.89798, - utm_x : 12619780.66, - utm_y : 2602910.64, - x : 1073186, - y : 1123374 - }, { - j : 113.404577, - w : 22.906481, - utm_x : 12624277.13, - utm_y : 2603932.06, - x : 1084888, - y : 1128692 - }, { - j : 113.430856, - w : 22.913156, - utm_x : 12627202.52, - utm_y : 2604734.12, - x : 1092892, - y : 1131761 - }, { - j : 113.384554, - w : 22.933021, - utm_x : 12622048.15, - utm_y : 2607121.32, - x : 1086975, - y : 1120403 - }, { - j : 113.263566, - w : 23.146333, - utm_x : 12608579.68, - utm_y : 2632777.63, - x : 1111742, - y : 1062098 - }, { - j : 113.239213, - w : 23.152996, - utm_x : 12605868.69, - utm_y : 2633579.69, - x : 1107616, - y : 1056740 - }, { - j : 113.253865, - w : 23.131628, - utm_x : 12607499.76, - utm_y : 2631007.65, - x : 1105912, - y : 1062966 - }, { - j : 113.240767, - w : 23.088434, - utm_x : 12606041.68, - utm_y : 2625809.7, - x : 1092270, - y : 1068184 - }, { - j : 113.279628, - w : 23.088284, - utm_x : 12610367.72, - utm_y : 2625791.65, - x : 1101412, - y : 1074883 - }, { - j : 113.462271, - w : 23.107058, - utm_x : 12630699.66, - utm_y : 2628050.7, - x : 1148752, - y : 1101736 - }, { - j : 113.401618, - w : 23.052957, - utm_x : 12623947.73, - utm_y : 2621541.68, - x : 1121925, - y : 1101535 - }, { - j : 113.422504, - w : 23.05905, - utm_x : 12626272.77, - utm_y : 2622274.61, - x : 1128470, - y : 1104049 - }, { - j : 113.362506, - w : 23.107149, - utm_x : 12619593.75, - utm_y : 2628061.65, - x : 1125835, - y : 1085505 - }, { - j : 113.419629, - w : 23.143176, - utm_x : 12625952.73, - utm_y : 2632397.61, - x : 1148133, - y : 1089052 - }, { - j : 113.23315, - w : 23.062251, - utm_x : 12605193.75, - utm_y : 2622659.67, - x : 1084184, - y : 1071368 - }, { - j : 113.314525, - w : 23.101412, - utm_x : 12614252.48, - utm_y : 2627371.29, - x : 1113011, - y : 1078426 - }, { - j : 113.307947, - w : 23.131369, - utm_x : 12613520.21, - utm_y : 2630976.47, - x : 1118622, - y : 1072198 - } ], - sh : [ { - j : 121.524411, - w : 31.245875, - utm_x : 13528182.75, - utm_y : 3642354.51, - x : 1086581, - y : 1065728 - }, { - j : 121.419229, - w : 31.244887, - utm_x : 13516473.81, - utm_y : 3642226.51, - x : 1032616, - y : 1029148 - }, { - j : 121.405637, - w : 31.237871, - utm_x : 13514960.74, - utm_y : 3641317.54, - x : 1022724, - y : 1027244 - }, { - j : 121.415348, - w : 31.222879, - utm_x : 13516041.78, - utm_y : 3639375.47, - x : 1018548, - y : 1036980 - }, { - j : 121.422561, - w : 31.224261, - utm_x : 13516844.73, - utm_y : 3639554.48, - x : 1022976, - y : 1038908 - }, { - j : 121.412581, - w : 31.204148, - utm_x : 13515733.75, - utm_y : 3636949.48, - x : 1006568, - y : 1043696 - }, { - j : 121.443025, - w : 31.206202, - utm_x : 13519122.8, - utm_y : 3637215.49, - x : 1022656, - y : 1053704 - }, { - j : 121.524061, - w : 31.246917, - utm_x : 13528143.79, - utm_y : 3642489.52, - x : 1082052, - y : 1064124 - }, { - j : 121.529343, - w : 31.217769, - utm_x : 13528731.78, - utm_y : 3638713.59, - x : 1072696, - y : 1079064 - }, { - j : 121.530268, - w : 31.210341, - utm_x : 13528834.75, - utm_y : 3637751.53, - x : 1068748, - y : 1082416 - }, { - j : 121.511601, - w : 31.227303, - utm_x : 13526756.73, - utm_y : 3639948.53, - x : 1069276, - y : 1068716 - }, { - j : 121.4966, - w : 31.243614, - utm_x : 13525086.81, - utm_y : 3642061.58, - x : 1071220, - y : 1056805 - }, { - j : 121.485021, - w : 31.26138, - utm_x : 13523797.82, - utm_y : 3644363.54, - x : 1075708, - y : 1045540 - }, { - j : 121.465114, - w : 31.278803, - utm_x : 13521581.76, - utm_y : 3646621.48, - x : 1073740, - y : 1031268 - }, { - j : 121.454784, - w : 31.266566, - utm_x : 13520431.82, - utm_y : 3645035.58, - x : 1063591, - y : 1033191 - }, { - j : 121.46851, - w : 31.24951, - utm_x : 13521959.81, - utm_y : 3642825.48, - x : 1060200, - y : 1044520 - }, { - j : 121.446384, - w : 31.248422, - utm_x : 13519496.73, - utm_y : 3642684.51, - x : 1048784, - y : 1037750 - }, { - j : 121.509499, - w : 31.246469, - utm_x : 13526522.73, - utm_y : 3642431.47, - x : 1079309, - y : 1060105 - }, { - j : 121.481643, - w : 31.283943, - utm_x : 13523421.78, - utm_y : 3647287.68, - x : 1087096, - y : 1035304 - }, { - j : 121.508054, - w : 31.280609, - utm_x : 13526361.87, - utm_y : 3646855.56, - x : 1098432, - y : 1045648 - }, { - j : 121.493854, - w : 31.19121, - utm_x : 13524781.12, - utm_y : 3635274.07, - x : 1039624, - y : 1077288 - }, { - j : 121.500079, - w : 31.185541, - utm_x : 13525474.09, - utm_y : 3634540.04, - x : 1039960, - y : 1081640 - }, { - j : 121.484482, - w : 31.202846, - utm_x : 13523737.82, - utm_y : 3636780.87, - x : 1041388, - y : 1069232 - }, { - j : 121.480877, - w : 31.189587, - utm_x : 13523336.51, - utm_y : 3635063.92, - x : 1032484, - y : 1073640 - }, { - j : 121.502652, - w : 31.195209, - utm_x : 13525760.52, - utm_y : 3635791.9, - x : 1046384, - y : 1078728 - } ] - }, - getLnglatIndex : function(cN, cR, cQ) { - var cM = 0; - var cL = 0; - var cS = 10000000, cP = 1000000000; - for ( var cO = 0; cO < this.correct_pts[cN].length; cO++) { - var T = this.getDis(this.correct_pts[cN][cO].x, - this.correct_pts[cN][cO].y, cR, cQ); - if (T < cP) { - if (T < cS) { - cP = cS; - cS = T; - cL = cM; - cM = cO - } else { - sedMinDis = T; - cL = cO - } - } - } - return { - lt : cM, - rb : cL - } - }, - getOMapIndex_mm : function(cN, cS, cR) { - var cM = 0; - var cL = 0; - var cQ = 1294723000, cP = 1294723000; - for ( var cO = 0; cO < this.correct_pts[cN].length; cO++) { - var T = this.getDis( - this.correct_pts[cN][cO].utm_x, - this.correct_pts[cN][cO].utm_y, cS, cR); - if (T < cP) { - if (T < cQ) { - cP = cQ; - cQ = T; - cL = cM; - cM = cO - } else { - sedMinDis = T; - cL = cO - } - } - } - return { - lt : cM, - rb : cL - } - }, - getDis : function(T, cN, cL, cM) { - return Math.abs(T - cL) + Math.abs(cN - cM) - }, - toMap : function(cN, T, cO) { - var cL = (T - cO) * this.num[cN].num; - var cM = (T + cO) * this.num[cN].num - * this.num[cN].num2; - return { - x : cL, - y : cM - } - }, - fromMap : function(cN, T, cO) { - cO = cO / this.num[cN].num2; - var cL = (T + cO) / (this.num[cN].num * 2); - var cM = (cO - T) / (this.num[cN].num * 2); - return { - x : cL, - y : cM - } - }, - getDgPix_mm : function(cO, cT, cP) { - var cS = this.fromMap(cO, - this.correct_pts[cO][cT].x, - this.correct_pts[cO][cT].y); - var cQ = this.fromMap(cO, - this.correct_pts[cO][cP].x, - this.correct_pts[cO][cP].y); - var cY = cS.x, cL = cS.y; - var cX = cQ.x, T = cQ.y; - var cV = this.correct_pts[cO][cT].utm_x, cN = this.correct_pts[cO][cT].utm_y; - var cR = this.correct_pts[cO][cP].utm_x, cM = this.correct_pts[cO][cP].utm_y; - var cW = Math.abs((cR - cV) * 100000 / (cX - cY)); - var cU = Math.abs((cM - cN) * 100000 / (T - cL)); - return { - j : cW, - w : cU, - x : 100000 / cW, - y : 100000 / cU - } - }, - getPx_mm : function(c1, cX, cW, cO, cN) { - var cM = this.correct_pts[c1][cO]; - var T = this.correct_pts[c1][cO]; - var cU = this.getDgPix_mm(c1, cO, cN); - var cQ = this.fromMap(c1, cM.x, cM.y); - var cP = T.utm_x, c3 = T.utm_y; - var c2 = cX, cV = cW; - var c0 = cQ.x; - var cL = cQ.y; - var cS = c2 - cP, cZ = cV - c3; - var cT = cS * cU.x + c0; - var cR = -cZ * cU.y + cL; - var cY = this.toMap(c1, cT, cR); - return cY - }, - getJw_mm : function(cZ, cU, cT, cP, cO) { - var cS = this.correct_pts[cZ][cP]; - var cL = this.correct_pts[cZ][cP]; - var cV = this.getDgPix_mm(cZ, cP, cO); - var cX = this.fromMap(cZ, cU, cT); - var cN = this.fromMap(cZ, cS.x, cS.y); - var cQ = cL.utm_x, c0 = cL.utm_y; - var cY = cN.x; - var cM = cN.y; - var c1 = cX.x - cY, cW = cM - cX.y; - var cR = c1 / cV.x + cQ; - var T = cW / cV.y + c0; - return { - lng : cR, - lat : T - } - }, - getOMap_pts : function(cL, T) { - return this.getOMap_index(cL, T.lng, T.lat, T.lt, - T.rb) - }, - getMapJw_pts : function(cL, T) { - return this.getMapJw_index(cL, T.lng, - 9998336 - T.lat, T.lt, T.rb) - }, - getOMap_index : function(cQ, cP, cO, T, cN) { - if (!T || !cN) { - var cL = this.getOMapIndex_mm(cQ, cP, cO) - } else { - var cL = { - lt : T, - rb : cN - } - } - var cM = this.getPx_mm(cQ, cP, cO, cL.lt, cL.rb); - return { - x : Math.floor(cM.x), - y : 9998336 - Math.floor(cM.y), - lt : cL.lt, - rb : cL.rb - } - }, - getMapJw_index : function(cP, cM, cQ, cL, cO) { - if (!cL || !cO) { - var cN = this.getLnglatIndex(cP, cM, cQ) - } else { - var cN = { - lt : cL, - rb : cO - } - } - var T = this.getJw_mm(cP, cM, cQ, cN.lt, cN.rb); - return { - lng : T.lng, - lat : T.lat, - lt : cN.lt, - rb : cN.rb - } - } - }); - function ba() { - } - ba.prototype = new bd(); - a8.extend(ba, - { - EARTHRADIUS : 6370996.81, - MCBAND : [ 12890594.86, 8362377.87, 5591021, 3481989.83, - 1678043.12, 0 ], - LLBAND : [ 75, 60, 45, 30, 15, 0 ], - MC2LL : [ - [ 1.410526172116255e-8, 0.00000898305509648872, - -1.9939833816331, 200.9824383106796, - -187.2403703815547, 91.6087516669843, - -23.38765649603339, 2.57121317296198, - -0.03801003308653, 17337981.2 ], - [ -7.435856389565537e-9, 0.000008983055097726239, - -0.78625201886289, 96.32687599759846, - -1.85204757529826, -59.36935905485877, - 47.40033549296737, -16.50741931063887, - 2.28786674699375, 10260144.86 ], - [ -3.030883460898826e-8, 0.00000898305509983578, - 0.30071316287616, 59.74293618442277, - 7.357984074871, -25.38371002664745, - 13.45380521110908, -3.29883767235584, - 0.32710905363475, 6856817.37 ], - [ -1.981981304930552e-8, 0.000008983055099779535, - 0.03278182852591, 40.31678527705744, - 0.65659298677277, -4.44255534477492, - 0.85341911805263, 0.12923347998204, - -0.04625736007561, 4482777.06 ], - [ 3.09191371068437e-9, 0.000008983055096812155, - 0.00006995724062, 23.10934304144901, - -0.00023663490511, -0.6321817810242, - -0.00663494467273, 0.03430082397953, - -0.00466043876332, 2555164.4 ], - [ 2.890871144776878e-9, 0.000008983055095805407, - -3.068298e-8, 7.47137025468032, - -0.00000353937994, -0.02145144861037, - -0.00001234426596, 0.00010322952773, - -0.00000323890364, 826088.5 ] ], - LL2MC : [ - [ -0.0015702102444, 111320.7020616939, - 1704480524535203, -10338987376042340, - 26112667856603880, -35149669176653700, - 26595700718403920, -10725012454188240, - 1800819912950474, 82.5 ], - [ 0.0008277824516172526, 111320.7020463578, - 647795574.6671607, -4082003173.641316, - 10774905663.51142, -15171875531.51559, - 12053065338.62167, -5124939663.577472, - 913311935.9512032, 67.5 ], - [ 0.00337398766765, 111320.7020202162, - 4481351.045890365, -23393751.19931662, - 79682215.47186455, -115964993.2797253, - 97236711.15602145, -43661946.33752821, - 8477230.501135234, 52.5 ], - [ 0.00220636496208, 111320.7020209128, - 51751.86112841131, 3796837.749470245, - 992013.7397791013, -1221952.21711287, - 1340652.697009075, -620943.6990984312, - 144416.9293806241, 37.5 ], - [ -0.0003441963504368392, 111320.7020576856, - 278.2353980772752, 2485758.690035394, - 6070.750963243378, 54821.18345352118, - 9540.606633304236, -2710.55326746645, - 1405.483844121726, 22.5 ], - [ -0.0003218135878613132, 111320.7020701615, - 0.00369383431289, 823725.6402795718, - 0.46104986909093, 2351.343141331292, - 1.58060784298199, 8.77738589078284, - 0.37238884252424, 7.45 ] ], - getDistanceByMC : function(cP, cN) { - if (!cP || !cN) { - return 0 - } - var cL, cO, T, cM; - cP = this.convertMC2LL(cP); - if (!cP) { - return 0 - } - cL = this.toRadians(cP.lng); - cO = this.toRadians(cP.lat); - cN = this.convertMC2LL(cN); - if (!cN) { - return 0 - } - T = this.toRadians(cN.lng); - cM = this.toRadians(cN.lat); - return this.getDistance(cL, T, cO, cM) - }, - getDistanceByLL : function(cP, cN) { - if (!cP || !cN) { - return 0 - } - cP.lng = this.getLoop(cP.lng, -180, 180); - cP.lat = this.getRange(cP.lat, -74, 74); - cN.lng = this.getLoop(cN.lng, -180, 180); - cN.lat = this.getRange(cN.lat, -74, 74); - var cL, T, cO, cM; - cL = this.toRadians(cP.lng); - cO = this.toRadians(cP.lat); - T = this.toRadians(cN.lng); - cM = this.toRadians(cN.lat); - return this.getDistance(cL, T, cO, cM) - }, - convertMC2LL : function(cL) { - var cM, cO; - cM = new cd(Math.abs(cL.lng), Math.abs(cL.lat)); - for ( var cN = 0; cN < this.MCBAND.length; cN++) { - if (cM.lat >= this.MCBAND[cN]) { - cO = this.MC2LL[cN]; - break - } - } - var T = this.convertor(cL, cO); - var cL = new cd(T.lng.toFixed(6), T.lat.toFixed(6)); - return cL - }, - convertLL2MC : function(T) { - var cL, cN; - T.lng = this.getLoop(T.lng, -180, 180); - T.lat = this.getRange(T.lat, -74, 74); - cL = new cd(T.lng, T.lat); - for ( var cM = 0; cM < this.LLBAND.length; cM++) { - if (cL.lat >= this.LLBAND[cM]) { - cN = this.LL2MC[cM]; - break - } - } - if (!cN) { - for ( var cM = this.LLBAND.length - 1; cM >= 0; cM--) { - if (cL.lat <= -this.LLBAND[cM]) { - cN = this.LL2MC[cM]; - break - } - } - } - var cO = this.convertor(T, cN); - var T = new cd(cO.lng.toFixed(2), cO.lat.toFixed(2)); - return T - }, - convertor : function(cM, cN) { - if (!cM || !cN) { - return - } - var T = cN[0] + cN[1] * Math.abs(cM.lng); - var cL = Math.abs(cM.lat) / cN[9]; - var cO = cN[2] + cN[3] * cL + cN[4] * cL * cL + cN[5] * cL - * cL * cL + cN[6] * cL * cL * cL * cL + cN[7] * cL - * cL * cL * cL * cL + cN[8] * cL * cL * cL * cL - * cL * cL; - T *= (cM.lng < 0 ? -1 : 1); - cO *= (cM.lat < 0 ? -1 : 1); - return new cd(T, cO) - }, - getDistance : function(cL, T, cN, cM) { - return this.EARTHRADIUS - * Math.acos((Math.sin(cN) * Math.sin(cM) + Math - .cos(cN) - * Math.cos(cM) * Math.cos(T - cL))) - }, - toRadians : function(T) { - return Math.PI * T / 180 - }, - toDegrees : function(T) { - return (180 * T) / Math.PI - }, - getRange : function(cM, cL, T) { - if (cL != null) { - cM = Math.max(cM, cL) - } - if (T != null) { - cM = Math.min(cM, T) - } - return cM - }, - getLoop : function(cM, cL, T) { - while (cM > T) { - cM -= T - cL - } - while (cM < cL) { - cM += T - cL - } - return cM - } - }); - a8.extend(ba.prototype, { - lngLatToMercator : function(T) { - return ba.convertLL2MC(T) - }, - lngLatToPoint : function(T) { - var cL = ba.convertLL2MC(T); - return new bu(cL.lng, cL.lat) - }, - mercatorToLngLat : function(T) { - return ba.convertMC2LL(T) - }, - pointToLngLat : function(T) { - var cL = new cd(T.x, T.y); - return ba.convertMC2LL(cL) - }, - pointToPixel : function(cL, cP, cO, cN, cQ) { - if (!cL) { - return - } - cL = this.lngLatToMercator(cL, cQ); - var cM = this.getZoomUnits(cP); - var T = Math.round((cL.lng - cO.lng) / cM + cN.width / 2); - var cR = Math.round((cO.lat - cL.lat) / cM + cN.height / 2); - return new bu(T, cR) - }, - pixelToPoint : function(T, cS, cO, cM, cL) { - if (!T) { - return - } - var cR = this.getZoomUnits(cS); - var cP = cO.lng + cR * (T.x - cM.width / 2); - var cN = cO.lat - cR * (T.y - cM.height / 2); - var cQ = new cd(cP, cN); - return this.mercatorToLngLat(cQ, cL) - }, - getZoomUnits : function(T) { - return Math.pow(2, (18 - T)) - } - }); - function cE() { - } - cE.prototype = new ba(); - a8.extend(cE.prototype, { - lngLatToMercator : function(cL, T) { - return this._convert2DTo3D(T, ba.convertLL2MC(cL)) - }, - mercatorToLngLat : function(cL, T) { - return ba.convertMC2LL(this._convert3DTo2D(T, cL)) - }, - lngLatToPoint : function(cM, T) { - var cL = this._convert2DTo3D(T, ba.convertLL2MC(cM)); - return new bu(cL.lng, cL.lat) - }, - pointToLngLat : function(cL, T) { - var cM = new cd(cL.x, cL.y); - return ba.convertMC2LL(this._convert3DTo2D(T, cM)) - }, - _convert2DTo3D : function(cM, T) { - var cL = b6.getOMap_pts(cM || "bj", T); - return new cd(cL.x, cL.y) - }, - _convert3DTo2D : function(cM, T) { - var cL = b6.getMapJw_pts(cM || "bj", T); - return new cd(cL.lng, cL.lat) - }, - getZoomUnits : function(T) { - return Math.pow(2, (20 - T)) - } - }); - function bG() { - this._type = "overlay" - } - a8.lang.inherits(bG, a8.lang.Class, "Overlay"); - bG.getZIndex = function(T) { - T = T * 1; - if (!T) { - return 0 - } - return (T * -100000) << 1 - }; - a8.extend(bG.prototype, { - _i : function(T) { - if (!this.domElement && I(this.initialize)) { - this.domElement = this.initialize(T); - if (this.domElement) { - this.domElement.style.WebkitUserSelect = "none" - } - } - this.draw() - }, - initialize : function(T) { - throw "initialize\u65b9\u6cd5\u672a\u5b9e\u73b0" - }, - draw : function() { - throw "draw\u65b9\u6cd5\u672a\u5b9e\u73b0" - }, - remove : function() { - if (this.domElement && this.domElement.parentNode) { - this.domElement.parentNode.removeChild(this.domElement) - } - this.domElement = null; - this.dispatchEvent(new bg("onremove")) - }, - hide : function() { - if (this.domElement) { - a8.dom.hide(this.domElement) - } - }, - show : function() { - if (this.domElement) { - a8.dom.show(this.domElement) - } - }, - isVisible : function() { - if (!this.domElement) { - return false - } - if (this.domElement.style.display == "none" - || this.domElement.style.visibility == "hidden") { - return false - } - return true - } - }); - BMap.register(function(cM) { - var T = cM.temp; - T.overlayDiv = cM.overlayDiv = cL(cM.platform, 200); - cM._panes.floatPane = cL(T.overlayDiv, 800); - cM._panes.markerMouseTarget = cL(T.overlayDiv, 700); - cM._panes.floatShadow = cL(T.overlayDiv, 600); - cM._panes.labelPane = cL(T.overlayDiv, 500); - cM._panes.markerPane = cL(T.overlayDiv, 400); - cM._panes.markerShadow = cL(T.overlayDiv, 300); - cM._panes.mapPane = cL(T.overlayDiv, 200); - function cL(cN, cQ) { - var cP = aa("div"), cO = cP.style; - cO.position = "absolute"; - cO.top = cO.left = cO.width = cO.height = "0"; - cO.zIndex = cQ; - cN.appendChild(cP); - return cP - } - }); - function Y() { - a8.lang.Class.call(this); - bG.call(this); - this.map = null; - this._visible = true; - this.infoWindow = null; - this._dblclickTime = 0 - } - a8.lang.inherits(Y, bG, "OverlayInternal"); - a8.extend(Y.prototype, { - initialize : function(T) { - this.map = T; - a8.lang.Class.call(this, this.guid); - return null - }, - getMap : function() { - return this.map - }, - draw : function() { - }, - remove : function() { - this.map = null; - a8.lang.decontrol(this.guid); - bG.prototype.remove.call(this) - }, - hide : function() { - if (this._visible == false) { - return - } - this._visible = false - }, - show : function() { - if (this._visible == true) { - return - } - this._visible = true - }, - isVisible : function() { - if (!this.domElement) { - return false - } - return !!this._visible - }, - getContainer : function() { - return this.domElement - }, - setConfig : function(cL) { - cL = cL || {}; - for ( var T in cL) { - this._config[T] = cL[T] - } - }, - setZIndex : function(T) { - this.zIndex = T - }, - enableMassClear : function() { - this._config.enableMassClear = true - }, - disableMassClear : function() { - this._config.enableMassClear = false - }, - addContextMenu : function(T) { - this._menu = T - }, - removeContextMenu : function(T) { - this._menu = null - } - }); - function cs() { - this.map = null; - this._overlays = {}; - this._customOverlays = [] - } - BMap - .register(function(cL) { - var T = new cs(); - T.map = cL; - cL._overlays = T._overlays; - cL._customOverlays = T._customOverlays; - cL.addEventListener("load", function(cM) { - T.draw(cM) - }); - cL.addEventListener("moveend", function(cM) { - T.draw(cM) - }); - if (a8.browser.ie && a8.browser.ie < 8 - || document.compatMode == "BackCompat") { - cL.addEventListener("zoomend", function(cM) { - setTimeout(function() { - T.draw(cM) - }, 20) - }) - } else { - cL.addEventListener("zoomend", function(cM) { - T.draw(cM) - }) - } - cL.addEventListener("maptypechange", function(cM) { - T.draw(cM) - }); - cL - .addEventListener( - "addoverlay", - function(cQ) { - var cN = cQ.target; - if (cN instanceof Y) { - if (!T._overlays[cN.guid]) { - T._overlays[cN.guid] = cN - } - } else { - var cP = false; - for ( var cO = 0, cM = T._customOverlays.length; cO < cM; cO++) { - if (T._customOverlays[cO] === cN) { - cP = true; - break - } - } - if (!cP) { - T._customOverlays.push(cN) - } - } - }); - cL - .addEventListener( - "removeoverlay", - function(cP) { - var cN = cP.target; - if (cN instanceof Y) { - delete T._overlays[cN.guid] - } else { - for ( var cO = 0, cM = T._customOverlays.length; cO < cM; cO++) { - if (T._customOverlays[cO] === cN) { - T._customOverlays.splice(cO, 1); - break - } - } - } - }); - cL - .addEventListener( - "clearoverlays", - function(cP) { - this.closeInfoWindow(); - for ( var cO in T._overlays) { - if (T._overlays[cO]._config.enableMassClear) { - T._overlays[cO].remove(); - delete T._overlays[cO] - } - } - for ( var cN = 0, cM = T._customOverlays.length; cN < cM; cN++) { - if (T._customOverlays[cN].enableMassClear != false) { - T._customOverlays[cN].remove(); - T._customOverlays[cN] = null; - T._customOverlays.splice(cN, 1); - cN--; - cM-- - } - } - }); - cL.addEventListener("infowindowopen", function(cN) { - var cM = this.infoWindow; - if (cM) { - a8.dom.hide(cM.popDom); - a8.dom.hide(cM.shadowDom) - } - }); - cL.addEventListener("movestart", function() { - if (this.getInfoWindow()) { - this.getInfoWindow()._setOverflow() - } - }); - cL.addEventListener("moveend", function() { - if (this.getInfoWindow()) { - this.getInfoWindow()._resetOverflow() - } - }) - }); - cs.prototype.draw = function(cM) { - for ( var cL in this._overlays) { - this._overlays[cL].draw() - } - a8.array.each(this._customOverlays, function(cN) { - cN.draw() - }); - if (this.map.temp.infoWin) { - this.map.temp.infoWin.setPosition() - } - if (BMap.DrawerSelector) { - var T = BMap.DrawerSelector.getDrawer(this.map); - T.setPalette() - } - }; - function cF(T) { - Y.call(this); - this._config = { - strokeColor : "#3a6bdb", - strokeWeight : 5, - strokeOpacity : 0.65, - strokeStyle : "solid", - enableMassClear : true, - getParseTolerance : null, - getParseCacheIndex : null, - enableEditing : false, - mouseOverTolerance : 15, - use3DCoords : false, - clickable : true - }; - T = T || {}; - this.setConfig(T); - if (this._config.strokeWeight <= 0) { - this._config.strokeWeight = 5 - } - if (this._config.strokeOpacity < 0 || this._config.strokeOpacity > 1) { - this._config.strokeOpacity = 0.65 - } - if (this._config.fillOpacity < 0 || this._config.fillOpacity > 1) { - this._config.fillOpacity = 0.65 - } - if (this._config.strokeStyle != "solid" - && this._config.strokeStyle != "dashed") { - this._config.strokeStyle = "solid" - } - if (ch(T.enableClicking)) { - this._config.clickable = T.enableClicking - } - this.domElement = null; - this._bounds = new BMap.Bounds(0, 0, 0, 0); - this._parseCache = []; - this.vertexMarkers = []; - this._temp = {} - } - a8.lang.inherits(cF, Y, "Graph"); - cF.getGraphPoints = function(cL) { - var T = []; - if (!cL) { - return T - } - if (b3(cL)) { - var cM = cL.split(";"); - a8.array.each(cM, function(cO) { - var cN = cO.split(","); - T.push(new cd(cN[0], cN[1])) - }) - } - if (cL.constructor == Array && cL.length > 0) { - T = cL - } - return T - }; - cF.parseTolerance = [ 0.09, 0.005, 0.0001, 0.00001 ]; - a8.extend(cF.prototype, { - initialize : function(T) { - this.map = T; - return null - }, - draw : function() { - return; - if (!this.domElement) { - return - } - if (this._drawer) { - this._drawer.setPath(this.domElement, this - ._getDisplayPixels(this.points)) - } - }, - setPath : function(T) { - this._parseCache.length = 0; - this.points = cF.getGraphPoints(T).slice(0); - this._calcBounds() - }, - _calcBounds : function() { - if (!this.points) { - return - } - var T = this; - T._bounds = new bN(); - a8.array.each(this.points, function(cL) { - T._bounds.extend(cL) - }) - }, - getPath : function() { - return this.points - }, - setPositionAt : function(cL, T) { - if (!T || !this.points[cL]) { - return - } - this._parseCache.length = 0; - this.points[cL] = new cd(T.lng, T.lat); - this._calcBounds() - }, - setStrokeColor : function(T) { - this._config.strokeColor = T - }, - getStrokeColor : function() { - return this._config.strokeColor - }, - setStrokeWeight : function(T) { - if (T > 0) { - this._config.strokeWeight = T - } - }, - getStrokeWeight : function() { - return this._config.strokeWeight - }, - setStrokeOpacity : function(T) { - if (!T || T > 1 || T < 0) { - return - } - this._config.strokeOpacity = T - }, - getStrokeOpacity : function() { - return this._config.strokeOpacity - }, - setFillOpacity : function(T) { - if (T > 1 || T < 0) { - return - } - this._config.fillOpacity = T - }, - getFillOpacity : function() { - return this._config.fillOpacity - }, - setStrokeStyle : function(T) { - if (T != "solid" && T != "dashed") { - return - } - this._config.strokeStyle = T - }, - getStrokeStyle : function() { - return this._config.strokeStyle - }, - setFillColor : function(T) { - this._config.fillColor = T || "" - }, - getFillColor : function() { - return this._config.fillColor - }, - getBounds : function() { - return this._bounds - }, - remove : function() { - if (this.map) { - this.map.removeEventListener("onmousemove", - this._graphMouseEvent) - } - Y.prototype.remove.call(this); - this._parseCache.length = 0 - }, - enableEditing : function() { - this._config.enableEditing = true - }, - disableEditing : function() { - this._config.enableEditing = false - } - }); - function n(T) { - Y.call(this); - this.map = null; - this.domElement = null; - this._config = { - width : 0, - height : 0, - offset : new aH(0, 0), - opacity : 1, - background : "transparent", - lineStroke : 1, - lineColor : "#000", - lineStyle : "solid", - point : null - }; - this.setConfig(T); - this.point = this._config.point - } - a8.lang.inherits(n, Y, "Division"); - a8 - .extend( - n.prototype, - { - _addDom : function() { - var T = this._config; - var cM = this.content; - var cL = [ '
'); - cL.push(cM); - cL.push("
"); - this.domElement = at( - this.map.getPanes().markerMouseTarget, cL - .join("")) - }, - initialize : function(T) { - this.map = T; - this._addDom(); - if (this.domElement) { - a8.on(this.domElement, "mousedown", - function(cL) { - aP(cL) - }) - } - return this.domElement - }, - draw : function() { - var T = this.map - .pointToOverlayPixel(this._config.point); - this._config.offset = new aH( - -Math.round(this._config.width / 2) - - Math - .round(this._config.lineStroke), - -Math.round(this._config.height / 2) - - Math - .round(this._config.lineStroke)); - this.domElement.style.left = T.x - + this._config.offset.width + "px"; - this.domElement.style.top = T.y - + this._config.offset.height + "px" - }, - getPosition : function() { - return this._config.point - }, - _getPixel : function(T) { - return this.map.pointToPixel(this.getPosition()) - }, - setPosition : function(T) { - this._config.point = T; - this.draw() - }, - setDimension : function(T, cL) { - this._config.width = Math.round(T); - this._config.height = Math.round(cL); - if (this.domElement) { - this.domElement.style.width = this._config.width - + "px"; - this.domElement.style.height = this._config.height - + "px"; - this.draw() - } - } - }); - function M(cL, cM, cN) { - if (!cL || !cM) { - return - } - this.imageUrl = cL; - this.size = cM; - var T = new aH(Math.floor(cM.width / 2), Math.floor(cM.height / 2)); - var cO = { - anchor : T, - imageOffset : new aH(0, 0) - }; - cN = cN || {}; - a8.extend(cO, cN); - this.anchor = cO.anchor; - this.imageOffset = cO.imageOffset; - this.infoWindowAnchor = cN.infoWindowAnchor || this.anchor; - this.printImageUrl = cN.printImageUrl || "" - } - var bD = M.prototype; - bD.setImageUrl = function(T) { - if (!T) { - return - } - this.imageUrl = T - }; - bD.setPrintImageUrl = function(T) { - if (!T) { - return - } - this.printImageUrl = T - }; - bD.setSize = function(T) { - if (!T) { - return - } - this.size = new aH(T.width, T.height) - }; - bD.setAnchor = function(T) { - if (!T) { - return - } - this.anchor = new aH(T.width, T.height) - }; - bD.setImageOffset = function(T) { - if (!T) { - return - } - this.imageOffset = new aH(T.width, T.height) - }; - bD.setInfoWindowAnchor = function(T) { - if (!T) { - return - } - this.infoWindowAnchor = new aH(T.width, T.height) - }; - bD.toString = function() { - return "Icon" - }; - function bP(cM, cL) { - a8.lang.Class.call(this); - this.content = cM; - this.map = null; - this._config = { - width : 0, - height : 0, - maxWidth : 600, - offset : new aH(0, 0), - title : "", - maxContent : "", - enableMaximize : false, - enableAutoPan : true, - enableCloseOnClick : true, - margin : [ 10, 10, 40, 10 ], - collisions : [ [ 10, 10 ], [ 10, 10 ], [ 10, 10 ], [ 10, 10 ] ], - ifMaxScene : false, - onClosing : function() { - return true - } - }; - a8.extend(this._config, cL || {}); - if (this._config.width != 0) { - if (this._config.width < 220) { - this._config.width = 220 - } - if (this._config.width > 730) { - this._config.width = 730 - } - } - if (this._config.height != 0) { - if (this._config.height < 60) { - this._config.height = 60 - } - if (this._config.height > 650) { - this._config.height = 650 - } - } - if (this._config.maxWidth != 0) { - if (this._config.maxWidth < 220) { - this._config.maxWidth = 220 - } - if (this._config.maxWidth > 730) { - this._config.maxWidth = 730 - } - } - this.isWinMax = false; - this.IMG_PATH = cc.imgPath; - this.overlay = null; - var T = this; - cA.load("infowindow", function() { - T._draw() - }) - } - a8.lang.inherits(bP, a8.lang.Class, "InfoWindow"); - a8.extend(bP.prototype, { - setWidth : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 220) { - T = 220 - } - if (T > 730) { - T = 730 - } - } - this._config.width = T - }, - setHeight : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 60) { - T = 60 - } - if (T > 650) { - T = 650 - } - } - this._config.height = T - }, - setMaxWidth : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 220) { - T = 220 - } - if (T > 730) { - T = 730 - } - } - this._config.maxWidth = T - }, - setTitle : function(T) { - this._config.title = T - }, - getTitle : function() { - return this._config.title - }, - setContent : function(T) { - this.content = T - }, - getContent : function() { - return this.content - }, - setMaxContent : function(T) { - this._config.maxContent = T + "" - }, - redraw : function() { - }, - enableAutoPan : function() { - this._config.enableAutoPan = true - }, - disableAutoPan : function() { - this._config.enableAutoPan = false - }, - enableCloseOnClick : function() { - this._config.enableCloseOnClick = true - }, - disableCloseOnClick : function() { - this._config.enableCloseOnClick = false - }, - enableMaximize : function() { - this._config.enableMaximize = true - }, - disableMaximize : function() { - this._config.enableMaximize = false - }, - show : function() { - this._visible = true - }, - hide : function() { - this._visible = false - }, - close : function() { - this.hide() - }, - maximize : function() { - this.isWinMax = true - }, - restore : function() { - this.isWinMax = false - }, - isVisible : function() { - return this.isOpen() - }, - isOpen : function() { - return false - }, - getPosition : function() { - if (this.overlay && this.overlay.getPosition) { - return this.overlay.getPosition() - } - }, - getOffset : function() { - return this._config.offset - } - }); - bz.prototype.openInfoWindow = function(cN, T) { - if (!(cN instanceof bP) || !(T instanceof cd)) { - return - } - var cL = this.temp; - if (!cL.marker) { - var cM = new M(cc.imgPath + "blank.gif", { - width : 1, - height : 1 - }); - cL.marker = new ad(T, { - icon : cM, - width : 1, - height : 1, - offset : new aH(0, 0), - infoWindowOffset : new aH(0, 0), - clickable : false - }); - cL.marker._fromMap = 1 - } else { - cL.marker.setPosition(T) - } - this.addOverlay(cL.marker); - cL.marker.openInfoWindow(cN) - }; - bz.prototype.closeInfoWindow = function() { - var T = this.temp.infoWin || this.temp._infoWin; - if (T && T.overlay) { - T.overlay.closeInfoWindow() - } - }; - Y.prototype.openInfoWindow = function(T) { - if (this.map) { - this.map.closeInfoWindow(); - T._visible = true; - this.map.temp._infoWin = T; - T.overlay = this; - a8.lang.Class.call(T, T.guid) - } - }; - Y.prototype.closeInfoWindow = function() { - if (this.map && this.map.temp._infoWin) { - this.map.temp._infoWin._visible = false; - a8.lang.decontrol(this.map.temp._infoWin.guid); - this.map.temp._infoWin = null - } - }; - function ag(cM, cL) { - Y.call(this); - this.content = cM; - this.map = null; - this.domElement = null; - this._config = { - width : 0, - offset : new aH(0, 0), - styles : { - backgroundColor : "#fff", - border : "1px solid #f00", - padding : "1px", - whiteSpace : "nowrap", - font : "12px " + cc.fontFamily, - zIndex : "80", - MozUserSelect : "none" - }, - position : null, - enableMassClear : true, - clickable : true - }; - cL = cL || {}; - this.setConfig(cL); - if (this._config.width < 0) { - this._config.width = 0 - } - if (ch(cL.enableClicking)) { - this._config.clickable = cL.enableClicking - } - this.point = this._config.position; - var T = this; - cA.load("marker", function() { - T._draw() - }) - } - a8.lang.inherits(ag, Y, "Label"); - a8.extend(ag.prototype, { - getPosition : function() { - if (this._marker) { - return this._marker.getPosition() - } - return this.point - }, - setPosition : function(T) { - if (T instanceof cd && !this.getMarker()) { - this.point = this._config.position = new cd(T.lng, T.lat) - } - }, - setContent : function(T) { - this.content = T - }, - setOpacity : function(T) { - if (T >= 0 && T <= 1) { - this._config.opacity = T - } - }, - setOffset : function(T) { - if (!(T instanceof aH)) { - return - } - this._config.offset = new aH(T.width, T.height) - }, - getOffset : function() { - return this._config.offset - }, - setStyle : function(T) { - T = T || {}; - this._config.styles = a8.extend(this._config.styles, T) - }, - setStyles : function(T) { - return this.setStyle(T) - }, - setTitle : function(T) { - this._config.title = T || "" - }, - getTitle : function() { - return this._config.title - }, - setMarker : function(T) { - this._marker = T; - if (T) { - this.point = this._config.position = T.getPosition() - } else { - this.point = this._config.position = null - } - }, - getMarker : function() { - return this._marker || null - } - }); - window.BMAP_ANIMATION_DROP = 1; - window.BMAP_ANIMATION_BOUNCE = 2; - var au = new M(cc.imgPath + "marker_red_sprite.png", new aH(19, 25), { - anchor : new aH(10, 25), - infoWindowAnchor : new aH(10, 0) - }); - var ar = new M(cc.imgPath + "marker_red_sprite.png", new aH(20, 11), { - anchor : new aH(6, 11), - imageOffset : new aH(-19, -13) - }); - function ad(T, cM) { - Y.call(this); - cM = cM || {}; - this.point = T; - this.map = null; - this._animation = null; - this._config = { - offset : new aH(0, 0), - icon : au, - shadow : ar, - title : "", - label : null, - baseZIndex : 0, - clickable : true, - zIndexFixed : false, - isTop : false, - enableMassClear : true, - enableDragging : false, - raiseOnDrag : false, - restrictDraggingArea : false, - draggingCursor : cc.draggingCursor - }; - this.setConfig(cM); - if (cM.icon && !cM.shadow) { - this._config.shadow = null - } - if (ch(cM.enableClicking)) { - this._config.clickable = cM.enableClicking - } - var cL = this; - cA.load("marker", function() { - cL._draw() - }) - } - ad.TOP_ZINDEX = bG.getZIndex(-90) + 1000000; - ad.DRAG_ZINDEX = ad.TOP_ZINDEX + 1000000; - a8.lang.inherits(ad, Y, "Marker"); - a8.extend(ad.prototype, { - setIcon : function(T) { - if (T instanceof M) { - this._config.icon = T - } - }, - getIcon : function() { - return this._config.icon - }, - setShadow : function(T) { - if (T instanceof M) { - this._config.shadow = T - } - }, - getShadow : function() { - return this._config.shadow - }, - setLabel : function(T) { - this._config.label = T || null - }, - getLabel : function() { - return this._config.label - }, - enableDragging : function() { - this._config.enableDragging = true - }, - disableDragging : function() { - this._config.enableDragging = false - }, - getPosition : function() { - return this.point - }, - setPosition : function(T) { - if (T instanceof cd) { - this.point = new cd(T.lng, T.lat) - } - }, - setTop : function(cL, T) { - this._config.isTop = !!cL; - if (cL) { - this._addi = T || 0 - } - }, - setTitle : function(T) { - this._config.title = T + "" - }, - getTitle : function() { - return this._config.title - }, - setOffset : function(T) { - if (T instanceof aH) { - this._config.offset = T - } - }, - getOffset : function() { - return this._config.offset - }, - setAnimation : function(T) { - this._animation = T - } - }); - function cn(T, cM) { - cF.call(this, cM); - cM = cM || {}; - this._config.fillOpacity = cM.fillOpacity ? cM.fillOpacity : 0.65; - if (cM.fillColor == "") { - this._config.fillColor = "" - } else { - this._config.fillColor = cM.fillColor ? cM.fillColor : "#fff" - } - this.setPath(T); - var cL = this; - cA.load("poly", function() { - cL._draw() - }) - } - a8.lang.inherits(cn, cF, "Polygon"); - a8.extend(cn.prototype, { - setPath : function(cL, T) { - this._userPoints = cF.getGraphPoints(cL).slice(0); - var cM = cF.getGraphPoints(cL).slice(0); - if (cM.length > 1 && !cM[0].equals(cM[cM.length - 1])) { - cM.push(new cd(cM[0].lng, cM[0].lat)) - } - cF.prototype.setPath.call(this, cM, T) - }, - setPositionAt : function(cL, T) { - if (!this._userPoints[cL]) { - return - } - this._userPoints[cL] = new cd(T.lng, T.lat); - this.points[cL] = new cd(T.lng, T.lat); - if (cL == 0 - && !this.points[0] - .equals(this.points[this.points.length - 1])) { - this.points[this.points.length - 1] = new cd(T.lng, T.lat) - } - this._calcBounds() - }, - getPath : function() { - var T = this._userPoints; - if (T.length == 0) { - T = this.points - } - return T - } - }); - function f(T, cM) { - cF.call(this, cM); - this.setPath(T); - var cL = this; - cA.load("poly", function() { - cL._draw() - }) - } - a8.lang.inherits(f, cF, "Polyline"); - function a(cL, T, cM) { - this.point = cL; - this.radius = Math.abs(T); - cn.call(this, [], cM) - } - a.parseTolerance = [ 0.01, 0.0001, 0.00001, 0.000004 ]; - a8.lang.inherits(a, cn, "Circle"); - a8 - .extend( - a.prototype, - { - initialize : function(T) { - this.map = T; - this.points = this._getPerimeterPoints(this.point, - this.radius); - this._calcBounds(); - return null - }, - getCenter : function() { - return this.point - }, - setCenter : function(T, cL) { - if (!T) { - return - } - this.point = T - }, - getRadius : function() { - return this.radius - }, - setRadius : function(T) { - this.radius = Math.abs(T) - }, - _getPerimeterPoints : function(T, cS) { - if (!T || !cS || !this.map) { - return [] - } - var cL = this.map; - var cP = T.lng, cN = T.lat; - var cZ = []; - var cU = cS / 6378800, cR = (Math.PI / 180) * cN, cX = (Math.PI / 180) - * cP; - for ( var cQ = 0; cQ < 360; cQ += 9) { - var cO = (Math.PI / 180) * cQ, cV = Math - .asin(Math.sin(cR) * Math.cos(cU) - + Math.cos(cR) * Math.sin(cU) - * Math.cos(cO)), cT = Math - .atan2(Math.sin(cO) * Math.sin(cU) - * Math.cos(cR), Math.cos(cU) - - Math.sin(cR) * Math.sin(cV)), cW = ((cX - - cT + Math.PI) % (2 * Math.PI)) - - Math.PI, cY = new cd(cW - * (180 / Math.PI), cV * (180 / Math.PI)); - cZ.push(cY) - } - var cM = cZ[0]; - cZ.push(new cd(cM.lng, cM.lat)); - return cZ - } - }); - function bR(T) { - this.map = T; - this.mapTypeLayers = []; - this.tileLayers = []; - this.bufferNumber = 300; - this.realBufferNumber = 0; - this.mapTiles = {}; - this.bufferTiles = {}; - this.numLoading = 0; - this._mapTypeLayerContainer = this._createDiv(1); - this._normalLayerContainer = this._createDiv(2); - T.platform.appendChild(this._mapTypeLayerContainer); - T.platform.appendChild(this._normalLayerContainer) - } - BMap.register(function(cL) { - var T = new bR(cL); - T.initialize() - }); - a8.extend(bR.prototype, { - initialize : function() { - var T = this, cL = T.map; - cL.addEventListener("loadcode", function() { - T.loadTiles() - }); - cL.addEventListener("addtilelayer", function(cM) { - T.addTileLayer(cM) - }); - cL.addEventListener("removetilelayer", function(cM) { - T.removeTileLayer(cM) - }); - cL.addEventListener("setmaptype", function(cM) { - T.setMapType(cM) - }); - cL.addEventListener("zoomstartcode", function(cM) { - T._zoom(cM) - }) - }, - loadTiles : function() { - var T = this; - if (a8.browser.ie) { - try { - document.execCommand("BackgroundImageCache", false, true) - } catch (cL) { - } - } - if (!this.loaded) { - T.initMapTypeTiles() - } - T.moveGridTiles(); - if (!this.loaded) { - this.loaded = true; - cA.load("tile", function() { - T._asyncLoadTiles() - }) - } - }, - initMapTypeTiles : function() { - var cL = this.map.getMapType(); - var cM = cL.getTileLayers(); - for ( var T = 0; T < cM.length; T++) { - var cN = new p(); - a8.extend(cN, cM[T]); - this.mapTypeLayers.push(cN); - cN.initialize(this.map, this._mapTypeLayerContainer) - } - }, - _createDiv : function(cL) { - var T = aa("div"); - T.style.position = "absolute"; - T.style.left = T.style.top = "0"; - T.style.zIndex = cL; - return T - }, - showTile : function(cP, cO, cS) { - var cV = this; - cV.centerPos = cO; - var cR = this.map.getMapType(); - var cM = cV.getTileName(cP, cS); - var cZ = cR.getTileSize(); - var cN = (cP[0] * cZ) + cO[0]; - var cY = 0; - if (cR === BMAP_PERSPECTIVE_MAP && cV.map.getZoom() == 15) { - cY = 0.5 - } - var cL = (cY - 1 - cP[1]) * cZ + cO[1]; - var cT = [ cN, cL ]; - var cU = this.mapTiles[cM]; - if (cU && cU.img) { - bI(cU.img, cT); - if (cU.loaded) { - this._checkTilesLoaded() - } else { - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }) - } - return - } - cU = this.bufferTiles[cM]; - if (cU && cU.img) { - cS.tilesDiv.insertBefore(cU.img, cS.tilesDiv.lastChild); - this.mapTiles[cM] = cU; - bI(cU.img, cT); - if (cU.loaded) { - this._checkTilesLoaded() - } else { - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }) - } - return - } - var cX = 256 * Math.pow(2, (cR.getMaxZoom() - cP[2])); - var cW = new cd(cP[0] * cX, cP[1] * cX); - var cQ = new bu(cP[0], cP[1]); - var T = cS.getTilesUrl(cQ, cP[2]); - cU = new bU(this, T, cT, cP, cS); - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }); - cU._load(); - this.mapTiles[cM] = cU - }, - _checkTilesLoaded : function() { - this.numLoading--; - var T = this; - if (this.numLoading == 0) { - if (this._checkLoadedTimer) { - clearTimeout(this._checkLoadedTimer); - this._checkLoadedTimer = null - } - this._checkLoadedTimer = setTimeout(function() { - if (T.numLoading == 0) { - T.map.dispatchEvent(new bg("ontilesloaded")) - } - T._checkLoadedTimer = null - }, 80) - } - }, - getTileName : function(T, cL) { - if (this.map.getMapType() === BMAP_PERSPECTIVE_MAP) { - return "TILE-" + cL.guid + "-" + this.map.cityCode + "-" + T[0] - + "-" + T[1] + "-" + T[2] - } else { - return "TILE-" + cL.guid + "-" + T[0] + "-" + T[1] + "-" + T[2] - } - }, - hideTile : function(cL) { - var T = cL.img; - if (T) { - J(T); - if (y(T)) { - T.parentNode.removeChild(T) - } - } - delete this.mapTiles[cL.name]; - if (!cL.loaded) { - J(T); - T = null; - cL._callCbks(); - cL.img = null; - cL.mgr = null - } - }, - moveGridTiles : function() { - var da = this.mapTypeLayers; - var cW = da.concat(this.tileLayers); - var c2 = cW.length; - for ( var c4 = 0; c4 < c2; c4++) { - var cP = cW[c4]; - if (cP.baseLayer) { - this.tilesDiv = cP.tilesDiv - } - var dg = this.map; - var dc = dg.getMapType(); - var dh = dc.getProjection(); - var c3 = dg.zoomLevel; - var c6 = dg.mercatorCenter; - this.mapCenterPoint = c6; - var cU = dc.getZoomUnits(c3); - var cX = dc.getZoomFactor(c3); - var cV = Math.ceil(c6.lng / cX); - var cQ = Math.ceil(c6.lat / cX); - var c1 = dc.getTileSize(); - var cO = [ cV, cQ, (c6.lng - cV * cX) / cX * c1, - (c6.lat - cQ * cX) / cX * c1 ]; - var db = cO[0] - Math.ceil((dg.width / 2 - cO[2]) / c1); - var cN = cO[1] - Math.ceil((dg.height / 2 - cO[3]) / c1); - var c7 = cO[0] + Math.ceil((dg.width / 2 + cO[2]) / c1); - var cZ = 0; - if (dc === BMAP_PERSPECTIVE_MAP && dg.getZoom() == 15) { - cZ = 1 - } - var cY = cO[1] + Math.ceil((dg.height / 2 + cO[3]) / c1) + cZ; - this.areaCenter = new cd(c6.lng, c6.lat); - var cM = this.mapTiles; - var cT = -this.areaCenter.lng / cU; - var cS = this.areaCenter.lat / cU; - var de = [ Math.round(cT), Math.round(cS) ]; - var cL = dg.getZoom(); - for ( var df in cM) { - var di = cM[df]; - var dd = di.info; - if (dd[2] != cL - || (dd[2] == cL && (db > dd[0] || c7 <= dd[0] - || cN > dd[1] || cY <= dd[1]))) { - this.hideTile(di) - } - } - var cR = -dg.offsetX + dg.width / 2; - var c0 = -dg.offsetY + dg.height / 2; - cP.tilesDiv.style.left = Math.round(cT + cR) - de[0] + "px"; - cP.tilesDiv.style.top = Math.round(cS + c0) - de[1] + "px"; - var T = []; - for ( var c9 = db; c9 < c7; c9++) { - for ( var c8 = cN; c8 < cY; c8++) { - T.push( [ c9, c8 ]) - } - } - T.sort((function(dj) { - return function(dk, dl) { - return ((0.4 * Math.abs(dk[0] - dj[0]) + 0.6 * Math - .abs(dk[1] - dj[1])) - (0.4 * Math.abs(dl[0] - - dj[0]) + 0.6 * Math.abs(dl[1] - dj[1]))) - } - })( [ cO[0] - 1, cO[1] - 1 ])); - this.numLoading += T.length; - for ( var c9 = 0, c5 = T.length; c9 < c5; c9++) { - this.showTile( [ T[c9][0], T[c9][1], cL ], de, cP) - } - } - return - }, - addTileLayer : function(cN) { - var cM = this; - var T = cN.target; - for ( var cL = 0; cL < cM.tileLayers.length; cL++) { - if (cM.tileLayers[cL] == T) { - return - } - } - T.initialize(this.map, this._normalLayerContainer); - cM.tileLayers.push(T) - }, - removeTileLayer : function(cO) { - var cN = this; - var cL = cO.target; - for ( var cM = 0, T = cN.tileLayers.length; cM < T; cM++) { - if (cL == cN.tileLayers[cM]) { - cN.tileLayers.splice(cM, 1) - } - } - cL.remove() - }, - setMapType : function() { - var cM = this; - var cN = this.mapTypeLayers; - for ( var cL = 0, T = cN.length; cL < T; cL++) { - cN[cL].remove() - } - delete this.tilesDiv; - this.mapTypeLayers = []; - this.bufferTiles = this.mapTiles = {}; - this.initMapTypeTiles(); - this.moveGridTiles() - }, - _zoom : function() { - var T = this; - if (T.zoomsDiv) { - a8.dom.hide(T.zoomsDiv) - } - setTimeout(function() { - T.moveGridTiles(); - T.map.dispatchEvent(new bg("onzoomend")) - }, 10) - } - }); - function bU(cR, T, cO, cL, cN) { - this.mgr = cR; - this.position = cO; - this._cbks = []; - this.name = cR.getTileName(cL, cN); - this.info = cL; - this._transparentPng = cN.isTransparentPng(); - var cS = aa("img"); - cw(cS); - cS.galleryImg = false; - var cQ = cS.style; - var cM = cR.map.getMapType(); - cQ.position = "absolute"; - cQ.border = "none"; - cQ.width = cM.getTileSize() + "px"; - cQ.height = cM.getTileSize() + "px"; - cQ.left = cO[0] + "px"; - cQ.top = cO[1] + "px"; - this.img = cS; - this.src = T; - if (E) { - this.img.style.opacity = 0 - } - var cP = this; - this.img.onload = function(cY) { - cP.loaded = true; - if (!cP.mgr) { - return - } - var cU = cP.mgr; - var cT = cU.bufferTiles; - if (!cT[cP.name]) { - cU.realBufferNumber++; - cT[cP.name] = cP - } - if (cP.img && !y(cP.img)) { - if (cN.tilesDiv) { - cN.tilesDiv.appendChild(cP.img); - if (a8.browser.ie <= 6 && a8.browser.ie > 0 - && cP._transparentPng) { - cP.img.style.cssText += ';filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + cP.src + '",sizingMethod=scale);' - } - } - } - var cW = cU.realBufferNumber - cU.bufferNumber; - for ( var cX in cT) { - if (cW <= 0) { - break - } - if (!cU.mapTiles[cX]) { - cT[cX].mgr = null; - var cV = cT[cX].img; - if (cV && cV.parentNode) { - cV.parentNode.removeChild(cV); - J(cV) - } - cV = null; - cT[cX].img = null; - delete cT[cX]; - cU.realBufferNumber--; - cW-- - } - } - if (E) { - new g( { - fps : 20, - duration : 200, - render : function(cZ) { - if (cP.img && cP.img.style) { - cP.img.style.opacity = cZ * 1 - } - }, - finish : function() { - if (cP.img && cP.img.style) { - delete cP.img.style.opacity - } - } - }) - } - cP._callCbks() - }; - this.img.onerror = function() { - var cU = cP.img, cV = cP.img.getAttribute("isError") || 0; - if (m && cV < 5) { - cV++; - cU.setAttribute("isError", cV); - cU.src = T + "&t=" + new Date().getTime() - } else { - cP._callCbks(); - if (!cP.mgr) { - return - } - var cT = cP.mgr; - var cW = cT.map.getMapType(); - if (cW.getErrorImageUrl()) { - cP.error = true; - cP.img.src = cW.getErrorImageUrl(); - if (cP.img && !y(cP.img)) { - cN.tilesDiv.appendChild(cP.img) - } - } - } - }; - cS = null - } - bU.prototype._addLoadCbk = function(T) { - this._cbks.push(T) - }; - bU.prototype._load = function() { - if (a8.browser.ie > 0 && a8.browser.ie <= 6 && this._transparentPng) { - this.img.src = cc.imgPath + "blank.gif" - } else { - this.img.src = this.src - } - }; - bU.prototype._callCbks = function() { - var cL = this; - for ( var T = 0; T < cL._cbks.length; T++) { - cL._cbks[T]() - } - cL._cbks.length = 0 - }; - function J(cN) { - if (!cN) { - return - } - cN.onload = cN.onerror = null; - var cL = cN.attributes, cM, T, cO; - if (cL) { - T = cL.length; - for (cM = 0; cM < T; cM += 1) { - cO = cL[cM].name; - if (I(cN[cO])) { - cN[cO] = null - } - } - } - cL = cN.children; - if (cL) { - T = cL.length; - for (cM = 0; cM < T; cM += 1) { - J(cN.children[cM]) - } - } - } - var E = (!a8.browser.ie || a8.browser.ie > 8); - function p(T) { - this.opts = T || {}; - this.copyright = this.opts.copyright || null; - this.transparentPng = this.opts.transparentPng || false; - this.baseLayer = this.opts.baseLayer || false; - this.zIndex = this.opts.zIndex || 0; - this.guid = p._guid++ - } - p._guid = 0; - a8.lang.inherits(p, a8.lang.Class, "TileLayer"); - a8.extend(p.prototype, { - initialize : function(cM, T) { - if (this.baseLayer) { - this.zIndex = -100 - } - this.map = cM; - if (!this.tilesDiv) { - var cN = aa("div"); - var cL = cN.style; - if (!a8.platform.isAndroid) { - T.style.WebkitBackfaceVisibility = "hidden" - } - cL.position = "absolute"; - cL.zIndex = this.zIndex; - cL.left = Math.ceil(-cM.offsetX + cM.width / 2) + "px"; - cL.top = Math.ceil(-cM.offsetY + cM.height / 2) + "px"; - T.appendChild(cN); - this.tilesDiv = cN - } - }, - remove : function() { - if (this.tilesDiv && this.tilesDiv.parentNode) { - this.tilesDiv.innerHTML = ""; - this.tilesDiv.parentNode.removeChild(this.tilesDiv) - } - delete this.tilesDiv - }, - isTransparentPng : function() { - return this.transparentPng - }, - getTilesUrl : function(cL, cM) { - var T = ""; - if (this.opts.tileUrlTemplate) { - T = this.opts.tileUrlTemplate.replace(/\{X\}/, cL.x); - T = T.replace(/\{Y\}/, cL.y); - T = T.replace(/\{Z\}/, cM) - } - return T - }, - getCopyright : function() { - return this.copyright - }, - getMapType : function() { - return this.mapType || BMAP_NORMAL_MAP - } - }); - function aC(T) { - p.call(this, T); - this._opts = {}; - T = T || {}; - this._opts = a8.object.extend(this._opts, T); - if (this._opts.predictDate) { - if (this._opts.predictDate.weekday < 1 - || this._opts.predictDate.weekday > 7) { - this._opts.predictDate = 1 - } - if (this._opts.predictDate.hour < 0 - || this._opts.predictDate.hour > 23) { - this._opts.predictDate.hour = 0 - } - } - this._tileUrl = "http://its.map.baidu.com:8002/traffic/" - } - aC.prototype = new p(); - aC.prototype.initialize = function(cL, T) { - p.prototype.initialize.call(this, cL, T); - this._map = cL - }; - aC.prototype.isTransparentPng = function() { - return true - }; - aC.prototype.getTilesUrl = function(cQ, cL) { - var cR = ""; - if (this._opts.predictDate) { - cR = "HistoryService?day=" + (this._opts.predictDate.weekday - 1) - + "&hour=" + this._opts.predictDate.hour + "&t=" - + new Date().getTime() + "&" - } else { - cR = "TrafficTileService?time=" + new Date().getTime() + "&" - } - var cM = this._map, cS = cQ.x, cN = cQ.y, cP = Math.floor(cS / 200), cO = Math - .floor(cN / 200), T = this._tileUrl + cR + "level=" + cL - + "&x=" + cS + "&y=" + cN; - return T.replace(/-(\d+)/gi, "M$1") - }; - function cu(T, cL, cM) { - this._name = T; - this._layers = cL instanceof p ? [ cL ] : cL.slice(0); - this._opts = { - tips : "", - labelText : "", - minZoom : 1, - maxZoom : 19, - tileSize : 256, - textColor : "black", - errorImageUrl : "", - projection : new ba() - }; - if (this._layers.length == 1) { - this._layers[0].baseLayer = true - } - a8.extend(this._opts, cM || {}) - } - a8.extend(cu.prototype, { - getName : function() { - return this._name - }, - getTips : function() { - return this._opts.tips - }, - getLabelText : function() { - return this._opts.labelText - }, - getTileLayer : function() { - return this._layers[0] - }, - getTileLayers : function() { - return this._layers - }, - getTileSize : function() { - return this._opts.tileSize - }, - getMinZoom : function() { - return this._opts.minZoom - }, - getMaxZoom : function() { - return this._opts.maxZoom - }, - getTextColor : function() { - return this._opts.textColor - }, - getProjection : function() { - return this._opts.projection - }, - getErrorImageUrl : function() { - return this._opts.errorImageUrl - }, - getZoomUnits : function(T) { - return Math.pow(2, (18 - T)) - }, - getZoomFactor : function(T) { - return this.getZoomUnits(T) * 256 - } - }); - var b7 = [ "http://shangetu0.map.bdimg.com/it/", - "http://shangetu1.map.bdimg.com/it/", - "http://shangetu2.map.bdimg.com/it/", - "http://shangetu3.map.bdimg.com/it/", - "http://shangetu4.map.bdimg.com/it/" ]; - var j = [ "http://online0.map.bdimg.com/tile/", - "http://online1.map.bdimg.com/tile/", - "http://online2.map.bdimg.com/tile/", - "http://online3.map.bdimg.com/tile/", - "http://online4.map.bdimg.com/tile/" ]; - if (m) { - b7 = [ x + "it/" ] - } - var aT = new p(); - aT.getTilesUrl = function(cM, cP) { - var cQ = cM.x; - var cN = cM.y; -// var T = "20130712"; -// var cO = "pl"; -// if (this.map.highResolutionEnabled()) { -// cO = "ph" -// } -// var cL = j[Math.abs(cQ + cN) % j.length] + "?qt=tile&x=" -// + (cQ + "").replace(/-/gi, "M") + "&y=" -// + (cN + "").replace(/-/gi, "M") + "&z=" + cP + "&styles=" + cO -// + (a8.browser.ie == 6 ? "&color_dep=32&colors=50" : "") -// + "&udt=" + T; -// if (m) { -// cL = b7[Math.abs(cQ + cN) % b7.length] + "u=x=" + cQ + ";y=" + cN -// + ";z=" + cP + ";v=017;type=web&fm=44" -// } - cL = "static/BMap/maptile/" + cP + "/" + cQ + "/" + cN + ".jpg"; - return cL.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_NORMAL_MAP = new cu("\u5730\u56fe", aT, { - tips : "\u663e\u793a\u666e\u901a\u5730\u56fe" - }); - var bs = new p(); - bs.tileUrls = [ "http://d0.map.baidu.com/resource/mappic/", - "http://d1.map.baidu.com/resource/mappic/", - "http://d2.map.baidu.com/resource/mappic/", - "http://d3.map.baidu.com/resource/mappic/" ]; - bs.getTilesUrl = function(T, cM) { - var cO = T.x; - var cL = T.y; - var cN = Math.pow(2, (20 - cM)) * 256; - cL = Math.round((9998336 - cN * (cL)) / cN) - 1; - url = this.tileUrls[Math.abs(cO + cL) % this.tileUrls.length] - + this.map.currentCity + "/" + this.map.cityCode + "/3/lv" - + (21 - cM) + "/" + cO + "," + cL + ".jpg"; - return url - }; - window.BMAP_PERSPECTIVE_MAP = new cu("\u4e09\u7ef4", bs, { - tips : "\u663e\u793a\u4e09\u7ef4\u5730\u56fe", - minZoom : 15, - maxZoom : 20, - textColor : "white", - projection : new cE() - }); - BMAP_PERSPECTIVE_MAP.getZoomUnits = function(T) { - return Math.pow(2, (20 - T)) - }; - BMAP_PERSPECTIVE_MAP.getCityName = function(T) { - if (!T) { - return "" - } - var cL = cc.cityNames; - for ( var cM in cL) { - if (T.search(cM) > -1) { - return cL[cM] - } - } - return "" - }; - BMAP_PERSPECTIVE_MAP.getCityCode = function(T) { - return ( { - bj : 2, - gz : 1, - sz : 14, - sh : 4 - })[T] - }; - var bQ = new p( { - baseLayer : true - }); - bQ.getTilesUrl = function(cL, cN) { - var cO = cL.x; - var cM = cL.y; - var T = b7[Math.abs(cO + cM) % b7.length] + "u=x=" + cO + ";y=" + cM - + ";z=" + cN + ";v=009;type=sate&fm=46"; - return T.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_SATELLITE_MAP = new cu("\u536b\u661f", bQ, { - tips : "\u663e\u793a\u536b\u661f\u5f71\u50cf", - minZoom : 1, - maxZoom : 19, - textColor : "white" - }); - var o = new p( { - transparentPng : true - }); - o.getTilesUrl = function(cM, cO) { - var cP = cM.x; - var cN = cM.y; - var T = "20130617"; - var cL = j[Math.abs(cP + cN) % j.length] + "?qt=tile&x=" - + (cP + "").replace(/-/gi, "M") + "&y=" - + (cN + "").replace(/-/gi, "M") + "&z=" + cO + "&styles=sl" - + (a8.browser.ie == 6 ? "&color_dep=32&colors=50" : "") - + "&udt=" + T; - return cL.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_HYBRID_MAP = new cu( - "\u6df7\u5408", - [ bQ, o ], - { - tips : "\u663e\u793a\u5e26\u6709\u8857\u9053\u7684\u536b\u661f\u5f71\u50cf", - labelText : "\u8def\u7f51", - minZoom : 1, - maxZoom : 19, - textColor : "white" - }); - window.BMAP_POI_TYPE_NORMAL = 0; - window.BMAP_POI_TYPE_BUSSTOP = 1; - window.BMAP_POI_TYPE_BUSLINE = 2; - window.BMAP_POI_TYPE_SUBSTOP = 3; - window.BMAP_POI_TYPE_SUBLINE = 4; - var H = 0; - var bh = 1; - var an = {}; - function w(cL, T) { - a8.lang.Class.call(this); - this._loc = {}; - this.setLocation(cL); - this._opts = { - renderOptions : { - panel : null, - map : null, - autoViewport : true - }, - onSearchComplete : function() { - }, - onMarkersSet : function() { - }, - onInfoHtmlSet : function() { - }, - onResultsHtmlSet : function() { - }, - onGetBusListComplete : function() { - }, - onGetBusLineComplete : function() { - }, - onBusListHtmlSet : function() { - }, - onBusLineHtmlSet : function() { - }, - onPolylinesSet : function() { - }, - reqFrom : "" - }; - a8.extend(this._opts, T); - if (typeof T != "undefined" && typeof T.renderOptions != "undefined" - && typeof T.renderOptions.autoViewport != "undefined") { - this._opts.renderOptions.autoViewport = T.renderOptions.autoViewport - } else { - this._opts.renderOptions.autoViewport = true - } - this._opts.renderOptions.panel = a8.G(this._opts.renderOptions.panel) - } - a8.inherits(w, a8.lang.Class); - a8.extend(w.prototype, { - getResults : function() { - if (!this._isMultiKey) { - return this._results - } else { - return this._arrResults - } - }, - enableAutoViewport : function() { - this._opts.renderOptions.autoViewport = true - }, - disableAutoViewport : function() { - this._opts.renderOptions.autoViewport = false - }, - setLocation : function(T) { - if (!T) { - return - } - this._loc.src = T - }, - setSearchCompleteCallback : function(T) { - this._opts.onSearchComplete = T || function() { - } - }, - setMarkersSetCallback : function(T) { - this._opts.onMarkersSet = T || function() { - } - }, - setPolylinesSetCallback : function(T) { - this._opts.onPolylinesSet = T || function() { - } - }, - setInfoHtmlSetCallback : function(T) { - this._opts.onInfoHtmlSet = T || function() { - } - }, - setResultsHtmlSetCallback : function(T) { - this._opts.onResultsHtmlSet = T || function() { - } - }, - getStatus : function() { - return this._status - } - }); - var bb = { - REQ_BASE_URL : x, - request : function(cQ, cN, cL, cS, cM) { - return; - var cO = (Math.random() * 100000).toFixed(0); - BMap._rd["_cbk" + cO] = function(cT) { - cL = cL || {}; - cQ && cQ(cT, cL); - delete BMap._rd["_cbk" + cO] - }; - cS = cS || ""; - var cR; - if (cL && cL.useEncodeURI) { - cR = O(cN, encodeURI) - } else { - cR = O(cN, encodeURIComponent) - } - var cP = this, T = cP.REQ_BASE_URL + cS + "?" + cR - + "&ie=utf-8&oue=1&fromproduct=jsapi"; - if (!cM) { - T += "&res=api" - } - T += "&callback=BMap._rd._cbk" + cO; - cx.request(T) - } - }; - BMap._rd = {}; - var S = {}; - S.removeHtml = function(T) { - return T.replace(/<\/?b>/g, "") - }; - S.parseGeoExtReg1 = function(T) { - return T - .replace( - /([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g, - "$1,$2;") - }; - S.parseGeoExtReg2 = function(cL, T) { - var cM = new RegExp( - "(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){" - + T + "}", "ig"); - return cL.replace(cM, "$1") - }; - window.BMAP_STATUS_SUCCESS = 0; - window.BMAP_STATUS_CITY_LIST = 1; - window.BMAP_STATUS_UNKNOWN_LOCATION = 2; - window.BMAP_STATUS_UNKNOWN_ROUTE = 3; - window.BMAP_STATUS_INVALID_KEY = 4; - window.BMAP_STATUS_INVALID_REQUEST = 5; - window.BMAP_STATUS_PERMISSION_DENIED = 6; - window.BMAP_STATUS_SERVICE_UNAVAILABLE = 7; - window.BMAP_STATUS_TIMEOUT = 8; - window.BMAP_ROUTE_TYPE_WALKING = 2; - window.BMAP_ROUTE_TYPE_DRIVING = 3; - var cv = "cur"; - var c = "cen"; - var cj = "s"; - var Q = "con"; - var al = "bd"; - var cb = "nb"; - var F = "bt"; - var bM = "nav"; - var bv = "walk"; - var bA = "gc"; - var d = "rgc"; - var U = "dec"; - var aQ = "bse"; - var e = "nse"; - var G = "bl"; - var bf = "bsl"; - var aG = "bda"; - var ai = "sa"; - var a1 = "nba"; - var ci = "drag"; - var b4 = "ext"; - var s = 2; - var a5 = 4; - var bt = 7; - var X = 11; - var aN = 12; - var bi = 14; - var a2 = 15; - var cy = 18; - var u = 20; - var R = 21; - var ap = 26; - var bE = 28; - var z = 31; - var bq = 35; - var bC = 44; - var ax = 45; - var ae = 46; - var bS = 47; - var a0 = -1; - var ab = 0; - var cq = 1; - var a6 = 2; - var B = 3; - var cI = "http://map.baidu.com/"; - BMap.I = window.Instance = a8.lang.instance; - var a4 = function(cM, cL) { - w.call(this, cM, cL); - cL = cL || {}; - cL.renderOptions = cL.renderOptions || {}; - this.setPageCapacity(cL.pageCapacity); - if (typeof cL.renderOptions.selectFirstResult != "undefined" - && !cL.renderOptions.selectFirstResult) { - this.disableFirstResultSelection() - } else { - this.enableFirstResultSelection() - } - this._overlays = []; - this._arrPois = []; - this._curIndex = -1; - this._queryList = []; - var T = this; - cA.load("local", function() { - T._check() - }) - }; - a8.inherits(a4, w, "LocalSearch"); - a4.DEFAULT_PAGE_CAPACITY = 10; - a4.MIN_PAGE_CAPACITY = 1; - a4.MAX_PAGE_CAPACITY = 100; - a4.DEFAULT_RADIUS = 2000; - a4.MAX_RADIUS = 100000; - a8.extend(a4.prototype, { - search : function(T) { - this._queryList.push( { - method : "search", - arguments : [ T ] - }) - }, - searchInBounds : function(T, cL) { - this._queryList.push( { - method : "searchInBounds", - arguments : [ T, cL ] - }) - }, - searchNearby : function(cM, cL, T) { - this._queryList.push( { - method : "searchNearby", - arguments : [ cM, cL, T ] - }) - }, - clearResults : function() { - delete this._json; - delete this._status; - delete this._results; - delete this._ud; - this._curIndex = -1; - this._setStatus(); - if (this._opts.renderOptions.panel) { - this._opts.renderOptions.panel.innerHTML = "" - } - }, - gotoPage : function() { - }, - enableFirstResultSelection : function() { - this._opts.renderOptions.selectFirstResult = true - }, - disableFirstResultSelection : function() { - this._opts.renderOptions.selectFirstResult = false - }, - setPageCapacity : function(T) { - if (typeof T == "number" && !isNaN(T)) { - this._opts.pageCapacity = T < 1 ? a4.DEFAULT_PAGE_CAPACITY - : (T > a4.MAX_PAGE_CAPACITY ? a4.DEFAULT_PAGE_CAPACITY - : T) - } else { - this._opts.pageCapacity = a4.DEFAULT_PAGE_CAPACITY - } - }, - getPageCapacity : function() { - return this._opts.pageCapacity - }, - toString : function() { - return "LocalSearch" - } - }); - var b5 = function(cL, T) { - w.call(this, cL, T) - }; - a8.inherits(b5, w, "BaseRoute"); - a8.extend(b5.prototype, { - clearResults : function() { - } - }); - window.BMAP_TRANSIT_POLICY_LEAST_TIME = 0; - window.BMAP_TRANSIT_POLICY_LEAST_TRANSFER = 2; - window.BMAP_TRANSIT_POLICY_LEAST_WALKING = 3; - window.BMAP_TRANSIT_POLICY_AVOID_SUBWAYS = 4; - window.BMAP_LINE_TYPE_BUS = 0; - window.BMAP_LINE_TYPE_SUBWAY = 1; - window.BMAP_LINE_TYPE_FERRY = 2; - function aU(cM, cL) { - b5.call(this, cM, cL); - cL = cL || {}; - this.setPolicy(cL.policy); - this.setPageCapacity(cL.pageCapacity); - this.QUERY_TYPE = F; - this.RETURN_TYPE = bi; - this.ROUTE_TYPE = bh; - this._overlays = []; - this._curIndex = -1; - this._queryList = []; - var T = this; - cA.load("route", function() { - T._asyncSearch() - }) - } - aU.MAX_PAGE_CAPACITY = 100; - aU.LINE_TYPE_MAPPING = [ 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 1 ]; - a8.inherits(aU, b5, "TransitRoute"); - a8.extend(aU.prototype, { - setPolicy : function(T) { - if (T >= BMAP_TRANSIT_POLICY_LEAST_TIME - && T <= BMAP_TRANSIT_POLICY_AVOID_SUBWAYS) { - this._opts.policy = T - } else { - this._opts.policy = BMAP_TRANSIT_POLICY_LEAST_TIME - } - }, - _internalSearch : function(cL, T) { - this._queryList.push( { - method : "_internalSearch", - arguments : [ cL, T ] - }) - }, - search : function(cL, T) { - this._queryList.push( { - method : "search", - arguments : [ cL, T ] - }) - }, - setPageCapacity : function(T) { - if (typeof T == "string") { - T = parseInt(T); - if (isNaN(T)) { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY; - return - } - } - if (typeof T != "number") { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY; - return - } - if (T >= 1 && T <= aU.MAX_PAGE_CAPACITY) { - this._opts.pageCapacity = Math.round(T) - } else { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY - } - }, - toString : function() { - return "TransitRoute" - }, - _shortTitle : function(T) { - return T.replace(/\(.*\)/, "") - } - }); - window.BMAP_HIGHLIGHT_STEP = 1; - window.BMAP_HIGHLIGHT_ROUTE = 2; - var bl = function(T, cN) { - b5.call(this, T, cN); - this._overlays = []; - this._curIndex = -1; - this._queryList = []; - var cM = this; - var cL = this._opts.renderOptions; - if (cL.highlightMode != BMAP_HIGHLIGHT_STEP - && cL.highlightMode != BMAP_HIGHLIGHT_ROUTE) { - cL.highlightMode = BMAP_HIGHLIGHT_STEP - } - this._enableDragging = this._opts.renderOptions.enableDragging ? true - : false; - cA.load("route", function() { - cM._asyncSearch() - }) - }; - bl.ROAD_TYPE = [ "", "\u73af\u5c9b", "\u65e0\u5c5e\u6027\u9053\u8def", - "\u4e3b\u8def", "\u9ad8\u901f\u8fde\u63a5\u8def", - "\u4ea4\u53c9\u70b9\u5185\u8def\u6bb5", "\u8fde\u63a5\u9053\u8def", - "\u505c\u8f66\u573a\u5185\u90e8\u9053\u8def", - "\u670d\u52a1\u533a\u5185\u90e8\u9053\u8def", "\u6865", - "\u6b65\u884c\u8857", "\u8f85\u8def", "\u531d\u9053", - "\u5168\u5c01\u95ed\u9053\u8def", - "\u672a\u5b9a\u4e49\u4ea4\u901a\u533a\u57df", - "POI\u8fde\u63a5\u8def", "\u96a7\u9053", "\u6b65\u884c\u9053", - "\u516c\u4ea4\u4e13\u7528\u9053", "\u63d0\u524d\u53f3\u8f6c\u9053" ]; - a8.inherits(bl, b5, "DWRoute"); - a8.extend(bl.prototype, { - search : function(cL, T) { - this._queryList.push( { - method : "search", - arguments : [ cL, T ] - }) - } - }); - window.BMAP_DRIVING_POLICY_LEAST_TIME = 0; - window.BMAP_DRIVING_POLICY_LEAST_DISTANCE = 1; - window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS = 2; - function q(T, cL) { - bl.call(this, T, cL); - cL = cL || {}; - this.setPolicy(cL.policy); - this.QUERY_TYPE = bM; - this.RETURN_TYPE = u; - this.ROUTE_TYPE = BMAP_ROUTE_TYPE_DRIVING - } - a8.inherits(q, bl, "DrivingRoute"); - a8.extend(q.prototype, { - setPolicy : function(T) { - if (T >= BMAP_DRIVING_POLICY_LEAST_TIME - && T <= BMAP_DRIVING_POLICY_AVOID_HIGHWAYS) { - this._opts.policy = T - } else { - this._opts.policy = BMAP_DRIVING_POLICY_LEAST_TIME - } - } - }); - function cD(T, cL) { - bl.call(this, T, cL); - this.QUERY_TYPE = bv; - this.RETURN_TYPE = z; - this.ROUTE_TYPE = BMAP_ROUTE_TYPE_WALKING; - this._enableDragging = false - } - a8.inherits(cD, bl, "WalkingRoute"); - function aX(cL) { - this._opts = {}; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(aX, a8.lang.Class, "Geocoder"); - a8.extend(aX.prototype, { - getPoint : function(T, cM, cL) { - this._queryList.push( { - method : "getPoint", - arguments : [ T, cM, cL ] - }) - }, - getLocation : function(T, cM, cL) { - this._queryList.push( { - method : "getLocation", - arguments : [ T, cM, cL ] - }) - }, - toString : function() { - return "Geocoder" - } - }); - function ak(cL) { - this._opts = {}; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.extend(ak.prototype, { - getCurrentPosition : function(cL, T) { - this._queryList.push( { - method : "getCurrentPosition", - arguments : [ cL, T ] - }) - }, - getStatus : function() { - return this._status - } - }); - function b9(cL) { - this._opts = { - renderOptions : { - map : null - } - }; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(b9, a8.lang.Class, "LocalCity"); - a8.extend(b9.prototype, { - get : function(T) { - this._queryList.push( { - method : "get", - arguments : [ T ] - }) - }, - toString : function() { - return "LocalCity" - } - }); - function V() { - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(V, a8.lang.Class, "Boundary"); - a8.extend(V.prototype, { - get : function(cL, T) { - this._queryList.push( { - method : "get", - arguments : [ cL, T ] - }) - }, - toString : function() { - return "Boundary" - } - }); - function bm(cM, cL) { - w.call(this, cM, cL); - this.QUERY_TYPE_BUSLIST = G; - this.RETURN_TYPE_BUSLIST = a2; - this.QUERY_TYPE_BUSLINE = bf; - this.RETURN_TYPE_BUSLINE = cy; - this._queryList = []; - var T = this; - cA.load("buslinesearch", function() { - T._asyncSearch() - }) - } - bm._iconOpen = cc.imgPath + "iw_plus.gif"; - bm._iconClose = cc.imgPath + "iw_minus.gif"; - bm._stopUrl = cc.imgPath + "stop_icon.png"; - a8.inherits(bm, w); - a8.extend(bm.prototype, { - getBusList : function(T) { - this._queryList.push( { - method : "getBusList", - arguments : [ T ] - }) - }, - getBusLine : function(T) { - this._queryList.push( { - method : "getBusLine", - arguments : [ T ] - }) - }, - setGetBusListCompleteCallback : function(T) { - this._opts.onGetBusListComplete = T || function() { - } - }, - setGetBusLineCompleteCallback : function(T) { - this._opts.onGetBusLineComplete = T || function() { - } - }, - setBusListHtmlSetCallback : function(T) { - this._opts.onBusListHtmlSet = T || function() { - } - }, - setBusLineHtmlSetCallback : function(T) { - this._opts.onBusLineHtmlSet = T || function() { - } - }, - setPolylinesSetCallback : function(T) { - this._opts.onPolylinesSet = T || function() { - } - } - }); - function by(cL) { - w.call(this, cL); - cL = cL || {}; - this._options = { - input : null, - types : [], - onSearchComplete : function() { - } - }; - a8.extend(this._options, cL); - this._loc.src = cL.location || "\u5168\u56fd"; - this._word = ""; - this._show = false; - this._suggestion = null; - this._inputValue = ""; - this._initialize(); - _addStat(5011); - var T = this; - cA.load("autocomplete", function() { - T._asyncSearch() - }) - } - a8.inherits(by, w, "Autocomplete"); - a8.extend(by.prototype, { - _initialize : function() { - }, - show : function() { - this._show = true - }, - hide : function() { - this._show = false - }, - setTypes : function(T) { - this._options.types = T - }, - setLocation : function(T) { - this._loc.src = T - }, - search : function(T) { - this._word = T - }, - setInputValue : function(T) { - this._inputValue = T - } - }); - function aj(T, cL) { - window.BMap[T] = cL - } - aj("Map", bz); - aj("Hotspot", cm); - aj("MapType", cu); - aj("Point", cd); - aj("Pixel", bu); - aj("Size", aH); - aj("Bounds", bN); - aj("TileLayer", p); - aj("Projection", bd); - aj("MercatorProjection", ba); - aj("PerspectiveProjection", cE); - aj("Copyright", av); - aj("Overlay", bG); - aj("Label", ag); - aj("Marker", ad); - aj("Icon", M); - aj("Polyline", f); - aj("Polygon", cn); - aj("InfoWindow", bP); - aj("Circle", a); - aj("Control", cp); - aj("NavigationControl", L); - aj("OverviewMapControl", cK); - aj("CopyrightControl", am); - aj("ScaleControl", bK); - aj("MapTypeControl", aL); - aj("TrafficLayer", aC); - aj("ContextMenu", cz); - aj("MenuItem", be); - aj("LocalSearch", a4); - aj("TransitRoute", aU); - aj("DrivingRoute", q); - aj("WalkingRoute", cD); - aj("Autocomplete", by); - aj("Geocoder", aX); - aj("LocalCity", b9); - aj("Geolocation", ak); - aj("BusLineSearch", bm); - aj("Boundary", V); - window.BMap.apiLoad(); -})(); diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls1d3.gif b/static/BMap/images/mapctrls1d3.gif deleted file mode 100644 index 522c6f8..0000000 --- a/static/BMap/images/mapctrls1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls2d0.png b/static/BMap/images/mapctrls2d0.png deleted file mode 100644 index fc6b518..0000000 --- a/static/BMap/images/mapctrls2d0.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/marker_red_sprite.png b/static/BMap/images/marker_red_sprite.png deleted file mode 100644 index 38a5900..0000000 --- a/static/BMap/images/marker_red_sprite.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/openhand.cur b/static/BMap/images/openhand.cur deleted file mode 100644 index cb444f9..0000000 --- a/static/BMap/images/openhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.jpg b/static/BMap/images/simulator.jpg deleted file mode 100644 index 7eccb40..0000000 --- a/static/BMap/images/simulator.jpg +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.png b/static/BMap/images/simulator.png deleted file mode 100644 index 981b8d7..0000000 --- a/static/BMap/images/simulator.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/st-close.png b/static/BMap/images/st-close.png deleted file mode 100644 index b516fa2..0000000 --- a/static/BMap/images/st-close.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/well-gas.svg b/static/BMap/images/well-gas.svg deleted file mode 100644 index 50cdd83..0000000 --- a/static/BMap/images/well-gas.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-heat.svg b/static/BMap/images/well-heat.svg deleted file mode 100644 index baee123..0000000 --- a/static/BMap/images/well-heat.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-power.svg b/static/BMap/images/well-power.svg deleted file mode 100644 index e731bcd..0000000 --- a/static/BMap/images/well-power.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-rain.svg b/static/BMap/images/well-rain.svg deleted file mode 100644 index f2ef906..0000000 --- a/static/BMap/images/well-rain.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-sewage.svg b/static/BMap/images/well-sewage.svg deleted file mode 100644 index a9a1662..0000000 --- a/static/BMap/images/well-sewage.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/js/apiv1.3.min.js b/static/BMap/js/apiv1.3.min.js deleted file mode 100644 index 63c0ac1..0000000 --- a/static/BMap/js/apiv1.3.min.js +++ /dev/null @@ -1,6424 +0,0 @@ -window.BMAP_AUTHENTIC_KEY = ""; -(function() { - var b2, a8 = b2 = a8 || { - version : "1.3.4" - }; - a8.guid = "$BAIDU$"; - window[a8.guid] = window[a8.guid] || {}; - a8.object = a8.object || {}; - a8.extend = a8.object.extend = function(cM, T) { - for ( var cL in T) { - if (T.hasOwnProperty(cL)) { - cM[cL] = T[cL] - } - } - return cM - }; - a8.dom = a8.dom || {}; - a8.dom.g = function(T) { - if ("string" == typeof T || T instanceof String) { - return document.getElementById(T) - } else { - if (T && T.nodeName && (T.nodeType == 1 || T.nodeType == 9)) { - return T - } - } - return null - }; - a8.g = a8.G = a8.dom.g; - a8.dom.hide = function(T) { - T = a8.dom.g(T); - T.style.display = "none"; - return T - }; - a8.hide = a8.dom.hide; - a8.lang = a8.lang || {}; - a8.lang.isString = function(T) { - return "[object String]" == Object.prototype.toString.call(T) - }; - a8.isString = a8.lang.isString; - a8.dom._g = function(T) { - if (a8.lang.isString(T)) { - return document.getElementById(T) - } - return T - }; - a8._g = a8.dom._g; - a8.dom.contains = function(T, cL) { - var cM = a8.dom._g; - T = cM(T); - cL = cM(cL); - return T.contains ? T != cL && T.contains(cL) : !!(T - .compareDocumentPosition(cL) & 16) - }; - a8.browser = a8.browser || {}; - if (/msie (\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.ie = a8.ie = document.documentMode || +RegExp["\x241"] - } - a8.dom._NAME_ATTRS = (function() { - var T = { - cellpadding : "cellPadding", - cellspacing : "cellSpacing", - colspan : "colSpan", - rowspan : "rowSpan", - valign : "vAlign", - usemap : "useMap", - frameborder : "frameBorder" - }; - if (a8.browser.ie < 8) { - T["for"] = "htmlFor"; - T["class"] = "className" - } else { - T.htmlFor = "for"; - T.className = "class" - } - return T - })(); - a8.dom.setAttr = function(cL, T, cM) { - cL = a8.dom.g(cL); - if ("style" == T) { - cL.style.cssText = cM - } else { - T = a8.dom._NAME_ATTRS[T] || T; - cL.setAttribute(T, cM) - } - return cL - }; - a8.setAttr = a8.dom.setAttr; - a8.dom.setAttrs = function(cM, T) { - cM = a8.dom.g(cM); - for ( var cL in T) { - a8.dom.setAttr(cM, cL, T[cL]) - } - return cM - }; - a8.setAttrs = a8.dom.setAttrs; - a8.string = a8.string || {}; - (function() { - var T = new RegExp( - "(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+\x24)", "g"); - a8.string.trim = function(cL) { - return String(cL).replace(T, "") - } - })(); - a8.trim = a8.string.trim; - a8.string.format = function(cM, T) { - cM = String(cM); - var cL = Array.prototype.slice.call(arguments, 1), cN = Object.prototype.toString; - if (cL.length) { - cL = cL.length == 1 ? (T !== null - && (/\[object Array\]|\[object Object\]/.test(cN.call(T))) ? T - : cL) - : cL; - return cM.replace(/#\{(.+?)\}/g, function(cO, cQ) { - var cP = cL[cQ]; - if ("[object Function]" == cN.call(cP)) { - cP = cP(cQ) - } - return ("undefined" == typeof cP ? "" : cP) - }) - } - return cM - }; - a8.format = a8.string.format; - a8.dom.removeClass = function(cP, cQ) { - cP = a8.dom.g(cP); - var cN = cP.className.split(/\s+/), cR = cQ.split(/\s+/), cL, T = cR.length, cM, cO = 0; - for (; cO < T; ++cO) { - for (cM = 0, cL = cN.length; cM < cL; ++cM) { - if (cN[cM] == cR[cO]) { - cN.splice(cM, 1); - break - } - } - } - cP.className = cN.join(" "); - return cP - }; - a8.removeClass = a8.dom.removeClass; - a8.dom.insertHTML = function(cN, T, cM) { - cN = a8.dom.g(cN); - var cL, cO; - if (cN.insertAdjacentHTML) { - cN.insertAdjacentHTML(T, cM) - } else { - cL = cN.ownerDocument.createRange(); - T = T.toUpperCase(); - if (T == "AFTERBEGIN" || T == "BEFOREEND") { - cL.selectNodeContents(cN); - cL.collapse(T == "AFTERBEGIN") - } else { - cO = T == "BEFOREBEGIN"; - cL[cO ? "setStartBefore" : "setEndAfter"](cN); - cL.collapse(cO) - } - cL.insertNode(cL.createContextualFragment(cM)) - } - return cN - }; - a8.insertHTML = a8.dom.insertHTML; - a8.dom.show = function(T) { - T = a8.dom.g(T); - T.style.display = ""; - return T - }; - a8.show = a8.dom.show; - a8.dom.getDocument = function(T) { - T = a8.dom.g(T); - return T.nodeType == 9 ? T : T.ownerDocument || T.document - }; - a8.dom.addClass = function(cP, cQ) { - cP = a8.dom.g(cP); - var cL = cQ.split(/\s+/), T = cP.className, cO = " " + T + " ", cN = 0, cM = cL.length; - for (; cN < cM; cN++) { - if (cO.indexOf(" " + cL[cN] + " ") < 0) { - T += " " + cL[cN] - } - } - cP.className = T; - return cP - }; - a8.addClass = a8.dom.addClass; - a8.dom._styleFixer = a8.dom._styleFixer || {}; - a8.dom._styleFilter = a8.dom._styleFilter || []; - a8.dom._styleFilter.filter = function(cL, cO, cP) { - for ( var T = 0, cN = a8.dom._styleFilter, cM; cM = cN[T]; T++) { - if (cM = cM[cP]) { - cO = cM(cL, cO) - } - } - return cO - }; - a8.string.toCamelCase = function(T) { - if (T.indexOf("-") < 0 && T.indexOf("_") < 0) { - return T - } - return T.replace(/[-_][^-_]/g, function(cL) { - return cL.charAt(1).toUpperCase() - }) - }; - a8.dom.getStyle = function(cM, cL) { - var cP = a8.dom; - cM = cP.g(cM); - cL = a8.string.toCamelCase(cL); - var cO = cM.style[cL]; - if (!cO) { - var T = cP._styleFixer[cL], cN = cM.currentStyle - || (a8.browser.ie ? cM.style : getComputedStyle(cM, null)); - cO = T && T.get ? T.get(cM, cN) : cN[T || cL] - } - if (T = cP._styleFilter) { - cO = T.filter(cL, cO, "get") - } - return cO - }; - a8.getStyle = a8.dom.getStyle; - if (/opera\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.opera = +RegExp["\x241"] - } - a8.browser.isWebkit = /webkit/i.test(navigator.userAgent); - a8.browser.isGecko = /gecko/i.test(navigator.userAgent) - && !/like gecko/i.test(navigator.userAgent); - a8.browser.isStrict = document.compatMode == "CSS1Compat"; - a8.dom.getPosition = function(T) { - T = a8.dom.g(T); - var cT = a8.dom.getDocument(T), cN = a8.browser, cQ = a8.dom.getStyle, cM = cN.isGecko > 0 - && cT.getBoxObjectFor - && cQ(T, "position") == "absolute" - && (T.style.top === "" || T.style.left === ""), cR = { - left : 0, - top : 0 - }, cP = (cN.ie && !cN.isStrict) ? cT.body : cT.documentElement, cU, cL; - if (T == cP) { - return cR - } - if (T.getBoundingClientRect) { - cL = T.getBoundingClientRect(); - cR.left = Math.floor(cL.left) - + Math.max(cT.documentElement.scrollLeft, - cT.body.scrollLeft); - cR.top = Math.floor(cL.top) - + Math.max(cT.documentElement.scrollTop, cT.body.scrollTop); - cR.left -= cT.documentElement.clientLeft; - cR.top -= cT.documentElement.clientTop; - var cS = cT.body, cV = parseInt(cQ(cS, "borderLeftWidth")), cO = parseInt(cQ( - cS, "borderTopWidth")); - if (cN.ie && !cN.isStrict) { - cR.left -= isNaN(cV) ? 2 : cV; - cR.top -= isNaN(cO) ? 2 : cO - } - } else { - cU = T; - do { - cR.left += cU.offsetLeft; - cR.top += cU.offsetTop; - if (cN.isWebkit > 0 && cQ(cU, "position") == "fixed") { - cR.left += cT.body.scrollLeft; - cR.top += cT.body.scrollTop; - break - } - cU = cU.offsetParent - } while (cU && cU != T); - if (cN.opera > 0 - || (cN.isWebkit > 0 && cQ(T, "position") == "absolute")) { - cR.top -= cT.body.offsetTop - } - cU = T.offsetParent; - while (cU && cU != cT.body) { - cR.left -= cU.scrollLeft; - if (!cN.opera || cU.tagName != "TR") { - cR.top -= cU.scrollTop - } - cU = cU.offsetParent - } - } - return cR - }; - if (/firefox\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.firefox = +RegExp["\x241"] - } - (function() { - var T = navigator.userAgent; - if (/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(T) - && !/chrome/i.test(T)) { - a8.browser.safari = +(RegExp["\x241"] || RegExp["\x242"]) - } - })(); - if (/chrome\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.chrome = +RegExp["\x241"] - } - a8.array = a8.array || {}; - a8.array.each = function(cP, cN) { - var cM, cO, cL, T = cP.length; - if ("function" == typeof cN) { - for (cL = 0; cL < T; cL++) { - cO = cP[cL]; - cM = cN.call(cP, cO, cL); - if (cM === false) { - break - } - } - } - return cP - }; - a8.each = a8.array.each; - a8.lang.guid = function() { - return "TANGRAM__" + (window[a8.guid]._counter++).toString(36) - }; - window[a8.guid]._counter = window[a8.guid]._counter || 1; - window[a8.guid]._instances = window[a8.guid]._instances || {}; - a8.lang.isFunction = function(T) { - return "[object Function]" == Object.prototype.toString.call(T) - }; - a8.lang.Class = function(T) { - this.guid = T || a8.lang.guid(); - window[a8.guid]._instances[this.guid] = this - }; - window[a8.guid]._instances = window[a8.guid]._instances || {}; - a8.lang.Class.prototype.dispose = function() { - delete window[a8.guid]._instances[this.guid]; - for ( var T in this) { - if (!a8.lang.isFunction(this[T])) { - delete this[T] - } - } - this.disposed = true - }; - a8.lang.Class.prototype.toString = function() { - return "[object " + (this._className || "Object") + "]" - }; - a8.lang.Event = function(T, cL) { - this.type = T; - this.returnValue = true; - this.target = cL || null; - this.currentTarget = null - }; - a8.lang.Class.prototype.addEventListener = function(cN, cM, cL) { - if (!a8.lang.isFunction(cM)) { - return - } - !this.__listeners && (this.__listeners = {}); - var T = this.__listeners, cO; - if (typeof cL == "string" && cL) { - if (/[^\w\-]/.test(cL)) { - throw ("nonstandard key:" + cL) - } else { - cM.hashCode = cL; - cO = cL - } - } - cN.indexOf("on") != 0 && (cN = "on" + cN); - typeof T[cN] != "object" && (T[cN] = {}); - cO = cO || a8.lang.guid(); - cM.hashCode = cO; - T[cN][cO] = cM - }; - a8.lang.Class.prototype.removeEventListener = function(cM, cL) { - if (a8.lang.isFunction(cL)) { - cL = cL.hashCode - } else { - if (!a8.lang.isString(cL)) { - return - } - } - !this.__listeners && (this.__listeners = {}); - cM.indexOf("on") != 0 && (cM = "on" + cM); - var T = this.__listeners; - if (!T[cM]) { - return - } - T[cM][cL] && delete T[cM][cL] - }; - a8.lang.Class.prototype.dispatchEvent = function(cN, T) { - if (a8.lang.isString(cN)) { - cN = new a8.lang.Event(cN) - } - !this.__listeners && (this.__listeners = {}); - T = T || {}; - for ( var cM in T) { - cN[cM] = T[cM] - } - var cM, cL = this.__listeners, cO = cN.type; - cN.target = cN.target || this; - cN.currentTarget = this; - cO.indexOf("on") != 0 && (cO = "on" + cO); - a8.lang.isFunction(this[cO]) && this[cO].apply(this, arguments); - if (typeof cL[cO] == "object") { - for (cM in cL[cO]) { - cL[cO][cM].apply(this, arguments) - } - } - return cN.returnValue - }; - a8.lang.inherits = function(cQ, cO, cN) { - var cM, cP, T = cQ.prototype, cL = new Function(); - cL.prototype = cO.prototype; - cP = cQ.prototype = new cL(); - for (cM in T) { - cP[cM] = T[cM] - } - cQ.prototype.constructor = cQ; - cQ.superClass = cO.prototype; - if ("string" == typeof cN) { - cP._className = cN - } - }; - a8.inherits = a8.lang.inherits; - a8.lang.instance = function(T) { - return window[a8.guid]._instances[T] || null - }; - a8.platform = a8.platform || {}; - a8.platform.isMacintosh = /macintosh/i.test(navigator.userAgent); - a8.platform.isWindows = /windows/i.test(navigator.userAgent); - a8.platform.isX11 = /x11/i.test(navigator.userAgent); - a8.platform.isAndroid = /android/i.test(navigator.userAgent); - a8.platform.isIpad = /ipad/i.test(navigator.userAgent); - a8.platform.isIphone = /iphone/i.test(navigator.userAgent); - a8.lang.Event.prototype.inherit = function(cM) { - var cL = this; - this.domEvent = cM = window.event || cM; - cL.clientX = cM.clientX || cM.pageX; - cL.clientY = cM.clientY || cM.pageY; - cL.offsetX = cM.offsetX || cM.layerX; - cL.offsetY = cM.offsetY || cM.layerY; - cL.screenX = cM.screenX; - cL.screenY = cM.screenY; - cL.ctrlKey = cM.ctrlKey || cM.metaKey; - cL.shiftKey = cM.shiftKey; - cL.altKey = cM.altKey; - if (cM.touches) { - cL.touches = []; - for ( var T = 0; T < cM.touches.length; T++) { - cL.touches.push( { - clientX : cM.touches[T].clientX, - clientY : cM.touches[T].clientY, - screenX : cM.touches[T].screenX, - screenY : cM.touches[T].screenY, - pageX : cM.touches[T].pageX, - pageY : cM.touches[T].pageY, - target : cM.touches[T].target, - identifier : cM.touches[T].identifier - }) - } - } - if (cM.changedTouches) { - cL.changedTouches = []; - for ( var T = 0; T < cM.changedTouches.length; T++) { - cL.changedTouches.push( { - clientX : cM.changedTouches[T].clientX, - clientY : cM.changedTouches[T].clientY, - screenX : cM.changedTouches[T].screenX, - screenY : cM.changedTouches[T].screenY, - pageX : cM.changedTouches[T].pageX, - pageY : cM.changedTouches[T].pageY, - target : cM.changedTouches[T].target, - identifier : cM.changedTouches[T].identifier - }) - } - } - if (cM.targetTouches) { - cL.targetTouches = []; - for ( var T = 0; T < cM.targetTouches.length; T++) { - cL.targetTouches.push( { - clientX : cM.targetTouches[T].clientX, - clientY : cM.targetTouches[T].clientY, - screenX : cM.targetTouches[T].screenX, - screenY : cM.targetTouches[T].screenY, - pageX : cM.targetTouches[T].pageX, - pageY : cM.targetTouches[T].pageY, - target : cM.targetTouches[T].target, - identifier : cM.targetTouches[T].identifier - }) - } - } - cL.rotation = cM.rotation; - cL.scale = cM.scale; - return cL - }; - a8.lang.decontrol = function(cL) { - var T = window[a8.guid]; - T._instances && (delete T._instances[cL]) - }; - a8.event = {}; - a8.on = a8.event.on = function(cM, cL, T) { - if (!(cM = a8.g(cM))) { - return cM - } - cL = cL.replace(/^on/, ""); - if (cM.addEventListener) { - cM.addEventListener(cL, T, false) - } else { - if (cM.attachEvent) { - cM.attachEvent("on" + cL, T) - } - } - return cM - }; - a8.un = a8.event.un = function(cM, cL, T) { - if (!(cM = a8.g(cM))) { - return cM - } - cL = cL.replace(/^on/, ""); - if (cM.removeEventListener) { - cM.removeEventListener(cL, T, false) - } else { - if (cM.detachEvent) { - cM.detachEvent("on" + cL, T) - } - } - return cM - }; - a8.dom.hasClass = function(cM, cL) { - if (!cM || !cM.className || typeof cM.className != "string") { - return false - } - var T = -1; - try { - T = cM.className == cL - || cM.className.search(new RegExp("(\\s|^)" + cL - + "(\\s|$)")) - } catch (cN) { - return false - } - return T > -1 - }; - window.BMap = window.BMap || {}; - window.BMap.version = "1.3"; - window.BMap._register = []; - window.BMap.register = function(T) { - this._register.push(T) - }; - window.BMap.apiLoad = window.BMap.apiLoad || function() { - }; - var bJ = window.BMAP_AUTHENTIC_KEY; - window.BMAP_AUTHENTIC_KEY = null; - function bz(cN, cP) { - cN = a8.g(cN); - if (!cN) { - return - } - var cO = this; - a8.lang.Class.call(cO); - cO.config = { - clickInterval : 200, - enableDragging : true, - enableKeyboard : false, - enableDblclickZoom : true, - enableContinuousZoom : false, - enableWheelZoom : false, - enableMouseDown : true, - enablePinchToZoom : true, - enableAutoResize : true, - fps : 25, - zoomerDuration : 240, - actionDuration : 450, - defaultCursor : cc.defaultCursor, - draggingCursor : cc.draggingCursor, - isOverviewMap : false, - minZoom : 1, - maxZoom : 18, - mapType : BMAP_NORMAL_MAP, - restrictBounds : false, - drawer : BMAP_SYS_DRAWER, - enableInertialDragging : false, - drawMargin : 500, - enableHighResolution : false - }; - a8.extend(cO.config, cP || {}); - if (cO.highResolutionEnabled()) { - var cR = document.querySelector("meta[name=viewport]"); - cR.content = "initial-scale=0.5, minimum-scale=0.5, maximum-scale=0.5, user-scalable=no, target-densitydpi=high-dpi" - } - cO.container = cN; - cO._setStyle(cN); - cN.unselectable = "on"; - cN.innerHTML = ""; - cN.appendChild(cO.render()); - var cL = cO.getSize(); - cO.width = cL.width; - cO.height = cL.height; - cO.offsetX = 0; - cO.offsetY = 0; - cO.platform = cN.firstChild; - cO.maskLayer = cO.platform.firstChild; - cO.maskLayer.style.width = cO.width + "px"; - cO.maskLayer.style.height = cO.height + "px"; - cO._panes = {}; - cO.centerPoint = new cd(0, 0); - cO.mercatorCenter = new cd(0, 0); - cO.zoomLevel = 1; - cO.lastLevel = 0; - cO.defaultZoomLevel = null; - cO.defaultCenter = null; - cO.currentCity = ""; - cO.cityCode = ""; - cO._hotspots = {}; - cO.currentOperation = 0; - cP = cP || {}; - var cQ = cO.mapType = cO.config.mapType; - cO.projection = cQ.getProjection(); - if (cQ === BMAP_PERSPECTIVE_MAP) { - _addStat(5002) - } - if (cQ === BMAP_SATELLITE_MAP || cQ === BMAP_HYBRID_MAP) { - _addStat(5003) - } - var T = cO.config; - T.userMinZoom = cP.minZoom; - T.userMaxZoom = cP.maxZoom; - cO._checkZoom(); - cO.temp = { - operating : false, - arrow : 0, - lastDomMoveTime : 0, - lastLoadTileTime : 0, - lastMovingTime : 0, - canKeyboard : false, - registerIndex : -1, - curSpots : [] - }; - cO.platform.style.cursor = cO.config.defaultCursor; - for ( var cM = 0; cM < BMap._register.length; cM++) { - BMap._register[cM](cO) - } - cO.temp.registerIndex = cM; - cO._bind(); - cA.load("map", function() { - cO._draw() - }); - if (bO()) { - cA.load("oppc", function() { - cO._asyncRegister() - }) - } - if (aA()) { - cA.load("opmb", function() { - cO._asyncRegister() - }) - } - cN = null - } - a8.lang.inherits(bz, a8.lang.Class, "Map"); - a8 - .extend( - bz.prototype, - { - render : function() { - var T = aa("div"); - var cN = T.style; - cN.overflow = "visible"; - cN.position = "absolute"; - cN.zIndex = "0"; - cN.top = cN.left = "0px"; - var cL = aa("div", { - "class" : "BMap_mask" - }); - var cM = cL.style; - cM.position = "absolute"; - cM.top = cM.left = "0px"; - cM.zIndex = "9"; - cM.overflow = "hidden"; - cM.WebkitUserSelect = "none"; - T.appendChild(cL); - return T - }, - _setStyle : function(cL) { - var T = cL.style; - T.overflow = "hidden"; - if (aJ(cL).position != "absolute") { - T.position = "relative"; - T.zIndex = 0 - } - T.backgroundColor = "#F3F1EC"; - T.color = "#000"; - T.textAlign = "left" - }, - _bind : function() { - var T = this; - T._watchSize = function() { - var cL = T.getSize(); - if (T.width != cL.width - || T.height != cL.height) { - var cN = new aH(T.width, T.height); - var cO = new bg("onbeforeresize"); - cO.size = cN; - T.dispatchEvent(cO); - T._updateCenterPoint( - (cL.width - T.width) / 2, - (cL.height - T.height) / 2); - T.maskLayer.style.width = (T.width = cL.width) - + "px"; - T.maskLayer.style.height = (T.height = cL.height) - + "px"; - var cM = new bg("onresize"); - cM.size = cL; - T.dispatchEvent(cM) - } - }; - if (T.config.enableAutoResize) { - T.temp.autoResizeTimer = setInterval( - T._watchSize, 80) - } - }, - _updateCenterPoint : function(cN, cL, cR, cQ) { - var cO = this.getMapType().getZoomUnits( - this.getZoom()); - var cS = this.projection; - var cP = true; - if (cR && cd.isInRange(cR)) { - this.centerPoint = new cd(cR.lng, cR.lat); - cP = false - } - var cM = (cR && cQ) ? cS.lngLatToMercator(cR, - this.currentCity) : this.mercatorCenter; - if (cM) { - this.mercatorCenter = new cd(cM.lng + cN * cO, - cM.lat - cL * cO); - var T = cS.mercatorToLngLat( - this.mercatorCenter, this.currentCity); - if (T && cP) { - this.centerPoint = T - } - } - }, - zoomTo : function(cN, cL) { - if (!aK(cN)) { - return - } - cN = this._getProperZoom(cN).zoom; - if (cN == this.zoomLevel) { - return - } - this.lastLevel = this.zoomLevel; - this.zoomLevel = cN; - var cM; - if (cL) { - cM = cL - } else { - if (this.getInfoWindow()) { - cM = this.getInfoWindow().getPosition() - } - } - if (cM) { - var T = this.pointToPixel(cM, this.lastLevel); - this._updateCenterPoint(this.width / 2 - T.x, - this.height / 2 - T.y, - this.pixelToPoint(T, this.lastLevel), - true) - } - this.dispatchEvent(new bg("onzoomstart")); - this.dispatchEvent(new bg("onzoomstartcode")) - }, - setZoom : function(T) { - this.zoomTo(T) - }, - zoomIn : function(T) { - this.zoomTo(this.zoomLevel + 1, T) - }, - zoomOut : function(T) { - this.zoomTo(this.zoomLevel - 1, T) - }, - panTo : function(T, cL) { - if (!(T instanceof cd)) { - return - } - this.mercatorCenter = this.projection - .lngLatToMercator(T, this.currentCity); - if (cd.isInRange(T)) { - this.centerPoint = new cd(T.lng, T.lat) - } else { - this.centerPoint = this.projection - .mercatorToLngLat(this.mercatorCenter, - this.currentCity) - } - }, - panBy : function(cL, T) { - cL = Math.round(cL) || 0; - T = Math.round(T) || 0; - this._updateCenterPoint(-cL, -T) - }, - addControl : function(T) { - if (T && I(T._i)) { - T._i(this); - this.dispatchEvent(new bg("onaddcontrol", T)) - } - }, - removeControl : function(T) { - if (T && I(T.remove)) { - T.remove(); - this - .dispatchEvent(new bg( - "onremovecontrol", T)) - } - }, - addContextMenu : function(T) { - if (T && I(T.initialize)) { - T.initialize(this); - this - .dispatchEvent(new bg( - "onaddcontextmenu", T)) - } - }, - removeContextMenu : function(T) { - if (T && I(T.remove)) { - this.dispatchEvent(new bg( - "onremovecontextmenu", T)); - T.remove() - } - }, - addOverlay : function(T) { - if (T && I(T._i)) { - T._i(this); - this.dispatchEvent(new bg("onaddoverlay", T)) - } - }, - removeOverlay : function(T) { - if (T && I(T.remove)) { - T.remove(); - this - .dispatchEvent(new bg( - "onremoveoverlay", T)) - } - }, - clearOverlays : function() { - this.dispatchEvent(new bg("onclearoverlays")) - }, - addTileLayer : function(T) { - if (T) { - this.dispatchEvent(new bg("onaddtilelayer", T)) - } - }, - removeTileLayer : function(T) { - if (T) { - this.dispatchEvent(new bg("onremovetilelayer", - T)) - } - }, - setMapType : function(cL) { - if (this.mapType === cL) { - return - } - var cM = new bg("onsetmaptype"); - var T = this.mapType; - cM.preMapType = T; - this.mapType = this.config.mapType = cL; - this.projection = this.mapType.getProjection(); - this._updateCenterPoint(0, 0, this.getCenter(), - true); - this._checkZoom(); - var cN = this._getProperZoom(this.getZoom()).zoom; - this.zoomTo(cN); - this.dispatchEvent(cM); - var cM = new bg("onmaptypechange"); - cM.zoomLevel = cN; - cM.mapType = cL; - this.dispatchEvent(cM); - if (cL === BMAP_SATELLITE_MAP - || cL === BMAP_HYBRID_MAP) { - _addStat(5003) - } - }, - setCenter : function(T) { - var cM = this; - if (T instanceof cd) { - cM.panTo(T, { - noAnimation : true - }) - } else { - if (b3(T)) { - var cL = this._getLocal(); - cL.setSearchCompleteCallback(function(cN) { - if (cL.getStatus() == 0 - && cL._json.result.type == 2) { - cM.setCenter(cN.getPoi(0).point); - if (BMAP_PERSPECTIVE_MAP - .getCityName(T)) { - cM.setCurrentCity(T) - } - } - }); - cL.search(T) - } - } - }, - centerAndZoom : function(T, cM) { - var cL = this; - if (b3(T)) { - var cP = cL._getLocal(); - cP - .setSearchCompleteCallback(function(cQ) { - if (cP.getStatus() == 0 - && cP._json.result.type == 2) { - var cS = cQ.getPoi(0).point; - var cR = cM - || S - .getBestLevel( - cP._json.content.level, - cL); - cL.centerAndZoom(cS, cR); - if (BMAP_PERSPECTIVE_MAP - .getCityName(T)) { - cL.setCurrentCity(T) - } - } - }); - cP.search(T); - return - } - if (!(T instanceof cd) || !cM) { - return - } - cM = cL._getProperZoom(cM).zoom; - cL.lastLevel = cL.zoomLevel || cM; - cL.zoomLevel = cM; - cL.centerPoint = new cd(T.lng, T.lat); - cL.mercatorCenter = cL.projection.lngLatToMercator( - cL.centerPoint, cL.currentCity); - cL.defaultZoomLevel = cL.defaultZoomLevel - || cL.zoomLevel; - cL.defaultCenter = cL.defaultCenter - || cL.centerPoint; - var cO = new bg("onload"); - var cN = new bg("onloadcode"); - cO.point = new cd(T.lng, T.lat); - cO.pixel = cL.pointToPixel(cL.centerPoint, - cL.zoomLevel); - cO.zoom = cM; - if (!cL.loaded) { - cL.loaded = true; - cL.dispatchEvent(cO) - } - cL.dispatchEvent(cN); - cL.dispatchEvent(new bg("onmoveend")); - if (cL.lastLevel != cL.zoomLevel) { - cL.dispatchEvent(new bg("onzoomend")) - } - }, - _getLocal : function() { - if (!this.temp.local) { - this.temp.local = new a4(1) - } - return this.temp.local - }, - reset : function() { - this.centerAndZoom(this.defaultCenter, - this.defaultZoomLevel, true) - }, - enableDragging : function() { - this.config.enableDragging = true - }, - disableDragging : function() { - this.config.enableDragging = false - }, - enableInertialDragging : function() { - this.config.enableInertialDragging = true - }, - disableInertialDragging : function() { - this.config.enableInertialDragging = false - }, - enableScrollWheelZoom : function() { - this.config.enableWheelZoom = true - }, - disableScrollWheelZoom : function() { - this.config.enableWheelZoom = false - }, - enableContinuousZoom : function() { - this.config.enableContinuousZoom = true - }, - disableContinuousZoom : function() { - this.config.enableContinuousZoom = false - }, - enableDoubleClickZoom : function() { - this.config.enableDblclickZoom = true - }, - disableDoubleClickZoom : function() { - this.config.enableDblclickZoom = false - }, - enableKeyboard : function() { - this.config.enableKeyboard = true - }, - disableKeyboard : function() { - this.config.enableKeyboard = false - }, - enablePinchToZoom : function() { - this.config.enablePinchToZoom = true - }, - disablePinchToZoom : function() { - this.config.enablePinchToZoom = false - }, - enableAutoResize : function() { - this.config.enableAutoResize = true; - this._watchSize(); - if (!this.temp.autoResizeTimer) { - this.temp.autoResizeTimer = setInterval( - this._watchSize, 80) - } - }, - disableAutoResize : function() { - this.config.enableAutoResize = false; - if (this.temp.autoResizeTimer) { - clearInterval(this.temp.autoResizeTimer); - this.temp.autoResizeTimer = null - } - }, - getSize : function() { - return new aH(this.container.clientWidth, - this.container.clientHeight) - }, - getCenter : function() { - return this.centerPoint - }, - getZoom : function() { - return this.zoomLevel - }, - checkResize : function() { - this._watchSize() - }, - _getProperZoom : function(cM) { - var cL = this.config.minZoom, T = this.config.maxZoom, cN = false; - if (cM < cL) { - cN = true; - cM = cL - } - if (cM > T) { - cN = true; - cM = T - } - return { - zoom : cM, - exceeded : cN - } - }, - getContainer : function() { - return this.container - }, - pointToPixel : function(T, cL) { - cL = cL || this.getZoom(); - return this.projection.pointToPixel(T, cL, - this.mercatorCenter, this.getSize(), - this.currentCity) - }, - pixelToPoint : function(T, cL) { - cL = cL || this.getZoom(); - return this.projection.pixelToPoint(T, cL, - this.mercatorCenter, this.getSize(), - this.currentCity) - }, - pointToOverlayPixel : function(T, cM) { - if (!T) { - return - } - var cN = new cd(T.lng, T.lat); - var cL = this.pointToPixel(cN, cM); - cL.x -= this.offsetX; - cL.y -= this.offsetY; - return cL - }, - overlayPixelToPoint : function(T, cM) { - if (!T) { - return - } - var cL = new bu(T.x, T.y); - cL.x += this.offsetX; - cL.y += this.offsetY; - return this.pixelToPoint(cL, cM) - }, - getBounds : function() { - if (!this.isLoaded()) { - return new bN() - } - var cL = arguments[0] || {}, cN = cL.margins - || [ 0, 0, 0, 0 ], T = cL.zoom || null, cO = this - .pixelToPoint( { - x : cN[3], - y : this.height - cN[2] - }, T), cM = this.pixelToPoint( { - x : this.width - cN[1], - y : cN[0] - }, T); - return new bN(cO, cM) - }, - isLoaded : function() { - return !!this.loaded - }, - _getBestLevel : function(cL, cM) { - var cP = this.getMapType(); - var cR = cM.margins || [ 10, 10, 10, 10 ], cO = cM.zoomFactor || 0, cS = cR[1] - + cR[3], cQ = cR[0] + cR[2], T = cP - .getMinZoom(), cU = cP.getMaxZoom(); - for ( var cN = cU; cN >= T; cN--) { - var cT = this.getMapType().getZoomUnits(cN); - if (cL.toSpan().lng / cT < this.width - cS - && cL.toSpan().lat / cT < this.height - - cQ) { - break - } - } - cN += cO; - if (cN < T) { - cN = T - } - if (cN > cU) { - cN = cU - } - return cN - }, - getViewport : function(cT, cL) { - var cX = { - center : this.getCenter(), - zoom : this.getZoom() - }; - if (!cT || !cT instanceof bN && cT.length == 0 - || cT instanceof bN && cT.isEmpty()) { - return cX - } - var cV = []; - if (cT instanceof bN) { - cV.push(cT.getNorthEast()); - cV.push(cT.getSouthWest()) - } else { - cV = cT.slice(0) - } - cL = cL || {}; - var cP = []; - for ( var cQ = 0, cO = cV.length; cQ < cO; cQ++) { - cP.push(this.projection.lngLatToMercator( - cV[cQ], this.currentCity)) - } - var cM = new bN(); - for ( var cQ = cP.length - 1; cQ >= 0; cQ--) { - cM.extend(cP[cQ]) - } - if (cM.isEmpty()) { - return cX - } - var T = cM.getCenter(); - var cW = this._getBestLevel(cM, cL); - if (cL.margins) { - var cS = cL.margins, cR = (cS[1] - cS[3]) / 2, cU = (cS[0] - cS[2]) / 2, cN = this - .getMapType().getZoomUnits(cW); - T.lng = T.lng + cN * cR; - T.lat = T.lat + cN * cU - } - T = this.projection.mercatorToLngLat(T, - this.currentCity); - return { - center : T, - zoom : cW - } - }, - setViewport : function(cL, cO) { - var T; - if (cL && cL.center) { - T = cL - } else { - T = this.getViewport(cL, cO) - } - cO = cO || {}; - var cM = cO.delay || 200; - if (T.zoom == this.zoomLevel - && cO.enableAnimation != false) { - var cN = this; - setTimeout(function() { - cN.panTo(T.center, { - duration : 210 - }) - }, cM) - } else { - this.centerAndZoom(T.center, T.zoom) - } - }, - getPanes : function() { - return this._panes - }, - getInfoWindow : function() { - if (this.temp.infoWin && this.temp.infoWin.isOpen()) { - return this.temp.infoWin - } - return null - }, - getDistance : function(cM, T) { - if (!cM || !T) { - return - } - var cL = 0; - cL = ba.getDistanceByLL(cM, T); - return cL - }, - getOverlays : function() { - var cN = [], cO = this._overlays, cM = this._customOverlays; - if (cO) { - for ( var cL in cO) { - if (cO[cL] instanceof Y) { - cN.push(cO[cL]) - } - } - } - if (cM) { - for ( var cL = 0, T = cM.length; cL < T; cL++) { - cN.push(cM[cL]) - } - } - return cN - }, - getMapType : function() { - return this.mapType - }, - _asyncRegister : function() { - for ( var T = this.temp.registerIndex; T < BMap._register.length; T++) { - BMap._register[T](this) - } - this.temp.registerIndex = T - }, - setCurrentCity : function(T) { - this.currentCity = BMAP_PERSPECTIVE_MAP - .getCityName(T); - this.cityCode = BMAP_PERSPECTIVE_MAP - .getCityCode(this.currentCity) - }, - setDefaultCursor : function(T) { - if (a8.browser.firefox && T.indexOf("url") == 0) { - T = T += ", -moz-grab" - } - this.config.defaultCursor = T; - if (this.platform) { - this.platform.style.cursor = this.config.defaultCursor - } - }, - getDefaultCursor : function() { - return this.config.defaultCursor - }, - setDraggingCursor : function(T) { - if (a8.browser.firefox && T.indexOf("url") == 0) { - T = T += ", -moz-grabbing" - } - this.config.draggingCursor = T - }, - getDraggingCursor : function() { - return this.config.draggingCursor - }, - highResolutionEnabled : function() { - return this.config.enableHighResolution - && window.devicePixelRatio > 1 - }, - addHotspot : function(cL) { - if (cL instanceof cm) { - this._hotspots[cL.guid] = cL; - cL.initialize(this) - } - var T = this; - cA.load("hotspot", function() { - T._asyncRegister() - }) - }, - removeHotspot : function(T) { - if (this._hotspots[T.guid]) { - delete this._hotspots[T.guid] - } - }, - clearHotspots : function() { - this._hotspots = {} - }, - _checkZoom : function() { - var cL = this.mapType.getMinZoom(); - var cM = this.mapType.getMaxZoom(); - var T = this.config; - T.minZoom = T.userMinZoom || cL; - T.maxZoom = T.userMaxZoom || cM; - if (T.minZoom < cL) { - T.minZoom = cL - } - if (T.maxZoom > cM) { - T.maxZoom = cM - } - }, - setMinZoom : function(T) { - if (T > this.config.maxZoom) { - T = this.config.maxZoom - } - this.config.userMinZoom = T; - this._updateZoom() - }, - setMaxZoom : function(T) { - if (T < this.config.minZoom) { - T = this.config.minZoom - } - this.config.userMaxZoom = T; - this._updateZoom() - }, - _updateZoom : function() { - this._checkZoom(); - var T = this.config; - if (this.zoomLevel < T.minZoom) { - this.setZoom(T.minZoom) - } else { - if (this.zoomLevel > T.maxZoom) { - this.setZoom(T.maxZoom) - } - } - var cL = new bg("onzoomspanchange"); - cL.minZoom = T.minZoom; - cL.maxZoom = T.maxZoom; - this.dispatchEvent(cL) - } - }); - window.BMAP_API_VERSION = "1.3"; - window.BMAP_COORD_LNGLAT = 0; - window.BMAP_COORD_MERCATOR = 1; - window.BMAP_SYS_DRAWER = 0; - window.BMAP_SVG_DRAWER = 1; - window.BMAP_VML_DRAWER = 2; - window.BMAP_CANVAS_DRAWER = 3; - window._addStat = function(cP, cO) { - if (!cP) { - return - } - cO = cO || {}; - var cN = ""; - for ( var cL in cO) { - cN = cN + "&" + cL + "=" + encodeURIComponent(cO[cL]) - } - var cQ = function(cR) { - if (!cR) { - return - } - _addStat._sending = true; - setTimeout(function() { - _addStat._img.src = cc.imgPath + "blank.gif?" + cR.src - }, 50) - }; - var T = function() { - var cR = _addStat._reqQueue.shift(); - if (cR) { - cQ(cR) - } - }; - var cM = (Math.random() * 100000000).toFixed(0); - if (_addStat._sending) { - _addStat._reqQueue.push( { - src : "t=" + cM + "&code=" + cP + cN - }) - } else { - cQ( { - src : "t=" + cM + "&code=" + cP + cN - }) - } - if (!_addStat._binded) { - a8.on(_addStat._img, "load", function() { - _addStat._sending = false; - T() - }); - a8.on(_addStat._img, "error", function() { - _addStat._sending = false; - T() - }); - _addStat._binded = true - } - }; - window._addStat._reqQueue = []; - window._addStat._img = new Image(); - _addStat(5000, { - v : BMap.version - }); - function g(cN) { - var T = { - duration : 1000, - fps : 30, - delay : 0, - transition : aw.linear, - onStop : function() { - } - }; - this._anis = []; - if (cN) { - for ( var cL in cN) { - T[cL] = cN[cL] - } - } - this._opts = T; - if (aK(T.delay)) { - var cM = this; - setTimeout(function() { - cM.start() - }, T.delay) - } else { - if (T.delay != g.INFINITE) { - this.start() - } - } - } - g.INFINITE = "INFINITE"; - g.prototype.start = function() { - this._beginTime = aE(); - this._endTime = this._beginTime + this._opts.duration; - this._launch() - }; - g.prototype.add = function(T) { - this._anis.push(T) - }; - g.prototype._launch = function() { - var cM = this; - var T = aE(); - if (T >= cM._endTime) { - if (I(cM._opts.render)) { - cM._opts.render(cM._opts.transition(1)) - } - if (I(cM._opts.finish)) { - cM._opts.finish() - } - if (cM._anis.length > 0) { - var cL = cM._anis[0]; - cL._anis = [].concat(cM._anis.slice(1)); - cL.start() - } - return - } - cM.schedule = cM._opts.transition((T - cM._beginTime) - / cM._opts.duration); - if (I(cM._opts.render)) { - cM._opts.render(cM.schedule) - } - if (!cM.terminative) { - cM._timer = setTimeout(function() { - cM._launch() - }, 1000 / cM._opts.fps) - } - }; - g.prototype.stop = function(cL) { - this.terminative = true; - for ( var T = 0; T < this._anis.length; T++) { - this._anis[T].stop(); - this._anis[T] = null - } - this._anis.length = 0; - if (this._timer) { - clearTimeout(this._timer); - this._timer = null - } - this._opts.onStop(this.schedule); - if (cL) { - this._endTime = this._beginTime; - this._launch() - } - }; - g.prototype.cancel = function() { - if (this._timer) { - clearTimeout(this._timer) - } - this._endTime = this._beginTime; - this.schedule = 0 - }; - g.prototype.setFinishCallback = function(T) { - if (this._anis.length > 0) { - this._anis[this._anis.length - 1]._opts.finish = T - } else { - this._opts.finish = T - } - }; - var aw = { - linear : function(T) { - return T - }, - reverse : function(T) { - return 1 - T - }, - easeInQuad : function(T) { - return T * T - }, - easeInCubic : function(T) { - return Math.pow(T, 3) - }, - easeOutQuad : function(T) { - return -(T * (T - 2)) - }, - easeOutCubic : function(T) { - return Math.pow((T - 1), 3) + 1 - }, - easeInOutQuad : function(T) { - if (T < 0.5) { - return T * T * 2 - } else { - return -2 * (T - 2) * T - 1 - } - return - }, - easeInOutCubic : function(T) { - if (T < 0.5) { - return Math.pow(T, 3) * 4 - } else { - return Math.pow(T - 1, 3) * 4 + 1 - } - }, - easeInOutSine : function(T) { - return (1 - Math.cos(Math.PI * T)) / 2 - } - }; - aw["ease-in"] = aw.easeInQuad; - aw["ease-out"] = aw.easeOutQuad; - var m = !!(window.BMAP_PROTOCOL == "https"); - var x = m ? "https://sapi.map.baidu.com/" : "http://api.map.baidu.com/"; - var cc = { - imgPath : "static/BMap/images/", //******* �Ķ�ͼƬimages·�� ******* - cityNames : { - "\u5317\u4eac" : "bj", - "\u4e0a\u6d77" : "sh", - "\u6df1\u5733" : "sz", - "\u5e7f\u5dde" : "gz" - }, - fontFamily : "arial,sans-serif" - }; - if (a8.browser.firefox) { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur),crosshair", - defaultCursor : "-moz-grab", - draggingCursor : "-moz-grabbing" - }); - if (a8.platform.isWindows) { - cc.fontFamily = "arial,simsun,sans-serif" - } - } else { - if (a8.browser.chrome || a8.browser.safari) { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur) 2 6,crosshair", - defaultCursor : "url(" + cc.imgPath - + "openhand.cur) 8 8,default", - draggingCursor : "url(" + cc.imgPath - + "closedhand.cur) 8 8,move" - }) - } else { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur),crosshair", - defaultCursor : "url(" + cc.imgPath + "openhand.cur),default", - draggingCursor : "url(" + cc.imgPath + "closedhand.cur),move" - }) - } - } - function av(cM, cL, T) { - this.id = cM; - this.bounds = cL; - this.content = T - } - var bn = { - undo : 1, - redo : 2, - zoom : 4, - drag : 8, - move : 16, - mousewheel : 32, - toolbarOperation : 64, - stdMapCtrlDrag : 128, - dblclick : 256 - }; - function bI(cM, T) { - var cL = cM.style; - cL.left = T[0] + "px"; - cL.top = T[1] + "px" - } - function cw(T) { - if (a8.browser.ie > 0) { - T.unselectable = "on" - } else { - T.style.MozUserSelect = "none" - } - } - function y(T) { - return T && T.parentNode && T.parentNode.nodeType != 11 - } - function at(cL, T) { - a8.dom.insertHTML(cL, "beforeEnd", T); - return cL.lastChild - } - function bY(T) { - var cL = { - left : 0, - top : 0 - }; - while (T && T.offsetParent) { - cL.left += T.offsetLeft; - cL.top += T.offsetTop; - T = T.offsetParent - } - return cL - } - function aP(T) { - var T = window.event || T; - T.stopPropagation ? T.stopPropagation() : T.cancelBubble = true - } - function cC(T) { - var T = window.event || T; - T.preventDefault ? T.preventDefault() : T.returnValue = false; - return false - } - function co(T) { - aP(T); - return cC(T) - } - function cG() { - var T = document.documentElement, cL = document.body; - if (T && (T.scrollTop || T.scrollLeft)) { - return [ T.scrollTop, T.scrollLeft ] - } else { - if (cL) { - return [ cL.scrollTop, cL.scrollLeft ] - } else { - return [ 0, 0 ] - } - } - } - function ct(cL, T) { - if (!cL || !T) { - return - } - return Math.round(Math.sqrt(Math.pow(cL.x - T.x, 2) - + Math.pow(cL.y - T.y, 2))) - } - function O(T, cM) { - var cL = []; - cM = cM || function(cO) { - return cO - }; - for ( var cN in T) { - cL.push(cN + "=" + cM(T[cN])) - } - return cL.join("&") - } - function aa(cL, T, cM) { - var cN = document.createElement(cL); - if (cM) { - cN = document.createElementNS(cM, cL) - } - return a8.dom.setAttrs(cN, T || {}) - } - function aJ(T) { - if (T.currentStyle) { - return T.currentStyle - } else { - if (T.ownerDocument && T.ownerDocument.defaultView) { - return T.ownerDocument.defaultView.getComputedStyle(T, null) - } - } - } - function I(T) { - return typeof T == "function" - } - function aK(T) { - return typeof T == "number" - } - function b3(T) { - return typeof T == "string" - } - function ch(T) { - return typeof T != "undefined" - } - function cJ(T) { - return typeof T == "object" - } - function aY(T) { - return "[object Array]" == Object.prototype.toString.call(T) - } - var cf = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - function bV(cN) { - var cL = ""; - var cU, cS, cQ = ""; - var cT, cR, cP, cO = ""; - var cM = 0; - var T = /[^A-Za-z0-9\+\/\=]/g; - if (!cN || T.exec(cN)) { - return cN - } - cN = cN.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - do { - cT = cf.indexOf(cN.charAt(cM++)); - cR = cf.indexOf(cN.charAt(cM++)); - cP = cf.indexOf(cN.charAt(cM++)); - cO = cf.indexOf(cN.charAt(cM++)); - cU = (cT << 2) | (cR >> 4); - cS = ((cR & 15) << 4) | (cP >> 2); - cQ = ((cP & 3) << 6) | cO; - cL = cL + String.fromCharCode(cU); - if (cP != 64) { - cL = cL + String.fromCharCode(cS) - } - if (cO != 64) { - cL = cL + String.fromCharCode(cQ) - } - cU = cS = cQ = ""; - cT = cR = cP = cO = "" - } while (cM < cN.length); - return cL - } - var bg = a8.lang.Event; - function aA() { - return !!(a8.platform.isIphone || a8.platform.isIpad || a8.platform.isAndroid) - } - function bO() { - return !!(a8.platform.isWindows || a8.platform.isMacintosh || a8.platform.isX11) - } - function aE() { - return (new Date).getTime() - } - var cx = { - request : function(cL) { - var T = aa("script", { - src : cL, - type : "text/javascript", - charset : "utf-8" - }); - if (T.addEventListener) { - T.addEventListener("load", function(cN) { - var cM = cN.target; - cM.parentNode.removeChild(cM) - }, false) - } else { - if (T.attachEvent) { - T - .attachEvent( - "onreadystatechange", - function(cN) { - var cM = window.event.srcElement; - if (cM - && (cM.readyState == "loaded" || cM.readyState == "complete")) { - cM.parentNode.removeChild(cM) - } - }) - } - } - setTimeout(function() { - document.getElementsByTagName("head")[0].appendChild(T); - T = null - }, 1) - } - }; - function cA() { - } - a8.object.extend(cA, { - Request : { - INITIAL : -1, - WAITING : 0, - COMPLETED : 1 - }, - Dependency : { - control : [], - marker : [], - poly : [ "marker" ], - infowindow : [ "marker" ], - menu : [], - oppc : [], - opmb : [], - scommon : [], - local : [ "scommon" ], - route : [ "scommon" ], - othersearch : [ "scommon" ], - autocomplete : [ "scommon" ], - buslinesearch : [ "route" ], - hotspot : [] - }, - preLoaded : {}, - Config : { - _baseUrl : "js/", //x + "getmodules?v=1.3", //******* �Ķ���Դ��map,oppc,tile,control��·�� ******* - _timeout : 5000 - }, - delayFlag : false, - Module : { - _modules : {}, - _arrMdls : [] - }, - load : function(cL, cN) { - var T = this.current(cL); - if (T._status == this.Request.COMPLETED) { - return - } else { - if (T._status == this.Request.INITIAL) { - this.combine(cL); - this.pushUniqueMdl(cL); - var cM = this; - if (cM.delayFlag == false) { - cM.delayFlag = true; - window.setTimeout(function() { - var cO = cM.Config._baseUrl + "/modules" //"&mod=" - //+ cM.Module._arrMdls.join(","); - cx.request(cO); - cM.Module._arrMdls.length = 0; - cM.delayFlag = false - }, 1) - } - T._status = this.Request.WAITING - } - T._callbacks.push(cN) - } - }, - combine : function(T) { - if (T && this.Dependency[T]) { - var cM = this.Dependency[T]; - for ( var cL = 0; cL < cM.length; cL++) { - this.combine(cM[cL]); - if (!this.Module._modules[cM[cL]]) { - this.pushUniqueMdl(cM[cL]) - } - } - } - }, - pushUniqueMdl : function(cL) { - for ( var T = 0; T < this.Module._arrMdls.length; T++) { - if (this.Module._arrMdls[T] == cL) { - return - } - } - this.Module._arrMdls.push(cL) - }, - run : function(cM, cO) { - var cL = this.current(cM); - try { - eval(cO) - } catch (cP) { - return - } - cL._status = this.Request.COMPLETED; - for ( var cN = 0, T = cL._callbacks.length; cN < T; cN++) { - cL._callbacks[cN]() - } - cL._callbacks.length = 0 - }, - check : function(cL, cM) { - var T = this; - T.timeout = setTimeout(function() { - var cN = T.Module._modules[cL]._status; - if (cN != T.Request.COMPLETED) { - T.remove(cL); - T.load(cL, cM) - } else { - clearTimeout(T.timeout) - } - }, T.Config._timeout) - }, - current : function(cL) { - var T; - if (!this.Module._modules[cL]) { - this.Module._modules[cL] = {}; - this.Module._modules[cL]._status = this.Request.INITIAL; - this.Module._modules[cL]._callbacks = [] - } - T = this.Module._modules[cL]; - return T - }, - remove : function(cL) { - var T = this.current(cL); - delete T - } - }); - window._jsload = function(T, cL) { - cA.run(T, cL) - }; - function bu(T, cL) { - this.x = T || 0; - this.y = cL || 0 - } - bu.prototype.equals = function(T) { - return T && T.x == this.x && T.y == this.y - }; - function aH(cL, T) { - this.width = cL || 0; - this.height = T || 0 - } - aH.prototype.equals = function(T) { - return T && this.width == T.width && this.height == T.height - }; - function cm(T, cL) { - if (!T) { - return - } - this._position = T; - this.guid = "spot" + (cm.guid++); - cL = cL || {}; - this._text = cL.text || ""; - this._offsets = cL.offsets ? cL.offsets.slice(0) : [ 5, 5, 5, 5 ]; - this._userData = cL.userData || null; - this._minZoom = cL.minZoom || null; - this._maxZoom = cL.maxZoom || null - } - cm.guid = 0; - a8.extend(cm.prototype, { - initialize : function(T) { - if (this._minZoom == null) { - this._minZoom = T.config.minZoom - } - if (this._maxZoom == null) { - this._maxZoom = T.config.maxZoom - } - }, - setPosition : function(T) { - if (T instanceof cd) { - this._position = T - } - }, - getPosition : function() { - return this._position - }, - setText : function(T) { - this._text = T - }, - getText : function() { - return this._text - }, - setUserData : function(T) { - this._userData = T - }, - getUserData : function() { - return this._userData - } - }); - function cp() { - this._map = null; - this._container; - this._type = "control"; - this.blockInfoWindow = true; - this._visible = true - } - a8.lang.inherits(cp, a8.lang.Class, "Control"); - a8 - .extend( - cp.prototype, - { - initialize : function(T) { - this._map = T; - if (this._container) { - T.container.appendChild(this._container); - return this._container - } - return - }, - _i : function(T) { - if (!this._container && this.initialize - && I(this.initialize)) { - this._container = this.initialize(T) - } - this._opts = this._opts || { - printable : false - }; - this._setStyle(); - this._setPosition(); - if (this._container) { - this._container._jsobj = this - } - }, - _setStyle : function() { - var cL = this._container; - if (cL) { - var T = cL.style; - T.position = "absolute"; - T.zIndex = this._cZIndex || "10"; - T.MozUserSelect = "none"; - T.WebkitTextSizeAdjust = "none"; - if (!this._opts.printable) { - a8.dom.addClass(cL, "BMap_noprint") - } - a8.on(cL, "contextmenu", co) - } - }, - remove : function() { - this._map = null; - if (!this._container) { - return - } - this._container.parentNode - && this._container.parentNode - .removeChild(this._container); - this._container._jsobj = null; - this._container = null - }, - _render : function() { - this._container = at(this._map.container, - "
"); - if (this._visible == false) { - a8.dom.hide(this._container) - } - return this._container - }, - _setPosition : function() { - this.setAnchor(this._opts.anchor) - }, - setAnchor : function(cN) { - if (this.anchorFixed || !aK(cN) || isNaN(cN) - || cN < BMAP_ANCHOR_TOP_LEFT - || cN > BMAP_ANCHOR_BOTTOM_RIGHT) { - cN = this.defaultAnchor - } - this._opts = this._opts || { - printable : false - }; - this._opts.offset = this._opts.offset - || this.defaultOffset; - var cM = this._opts.anchor; - this._opts.anchor = cN; - if (!this._container) { - return - } - var cP = this._container; - var T = this._opts.offset.width; - var cO = this._opts.offset.height; - cP.style.left = cP.style.top = cP.style.right = cP.style.bottom = "auto"; - switch (cN) { - case BMAP_ANCHOR_TOP_LEFT: - cP.style.top = cO + "px"; - cP.style.left = T + "px"; - break; - case BMAP_ANCHOR_TOP_RIGHT: - cP.style.top = cO + "px"; - cP.style.right = T + "px"; - break; - case BMAP_ANCHOR_BOTTOM_LEFT: - cP.style.bottom = cO + "px"; - cP.style.left = T + "px"; - break; - case BMAP_ANCHOR_BOTTOM_RIGHT: - cP.style.bottom = cO + "px"; - cP.style.right = T + "px"; - break; - default: - break - } - var cL = [ "TL", "TR", "BL", "BR" ]; - a8.dom.removeClass(this._container, "anchor" - + cL[cM]); - a8.dom.addClass(this._container, "anchor" + cL[cN]) - }, - getAnchor : function() { - return this._opts.anchor - }, - setOffset : function(T) { - if (!(T instanceof aH)) { - return - } - this._opts = this._opts || { - printable : false - }; - this._opts.offset = new aH(T.width, T.height); - if (!this._container) { - return - } - this.setAnchor(this._opts.anchor) - }, - getOffset : function() { - return this._opts.offset - }, - getDom : function() { - return this._container - }, - show : function() { - if (this._visible == true) { - return - } - this._visible = true; - if (this._container) { - a8.dom.show(this._container) - } - }, - hide : function() { - if (this._visible == false) { - return - } - this._visible = false; - if (this._container) { - a8.dom.hide(this._container) - } - }, - isPrintable : function() { - return !!this._opts.printable - }, - isVisible : function() { - if (!this._container && !this._map) { - return false - } - return !!this._visible - } - }); - window.BMAP_ANCHOR_TOP_LEFT = 0; - window.BMAP_ANCHOR_TOP_RIGHT = 1; - window.BMAP_ANCHOR_BOTTOM_LEFT = 2; - window.BMAP_ANCHOR_BOTTOM_RIGHT = 3; - window.BMAP_NAVIGATION_CONTROL_LARGE = 0; - window.BMAP_NAVIGATION_CONTROL_SMALL = 1; - window.BMAP_NAVIGATION_CONTROL_PAN = 2; - window.BMAP_NAVIGATION_CONTROL_ZOOM = 3; - function L(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false, - showZoomInfo : true - }; - a8.object.extend(this._opts, T); - this.defaultAnchor = BMAP_ANCHOR_TOP_LEFT; - this.defaultOffset = new aH(10, 10); - this.setAnchor(T.anchor); - this.setType(T.type); - this._asyncLoadCode() - } - a8.lang.inherits(L, cp, "NavigationControl"); - a8.extend(L.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setType : function(T) { - if (aK(T) && T >= BMAP_NAVIGATION_CONTROL_LARGE - && T <= BMAP_NAVIGATION_CONTROL_ZOOM) { - this._opts.type = T - } else { - this._opts.type = BMAP_NAVIGATION_CONTROL_LARGE - } - }, - getType : function() { - return this._opts.type - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function am(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - a8.object.extend(this._opts, T); - this._copyrightCollection = []; - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_LEFT; - this.defaultOffset = new aH(5, 2); - this.setAnchor(T.anchor); - this._canShow = true; - this.blockInfoWindow = false; - this._asyncLoadCode() - } - a8.lang.inherits(am, cp, "CopyrightControl"); - a8.object - .extend( - am.prototype, - { - initialize : function(T) { - this._map = T; - return this._container - }, - addCopyright : function(cM) { - if (!cM || !aK(cM.id) || isNaN(cM.id)) { - return - } - var T = { - bounds : null, - content : "" - }; - for ( var cL in cM) { - T[cL] = cM[cL] - } - var cN = this.getCopyright(cM.id); - if (cN) { - for ( var cO in T) { - cN[cO] = T[cO] - } - } else { - this._copyrightCollection.push(T) - } - }, - getCopyright : function(cM) { - for ( var cL = 0, T = this._copyrightCollection.length; cL < T; cL++) { - if (this._copyrightCollection[cL].id == cM) { - return this._copyrightCollection[cL] - } - } - }, - getCopyrightCollection : function() { - return this._copyrightCollection - }, - removeCopyright : function(cM) { - for ( var cL = 0, T = this._copyrightCollection.length; cL < T; cL++) { - if (this._copyrightCollection[cL].id == cM) { - r = this._copyrightCollection.splice(cL, 1); - cL--; - T = this._copyrightCollection.length - } - } - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function cK(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - this._opts = a8.extend(a8.extend(this._opts, { - size : new aH(150, 150), - padding : 5, - isOpen : false, - zoomInterval : 4 - }), T); - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_RIGHT; - this.defaultOffset = new aH(0, 0); - this._btnWidth = 13; - this._btnHeight = 13; - this.setAnchor(T.anchor); - this.setSize(this._opts.size); - this._asyncLoadCode() - } - a8.lang.inherits(cK, cp, "OverviewMapControl"); - a8.extend(cK.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setAnchor : function(T) { - cp.prototype.setAnchor.call(this, T) - }, - changeView : function() { - this.changeView._running = true; - this._opts.isOpen = !this._opts.isOpen; - if (!this._container) { - this.changeView._running = false - } - }, - setSize : function(T) { - if (!(T instanceof aH)) { - T = new aH(150, 150) - } - T.width = T.width > 0 ? T.width : 150; - T.height = T.height > 0 ? T.height : 150; - this._opts.size = T - }, - getSize : function() { - return this._opts.size - }, - isOpen : function() { - return this._opts.isOpen - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function bK(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - this._opts = a8.object.extend(a8.object.extend(this._opts, { - color : "black", - unit : "metric" - }), T); - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_LEFT; - this.defaultOffset = new aH(81, 18); - this.setAnchor(T.anchor); - this._units = { - metric : { - name : "metric", - conv : 1, - incon : 1000, - u1 : "\u7c73", - u2 : "\u516c\u91cc" - }, - us : { - name : "us", - conv : 3.2808, - incon : 5280, - u1 : "\u82f1\u5c3a", - u2 : "\u82f1\u91cc" - } - }; - if (!this._units[this._opts.unit]) { - this._opts.unit = "metric" - } - this._scaleText = null; - this._numberArray = {}; - this._asyncLoadCode() - } - window.BMAP_UNIT_METRIC = "metric"; - window.BMAP_UNIT_IMPERIAL = "us"; - a8.lang.inherits(bK, cp, "ScaleControl"); - a8.object.extend(bK.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setColor : function(T) { - this._opts.color = T + "" - }, - getColor : function() { - return this._opts.color - }, - setUnit : function(T) { - this._opts.unit = this._units[T] && this._units[T].name - || this._opts.unit - }, - getUnit : function() { - return this._opts.unit - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - window.BMAP_MAPTYPE_CONTROL_HORIZONTAL = 0; - window.BMAP_MAPTYPE_CONTROL_DROPDOWN = 1; - function aL(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false, - mapTypes : [ BMAP_NORMAL_MAP, BMAP_SATELLITE_MAP, BMAP_HYBRID_MAP, - BMAP_PERSPECTIVE_MAP ], - type : BMAP_MAPTYPE_CONTROL_HORIZONTAL - }; - this.defaultAnchor = BMAP_ANCHOR_TOP_RIGHT; - this.defaultOffset = new aH(10, 10); - this.setAnchor(T.anchor); - this._opts = a8.extend(a8.extend(this._opts, { - offset : this.defaultOffset, - enableSwitch : true - }), T); - if (aY(T.mapTypes)) { - this._opts.mapTypes = T.mapTypes.slice(0) - } - this._asyncLoadCode() - } - a8.lang.inherits(aL, cp, "MapTypeControl"); - a8.object.extend(aL.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function cz(cL) { - a8.lang.Class.call(this); - this._opts = { - container : null, - cursor : "default" - }; - this._opts = a8.extend(this._opts, cL); - this._type = "contextmenu"; - this._map = null; - this._container; - this._shadow; - this._left = 0; - this._top = 0; - this._items = []; - this._rItems = []; - this._dividers = []; - this.curPixel = null; - this.curPoint = null; - this._isOpen = false; - var T = this; - cA.load("menu", function() { - T._draw() - }) - } - a8.lang.inherits(cz, a8.lang.Class, "ContextMenu"); - a8.object.extend(cz.prototype, { - initialize : function(cL, T) { - this._map = cL; - this._overlay = T || null - }, - remove : function() { - this._map = this._overlay = null - }, - addItem : function(cM) { - if (!cM || cM._type != "menuitem" || cM._text == "" - || cM._width <= 0) { - return - } - for ( var cL = 0, T = this._items.length; cL < T; cL++) { - if (this._items[cL] === cM) { - return - } - } - this._items.push(cM); - this._rItems.push(cM) - }, - removeItem : function(cM) { - if (!cM || cM._type != "menuitem") { - return - } - for ( var cL = 0, T = this._items.length; cL < T; cL++) { - if (this._items[cL] === cM) { - this._items[cL].remove(); - this._items.splice(cL, 1); - T-- - } - } - for ( var cL = 0, T = this._rItems.length; cL < T; cL++) { - if (this._rItems[cL] === cM) { - this._rItems[cL].remove(); - this._rItems.splice(cL, 1); - T-- - } - } - }, - addSeparator : function() { - this._items.push( { - _type : "divider", - _dIndex : this._dividers.length - }); - this._dividers.push( { - dom : null - }) - }, - removeSeparator : function(cL) { - if (!this._dividers[cL]) { - return - } - for ( var cM = 0, T = this._items.length; cM < T; cM++) { - if (this._items[cM] && this._items[cM]._type == "divider" - && this._items[cM]._dIndex == cL) { - this._items.splice(cM, 1); - T-- - } - if (this._items[cM] && this._items[cM]._type == "divider" - && this._items[cM]._dIndex > cL) { - this._items[cM]._dIndex-- - } - } - this._dividers.splice(cL, 1) - }, - getDom : function() { - return this._container - }, - show : function() { - if (this._isOpen == true) { - return - } - this._isOpen = true - }, - hide : function() { - if (this._isOpen == false) { - return - } - this._isOpen = false - }, - setCursor : function(T) { - if (!T) { - return - } - this._opts.cursor = T - }, - getItem : function(T) { - return this._rItems[T] - } - }); - function be(cM, cN, cL) { - if (!cM || !I(cN)) { - return - } - a8.lang.Class.call(this); - this._opts = { - width : 100, - id : "" - }; - cL = cL || {}; - this._opts.width = (cL.width * 1) ? cL.width : 100; - this._opts.id = cL.id ? cL.id : ""; - this._text = cM + ""; - this._callback = cN; - this._map = null; - this._type = "menuitem"; - this._contextmenu = null; - this._container = null; - this._enabled = true; - var T = this; - cA.load("menu", function() { - T._draw() - }) - } - a8.lang.inherits(be, a8.lang.Class, "MenuItem"); - a8.object.extend(be.prototype, { - initialize : function(T, cL) { - this._map = T; - this._contextmenu = cL - }, - remove : function() { - this._contextmenu = null; - this._map = null - }, - setText : function(T) { - if (!T) { - return - } - this._text = T + "" - }, - getDom : function() { - return this._container - }, - enable : function() { - this._enabled = true - }, - disable : function() { - this._enabled = false - } - }); - function bN(T, cL) { - if (T && !cL) { - cL = T - } - this._sw = this._ne = null; - this._swLng = this._swLat = null; - this._neLng = this._neLat = null; - if (T) { - this._sw = new cd(T.lng, T.lat); - this._ne = new cd(cL.lng, cL.lat); - this._swLng = T.lng; - this._swLat = T.lat; - this._neLng = cL.lng; - this._neLat = cL.lat - } - } - a8.object.extend(bN.prototype, { - isEmpty : function() { - return !this._sw || !this._ne - }, - equals : function(T) { - if (!(T instanceof bN) || this.isEmpty()) { - return false - } - return this.getSouthWest().equals(T.getSouthWest()) - && this.getNorthEast().equals(T.getNorthEast()) - }, - getSouthWest : function() { - return this._sw - }, - getNorthEast : function() { - return this._ne - }, - containsBounds : function(T) { - if (!(T instanceof bN) || this.isEmpty() || T.isEmpty()) { - return false - } - return (T._swLng > this._swLng && T._neLng < this._neLng - && T._swLat > this._swLat && T._neLat < this._neLat) - }, - getCenter : function() { - if (this.isEmpty()) { - return null - } - return new cd((this._swLng + this._neLng) / 2, - (this._swLat + this._neLat) / 2) - }, - intersects : function(cM) { - if (!(cM instanceof bN)) { - return null - } - if (Math.max(cM._swLng, cM._neLng) < Math.min(this._swLng, - this._neLng) - || Math.min(cM._swLng, cM._neLng) > Math.max(this._swLng, - this._neLng) - || Math.max(cM._swLat, cM._neLat) < Math.min(this._swLat, - this._neLat) - || Math.min(cM._swLat, cM._neLat) > Math.max(this._swLat, - this._neLat)) { - return null - } - var cO = Math.max(this._swLng, cM._swLng); - var cL = Math.min(this._neLng, cM._neLng); - var cN = Math.max(this._swLat, cM._swLat); - var T = Math.min(this._neLat, cM._neLat); - return new bN(new cd(cO, cN), new cd(cL, T)) - }, - containsPoint : function(T) { - if (!(T instanceof cd) || this.isEmpty()) { - return false - } - return (T.lng >= this._swLng && T.lng <= this._neLng - && T.lat >= this._swLat && T.lat <= this._neLat) - }, - extend : function(T) { - if (!(T instanceof cd)) { - return - } - var cL = T.lng, cM = T.lat; - if (!this._sw) { - this._sw = new cd(0, 0) - } - if (!this._ne) { - this._ne = new cd(0, 0) - } - if (!this._swLng || this._swLng > cL) { - this._sw.lng = this._swLng = cL - } - if (!this._neLng || this._neLng < cL) { - this._ne.lng = this._neLng = cL - } - if (!this._swLat || this._swLat > cM) { - this._sw.lat = this._swLat = cM - } - if (!this._neLat || this._neLat < cM) { - this._ne.lat = this._neLat = cM - } - }, - toSpan : function() { - if (this.isEmpty()) { - return new cd(0, 0) - } - return new cd(Math.abs(this._neLng - this._swLng), Math - .abs(this._neLat - this._swLat)) - } - }); - function cd(T, cL) { - if (isNaN(T)) { - T = bV(T); - T = isNaN(T) ? 0 : T - } - if (b3(T)) { - T = parseFloat(T) - } - if (isNaN(cL)) { - cL = bV(cL); - cL = isNaN(cL) ? 0 : cL - } - if (b3(cL)) { - cL = parseFloat(cL) - } - this.lng = T; - this.lat = cL - } - cd.isInRange = function(T) { - return T && T.lng <= 180 && T.lng >= -180 && T.lat <= 74 - && T.lat >= -74 - }; - cd.prototype.equals = function(T) { - return T && this.lat == T.lat && this.lng == T.lng - }; - function bd() { - } - bd.prototype.lngLatToPoint = function() { - throw "lngLatToPoint\u65b9\u6cd5\u672a\u5b9e\u73b0" - }; - bd.prototype.pointToLngLat = function() { - throw "pointToLngLat\u65b9\u6cd5\u672a\u5b9e\u73b0" - }; - function b6() { - } - a8 - .extend( - b6, - { - num : { - bj : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 6) - }, - gz : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - }, - sz : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - }, - sh : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - } - }, - correct_pts : { - bj : [ { - j : 116.305687, - w : 39.990912, - utm_x : 12947230.73, - utm_y : 4836903.65, - x : 630412, - y : 547340 - }, { - j : 116.381837, - w : 40.000198, - utm_x : 12955707.8, - utm_y : 4838247.62, - x : 667412, - y : 561832 - }, { - j : 116.430651, - w : 39.995216, - utm_x : 12961141.81, - utm_y : 4837526.55, - x : 686556, - y : 573372 - }, { - j : 116.474111, - w : 39.976323, - utm_x : 12965979.81, - utm_y : 4834792.55, - x : 697152, - y : 586816 - }, { - j : 116.280328, - w : 39.953159, - utm_x : 12944407.75, - utm_y : 4831441.53, - x : 603272, - y : 549976 - }, { - j : 116.316117, - w : 39.952496, - utm_x : 12948391.8, - utm_y : 4831345.64, - x : 618504, - y : 557872 - }, { - j : 116.350477, - w : 39.938107, - utm_x : 12952216.78, - utm_y : 4829264.65, - x : 627044, - y : 568220 - }, { - j : 116.432025, - w : 39.947158, - utm_x : 12961294.76, - utm_y : 4830573.59, - x : 666280, - y : 584016 - }, { - j : 116.46873, - w : 39.949516, - utm_x : 12965380.79, - utm_y : 4830914.63, - x : 683328, - y : 591444 - }, { - j : 116.280077, - w : 39.913823, - utm_x : 12944379.8, - utm_y : 4825753.62, - x : 586150, - y : 558552 - }, { - j : 116.308625, - w : 39.91374, - utm_x : 12947557.79, - utm_y : 4825741.62, - x : 598648, - y : 564732 - }, { - j : 116.369853, - w : 39.912979, - utm_x : 12954373.73, - utm_y : 4825631.62, - x : 624561, - y : 578039 - }, { - j : 116.433552, - w : 39.914694, - utm_x : 12961464.75, - utm_y : 4825879.53, - x : 652972, - y : 591348 - }, { - j : 116.457034, - w : 39.914273, - utm_x : 12964078.78, - utm_y : 4825818.67, - x : 663028, - y : 596444 - }, { - j : 116.490927, - w : 39.914127, - utm_x : 12967851.77, - utm_y : 4825797.57, - x : 677968, - y : 604188 - }, { - j : 116.483839, - w : 39.877198, - utm_x : 12967062.73, - utm_y : 4820460.67, - x : 658596, - y : 610312 - }, { - j : 116.405777, - w : 39.864461, - utm_x : 12958372.82, - utm_y : 4818620.62, - x : 619256, - y : 596088 - }, { - j : 116.35345, - w : 39.859774, - utm_x : 12952547.74, - utm_y : 4817943.6, - x : 594633, - y : 585851 - }, { - j : 116.403818, - w : 39.9141, - utm_x : 12958154.74, - utm_y : 4825793.66, - x : 639699, - y : 585226 - }, { - j : 116.318111, - w : 39.891101, - utm_x : 12948613.78, - utm_y : 4822469.56, - x : 592856, - y : 571480 - }, { - j : 116.413047, - w : 39.907238, - utm_x : 12959182.12, - utm_y : 4824801.76, - x : 640680, - y : 588704 - }, { - j : 116.390843, - w : 39.906113, - utm_x : 12956710.35, - utm_y : 4824639.16, - x : 630620, - y : 584108 - }, { - j : 116.446527, - w : 39.899438, - utm_x : 12962909.14, - utm_y : 4823674.4, - x : 651752, - y : 597416 - }, { - j : 116.388665, - w : 39.95527, - utm_x : 12956467.9, - utm_y : 4831746.87, - x : 650656, - y : 572800 - }, { - j : 116.398343, - w : 39.939704, - utm_x : 12957545.26, - utm_y : 4829495.6, - x : 648036, - y : 578452 - }, { - j : 116.355101, - w : 39.973581, - utm_x : 12952731.53, - utm_y : 4834395.82, - x : 643268, - y : 560944 - }, { - j : 116.380727, - w : 39.88464, - utm_x : 12955584.23, - utm_y : 4821535.94, - x : 616920, - y : 586496 - }, { - j : 116.360843, - w : 39.946452, - utm_x : 12953370.73, - utm_y : 4830471.48, - x : 635293, - y : 568765 - }, { - j : 116.340955, - w : 39.973421, - utm_x : 12951156.79, - utm_y : 4834372.67, - x : 638420, - y : 558632 - }, { - j : 116.322585, - w : 40.023941, - utm_x : 12949111.83, - utm_y : 4841684.79, - x : 652135, - y : 543802 - }, { - j : 116.356486, - w : 39.883341, - utm_x : 12952885.71, - utm_y : 4821348.24, - x : 606050, - y : 581443 - }, { - j : 116.339592, - w : 39.992259, - utm_x : 12951005.06, - utm_y : 4837098.59, - x : 645664, - y : 554400 - }, { - j : 116.3778, - w : 39.86392, - utm_x : 12955258.4, - utm_y : 4818542.48, - x : 606848, - y : 590328 - }, { - j : 116.377354, - w : 39.964124, - utm_x : 12955208.75, - utm_y : 4833027.64, - x : 649911, - y : 568581 - }, { - j : 116.361837, - w : 39.963897, - utm_x : 12953481.39, - utm_y : 4832994.8, - x : 643286, - y : 565175 - }, { - j : 116.441397, - w : 39.939403, - utm_x : 12962338.06, - utm_y : 4829452.07, - x : 666772, - y : 587728 - }, { - j : 116.359176, - w : 40.006631, - utm_x : 12953185.16, - utm_y : 4839178.78, - x : 660440, - y : 555411 - } ], - sz : [ { - w : 22.498861, - utm_x : 12677279.029193671, - utm_y : 2555027.9501714734, - j : 113.880696, - y : 1104472, - x : 947240 - }, { - w : 22.500706, - utm_x : 12683920.978881944, - utm_y : 2555248.973138607, - j : 113.940361, - y : 1122320, - x : 974864 - }, { - w : 22.576848, - utm_x : 12675897.984563945, - utm_y : 2564373.058056766, - j : 113.86829, - y : 1074048, - x : 979136 - }, { - w : 22.55689, - utm_x : 12680064.05051775, - utm_y : 2561981.0013635466, - j : 113.905714, - y : 1092484, - x : 986240 - }, { - w : 22.58066, - utm_x : 12678671.98513852, - utm_y : 2564829.983373251, - j : 113.893209, - y : 1080528, - x : 992088 - }, { - w : 22.595751, - utm_x : 12678298.949465925, - utm_y : 2566638.9913895614, - j : 113.889858, - y : 1074484, - x : 997960 - }, { - w : 22.557499, - utm_x : 12684523.001238672, - utm_y : 2562053.9875916084, - j : 113.945769, - y : 1104696, - x : 1004564 - }, { - w : 22.648419, - utm_x : 12676422.97299485, - utm_y : 2572954.0513219936, - j : 113.873006, - y : 1051384, - x : 1015916 - }, { - w : 22.562664, - utm_x : 12690460.958807131, - utm_y : 2562673.0054078405, - j : 113.99911, - y : 1119860, - x : 1030228 - }, { - w : 22.646618, - utm_x : 12683008.037804369, - utm_y : 2572738.0652955617, - j : 113.93216, - y : 1070324, - x : 1041496 - }, { - w : 22.571091, - utm_x : 12695789.992135335, - utm_y : 2563683.019582462, - j : 114.046981, - y : 1131924, - x : 1055628 - }, { - w : 22.704467, - utm_x : 12682276.994753957, - utm_y : 2579677.075645295, - j : 113.925593, - y : 1048536, - x : 1066348 - }, { - w : 22.547152, - utm_x : 12702917.96800879, - utm_y : 2560813.9850610085, - j : 114.111012, - y : 1160352, - x : 1072596 - }, { - w : 22.546192, - utm_x : 12704502.952164687, - utm_y : 2560698.9417545213, - j : 114.12525, - y : 1165256, - x : 1078452 - }, { - w : 22.5714, - utm_x : 12702350.00978689, - utm_y : 2563720.0558210905, - j : 114.10591, - y : 1150556, - x : 1081960 - }, { - w : 22.555004, - utm_x : 12704883.001041513, - utm_y : 2561754.9738317807, - j : 114.128664, - y : 1163304, - x : 1084172 - }, { - w : 22.551925, - utm_x : 12706255.028694374, - utm_y : 2561385.978019464, - j : 114.140989, - y : 1168216, - x : 1088116 - }, { - w : 22.693756, - utm_x : 12690318.02302569, - utm_y : 2578392.0635360866, - j : 113.997826, - y : 1075100, - x : 1092860 - }, { - w : 22.573769, - utm_x : 12705731.042149788, - utm_y : 2564004.003107545, - j : 114.136282, - y : 1159404, - x : 1096572 - }, { - w : 22.583238, - utm_x : 12706369.021093281, - utm_y : 2565139.002548978, - j : 114.142013, - y : 1157896, - x : 1103632 - }, { - w : 22.605844, - utm_x : 12704694.980375737, - utm_y : 2567848.984570506, - j : 114.126975, - y : 1145540, - x : 1107972 - }, { - w : 22.637228, - utm_x : 12702545.043656897, - utm_y : 2571612.010208761, - j : 114.107662, - y : 1128764, - x : 1114460 - }, { - w : 22.62496, - utm_x : 12707132.013185183, - utm_y : 2570140.9407190788, - j : 114.148867, - y : 1145732, - x : 1127028 - }, { - w : 22.644524, - utm_x : 12707016.01701364, - utm_y : 2572486.9446672536, - j : 114.147825, - y : 1138800, - x : 1135876 - }, { - w : 22.640188, - utm_x : 12711515.0431873, - utm_y : 2571966.966986786, - j : 114.18824, - y : 1152692, - x : 1151836 - }, { - w : 22.59807, - utm_x : 12720011.039168343, - utm_y : 2566916.995355996, - j : 114.26456, - y : 1191212, - x : 1165180 - }, { - w : 22.668221, - utm_x : 12714081.987256048, - utm_y : 2575329.007304823, - j : 114.211299, - y : 1150576, - x : 1175404 - }, { - w : 22.702591, - utm_x : 12717292.031020584, - utm_y : 2579452.0022288463, - j : 114.240135, - y : 1148204, - x : 1204600 - }, { - w : 22.731786, - utm_x : 12717795.9798388, - utm_y : 2582955.0308636553, - j : 114.244662, - y : 1139532, - x : 1220540 - }, { - w : 22.727494, - utm_x : 12720675.957721734, - utm_y : 2582439.9980541077, - j : 114.270533, - y : 1148992, - x : 1230084 - }, { - w : 22.716335, - utm_x : 12725500.040345404, - utm_y : 2581101.0132384477, - j : 114.313868, - y : 1166316, - x : 1244102 - } ], - gz : [ { - j : 113.335098, - w : 23.147289, - utm_x : 12616542.68, - utm_y : 2632892.7, - x : 1129109, - y : 1073920 - }, { - j : 113.320932, - w : 23.146956, - utm_x : 12614965.71, - utm_y : 2632852.62, - x : 1125620, - y : 1071640 - }, { - j : 113.321435, - w : 23.140119, - utm_x : 12615021.7, - utm_y : 2632029.65, - x : 1124032, - y : 1072882 - }, { - j : 113.321471, - w : 23.119165, - utm_x : 12615025.71, - utm_y : 2629507.68, - x : 1118932, - y : 1076530 - }, { - j : 113.340201, - w : 23.118616, - utm_x : 12617110.75, - utm_y : 2629441.61, - x : 1123238, - y : 1079667 - }, { - j : 113.358068, - w : 23.116323, - utm_x : 12619099.71, - utm_y : 2629165.66, - x : 1126968, - y : 1083116 - }, { - j : 113.357529, - w : 23.131271, - utm_x : 12619039.71, - utm_y : 2630964.68, - x : 1130508, - y : 1080440 - }, { - j : 113.365811, - w : 23.150595, - utm_x : 12619961.67, - utm_y : 2633290.66, - x : 1137205, - y : 1078567 - }, { - j : 113.294145, - w : 23.118467, - utm_x : 12611983.76, - utm_y : 2629423.68, - x : 1112245, - y : 1072043 - }, { - j : 113.28615, - w : 23.121525, - utm_x : 12611093.75, - utm_y : 2629791.7, - x : 1110993, - y : 1070197 - }, { - j : 113.307152, - w : 23.055497, - utm_x : 12613431.71, - utm_y : 2621847.21, - x : 1100144, - y : 1085123 - }, { - j : 113.333445, - w : 23.052687, - utm_x : 12616358.66, - utm_y : 2621509.2, - x : 1105784, - y : 1089948 - }, { - j : 113.347476, - w : 23.048755, - utm_x : 12617920.6, - utm_y : 2621036.24, - x : 1108099, - y : 1093064 - }, { - j : 113.385774, - w : 23.036574, - utm_x : 12622183.96, - utm_y : 2619571.12, - x : 1113850, - y : 1101834 - }, { - j : 113.364185, - w : 22.89798, - utm_x : 12619780.66, - utm_y : 2602910.64, - x : 1073186, - y : 1123374 - }, { - j : 113.404577, - w : 22.906481, - utm_x : 12624277.13, - utm_y : 2603932.06, - x : 1084888, - y : 1128692 - }, { - j : 113.430856, - w : 22.913156, - utm_x : 12627202.52, - utm_y : 2604734.12, - x : 1092892, - y : 1131761 - }, { - j : 113.384554, - w : 22.933021, - utm_x : 12622048.15, - utm_y : 2607121.32, - x : 1086975, - y : 1120403 - }, { - j : 113.263566, - w : 23.146333, - utm_x : 12608579.68, - utm_y : 2632777.63, - x : 1111742, - y : 1062098 - }, { - j : 113.239213, - w : 23.152996, - utm_x : 12605868.69, - utm_y : 2633579.69, - x : 1107616, - y : 1056740 - }, { - j : 113.253865, - w : 23.131628, - utm_x : 12607499.76, - utm_y : 2631007.65, - x : 1105912, - y : 1062966 - }, { - j : 113.240767, - w : 23.088434, - utm_x : 12606041.68, - utm_y : 2625809.7, - x : 1092270, - y : 1068184 - }, { - j : 113.279628, - w : 23.088284, - utm_x : 12610367.72, - utm_y : 2625791.65, - x : 1101412, - y : 1074883 - }, { - j : 113.462271, - w : 23.107058, - utm_x : 12630699.66, - utm_y : 2628050.7, - x : 1148752, - y : 1101736 - }, { - j : 113.401618, - w : 23.052957, - utm_x : 12623947.73, - utm_y : 2621541.68, - x : 1121925, - y : 1101535 - }, { - j : 113.422504, - w : 23.05905, - utm_x : 12626272.77, - utm_y : 2622274.61, - x : 1128470, - y : 1104049 - }, { - j : 113.362506, - w : 23.107149, - utm_x : 12619593.75, - utm_y : 2628061.65, - x : 1125835, - y : 1085505 - }, { - j : 113.419629, - w : 23.143176, - utm_x : 12625952.73, - utm_y : 2632397.61, - x : 1148133, - y : 1089052 - }, { - j : 113.23315, - w : 23.062251, - utm_x : 12605193.75, - utm_y : 2622659.67, - x : 1084184, - y : 1071368 - }, { - j : 113.314525, - w : 23.101412, - utm_x : 12614252.48, - utm_y : 2627371.29, - x : 1113011, - y : 1078426 - }, { - j : 113.307947, - w : 23.131369, - utm_x : 12613520.21, - utm_y : 2630976.47, - x : 1118622, - y : 1072198 - } ], - sh : [ { - j : 121.524411, - w : 31.245875, - utm_x : 13528182.75, - utm_y : 3642354.51, - x : 1086581, - y : 1065728 - }, { - j : 121.419229, - w : 31.244887, - utm_x : 13516473.81, - utm_y : 3642226.51, - x : 1032616, - y : 1029148 - }, { - j : 121.405637, - w : 31.237871, - utm_x : 13514960.74, - utm_y : 3641317.54, - x : 1022724, - y : 1027244 - }, { - j : 121.415348, - w : 31.222879, - utm_x : 13516041.78, - utm_y : 3639375.47, - x : 1018548, - y : 1036980 - }, { - j : 121.422561, - w : 31.224261, - utm_x : 13516844.73, - utm_y : 3639554.48, - x : 1022976, - y : 1038908 - }, { - j : 121.412581, - w : 31.204148, - utm_x : 13515733.75, - utm_y : 3636949.48, - x : 1006568, - y : 1043696 - }, { - j : 121.443025, - w : 31.206202, - utm_x : 13519122.8, - utm_y : 3637215.49, - x : 1022656, - y : 1053704 - }, { - j : 121.524061, - w : 31.246917, - utm_x : 13528143.79, - utm_y : 3642489.52, - x : 1082052, - y : 1064124 - }, { - j : 121.529343, - w : 31.217769, - utm_x : 13528731.78, - utm_y : 3638713.59, - x : 1072696, - y : 1079064 - }, { - j : 121.530268, - w : 31.210341, - utm_x : 13528834.75, - utm_y : 3637751.53, - x : 1068748, - y : 1082416 - }, { - j : 121.511601, - w : 31.227303, - utm_x : 13526756.73, - utm_y : 3639948.53, - x : 1069276, - y : 1068716 - }, { - j : 121.4966, - w : 31.243614, - utm_x : 13525086.81, - utm_y : 3642061.58, - x : 1071220, - y : 1056805 - }, { - j : 121.485021, - w : 31.26138, - utm_x : 13523797.82, - utm_y : 3644363.54, - x : 1075708, - y : 1045540 - }, { - j : 121.465114, - w : 31.278803, - utm_x : 13521581.76, - utm_y : 3646621.48, - x : 1073740, - y : 1031268 - }, { - j : 121.454784, - w : 31.266566, - utm_x : 13520431.82, - utm_y : 3645035.58, - x : 1063591, - y : 1033191 - }, { - j : 121.46851, - w : 31.24951, - utm_x : 13521959.81, - utm_y : 3642825.48, - x : 1060200, - y : 1044520 - }, { - j : 121.446384, - w : 31.248422, - utm_x : 13519496.73, - utm_y : 3642684.51, - x : 1048784, - y : 1037750 - }, { - j : 121.509499, - w : 31.246469, - utm_x : 13526522.73, - utm_y : 3642431.47, - x : 1079309, - y : 1060105 - }, { - j : 121.481643, - w : 31.283943, - utm_x : 13523421.78, - utm_y : 3647287.68, - x : 1087096, - y : 1035304 - }, { - j : 121.508054, - w : 31.280609, - utm_x : 13526361.87, - utm_y : 3646855.56, - x : 1098432, - y : 1045648 - }, { - j : 121.493854, - w : 31.19121, - utm_x : 13524781.12, - utm_y : 3635274.07, - x : 1039624, - y : 1077288 - }, { - j : 121.500079, - w : 31.185541, - utm_x : 13525474.09, - utm_y : 3634540.04, - x : 1039960, - y : 1081640 - }, { - j : 121.484482, - w : 31.202846, - utm_x : 13523737.82, - utm_y : 3636780.87, - x : 1041388, - y : 1069232 - }, { - j : 121.480877, - w : 31.189587, - utm_x : 13523336.51, - utm_y : 3635063.92, - x : 1032484, - y : 1073640 - }, { - j : 121.502652, - w : 31.195209, - utm_x : 13525760.52, - utm_y : 3635791.9, - x : 1046384, - y : 1078728 - } ] - }, - getLnglatIndex : function(cN, cR, cQ) { - var cM = 0; - var cL = 0; - var cS = 10000000, cP = 1000000000; - for ( var cO = 0; cO < this.correct_pts[cN].length; cO++) { - var T = this.getDis(this.correct_pts[cN][cO].x, - this.correct_pts[cN][cO].y, cR, cQ); - if (T < cP) { - if (T < cS) { - cP = cS; - cS = T; - cL = cM; - cM = cO - } else { - sedMinDis = T; - cL = cO - } - } - } - return { - lt : cM, - rb : cL - } - }, - getOMapIndex_mm : function(cN, cS, cR) { - var cM = 0; - var cL = 0; - var cQ = 1294723000, cP = 1294723000; - for ( var cO = 0; cO < this.correct_pts[cN].length; cO++) { - var T = this.getDis( - this.correct_pts[cN][cO].utm_x, - this.correct_pts[cN][cO].utm_y, cS, cR); - if (T < cP) { - if (T < cQ) { - cP = cQ; - cQ = T; - cL = cM; - cM = cO - } else { - sedMinDis = T; - cL = cO - } - } - } - return { - lt : cM, - rb : cL - } - }, - getDis : function(T, cN, cL, cM) { - return Math.abs(T - cL) + Math.abs(cN - cM) - }, - toMap : function(cN, T, cO) { - var cL = (T - cO) * this.num[cN].num; - var cM = (T + cO) * this.num[cN].num - * this.num[cN].num2; - return { - x : cL, - y : cM - } - }, - fromMap : function(cN, T, cO) { - cO = cO / this.num[cN].num2; - var cL = (T + cO) / (this.num[cN].num * 2); - var cM = (cO - T) / (this.num[cN].num * 2); - return { - x : cL, - y : cM - } - }, - getDgPix_mm : function(cO, cT, cP) { - var cS = this.fromMap(cO, - this.correct_pts[cO][cT].x, - this.correct_pts[cO][cT].y); - var cQ = this.fromMap(cO, - this.correct_pts[cO][cP].x, - this.correct_pts[cO][cP].y); - var cY = cS.x, cL = cS.y; - var cX = cQ.x, T = cQ.y; - var cV = this.correct_pts[cO][cT].utm_x, cN = this.correct_pts[cO][cT].utm_y; - var cR = this.correct_pts[cO][cP].utm_x, cM = this.correct_pts[cO][cP].utm_y; - var cW = Math.abs((cR - cV) * 100000 / (cX - cY)); - var cU = Math.abs((cM - cN) * 100000 / (T - cL)); - return { - j : cW, - w : cU, - x : 100000 / cW, - y : 100000 / cU - } - }, - getPx_mm : function(c1, cX, cW, cO, cN) { - var cM = this.correct_pts[c1][cO]; - var T = this.correct_pts[c1][cO]; - var cU = this.getDgPix_mm(c1, cO, cN); - var cQ = this.fromMap(c1, cM.x, cM.y); - var cP = T.utm_x, c3 = T.utm_y; - var c2 = cX, cV = cW; - var c0 = cQ.x; - var cL = cQ.y; - var cS = c2 - cP, cZ = cV - c3; - var cT = cS * cU.x + c0; - var cR = -cZ * cU.y + cL; - var cY = this.toMap(c1, cT, cR); - return cY - }, - getJw_mm : function(cZ, cU, cT, cP, cO) { - var cS = this.correct_pts[cZ][cP]; - var cL = this.correct_pts[cZ][cP]; - var cV = this.getDgPix_mm(cZ, cP, cO); - var cX = this.fromMap(cZ, cU, cT); - var cN = this.fromMap(cZ, cS.x, cS.y); - var cQ = cL.utm_x, c0 = cL.utm_y; - var cY = cN.x; - var cM = cN.y; - var c1 = cX.x - cY, cW = cM - cX.y; - var cR = c1 / cV.x + cQ; - var T = cW / cV.y + c0; - return { - lng : cR, - lat : T - } - }, - getOMap_pts : function(cL, T) { - return this.getOMap_index(cL, T.lng, T.lat, T.lt, - T.rb) - }, - getMapJw_pts : function(cL, T) { - return this.getMapJw_index(cL, T.lng, - 9998336 - T.lat, T.lt, T.rb) - }, - getOMap_index : function(cQ, cP, cO, T, cN) { - if (!T || !cN) { - var cL = this.getOMapIndex_mm(cQ, cP, cO) - } else { - var cL = { - lt : T, - rb : cN - } - } - var cM = this.getPx_mm(cQ, cP, cO, cL.lt, cL.rb); - return { - x : Math.floor(cM.x), - y : 9998336 - Math.floor(cM.y), - lt : cL.lt, - rb : cL.rb - } - }, - getMapJw_index : function(cP, cM, cQ, cL, cO) { - if (!cL || !cO) { - var cN = this.getLnglatIndex(cP, cM, cQ) - } else { - var cN = { - lt : cL, - rb : cO - } - } - var T = this.getJw_mm(cP, cM, cQ, cN.lt, cN.rb); - return { - lng : T.lng, - lat : T.lat, - lt : cN.lt, - rb : cN.rb - } - } - }); - function ba() { - } - ba.prototype = new bd(); - a8.extend(ba, - { - EARTHRADIUS : 6370996.81, - MCBAND : [ 12890594.86, 8362377.87, 5591021, 3481989.83, - 1678043.12, 0 ], - LLBAND : [ 75, 60, 45, 30, 15, 0 ], - MC2LL : [ - [ 1.410526172116255e-8, 0.00000898305509648872, - -1.9939833816331, 200.9824383106796, - -187.2403703815547, 91.6087516669843, - -23.38765649603339, 2.57121317296198, - -0.03801003308653, 17337981.2 ], - [ -7.435856389565537e-9, 0.000008983055097726239, - -0.78625201886289, 96.32687599759846, - -1.85204757529826, -59.36935905485877, - 47.40033549296737, -16.50741931063887, - 2.28786674699375, 10260144.86 ], - [ -3.030883460898826e-8, 0.00000898305509983578, - 0.30071316287616, 59.74293618442277, - 7.357984074871, -25.38371002664745, - 13.45380521110908, -3.29883767235584, - 0.32710905363475, 6856817.37 ], - [ -1.981981304930552e-8, 0.000008983055099779535, - 0.03278182852591, 40.31678527705744, - 0.65659298677277, -4.44255534477492, - 0.85341911805263, 0.12923347998204, - -0.04625736007561, 4482777.06 ], - [ 3.09191371068437e-9, 0.000008983055096812155, - 0.00006995724062, 23.10934304144901, - -0.00023663490511, -0.6321817810242, - -0.00663494467273, 0.03430082397953, - -0.00466043876332, 2555164.4 ], - [ 2.890871144776878e-9, 0.000008983055095805407, - -3.068298e-8, 7.47137025468032, - -0.00000353937994, -0.02145144861037, - -0.00001234426596, 0.00010322952773, - -0.00000323890364, 826088.5 ] ], - LL2MC : [ - [ -0.0015702102444, 111320.7020616939, - 1704480524535203, -10338987376042340, - 26112667856603880, -35149669176653700, - 26595700718403920, -10725012454188240, - 1800819912950474, 82.5 ], - [ 0.0008277824516172526, 111320.7020463578, - 647795574.6671607, -4082003173.641316, - 10774905663.51142, -15171875531.51559, - 12053065338.62167, -5124939663.577472, - 913311935.9512032, 67.5 ], - [ 0.00337398766765, 111320.7020202162, - 4481351.045890365, -23393751.19931662, - 79682215.47186455, -115964993.2797253, - 97236711.15602145, -43661946.33752821, - 8477230.501135234, 52.5 ], - [ 0.00220636496208, 111320.7020209128, - 51751.86112841131, 3796837.749470245, - 992013.7397791013, -1221952.21711287, - 1340652.697009075, -620943.6990984312, - 144416.9293806241, 37.5 ], - [ -0.0003441963504368392, 111320.7020576856, - 278.2353980772752, 2485758.690035394, - 6070.750963243378, 54821.18345352118, - 9540.606633304236, -2710.55326746645, - 1405.483844121726, 22.5 ], - [ -0.0003218135878613132, 111320.7020701615, - 0.00369383431289, 823725.6402795718, - 0.46104986909093, 2351.343141331292, - 1.58060784298199, 8.77738589078284, - 0.37238884252424, 7.45 ] ], - getDistanceByMC : function(cP, cN) { - if (!cP || !cN) { - return 0 - } - var cL, cO, T, cM; - cP = this.convertMC2LL(cP); - if (!cP) { - return 0 - } - cL = this.toRadians(cP.lng); - cO = this.toRadians(cP.lat); - cN = this.convertMC2LL(cN); - if (!cN) { - return 0 - } - T = this.toRadians(cN.lng); - cM = this.toRadians(cN.lat); - return this.getDistance(cL, T, cO, cM) - }, - getDistanceByLL : function(cP, cN) { - if (!cP || !cN) { - return 0 - } - cP.lng = this.getLoop(cP.lng, -180, 180); - cP.lat = this.getRange(cP.lat, -74, 74); - cN.lng = this.getLoop(cN.lng, -180, 180); - cN.lat = this.getRange(cN.lat, -74, 74); - var cL, T, cO, cM; - cL = this.toRadians(cP.lng); - cO = this.toRadians(cP.lat); - T = this.toRadians(cN.lng); - cM = this.toRadians(cN.lat); - return this.getDistance(cL, T, cO, cM) - }, - convertMC2LL : function(cL) { - var cM, cO; - cM = new cd(Math.abs(cL.lng), Math.abs(cL.lat)); - for ( var cN = 0; cN < this.MCBAND.length; cN++) { - if (cM.lat >= this.MCBAND[cN]) { - cO = this.MC2LL[cN]; - break - } - } - var T = this.convertor(cL, cO); - var cL = new cd(T.lng.toFixed(6), T.lat.toFixed(6)); - return cL - }, - convertLL2MC : function(T) { - var cL, cN; - T.lng = this.getLoop(T.lng, -180, 180); - T.lat = this.getRange(T.lat, -74, 74); - cL = new cd(T.lng, T.lat); - for ( var cM = 0; cM < this.LLBAND.length; cM++) { - if (cL.lat >= this.LLBAND[cM]) { - cN = this.LL2MC[cM]; - break - } - } - if (!cN) { - for ( var cM = this.LLBAND.length - 1; cM >= 0; cM--) { - if (cL.lat <= -this.LLBAND[cM]) { - cN = this.LL2MC[cM]; - break - } - } - } - var cO = this.convertor(T, cN); - var T = new cd(cO.lng.toFixed(2), cO.lat.toFixed(2)); - return T - }, - convertor : function(cM, cN) { - if (!cM || !cN) { - return - } - var T = cN[0] + cN[1] * Math.abs(cM.lng); - var cL = Math.abs(cM.lat) / cN[9]; - var cO = cN[2] + cN[3] * cL + cN[4] * cL * cL + cN[5] * cL - * cL * cL + cN[6] * cL * cL * cL * cL + cN[7] * cL - * cL * cL * cL * cL + cN[8] * cL * cL * cL * cL - * cL * cL; - T *= (cM.lng < 0 ? -1 : 1); - cO *= (cM.lat < 0 ? -1 : 1); - return new cd(T, cO) - }, - getDistance : function(cL, T, cN, cM) { - return this.EARTHRADIUS - * Math.acos((Math.sin(cN) * Math.sin(cM) + Math - .cos(cN) - * Math.cos(cM) * Math.cos(T - cL))) - }, - toRadians : function(T) { - return Math.PI * T / 180 - }, - toDegrees : function(T) { - return (180 * T) / Math.PI - }, - getRange : function(cM, cL, T) { - if (cL != null) { - cM = Math.max(cM, cL) - } - if (T != null) { - cM = Math.min(cM, T) - } - return cM - }, - getLoop : function(cM, cL, T) { - while (cM > T) { - cM -= T - cL - } - while (cM < cL) { - cM += T - cL - } - return cM - } - }); - a8.extend(ba.prototype, { - lngLatToMercator : function(T) { - return ba.convertLL2MC(T) - }, - lngLatToPoint : function(T) { - var cL = ba.convertLL2MC(T); - return new bu(cL.lng, cL.lat) - }, - mercatorToLngLat : function(T) { - return ba.convertMC2LL(T) - }, - pointToLngLat : function(T) { - var cL = new cd(T.x, T.y); - return ba.convertMC2LL(cL) - }, - pointToPixel : function(cL, cP, cO, cN, cQ) { - if (!cL) { - return - } - cL = this.lngLatToMercator(cL, cQ); - var cM = this.getZoomUnits(cP); - var T = Math.round((cL.lng - cO.lng) / cM + cN.width / 2); - var cR = Math.round((cO.lat - cL.lat) / cM + cN.height / 2); - return new bu(T, cR) - }, - pixelToPoint : function(T, cS, cO, cM, cL) { - if (!T) { - return - } - var cR = this.getZoomUnits(cS); - var cP = cO.lng + cR * (T.x - cM.width / 2); - var cN = cO.lat - cR * (T.y - cM.height / 2); - var cQ = new cd(cP, cN); - return this.mercatorToLngLat(cQ, cL) - }, - getZoomUnits : function(T) { - return Math.pow(2, (18 - T)) - } - }); - function cE() { - } - cE.prototype = new ba(); - a8.extend(cE.prototype, { - lngLatToMercator : function(cL, T) { - return this._convert2DTo3D(T, ba.convertLL2MC(cL)) - }, - mercatorToLngLat : function(cL, T) { - return ba.convertMC2LL(this._convert3DTo2D(T, cL)) - }, - lngLatToPoint : function(cM, T) { - var cL = this._convert2DTo3D(T, ba.convertLL2MC(cM)); - return new bu(cL.lng, cL.lat) - }, - pointToLngLat : function(cL, T) { - var cM = new cd(cL.x, cL.y); - return ba.convertMC2LL(this._convert3DTo2D(T, cM)) - }, - _convert2DTo3D : function(cM, T) { - var cL = b6.getOMap_pts(cM || "bj", T); - return new cd(cL.x, cL.y) - }, - _convert3DTo2D : function(cM, T) { - var cL = b6.getMapJw_pts(cM || "bj", T); - return new cd(cL.lng, cL.lat) - }, - getZoomUnits : function(T) { - return Math.pow(2, (20 - T)) - } - }); - function bG() { - this._type = "overlay" - } - a8.lang.inherits(bG, a8.lang.Class, "Overlay"); - bG.getZIndex = function(T) { - T = T * 1; - if (!T) { - return 0 - } - return (T * -100000) << 1 - }; - a8.extend(bG.prototype, { - _i : function(T) { - if (!this.domElement && I(this.initialize)) { - this.domElement = this.initialize(T); - if (this.domElement) { - this.domElement.style.WebkitUserSelect = "none" - } - } - this.draw() - }, - initialize : function(T) { - throw "initialize\u65b9\u6cd5\u672a\u5b9e\u73b0" - }, - draw : function() { - throw "draw\u65b9\u6cd5\u672a\u5b9e\u73b0" - }, - remove : function() { - if (this.domElement && this.domElement.parentNode) { - this.domElement.parentNode.removeChild(this.domElement) - } - this.domElement = null; - this.dispatchEvent(new bg("onremove")) - }, - hide : function() { - if (this.domElement) { - a8.dom.hide(this.domElement) - } - }, - show : function() { - if (this.domElement) { - a8.dom.show(this.domElement) - } - }, - isVisible : function() { - if (!this.domElement) { - return false - } - if (this.domElement.style.display == "none" - || this.domElement.style.visibility == "hidden") { - return false - } - return true - } - }); - BMap.register(function(cM) { - var T = cM.temp; - T.overlayDiv = cM.overlayDiv = cL(cM.platform, 200); - cM._panes.floatPane = cL(T.overlayDiv, 800); - cM._panes.markerMouseTarget = cL(T.overlayDiv, 700); - cM._panes.floatShadow = cL(T.overlayDiv, 600); - cM._panes.labelPane = cL(T.overlayDiv, 500); - cM._panes.markerPane = cL(T.overlayDiv, 400); - cM._panes.markerShadow = cL(T.overlayDiv, 300); - cM._panes.mapPane = cL(T.overlayDiv, 200); - function cL(cN, cQ) { - var cP = aa("div"), cO = cP.style; - cO.position = "absolute"; - cO.top = cO.left = cO.width = cO.height = "0"; - cO.zIndex = cQ; - cN.appendChild(cP); - return cP - } - }); - function Y() { - a8.lang.Class.call(this); - bG.call(this); - this.map = null; - this._visible = true; - this.infoWindow = null; - this._dblclickTime = 0 - } - a8.lang.inherits(Y, bG, "OverlayInternal"); - a8.extend(Y.prototype, { - initialize : function(T) { - this.map = T; - a8.lang.Class.call(this, this.guid); - return null - }, - getMap : function() { - return this.map - }, - draw : function() { - }, - remove : function() { - this.map = null; - a8.lang.decontrol(this.guid); - bG.prototype.remove.call(this) - }, - hide : function() { - if (this._visible == false) { - return - } - this._visible = false - }, - show : function() { - if (this._visible == true) { - return - } - this._visible = true - }, - isVisible : function() { - if (!this.domElement) { - return false - } - return !!this._visible - }, - getContainer : function() { - return this.domElement - }, - setConfig : function(cL) { - cL = cL || {}; - for ( var T in cL) { - this._config[T] = cL[T] - } - }, - setZIndex : function(T) { - this.zIndex = T - }, - enableMassClear : function() { - this._config.enableMassClear = true - }, - disableMassClear : function() { - this._config.enableMassClear = false - }, - addContextMenu : function(T) { - this._menu = T - }, - removeContextMenu : function(T) { - this._menu = null - } - }); - function cs() { - this.map = null; - this._overlays = {}; - this._customOverlays = [] - } - BMap - .register(function(cL) { - var T = new cs(); - T.map = cL; - cL._overlays = T._overlays; - cL._customOverlays = T._customOverlays; - cL.addEventListener("load", function(cM) { - T.draw(cM) - }); - cL.addEventListener("moveend", function(cM) { - T.draw(cM) - }); - if (a8.browser.ie && a8.browser.ie < 8 - || document.compatMode == "BackCompat") { - cL.addEventListener("zoomend", function(cM) { - setTimeout(function() { - T.draw(cM) - }, 20) - }) - } else { - cL.addEventListener("zoomend", function(cM) { - T.draw(cM) - }) - } - cL.addEventListener("maptypechange", function(cM) { - T.draw(cM) - }); - cL - .addEventListener( - "addoverlay", - function(cQ) { - var cN = cQ.target; - if (cN instanceof Y) { - if (!T._overlays[cN.guid]) { - T._overlays[cN.guid] = cN - } - } else { - var cP = false; - for ( var cO = 0, cM = T._customOverlays.length; cO < cM; cO++) { - if (T._customOverlays[cO] === cN) { - cP = true; - break - } - } - if (!cP) { - T._customOverlays.push(cN) - } - } - }); - cL - .addEventListener( - "removeoverlay", - function(cP) { - var cN = cP.target; - if (cN instanceof Y) { - delete T._overlays[cN.guid] - } else { - for ( var cO = 0, cM = T._customOverlays.length; cO < cM; cO++) { - if (T._customOverlays[cO] === cN) { - T._customOverlays.splice(cO, 1); - break - } - } - } - }); - cL - .addEventListener( - "clearoverlays", - function(cP) { - this.closeInfoWindow(); - for ( var cO in T._overlays) { - if (T._overlays[cO]._config.enableMassClear) { - T._overlays[cO].remove(); - delete T._overlays[cO] - } - } - for ( var cN = 0, cM = T._customOverlays.length; cN < cM; cN++) { - if (T._customOverlays[cN].enableMassClear != false) { - T._customOverlays[cN].remove(); - T._customOverlays[cN] = null; - T._customOverlays.splice(cN, 1); - cN--; - cM-- - } - } - }); - cL.addEventListener("infowindowopen", function(cN) { - var cM = this.infoWindow; - if (cM) { - a8.dom.hide(cM.popDom); - a8.dom.hide(cM.shadowDom) - } - }); - cL.addEventListener("movestart", function() { - if (this.getInfoWindow()) { - this.getInfoWindow()._setOverflow() - } - }); - cL.addEventListener("moveend", function() { - if (this.getInfoWindow()) { - this.getInfoWindow()._resetOverflow() - } - }) - }); - cs.prototype.draw = function(cM) { - for ( var cL in this._overlays) { - this._overlays[cL].draw() - } - a8.array.each(this._customOverlays, function(cN) { - cN.draw() - }); - if (this.map.temp.infoWin) { - this.map.temp.infoWin.setPosition() - } - if (BMap.DrawerSelector) { - var T = BMap.DrawerSelector.getDrawer(this.map); - T.setPalette() - } - }; - function cF(T) { - Y.call(this); - this._config = { - strokeColor : "#3a6bdb", - strokeWeight : 5, - strokeOpacity : 0.65, - strokeStyle : "solid", - enableMassClear : true, - getParseTolerance : null, - getParseCacheIndex : null, - enableEditing : false, - mouseOverTolerance : 15, - use3DCoords : false, - clickable : true - }; - T = T || {}; - this.setConfig(T); - if (this._config.strokeWeight <= 0) { - this._config.strokeWeight = 5 - } - if (this._config.strokeOpacity < 0 || this._config.strokeOpacity > 1) { - this._config.strokeOpacity = 0.65 - } - if (this._config.fillOpacity < 0 || this._config.fillOpacity > 1) { - this._config.fillOpacity = 0.65 - } - if (this._config.strokeStyle != "solid" - && this._config.strokeStyle != "dashed") { - this._config.strokeStyle = "solid" - } - if (ch(T.enableClicking)) { - this._config.clickable = T.enableClicking - } - this.domElement = null; - this._bounds = new BMap.Bounds(0, 0, 0, 0); - this._parseCache = []; - this.vertexMarkers = []; - this._temp = {} - } - a8.lang.inherits(cF, Y, "Graph"); - cF.getGraphPoints = function(cL) { - var T = []; - if (!cL) { - return T - } - if (b3(cL)) { - var cM = cL.split(";"); - a8.array.each(cM, function(cO) { - var cN = cO.split(","); - T.push(new cd(cN[0], cN[1])) - }) - } - if (cL.constructor == Array && cL.length > 0) { - T = cL - } - return T - }; - cF.parseTolerance = [ 0.09, 0.005, 0.0001, 0.00001 ]; - a8.extend(cF.prototype, { - initialize : function(T) { - this.map = T; - return null - }, - draw : function() { - return; - if (!this.domElement) { - return - } - if (this._drawer) { - this._drawer.setPath(this.domElement, this - ._getDisplayPixels(this.points)) - } - }, - setPath : function(T) { - this._parseCache.length = 0; - this.points = cF.getGraphPoints(T).slice(0); - this._calcBounds() - }, - _calcBounds : function() { - if (!this.points) { - return - } - var T = this; - T._bounds = new bN(); - a8.array.each(this.points, function(cL) { - T._bounds.extend(cL) - }) - }, - getPath : function() { - return this.points - }, - setPositionAt : function(cL, T) { - if (!T || !this.points[cL]) { - return - } - this._parseCache.length = 0; - this.points[cL] = new cd(T.lng, T.lat); - this._calcBounds() - }, - setStrokeColor : function(T) { - this._config.strokeColor = T - }, - getStrokeColor : function() { - return this._config.strokeColor - }, - setStrokeWeight : function(T) { - if (T > 0) { - this._config.strokeWeight = T - } - }, - getStrokeWeight : function() { - return this._config.strokeWeight - }, - setStrokeOpacity : function(T) { - if (!T || T > 1 || T < 0) { - return - } - this._config.strokeOpacity = T - }, - getStrokeOpacity : function() { - return this._config.strokeOpacity - }, - setFillOpacity : function(T) { - if (T > 1 || T < 0) { - return - } - this._config.fillOpacity = T - }, - getFillOpacity : function() { - return this._config.fillOpacity - }, - setStrokeStyle : function(T) { - if (T != "solid" && T != "dashed") { - return - } - this._config.strokeStyle = T - }, - getStrokeStyle : function() { - return this._config.strokeStyle - }, - setFillColor : function(T) { - this._config.fillColor = T || "" - }, - getFillColor : function() { - return this._config.fillColor - }, - getBounds : function() { - return this._bounds - }, - remove : function() { - if (this.map) { - this.map.removeEventListener("onmousemove", - this._graphMouseEvent) - } - Y.prototype.remove.call(this); - this._parseCache.length = 0 - }, - enableEditing : function() { - this._config.enableEditing = true - }, - disableEditing : function() { - this._config.enableEditing = false - } - }); - function n(T) { - Y.call(this); - this.map = null; - this.domElement = null; - this._config = { - width : 0, - height : 0, - offset : new aH(0, 0), - opacity : 1, - background : "transparent", - lineStroke : 1, - lineColor : "#000", - lineStyle : "solid", - point : null - }; - this.setConfig(T); - this.point = this._config.point - } - a8.lang.inherits(n, Y, "Division"); - a8 - .extend( - n.prototype, - { - _addDom : function() { - var T = this._config; - var cM = this.content; - var cL = [ '
'); - cL.push(cM); - cL.push("
"); - this.domElement = at( - this.map.getPanes().markerMouseTarget, cL - .join("")) - }, - initialize : function(T) { - this.map = T; - this._addDom(); - if (this.domElement) { - a8.on(this.domElement, "mousedown", - function(cL) { - aP(cL) - }) - } - return this.domElement - }, - draw : function() { - var T = this.map - .pointToOverlayPixel(this._config.point); - this._config.offset = new aH( - -Math.round(this._config.width / 2) - - Math - .round(this._config.lineStroke), - -Math.round(this._config.height / 2) - - Math - .round(this._config.lineStroke)); - this.domElement.style.left = T.x - + this._config.offset.width + "px"; - this.domElement.style.top = T.y - + this._config.offset.height + "px" - }, - getPosition : function() { - return this._config.point - }, - _getPixel : function(T) { - return this.map.pointToPixel(this.getPosition()) - }, - setPosition : function(T) { - this._config.point = T; - this.draw() - }, - setDimension : function(T, cL) { - this._config.width = Math.round(T); - this._config.height = Math.round(cL); - if (this.domElement) { - this.domElement.style.width = this._config.width - + "px"; - this.domElement.style.height = this._config.height - + "px"; - this.draw() - } - } - }); - function M(cL, cM, cN) { - if (!cL || !cM) { - return - } - this.imageUrl = cL; - this.size = cM; - var T = new aH(Math.floor(cM.width / 2), Math.floor(cM.height / 2)); - var cO = { - anchor : T, - imageOffset : new aH(0, 0) - }; - cN = cN || {}; - a8.extend(cO, cN); - this.anchor = cO.anchor; - this.imageOffset = cO.imageOffset; - this.infoWindowAnchor = cN.infoWindowAnchor || this.anchor; - this.printImageUrl = cN.printImageUrl || "" - } - var bD = M.prototype; - bD.setImageUrl = function(T) { - if (!T) { - return - } - this.imageUrl = T - }; - bD.setPrintImageUrl = function(T) { - if (!T) { - return - } - this.printImageUrl = T - }; - bD.setSize = function(T) { - if (!T) { - return - } - this.size = new aH(T.width, T.height) - }; - bD.setAnchor = function(T) { - if (!T) { - return - } - this.anchor = new aH(T.width, T.height) - }; - bD.setImageOffset = function(T) { - if (!T) { - return - } - this.imageOffset = new aH(T.width, T.height) - }; - bD.setInfoWindowAnchor = function(T) { - if (!T) { - return - } - this.infoWindowAnchor = new aH(T.width, T.height) - }; - bD.toString = function() { - return "Icon" - }; - function bP(cM, cL) { - a8.lang.Class.call(this); - this.content = cM; - this.map = null; - this._config = { - width : 0, - height : 0, - maxWidth : 600, - offset : new aH(0, 0), - title : "", - maxContent : "", - enableMaximize : false, - enableAutoPan : true, - enableCloseOnClick : true, - margin : [ 10, 10, 40, 10 ], - collisions : [ [ 10, 10 ], [ 10, 10 ], [ 10, 10 ], [ 10, 10 ] ], - ifMaxScene : false, - onClosing : function() { - return true - } - }; - a8.extend(this._config, cL || {}); - if (this._config.width != 0) { - if (this._config.width < 220) { - this._config.width = 220 - } - if (this._config.width > 730) { - this._config.width = 730 - } - } - if (this._config.height != 0) { - if (this._config.height < 60) { - this._config.height = 60 - } - if (this._config.height > 650) { - this._config.height = 650 - } - } - if (this._config.maxWidth != 0) { - if (this._config.maxWidth < 220) { - this._config.maxWidth = 220 - } - if (this._config.maxWidth > 730) { - this._config.maxWidth = 730 - } - } - this.isWinMax = false; - this.IMG_PATH = cc.imgPath; - this.overlay = null; - var T = this; - cA.load("infowindow", function() { - T._draw() - }) - } - a8.lang.inherits(bP, a8.lang.Class, "InfoWindow"); - a8.extend(bP.prototype, { - setWidth : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 220) { - T = 220 - } - if (T > 730) { - T = 730 - } - } - this._config.width = T - }, - setHeight : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 60) { - T = 60 - } - if (T > 650) { - T = 650 - } - } - this._config.height = T - }, - setMaxWidth : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 220) { - T = 220 - } - if (T > 730) { - T = 730 - } - } - this._config.maxWidth = T - }, - setTitle : function(T) { - this._config.title = T - }, - getTitle : function() { - return this._config.title - }, - setContent : function(T) { - this.content = T - }, - getContent : function() { - return this.content - }, - setMaxContent : function(T) { - this._config.maxContent = T + "" - }, - redraw : function() { - }, - enableAutoPan : function() { - this._config.enableAutoPan = true - }, - disableAutoPan : function() { - this._config.enableAutoPan = false - }, - enableCloseOnClick : function() { - this._config.enableCloseOnClick = true - }, - disableCloseOnClick : function() { - this._config.enableCloseOnClick = false - }, - enableMaximize : function() { - this._config.enableMaximize = true - }, - disableMaximize : function() { - this._config.enableMaximize = false - }, - show : function() { - this._visible = true - }, - hide : function() { - this._visible = false - }, - close : function() { - this.hide() - }, - maximize : function() { - this.isWinMax = true - }, - restore : function() { - this.isWinMax = false - }, - isVisible : function() { - return this.isOpen() - }, - isOpen : function() { - return false - }, - getPosition : function() { - if (this.overlay && this.overlay.getPosition) { - return this.overlay.getPosition() - } - }, - getOffset : function() { - return this._config.offset - } - }); - bz.prototype.openInfoWindow = function(cN, T) { - if (!(cN instanceof bP) || !(T instanceof cd)) { - return - } - var cL = this.temp; - if (!cL.marker) { - var cM = new M(cc.imgPath + "blank.gif", { - width : 1, - height : 1 - }); - cL.marker = new ad(T, { - icon : cM, - width : 1, - height : 1, - offset : new aH(0, 0), - infoWindowOffset : new aH(0, 0), - clickable : false - }); - cL.marker._fromMap = 1 - } else { - cL.marker.setPosition(T) - } - this.addOverlay(cL.marker); - cL.marker.openInfoWindow(cN) - }; - bz.prototype.closeInfoWindow = function() { - var T = this.temp.infoWin || this.temp._infoWin; - if (T && T.overlay) { - T.overlay.closeInfoWindow() - } - }; - Y.prototype.openInfoWindow = function(T) { - if (this.map) { - this.map.closeInfoWindow(); - T._visible = true; - this.map.temp._infoWin = T; - T.overlay = this; - a8.lang.Class.call(T, T.guid) - } - }; - Y.prototype.closeInfoWindow = function() { - if (this.map && this.map.temp._infoWin) { - this.map.temp._infoWin._visible = false; - a8.lang.decontrol(this.map.temp._infoWin.guid); - this.map.temp._infoWin = null - } - }; - function ag(cM, cL) { - Y.call(this); - this.content = cM; - this.map = null; - this.domElement = null; - this._config = { - width : 0, - offset : new aH(0, 0), - styles : { - backgroundColor : "#fff", - border : "1px solid #f00", - padding : "1px", - whiteSpace : "nowrap", - font : "12px " + cc.fontFamily, - zIndex : "80", - MozUserSelect : "none" - }, - position : null, - enableMassClear : true, - clickable : true - }; - cL = cL || {}; - this.setConfig(cL); - if (this._config.width < 0) { - this._config.width = 0 - } - if (ch(cL.enableClicking)) { - this._config.clickable = cL.enableClicking - } - this.point = this._config.position; - var T = this; - cA.load("marker", function() { - T._draw() - }) - } - a8.lang.inherits(ag, Y, "Label"); - a8.extend(ag.prototype, { - getPosition : function() { - if (this._marker) { - return this._marker.getPosition() - } - return this.point - }, - setPosition : function(T) { - if (T instanceof cd && !this.getMarker()) { - this.point = this._config.position = new cd(T.lng, T.lat) - } - }, - setContent : function(T) { - this.content = T - }, - setOpacity : function(T) { - if (T >= 0 && T <= 1) { - this._config.opacity = T - } - }, - setOffset : function(T) { - if (!(T instanceof aH)) { - return - } - this._config.offset = new aH(T.width, T.height) - }, - getOffset : function() { - return this._config.offset - }, - setStyle : function(T) { - T = T || {}; - this._config.styles = a8.extend(this._config.styles, T) - }, - setStyles : function(T) { - return this.setStyle(T) - }, - setTitle : function(T) { - this._config.title = T || "" - }, - getTitle : function() { - return this._config.title - }, - setMarker : function(T) { - this._marker = T; - if (T) { - this.point = this._config.position = T.getPosition() - } else { - this.point = this._config.position = null - } - }, - getMarker : function() { - return this._marker || null - } - }); - window.BMAP_ANIMATION_DROP = 1; - window.BMAP_ANIMATION_BOUNCE = 2; - var au = new M(cc.imgPath + "marker_red_sprite.png", new aH(19, 25), { - anchor : new aH(10, 25), - infoWindowAnchor : new aH(10, 0) - }); - var ar = new M(cc.imgPath + "marker_red_sprite.png", new aH(20, 11), { - anchor : new aH(6, 11), - imageOffset : new aH(-19, -13) - }); - function ad(T, cM) { - Y.call(this); - cM = cM || {}; - this.point = T; - this.map = null; - this._animation = null; - this._config = { - offset : new aH(0, 0), - icon : au, - shadow : ar, - title : "", - label : null, - baseZIndex : 0, - clickable : true, - zIndexFixed : false, - isTop : false, - enableMassClear : true, - enableDragging : false, - raiseOnDrag : false, - restrictDraggingArea : false, - draggingCursor : cc.draggingCursor - }; - this.setConfig(cM); - if (cM.icon && !cM.shadow) { - this._config.shadow = null - } - if (ch(cM.enableClicking)) { - this._config.clickable = cM.enableClicking - } - var cL = this; - cA.load("marker", function() { - cL._draw() - }) - } - ad.TOP_ZINDEX = bG.getZIndex(-90) + 1000000; - ad.DRAG_ZINDEX = ad.TOP_ZINDEX + 1000000; - a8.lang.inherits(ad, Y, "Marker"); - a8.extend(ad.prototype, { - setIcon : function(T) { - if (T instanceof M) { - this._config.icon = T - } - }, - getIcon : function() { - return this._config.icon - }, - setShadow : function(T) { - if (T instanceof M) { - this._config.shadow = T - } - }, - getShadow : function() { - return this._config.shadow - }, - setLabel : function(T) { - this._config.label = T || null - }, - getLabel : function() { - return this._config.label - }, - enableDragging : function() { - this._config.enableDragging = true - }, - disableDragging : function() { - this._config.enableDragging = false - }, - getPosition : function() { - return this.point - }, - setPosition : function(T) { - if (T instanceof cd) { - this.point = new cd(T.lng, T.lat) - } - }, - setTop : function(cL, T) { - this._config.isTop = !!cL; - if (cL) { - this._addi = T || 0 - } - }, - setTitle : function(T) { - this._config.title = T + "" - }, - getTitle : function() { - return this._config.title - }, - setOffset : function(T) { - if (T instanceof aH) { - this._config.offset = T - } - }, - getOffset : function() { - return this._config.offset - }, - setAnimation : function(T) { - this._animation = T - } - }); - function cn(T, cM) { - cF.call(this, cM); - cM = cM || {}; - this._config.fillOpacity = cM.fillOpacity ? cM.fillOpacity : 0.65; - if (cM.fillColor == "") { - this._config.fillColor = "" - } else { - this._config.fillColor = cM.fillColor ? cM.fillColor : "#fff" - } - this.setPath(T); - var cL = this; - cA.load("poly", function() { - cL._draw() - }) - } - a8.lang.inherits(cn, cF, "Polygon"); - a8.extend(cn.prototype, { - setPath : function(cL, T) { - this._userPoints = cF.getGraphPoints(cL).slice(0); - var cM = cF.getGraphPoints(cL).slice(0); - if (cM.length > 1 && !cM[0].equals(cM[cM.length - 1])) { - cM.push(new cd(cM[0].lng, cM[0].lat)) - } - cF.prototype.setPath.call(this, cM, T) - }, - setPositionAt : function(cL, T) { - if (!this._userPoints[cL]) { - return - } - this._userPoints[cL] = new cd(T.lng, T.lat); - this.points[cL] = new cd(T.lng, T.lat); - if (cL == 0 - && !this.points[0] - .equals(this.points[this.points.length - 1])) { - this.points[this.points.length - 1] = new cd(T.lng, T.lat) - } - this._calcBounds() - }, - getPath : function() { - var T = this._userPoints; - if (T.length == 0) { - T = this.points - } - return T - } - }); - function f(T, cM) { - cF.call(this, cM); - this.setPath(T); - var cL = this; - cA.load("poly", function() { - cL._draw() - }) - } - a8.lang.inherits(f, cF, "Polyline"); - function a(cL, T, cM) { - this.point = cL; - this.radius = Math.abs(T); - cn.call(this, [], cM) - } - a.parseTolerance = [ 0.01, 0.0001, 0.00001, 0.000004 ]; - a8.lang.inherits(a, cn, "Circle"); - a8 - .extend( - a.prototype, - { - initialize : function(T) { - this.map = T; - this.points = this._getPerimeterPoints(this.point, - this.radius); - this._calcBounds(); - return null - }, - getCenter : function() { - return this.point - }, - setCenter : function(T, cL) { - if (!T) { - return - } - this.point = T - }, - getRadius : function() { - return this.radius - }, - setRadius : function(T) { - this.radius = Math.abs(T) - }, - _getPerimeterPoints : function(T, cS) { - if (!T || !cS || !this.map) { - return [] - } - var cL = this.map; - var cP = T.lng, cN = T.lat; - var cZ = []; - var cU = cS / 6378800, cR = (Math.PI / 180) * cN, cX = (Math.PI / 180) - * cP; - for ( var cQ = 0; cQ < 360; cQ += 9) { - var cO = (Math.PI / 180) * cQ, cV = Math - .asin(Math.sin(cR) * Math.cos(cU) - + Math.cos(cR) * Math.sin(cU) - * Math.cos(cO)), cT = Math - .atan2(Math.sin(cO) * Math.sin(cU) - * Math.cos(cR), Math.cos(cU) - - Math.sin(cR) * Math.sin(cV)), cW = ((cX - - cT + Math.PI) % (2 * Math.PI)) - - Math.PI, cY = new cd(cW - * (180 / Math.PI), cV * (180 / Math.PI)); - cZ.push(cY) - } - var cM = cZ[0]; - cZ.push(new cd(cM.lng, cM.lat)); - return cZ - } - }); - function bR(T) { - this.map = T; - this.mapTypeLayers = []; - this.tileLayers = []; - this.bufferNumber = 300; - this.realBufferNumber = 0; - this.mapTiles = {}; - this.bufferTiles = {}; - this.numLoading = 0; - this._mapTypeLayerContainer = this._createDiv(1); - this._normalLayerContainer = this._createDiv(2); - T.platform.appendChild(this._mapTypeLayerContainer); - T.platform.appendChild(this._normalLayerContainer) - } - BMap.register(function(cL) { - var T = new bR(cL); - T.initialize() - }); - a8.extend(bR.prototype, { - initialize : function() { - var T = this, cL = T.map; - cL.addEventListener("loadcode", function() { - T.loadTiles() - }); - cL.addEventListener("addtilelayer", function(cM) { - T.addTileLayer(cM) - }); - cL.addEventListener("removetilelayer", function(cM) { - T.removeTileLayer(cM) - }); - cL.addEventListener("setmaptype", function(cM) { - T.setMapType(cM) - }); - cL.addEventListener("zoomstartcode", function(cM) { - T._zoom(cM) - }) - }, - loadTiles : function() { - var T = this; - if (a8.browser.ie) { - try { - document.execCommand("BackgroundImageCache", false, true) - } catch (cL) { - } - } - if (!this.loaded) { - T.initMapTypeTiles() - } - T.moveGridTiles(); - if (!this.loaded) { - this.loaded = true; - cA.load("tile", function() { - T._asyncLoadTiles() - }) - } - }, - initMapTypeTiles : function() { - var cL = this.map.getMapType(); - var cM = cL.getTileLayers(); - for ( var T = 0; T < cM.length; T++) { - var cN = new p(); - a8.extend(cN, cM[T]); - this.mapTypeLayers.push(cN); - cN.initialize(this.map, this._mapTypeLayerContainer) - } - }, - _createDiv : function(cL) { - var T = aa("div"); - T.style.position = "absolute"; - T.style.left = T.style.top = "0"; - T.style.zIndex = cL; - return T - }, - showTile : function(cP, cO, cS) { - var cV = this; - cV.centerPos = cO; - var cR = this.map.getMapType(); - var cM = cV.getTileName(cP, cS); - var cZ = cR.getTileSize(); - var cN = (cP[0] * cZ) + cO[0]; - var cY = 0; - if (cR === BMAP_PERSPECTIVE_MAP && cV.map.getZoom() == 15) { - cY = 0.5 - } - var cL = (cY - 1 - cP[1]) * cZ + cO[1]; - var cT = [ cN, cL ]; - var cU = this.mapTiles[cM]; - if (cU && cU.img) { - bI(cU.img, cT); - if (cU.loaded) { - this._checkTilesLoaded() - } else { - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }) - } - return - } - cU = this.bufferTiles[cM]; - if (cU && cU.img) { - cS.tilesDiv.insertBefore(cU.img, cS.tilesDiv.lastChild); - this.mapTiles[cM] = cU; - bI(cU.img, cT); - if (cU.loaded) { - this._checkTilesLoaded() - } else { - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }) - } - return - } - var cX = 256 * Math.pow(2, (cR.getMaxZoom() - cP[2])); - var cW = new cd(cP[0] * cX, cP[1] * cX); - var cQ = new bu(cP[0], cP[1]); - var T = cS.getTilesUrl(cQ, cP[2]); - cU = new bU(this, T, cT, cP, cS); - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }); - cU._load(); - this.mapTiles[cM] = cU - }, - _checkTilesLoaded : function() { - this.numLoading--; - var T = this; - if (this.numLoading == 0) { - if (this._checkLoadedTimer) { - clearTimeout(this._checkLoadedTimer); - this._checkLoadedTimer = null - } - this._checkLoadedTimer = setTimeout(function() { - if (T.numLoading == 0) { - T.map.dispatchEvent(new bg("ontilesloaded")) - } - T._checkLoadedTimer = null - }, 80) - } - }, - getTileName : function(T, cL) { - if (this.map.getMapType() === BMAP_PERSPECTIVE_MAP) { - return "TILE-" + cL.guid + "-" + this.map.cityCode + "-" + T[0] - + "-" + T[1] + "-" + T[2] - } else { - return "TILE-" + cL.guid + "-" + T[0] + "-" + T[1] + "-" + T[2] - } - }, - hideTile : function(cL) { - var T = cL.img; - if (T) { - J(T); - if (y(T)) { - T.parentNode.removeChild(T) - } - } - delete this.mapTiles[cL.name]; - if (!cL.loaded) { - J(T); - T = null; - cL._callCbks(); - cL.img = null; - cL.mgr = null - } - }, - moveGridTiles : function() { - var da = this.mapTypeLayers; - var cW = da.concat(this.tileLayers); - var c2 = cW.length; - for ( var c4 = 0; c4 < c2; c4++) { - var cP = cW[c4]; - if (cP.baseLayer) { - this.tilesDiv = cP.tilesDiv - } - var dg = this.map; - var dc = dg.getMapType(); - var dh = dc.getProjection(); - var c3 = dg.zoomLevel; - var c6 = dg.mercatorCenter; - this.mapCenterPoint = c6; - var cU = dc.getZoomUnits(c3); - var cX = dc.getZoomFactor(c3); - var cV = Math.ceil(c6.lng / cX); - var cQ = Math.ceil(c6.lat / cX); - var c1 = dc.getTileSize(); - var cO = [ cV, cQ, (c6.lng - cV * cX) / cX * c1, - (c6.lat - cQ * cX) / cX * c1 ]; - var db = cO[0] - Math.ceil((dg.width / 2 - cO[2]) / c1); - var cN = cO[1] - Math.ceil((dg.height / 2 - cO[3]) / c1); - var c7 = cO[0] + Math.ceil((dg.width / 2 + cO[2]) / c1); - var cZ = 0; - if (dc === BMAP_PERSPECTIVE_MAP && dg.getZoom() == 15) { - cZ = 1 - } - var cY = cO[1] + Math.ceil((dg.height / 2 + cO[3]) / c1) + cZ; - this.areaCenter = new cd(c6.lng, c6.lat); - var cM = this.mapTiles; - var cT = -this.areaCenter.lng / cU; - var cS = this.areaCenter.lat / cU; - var de = [ Math.round(cT), Math.round(cS) ]; - var cL = dg.getZoom(); - for ( var df in cM) { - var di = cM[df]; - var dd = di.info; - if (dd[2] != cL - || (dd[2] == cL && (db > dd[0] || c7 <= dd[0] - || cN > dd[1] || cY <= dd[1]))) { - this.hideTile(di) - } - } - var cR = -dg.offsetX + dg.width / 2; - var c0 = -dg.offsetY + dg.height / 2; - cP.tilesDiv.style.left = Math.round(cT + cR) - de[0] + "px"; - cP.tilesDiv.style.top = Math.round(cS + c0) - de[1] + "px"; - var T = []; - for ( var c9 = db; c9 < c7; c9++) { - for ( var c8 = cN; c8 < cY; c8++) { - T.push( [ c9, c8 ]) - } - } - T.sort((function(dj) { - return function(dk, dl) { - return ((0.4 * Math.abs(dk[0] - dj[0]) + 0.6 * Math - .abs(dk[1] - dj[1])) - (0.4 * Math.abs(dl[0] - - dj[0]) + 0.6 * Math.abs(dl[1] - dj[1]))) - } - })( [ cO[0] - 1, cO[1] - 1 ])); - this.numLoading += T.length; - for ( var c9 = 0, c5 = T.length; c9 < c5; c9++) { - this.showTile( [ T[c9][0], T[c9][1], cL ], de, cP) - } - } - return - }, - addTileLayer : function(cN) { - var cM = this; - var T = cN.target; - for ( var cL = 0; cL < cM.tileLayers.length; cL++) { - if (cM.tileLayers[cL] == T) { - return - } - } - T.initialize(this.map, this._normalLayerContainer); - cM.tileLayers.push(T) - }, - removeTileLayer : function(cO) { - var cN = this; - var cL = cO.target; - for ( var cM = 0, T = cN.tileLayers.length; cM < T; cM++) { - if (cL == cN.tileLayers[cM]) { - cN.tileLayers.splice(cM, 1) - } - } - cL.remove() - }, - setMapType : function() { - var cM = this; - var cN = this.mapTypeLayers; - for ( var cL = 0, T = cN.length; cL < T; cL++) { - cN[cL].remove() - } - delete this.tilesDiv; - this.mapTypeLayers = []; - this.bufferTiles = this.mapTiles = {}; - this.initMapTypeTiles(); - this.moveGridTiles() - }, - _zoom : function() { - var T = this; - if (T.zoomsDiv) { - a8.dom.hide(T.zoomsDiv) - } - setTimeout(function() { - T.moveGridTiles(); - T.map.dispatchEvent(new bg("onzoomend")) - }, 10) - } - }); - function bU(cR, T, cO, cL, cN) { - this.mgr = cR; - this.position = cO; - this._cbks = []; - this.name = cR.getTileName(cL, cN); - this.info = cL; - this._transparentPng = cN.isTransparentPng(); - var cS = aa("img"); - cw(cS); - cS.galleryImg = false; - var cQ = cS.style; - var cM = cR.map.getMapType(); - cQ.position = "absolute"; - cQ.border = "none"; - cQ.width = cM.getTileSize() + "px"; - cQ.height = cM.getTileSize() + "px"; - cQ.left = cO[0] + "px"; - cQ.top = cO[1] + "px"; - this.img = cS; - this.src = T; - if (E) { - this.img.style.opacity = 0 - } - var cP = this; - this.img.onload = function(cY) { - cP.loaded = true; - if (!cP.mgr) { - return - } - var cU = cP.mgr; - var cT = cU.bufferTiles; - if (!cT[cP.name]) { - cU.realBufferNumber++; - cT[cP.name] = cP - } - if (cP.img && !y(cP.img)) { - if (cN.tilesDiv) { - cN.tilesDiv.appendChild(cP.img); - if (a8.browser.ie <= 6 && a8.browser.ie > 0 - && cP._transparentPng) { - cP.img.style.cssText += ';filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + cP.src + '",sizingMethod=scale);' - } - } - } - var cW = cU.realBufferNumber - cU.bufferNumber; - for ( var cX in cT) { - if (cW <= 0) { - break - } - if (!cU.mapTiles[cX]) { - cT[cX].mgr = null; - var cV = cT[cX].img; - if (cV && cV.parentNode) { - cV.parentNode.removeChild(cV); - J(cV) - } - cV = null; - cT[cX].img = null; - delete cT[cX]; - cU.realBufferNumber--; - cW-- - } - } - if (E) { - new g( { - fps : 20, - duration : 200, - render : function(cZ) { - if (cP.img && cP.img.style) { - cP.img.style.opacity = cZ * 1 - } - }, - finish : function() { - if (cP.img && cP.img.style) { - delete cP.img.style.opacity - } - } - }) - } - cP._callCbks() - }; - this.img.onerror = function() { - var cU = cP.img, cV = cP.img.getAttribute("isError") || 0; - if (m && cV < 5) { - cV++; - cU.setAttribute("isError", cV); - cU.src = T + "&t=" + new Date().getTime() - } else { - cP._callCbks(); - if (!cP.mgr) { - return - } - var cT = cP.mgr; - var cW = cT.map.getMapType(); - if (cW.getErrorImageUrl()) { - cP.error = true; - cP.img.src = cW.getErrorImageUrl(); - if (cP.img && !y(cP.img)) { - cN.tilesDiv.appendChild(cP.img) - } - } - } - }; - cS = null - } - bU.prototype._addLoadCbk = function(T) { - this._cbks.push(T) - }; - bU.prototype._load = function() { - if (a8.browser.ie > 0 && a8.browser.ie <= 6 && this._transparentPng) { - this.img.src = cc.imgPath + "blank.gif" - } else { - this.img.src = this.src - } - }; - bU.prototype._callCbks = function() { - var cL = this; - for ( var T = 0; T < cL._cbks.length; T++) { - cL._cbks[T]() - } - cL._cbks.length = 0 - }; - function J(cN) { - if (!cN) { - return - } - cN.onload = cN.onerror = null; - var cL = cN.attributes, cM, T, cO; - if (cL) { - T = cL.length; - for (cM = 0; cM < T; cM += 1) { - cO = cL[cM].name; - if (I(cN[cO])) { - cN[cO] = null - } - } - } - cL = cN.children; - if (cL) { - T = cL.length; - for (cM = 0; cM < T; cM += 1) { - J(cN.children[cM]) - } - } - } - var E = (!a8.browser.ie || a8.browser.ie > 8); - function p(T) { - this.opts = T || {}; - this.copyright = this.opts.copyright || null; - this.transparentPng = this.opts.transparentPng || false; - this.baseLayer = this.opts.baseLayer || false; - this.zIndex = this.opts.zIndex || 0; - this.guid = p._guid++ - } - p._guid = 0; - a8.lang.inherits(p, a8.lang.Class, "TileLayer"); - a8.extend(p.prototype, { - initialize : function(cM, T) { - if (this.baseLayer) { - this.zIndex = -100 - } - this.map = cM; - if (!this.tilesDiv) { - var cN = aa("div"); - var cL = cN.style; - if (!a8.platform.isAndroid) { - T.style.WebkitBackfaceVisibility = "hidden" - } - cL.position = "absolute"; - cL.zIndex = this.zIndex; - cL.left = Math.ceil(-cM.offsetX + cM.width / 2) + "px"; - cL.top = Math.ceil(-cM.offsetY + cM.height / 2) + "px"; - T.appendChild(cN); - this.tilesDiv = cN - } - }, - remove : function() { - if (this.tilesDiv && this.tilesDiv.parentNode) { - this.tilesDiv.innerHTML = ""; - this.tilesDiv.parentNode.removeChild(this.tilesDiv) - } - delete this.tilesDiv - }, - isTransparentPng : function() { - return this.transparentPng - }, - getTilesUrl : function(cL, cM) { - var T = ""; - if (this.opts.tileUrlTemplate) { - T = this.opts.tileUrlTemplate.replace(/\{X\}/, cL.x); - T = T.replace(/\{Y\}/, cL.y); - T = T.replace(/\{Z\}/, cM) - } - return T - }, - getCopyright : function() { - return this.copyright - }, - getMapType : function() { - return this.mapType || BMAP_NORMAL_MAP - } - }); - function aC(T) { - p.call(this, T); - this._opts = {}; - T = T || {}; - this._opts = a8.object.extend(this._opts, T); - if (this._opts.predictDate) { - if (this._opts.predictDate.weekday < 1 - || this._opts.predictDate.weekday > 7) { - this._opts.predictDate = 1 - } - if (this._opts.predictDate.hour < 0 - || this._opts.predictDate.hour > 23) { - this._opts.predictDate.hour = 0 - } - } - this._tileUrl = "http://its.map.baidu.com:8002/traffic/" - } - aC.prototype = new p(); - aC.prototype.initialize = function(cL, T) { - p.prototype.initialize.call(this, cL, T); - this._map = cL - }; - aC.prototype.isTransparentPng = function() { - return true - }; - aC.prototype.getTilesUrl = function(cQ, cL) { - var cR = ""; - if (this._opts.predictDate) { - cR = "HistoryService?day=" + (this._opts.predictDate.weekday - 1) - + "&hour=" + this._opts.predictDate.hour + "&t=" - + new Date().getTime() + "&" - } else { - cR = "TrafficTileService?time=" + new Date().getTime() + "&" - } - var cM = this._map, cS = cQ.x, cN = cQ.y, cP = Math.floor(cS / 200), cO = Math - .floor(cN / 200), T = this._tileUrl + cR + "level=" + cL - + "&x=" + cS + "&y=" + cN; - return T.replace(/-(\d+)/gi, "M$1") - }; - function cu(T, cL, cM) { - this._name = T; - this._layers = cL instanceof p ? [ cL ] : cL.slice(0); - this._opts = { - tips : "", - labelText : "", - minZoom : 1, - maxZoom : 19, - tileSize : 256, - textColor : "black", - errorImageUrl : "", - projection : new ba() - }; - if (this._layers.length == 1) { - this._layers[0].baseLayer = true - } - a8.extend(this._opts, cM || {}) - } - a8.extend(cu.prototype, { - getName : function() { - return this._name - }, - getTips : function() { - return this._opts.tips - }, - getLabelText : function() { - return this._opts.labelText - }, - getTileLayer : function() { - return this._layers[0] - }, - getTileLayers : function() { - return this._layers - }, - getTileSize : function() { - return this._opts.tileSize - }, - getMinZoom : function() { - return this._opts.minZoom - }, - getMaxZoom : function() { - return this._opts.maxZoom - }, - getTextColor : function() { - return this._opts.textColor - }, - getProjection : function() { - return this._opts.projection - }, - getErrorImageUrl : function() { - return this._opts.errorImageUrl - }, - getZoomUnits : function(T) { - return Math.pow(2, (18 - T)) - }, - getZoomFactor : function(T) { - return this.getZoomUnits(T) * 256 - } - }); - var b7 = [ "http://shangetu0.map.bdimg.com/it/", - "http://shangetu1.map.bdimg.com/it/", - "http://shangetu2.map.bdimg.com/it/", - "http://shangetu3.map.bdimg.com/it/", - "http://shangetu4.map.bdimg.com/it/" ]; - var j = [ "http://online0.map.bdimg.com/tile/", - "http://online1.map.bdimg.com/tile/", - "http://online2.map.bdimg.com/tile/", - "http://online3.map.bdimg.com/tile/", - "http://online4.map.bdimg.com/tile/" ]; - if (m) { - b7 = [ x + "it/" ] - } - var aT = new p(); - aT.getTilesUrl = function(cM, cP) { - var cQ = cM.x; - var cN = cM.y; -// var T = "20130712"; -// var cO = "pl"; -// if (this.map.highResolutionEnabled()) { -// cO = "ph" -// } -// var cL = j[Math.abs(cQ + cN) % j.length] + "?qt=tile&x=" -// + (cQ + "").replace(/-/gi, "M") + "&y=" -// + (cN + "").replace(/-/gi, "M") + "&z=" + cP + "&styles=" + cO -// + (a8.browser.ie == 6 ? "&color_dep=32&colors=50" : "") -// + "&udt=" + T; -// if (m) { -// cL = b7[Math.abs(cQ + cN) % b7.length] + "u=x=" + cQ + ";y=" + cN -// + ";z=" + cP + ";v=017;type=web&fm=44" -// } - cL = "static/BMap/maptile/" + cP + "/" + cQ + "/" + cN + ".jpg"; - return cL.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_NORMAL_MAP = new cu("\u5730\u56fe", aT, { - tips : "\u663e\u793a\u666e\u901a\u5730\u56fe" - }); - var bs = new p(); - bs.tileUrls = [ "http://d0.map.baidu.com/resource/mappic/", - "http://d1.map.baidu.com/resource/mappic/", - "http://d2.map.baidu.com/resource/mappic/", - "http://d3.map.baidu.com/resource/mappic/" ]; - bs.getTilesUrl = function(T, cM) { - var cO = T.x; - var cL = T.y; - var cN = Math.pow(2, (20 - cM)) * 256; - cL = Math.round((9998336 - cN * (cL)) / cN) - 1; - url = this.tileUrls[Math.abs(cO + cL) % this.tileUrls.length] - + this.map.currentCity + "/" + this.map.cityCode + "/3/lv" - + (21 - cM) + "/" + cO + "," + cL + ".jpg"; - return url - }; - window.BMAP_PERSPECTIVE_MAP = new cu("\u4e09\u7ef4", bs, { - tips : "\u663e\u793a\u4e09\u7ef4\u5730\u56fe", - minZoom : 15, - maxZoom : 20, - textColor : "white", - projection : new cE() - }); - BMAP_PERSPECTIVE_MAP.getZoomUnits = function(T) { - return Math.pow(2, (20 - T)) - }; - BMAP_PERSPECTIVE_MAP.getCityName = function(T) { - if (!T) { - return "" - } - var cL = cc.cityNames; - for ( var cM in cL) { - if (T.search(cM) > -1) { - return cL[cM] - } - } - return "" - }; - BMAP_PERSPECTIVE_MAP.getCityCode = function(T) { - return ( { - bj : 2, - gz : 1, - sz : 14, - sh : 4 - })[T] - }; - var bQ = new p( { - baseLayer : true - }); - bQ.getTilesUrl = function(cL, cN) { - var cO = cL.x; - var cM = cL.y; - var T = b7[Math.abs(cO + cM) % b7.length] + "u=x=" + cO + ";y=" + cM - + ";z=" + cN + ";v=009;type=sate&fm=46"; - return T.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_SATELLITE_MAP = new cu("\u536b\u661f", bQ, { - tips : "\u663e\u793a\u536b\u661f\u5f71\u50cf", - minZoom : 1, - maxZoom : 19, - textColor : "white" - }); - var o = new p( { - transparentPng : true - }); - o.getTilesUrl = function(cM, cO) { - var cP = cM.x; - var cN = cM.y; - var T = "20130617"; - var cL = j[Math.abs(cP + cN) % j.length] + "?qt=tile&x=" - + (cP + "").replace(/-/gi, "M") + "&y=" - + (cN + "").replace(/-/gi, "M") + "&z=" + cO + "&styles=sl" - + (a8.browser.ie == 6 ? "&color_dep=32&colors=50" : "") - + "&udt=" + T; - return cL.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_HYBRID_MAP = new cu( - "\u6df7\u5408", - [ bQ, o ], - { - tips : "\u663e\u793a\u5e26\u6709\u8857\u9053\u7684\u536b\u661f\u5f71\u50cf", - labelText : "\u8def\u7f51", - minZoom : 1, - maxZoom : 19, - textColor : "white" - }); - window.BMAP_POI_TYPE_NORMAL = 0; - window.BMAP_POI_TYPE_BUSSTOP = 1; - window.BMAP_POI_TYPE_BUSLINE = 2; - window.BMAP_POI_TYPE_SUBSTOP = 3; - window.BMAP_POI_TYPE_SUBLINE = 4; - var H = 0; - var bh = 1; - var an = {}; - function w(cL, T) { - a8.lang.Class.call(this); - this._loc = {}; - this.setLocation(cL); - this._opts = { - renderOptions : { - panel : null, - map : null, - autoViewport : true - }, - onSearchComplete : function() { - }, - onMarkersSet : function() { - }, - onInfoHtmlSet : function() { - }, - onResultsHtmlSet : function() { - }, - onGetBusListComplete : function() { - }, - onGetBusLineComplete : function() { - }, - onBusListHtmlSet : function() { - }, - onBusLineHtmlSet : function() { - }, - onPolylinesSet : function() { - }, - reqFrom : "" - }; - a8.extend(this._opts, T); - if (typeof T != "undefined" && typeof T.renderOptions != "undefined" - && typeof T.renderOptions.autoViewport != "undefined") { - this._opts.renderOptions.autoViewport = T.renderOptions.autoViewport - } else { - this._opts.renderOptions.autoViewport = true - } - this._opts.renderOptions.panel = a8.G(this._opts.renderOptions.panel) - } - a8.inherits(w, a8.lang.Class); - a8.extend(w.prototype, { - getResults : function() { - if (!this._isMultiKey) { - return this._results - } else { - return this._arrResults - } - }, - enableAutoViewport : function() { - this._opts.renderOptions.autoViewport = true - }, - disableAutoViewport : function() { - this._opts.renderOptions.autoViewport = false - }, - setLocation : function(T) { - if (!T) { - return - } - this._loc.src = T - }, - setSearchCompleteCallback : function(T) { - this._opts.onSearchComplete = T || function() { - } - }, - setMarkersSetCallback : function(T) { - this._opts.onMarkersSet = T || function() { - } - }, - setPolylinesSetCallback : function(T) { - this._opts.onPolylinesSet = T || function() { - } - }, - setInfoHtmlSetCallback : function(T) { - this._opts.onInfoHtmlSet = T || function() { - } - }, - setResultsHtmlSetCallback : function(T) { - this._opts.onResultsHtmlSet = T || function() { - } - }, - getStatus : function() { - return this._status - } - }); - var bb = { - REQ_BASE_URL : x, - request : function(cQ, cN, cL, cS, cM) { - return; - var cO = (Math.random() * 100000).toFixed(0); - BMap._rd["_cbk" + cO] = function(cT) { - cL = cL || {}; - cQ && cQ(cT, cL); - delete BMap._rd["_cbk" + cO] - }; - cS = cS || ""; - var cR; - if (cL && cL.useEncodeURI) { - cR = O(cN, encodeURI) - } else { - cR = O(cN, encodeURIComponent) - } - var cP = this, T = cP.REQ_BASE_URL + cS + "?" + cR - + "&ie=utf-8&oue=1&fromproduct=jsapi"; - if (!cM) { - T += "&res=api" - } - T += "&callback=BMap._rd._cbk" + cO; - cx.request(T) - } - }; - BMap._rd = {}; - var S = {}; - S.removeHtml = function(T) { - return T.replace(/<\/?b>/g, "") - }; - S.parseGeoExtReg1 = function(T) { - return T - .replace( - /([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g, - "$1,$2;") - }; - S.parseGeoExtReg2 = function(cL, T) { - var cM = new RegExp( - "(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){" - + T + "}", "ig"); - return cL.replace(cM, "$1") - }; - window.BMAP_STATUS_SUCCESS = 0; - window.BMAP_STATUS_CITY_LIST = 1; - window.BMAP_STATUS_UNKNOWN_LOCATION = 2; - window.BMAP_STATUS_UNKNOWN_ROUTE = 3; - window.BMAP_STATUS_INVALID_KEY = 4; - window.BMAP_STATUS_INVALID_REQUEST = 5; - window.BMAP_STATUS_PERMISSION_DENIED = 6; - window.BMAP_STATUS_SERVICE_UNAVAILABLE = 7; - window.BMAP_STATUS_TIMEOUT = 8; - window.BMAP_ROUTE_TYPE_WALKING = 2; - window.BMAP_ROUTE_TYPE_DRIVING = 3; - var cv = "cur"; - var c = "cen"; - var cj = "s"; - var Q = "con"; - var al = "bd"; - var cb = "nb"; - var F = "bt"; - var bM = "nav"; - var bv = "walk"; - var bA = "gc"; - var d = "rgc"; - var U = "dec"; - var aQ = "bse"; - var e = "nse"; - var G = "bl"; - var bf = "bsl"; - var aG = "bda"; - var ai = "sa"; - var a1 = "nba"; - var ci = "drag"; - var b4 = "ext"; - var s = 2; - var a5 = 4; - var bt = 7; - var X = 11; - var aN = 12; - var bi = 14; - var a2 = 15; - var cy = 18; - var u = 20; - var R = 21; - var ap = 26; - var bE = 28; - var z = 31; - var bq = 35; - var bC = 44; - var ax = 45; - var ae = 46; - var bS = 47; - var a0 = -1; - var ab = 0; - var cq = 1; - var a6 = 2; - var B = 3; - var cI = "http://map.baidu.com/"; - BMap.I = window.Instance = a8.lang.instance; - var a4 = function(cM, cL) { - w.call(this, cM, cL); - cL = cL || {}; - cL.renderOptions = cL.renderOptions || {}; - this.setPageCapacity(cL.pageCapacity); - if (typeof cL.renderOptions.selectFirstResult != "undefined" - && !cL.renderOptions.selectFirstResult) { - this.disableFirstResultSelection() - } else { - this.enableFirstResultSelection() - } - this._overlays = []; - this._arrPois = []; - this._curIndex = -1; - this._queryList = []; - var T = this; - cA.load("local", function() { - T._check() - }) - }; - a8.inherits(a4, w, "LocalSearch"); - a4.DEFAULT_PAGE_CAPACITY = 10; - a4.MIN_PAGE_CAPACITY = 1; - a4.MAX_PAGE_CAPACITY = 100; - a4.DEFAULT_RADIUS = 2000; - a4.MAX_RADIUS = 100000; - a8.extend(a4.prototype, { - search : function(T) { - this._queryList.push( { - method : "search", - arguments : [ T ] - }) - }, - searchInBounds : function(T, cL) { - this._queryList.push( { - method : "searchInBounds", - arguments : [ T, cL ] - }) - }, - searchNearby : function(cM, cL, T) { - this._queryList.push( { - method : "searchNearby", - arguments : [ cM, cL, T ] - }) - }, - clearResults : function() { - delete this._json; - delete this._status; - delete this._results; - delete this._ud; - this._curIndex = -1; - this._setStatus(); - if (this._opts.renderOptions.panel) { - this._opts.renderOptions.panel.innerHTML = "" - } - }, - gotoPage : function() { - }, - enableFirstResultSelection : function() { - this._opts.renderOptions.selectFirstResult = true - }, - disableFirstResultSelection : function() { - this._opts.renderOptions.selectFirstResult = false - }, - setPageCapacity : function(T) { - if (typeof T == "number" && !isNaN(T)) { - this._opts.pageCapacity = T < 1 ? a4.DEFAULT_PAGE_CAPACITY - : (T > a4.MAX_PAGE_CAPACITY ? a4.DEFAULT_PAGE_CAPACITY - : T) - } else { - this._opts.pageCapacity = a4.DEFAULT_PAGE_CAPACITY - } - }, - getPageCapacity : function() { - return this._opts.pageCapacity - }, - toString : function() { - return "LocalSearch" - } - }); - var b5 = function(cL, T) { - w.call(this, cL, T) - }; - a8.inherits(b5, w, "BaseRoute"); - a8.extend(b5.prototype, { - clearResults : function() { - } - }); - window.BMAP_TRANSIT_POLICY_LEAST_TIME = 0; - window.BMAP_TRANSIT_POLICY_LEAST_TRANSFER = 2; - window.BMAP_TRANSIT_POLICY_LEAST_WALKING = 3; - window.BMAP_TRANSIT_POLICY_AVOID_SUBWAYS = 4; - window.BMAP_LINE_TYPE_BUS = 0; - window.BMAP_LINE_TYPE_SUBWAY = 1; - window.BMAP_LINE_TYPE_FERRY = 2; - function aU(cM, cL) { - b5.call(this, cM, cL); - cL = cL || {}; - this.setPolicy(cL.policy); - this.setPageCapacity(cL.pageCapacity); - this.QUERY_TYPE = F; - this.RETURN_TYPE = bi; - this.ROUTE_TYPE = bh; - this._overlays = []; - this._curIndex = -1; - this._queryList = []; - var T = this; - cA.load("route", function() { - T._asyncSearch() - }) - } - aU.MAX_PAGE_CAPACITY = 100; - aU.LINE_TYPE_MAPPING = [ 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 1 ]; - a8.inherits(aU, b5, "TransitRoute"); - a8.extend(aU.prototype, { - setPolicy : function(T) { - if (T >= BMAP_TRANSIT_POLICY_LEAST_TIME - && T <= BMAP_TRANSIT_POLICY_AVOID_SUBWAYS) { - this._opts.policy = T - } else { - this._opts.policy = BMAP_TRANSIT_POLICY_LEAST_TIME - } - }, - _internalSearch : function(cL, T) { - this._queryList.push( { - method : "_internalSearch", - arguments : [ cL, T ] - }) - }, - search : function(cL, T) { - this._queryList.push( { - method : "search", - arguments : [ cL, T ] - }) - }, - setPageCapacity : function(T) { - if (typeof T == "string") { - T = parseInt(T); - if (isNaN(T)) { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY; - return - } - } - if (typeof T != "number") { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY; - return - } - if (T >= 1 && T <= aU.MAX_PAGE_CAPACITY) { - this._opts.pageCapacity = Math.round(T) - } else { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY - } - }, - toString : function() { - return "TransitRoute" - }, - _shortTitle : function(T) { - return T.replace(/\(.*\)/, "") - } - }); - window.BMAP_HIGHLIGHT_STEP = 1; - window.BMAP_HIGHLIGHT_ROUTE = 2; - var bl = function(T, cN) { - b5.call(this, T, cN); - this._overlays = []; - this._curIndex = -1; - this._queryList = []; - var cM = this; - var cL = this._opts.renderOptions; - if (cL.highlightMode != BMAP_HIGHLIGHT_STEP - && cL.highlightMode != BMAP_HIGHLIGHT_ROUTE) { - cL.highlightMode = BMAP_HIGHLIGHT_STEP - } - this._enableDragging = this._opts.renderOptions.enableDragging ? true - : false; - cA.load("route", function() { - cM._asyncSearch() - }) - }; - bl.ROAD_TYPE = [ "", "\u73af\u5c9b", "\u65e0\u5c5e\u6027\u9053\u8def", - "\u4e3b\u8def", "\u9ad8\u901f\u8fde\u63a5\u8def", - "\u4ea4\u53c9\u70b9\u5185\u8def\u6bb5", "\u8fde\u63a5\u9053\u8def", - "\u505c\u8f66\u573a\u5185\u90e8\u9053\u8def", - "\u670d\u52a1\u533a\u5185\u90e8\u9053\u8def", "\u6865", - "\u6b65\u884c\u8857", "\u8f85\u8def", "\u531d\u9053", - "\u5168\u5c01\u95ed\u9053\u8def", - "\u672a\u5b9a\u4e49\u4ea4\u901a\u533a\u57df", - "POI\u8fde\u63a5\u8def", "\u96a7\u9053", "\u6b65\u884c\u9053", - "\u516c\u4ea4\u4e13\u7528\u9053", "\u63d0\u524d\u53f3\u8f6c\u9053" ]; - a8.inherits(bl, b5, "DWRoute"); - a8.extend(bl.prototype, { - search : function(cL, T) { - this._queryList.push( { - method : "search", - arguments : [ cL, T ] - }) - } - }); - window.BMAP_DRIVING_POLICY_LEAST_TIME = 0; - window.BMAP_DRIVING_POLICY_LEAST_DISTANCE = 1; - window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS = 2; - function q(T, cL) { - bl.call(this, T, cL); - cL = cL || {}; - this.setPolicy(cL.policy); - this.QUERY_TYPE = bM; - this.RETURN_TYPE = u; - this.ROUTE_TYPE = BMAP_ROUTE_TYPE_DRIVING - } - a8.inherits(q, bl, "DrivingRoute"); - a8.extend(q.prototype, { - setPolicy : function(T) { - if (T >= BMAP_DRIVING_POLICY_LEAST_TIME - && T <= BMAP_DRIVING_POLICY_AVOID_HIGHWAYS) { - this._opts.policy = T - } else { - this._opts.policy = BMAP_DRIVING_POLICY_LEAST_TIME - } - } - }); - function cD(T, cL) { - bl.call(this, T, cL); - this.QUERY_TYPE = bv; - this.RETURN_TYPE = z; - this.ROUTE_TYPE = BMAP_ROUTE_TYPE_WALKING; - this._enableDragging = false - } - a8.inherits(cD, bl, "WalkingRoute"); - function aX(cL) { - this._opts = {}; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(aX, a8.lang.Class, "Geocoder"); - a8.extend(aX.prototype, { - getPoint : function(T, cM, cL) { - this._queryList.push( { - method : "getPoint", - arguments : [ T, cM, cL ] - }) - }, - getLocation : function(T, cM, cL) { - this._queryList.push( { - method : "getLocation", - arguments : [ T, cM, cL ] - }) - }, - toString : function() { - return "Geocoder" - } - }); - function ak(cL) { - this._opts = {}; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.extend(ak.prototype, { - getCurrentPosition : function(cL, T) { - this._queryList.push( { - method : "getCurrentPosition", - arguments : [ cL, T ] - }) - }, - getStatus : function() { - return this._status - } - }); - function b9(cL) { - this._opts = { - renderOptions : { - map : null - } - }; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(b9, a8.lang.Class, "LocalCity"); - a8.extend(b9.prototype, { - get : function(T) { - this._queryList.push( { - method : "get", - arguments : [ T ] - }) - }, - toString : function() { - return "LocalCity" - } - }); - function V() { - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(V, a8.lang.Class, "Boundary"); - a8.extend(V.prototype, { - get : function(cL, T) { - this._queryList.push( { - method : "get", - arguments : [ cL, T ] - }) - }, - toString : function() { - return "Boundary" - } - }); - function bm(cM, cL) { - w.call(this, cM, cL); - this.QUERY_TYPE_BUSLIST = G; - this.RETURN_TYPE_BUSLIST = a2; - this.QUERY_TYPE_BUSLINE = bf; - this.RETURN_TYPE_BUSLINE = cy; - this._queryList = []; - var T = this; - cA.load("buslinesearch", function() { - T._asyncSearch() - }) - } - bm._iconOpen = cc.imgPath + "iw_plus.gif"; - bm._iconClose = cc.imgPath + "iw_minus.gif"; - bm._stopUrl = cc.imgPath + "stop_icon.png"; - a8.inherits(bm, w); - a8.extend(bm.prototype, { - getBusList : function(T) { - this._queryList.push( { - method : "getBusList", - arguments : [ T ] - }) - }, - getBusLine : function(T) { - this._queryList.push( { - method : "getBusLine", - arguments : [ T ] - }) - }, - setGetBusListCompleteCallback : function(T) { - this._opts.onGetBusListComplete = T || function() { - } - }, - setGetBusLineCompleteCallback : function(T) { - this._opts.onGetBusLineComplete = T || function() { - } - }, - setBusListHtmlSetCallback : function(T) { - this._opts.onBusListHtmlSet = T || function() { - } - }, - setBusLineHtmlSetCallback : function(T) { - this._opts.onBusLineHtmlSet = T || function() { - } - }, - setPolylinesSetCallback : function(T) { - this._opts.onPolylinesSet = T || function() { - } - } - }); - function by(cL) { - w.call(this, cL); - cL = cL || {}; - this._options = { - input : null, - types : [], - onSearchComplete : function() { - } - }; - a8.extend(this._options, cL); - this._loc.src = cL.location || "\u5168\u56fd"; - this._word = ""; - this._show = false; - this._suggestion = null; - this._inputValue = ""; - this._initialize(); - _addStat(5011); - var T = this; - cA.load("autocomplete", function() { - T._asyncSearch() - }) - } - a8.inherits(by, w, "Autocomplete"); - a8.extend(by.prototype, { - _initialize : function() { - }, - show : function() { - this._show = true - }, - hide : function() { - this._show = false - }, - setTypes : function(T) { - this._options.types = T - }, - setLocation : function(T) { - this._loc.src = T - }, - search : function(T) { - this._word = T - }, - setInputValue : function(T) { - this._inputValue = T - } - }); - function aj(T, cL) { - window.BMap[T] = cL - } - aj("Map", bz); - aj("Hotspot", cm); - aj("MapType", cu); - aj("Point", cd); - aj("Pixel", bu); - aj("Size", aH); - aj("Bounds", bN); - aj("TileLayer", p); - aj("Projection", bd); - aj("MercatorProjection", ba); - aj("PerspectiveProjection", cE); - aj("Copyright", av); - aj("Overlay", bG); - aj("Label", ag); - aj("Marker", ad); - aj("Icon", M); - aj("Polyline", f); - aj("Polygon", cn); - aj("InfoWindow", bP); - aj("Circle", a); - aj("Control", cp); - aj("NavigationControl", L); - aj("OverviewMapControl", cK); - aj("CopyrightControl", am); - aj("ScaleControl", bK); - aj("MapTypeControl", aL); - aj("TrafficLayer", aC); - aj("ContextMenu", cz); - aj("MenuItem", be); - aj("LocalSearch", a4); - aj("TransitRoute", aU); - aj("DrivingRoute", q); - aj("WalkingRoute", cD); - aj("Autocomplete", by); - aj("Geocoder", aX); - aj("LocalCity", b9); - aj("Geolocation", ak); - aj("BusLineSearch", bm); - aj("Boundary", V); - window.BMap.apiLoad(); -})(); diff --git a/static/BMap/js/bmap_offline_api_v3.0_min.js b/static/BMap/js/bmap_offline_api_v3.0_min.js deleted file mode 100644 index 878b4e9..0000000 --- a/static/BMap/js/bmap_offline_api_v3.0_min.js +++ /dev/null @@ -1,9809 +0,0 @@ -window.TILE_VERSION = { - "ditu": { - "normal": { - "version": "088", - "updateDate": "20180829" - }, - "satellite": { - "version": "009", - "updateDate": "20180829" - }, - "normalTraffic": { - "version": "081", - "updateDate": "20180829" - }, - "satelliteTraffic": { - "version": "083", - "updateDate": "20180829" - }, - "mapJS": { - "version": "104", - "updateDate": "20180829" - }, - "satelliteStreet": { - "version": "083", - "updateDate": "20180829" - }, - "panoClick": { - "version": "1033", - "updateDate": "20180816" - }, - "panoUdt": { - "version": "20180816", - "updateDate": "20180816" - }, - "panoSwfAPI": { - "version": "20150123", - "updateDate": "20150123" - }, - "panoSwfPlace": { - "version": "20141112", - "updateDate": "20141112" - }, - "earthVector": { - "version": "001", - "updateDate": "20180829" - } - }, - "webapp": { - "high_normal": { - "version": "001", - "updateDate": "20180829" - }, - "lower_normal": { - "version": "002", - "updateDate": "20180829" - } - }, - "api_for_mobile": { - "vector": { - "version": "002", - "updateDate": "20180829" - }, - "vectorIcon": { - "version": "002", - "updateDate": "20180829" - } - } -}; -window.BMAP_AUTHENTIC_KEY = ""; -var bmapcfg = { - 'imgext' : '.jpg', //瓦片图的后缀 ------ 根据需要修改,一般是 .png .jpg - 'tiles_dir' : 'static/BMap/maptile/', //普通瓦片图的地址,为空默认在 offlinemap/tiles/ 目录 - 'tiles_hybrid': '', //卫星瓦片图的地址,为空默认在 offlinemap/tiles_hybrid/ 目录 - 'tiles_self' : '', //自定义图层的地址,为空默认在 offlinemap/tiles_self/ 目录 - 'home':'static/BMap/' -}; -(function() { - function aa(a) { - throw a; - } - var l = void 0 - , q = !0 - , s = null - , t = !1; - function u() { - return function() {} - } - function ba(a) { - return function(b) { - this[a] = b - } - } - function w(a) { - return function() { - return this[a] - } - } - function ca(a) { - return function() { - return a - } - } - var da, ea = []; - function ga(a) { - return function() { - return ea[a].apply(this, arguments) - } - } - function ha(a, b) { - return ea[a] = b - } - var ia, z = ia = z || { - version: "1.3.4" - }; - z.aa = "$BAIDU$"; - window[z.aa] = window[z.aa] || {}; - z.object = z.object || {}; - z.extend = z.object.extend = function(a, b) { - for (var c in b) - b.hasOwnProperty(c) && (a[c] = b[c]); - return a - } - ; - z.D = z.D || {}; - z.D.$ = function(a) { - return "string" == typeof a || a instanceof String ? document.getElementById(a) : a && a.nodeName && (1 == a.nodeType || 9 == a.nodeType) ? a : s - } - ; - z.$ = z.Fc = z.D.$; - z.D.U = function(a) { - a = z.D.$(a); - if (a === s) - return a; - a.style.display = "none"; - return a - } - ; - z.U = z.D.U; - z.lang = z.lang || {}; - z.lang.wg = function(a) { - return "[object String]" == Object.prototype.toString.call(a) - } - ; - z.wg = z.lang.wg; - z.D.Oj = function(a) { - return z.lang.wg(a) ? document.getElementById(a) : a - } - ; - z.Oj = z.D.Oj; - z.D.getElementsByClassName = function(a, b) { - var c; - if (a.getElementsByClassName) - c = a.getElementsByClassName(b); - else { - var e = a; - e == s && (e = document); - c = []; - var e = e.getElementsByTagName("*"), f = e.length, g = RegExp("(^|\\s)" + b + "(\\s|$)"), i, k; - for (k = i = 0; i < f; i++) - g.test(e[i].className) && (c[k] = e[i], - k++) - } - return c - } - ; - z.getElementsByClassName = z.D.getElementsByClassName; - z.D.contains = function(a, b) { - var c = z.D.Oj - , a = c(a) - , b = c(b); - return a.contains ? a != b && a.contains(b) : !!(a.compareDocumentPosition(b) & 16) - } - ; - z.ca = z.ca || {}; - /msie (\d+\.\d)/i.test(navigator.userAgent) && (z.ca.ia = z.ia = document.documentMode || +RegExp.$1); - var ja = { - cellpadding: "cellPadding", - cellspacing: "cellSpacing", - colspan: "colSpan", - rowspan: "rowSpan", - valign: "vAlign", - usemap: "useMap", - frameborder: "frameBorder" - }; - 8 > z.ca.ia ? (ja["for"] = "htmlFor", - ja["class"] = "className") : (ja.htmlFor = "for", - ja.className = "class"); - z.D.RG = ja; - z.D.BF = function(a, b, c) { - a = z.D.$(a); - if (a === s) - return a; - if ("style" == b) - a.style.cssText = c; - else { - b = z.D.RG[b] || b; - a.setAttribute(b, c) - } - return a - } - ; - z.BF = z.D.BF; - z.D.CF = function(a, b) { - a = z.D.$(a); - if (a === s) - return a; - for (var c in b) - z.D.BF(a, c, b[c]); - return a - } - ; - z.CF = z.D.CF; - z.Wk = z.Wk || {}; - (function() { - var a = RegExp("(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+$)", "g"); - z.Wk.trim = function(b) { - return ("" + b).replace(a, "") - } - } - )(); - z.trim = z.Wk.trim; - z.Wk.Wo = function(a, b) { - var a = "" + a - , c = Array.prototype.slice.call(arguments, 1) - , e = Object.prototype.toString; - if (c.length) { - c = c.length == 1 ? b !== s && /\[object Array\]|\[object Object\]/.test(e.call(b)) ? b : c : c; - return a.replace(/#\{(.+?)\}/g, function(a, b) { - var i = c[b]; - "[object Function]" == e.call(i) && (i = i(b)); - return "undefined" == typeof i ? "" : i - }) - } - return a - } - ; - z.Wo = z.Wk.Wo; - z.D.Pb = function(a, b) { - a = z.D.$(a); - if (a === s) - return a; - for (var c = a.className.split(/\s+/), e = b.split(/\s+/), f, g = e.length, i, k = 0; k < g; ++k) { - i = 0; - for (f = c.length; i < f; ++i) - if (c[i] == e[k]) { - c.splice(i, 1); - break - } - } - a.className = c.join(" "); - return a - } - ; - z.Pb = z.D.Pb; - z.D.Vx = function(a, b, c) { - a = z.D.$(a); - if (a === s) - return a; - var e; - if (a.insertAdjacentHTML) - a.insertAdjacentHTML(b, c); - else { - e = a.ownerDocument.createRange(); - b = b.toUpperCase(); - if (b == "AFTERBEGIN" || b == "BEFOREEND") { - e.selectNodeContents(a); - e.collapse(b == "AFTERBEGIN") - } else { - b = b == "BEFOREBEGIN"; - e[b ? "setStartBefore" : "setEndAfter"](a); - e.collapse(b) - } - e.insertNode(e.createContextualFragment(c)) - } - return a - } - ; - z.Vx = z.D.Vx; - z.D.show = function(a) { - a = z.D.$(a); - if (a === s) - return a; - a.style.display = ""; - return a - } - ; - z.show = z.D.show; - z.D.QD = function(a) { - a = z.D.$(a); - return a === s ? a : a.nodeType == 9 ? a : a.ownerDocument || a.document - } - ; - z.D.Ua = function(a, b) { - a = z.D.$(a); - if (a === s) - return a; - for (var c = b.split(/\s+/), e = a.className, f = " " + e + " ", g = 0, i = c.length; g < i; g++) - f.indexOf(" " + c[g] + " ") < 0 && (e = e + (" " + c[g])); - a.className = e; - return a - } - ; - z.Ua = z.D.Ua; - z.D.PB = z.D.PB || {}; - z.D.Ol = z.D.Ol || []; - z.D.Ol.filter = function(a, b, c) { - for (var e = 0, f = z.D.Ol, g; g = f[e]; e++) - if (g = g[c]) - b = g(a, b); - return b - } - ; - z.Wk.RO = function(a) { - return a.indexOf("-") < 0 && a.indexOf("_") < 0 ? a : a.replace(/[-_][^-_]/g, function(a) { - return a.charAt(1).toUpperCase() - }) - } - ; - z.D.m0 = function(a) { - z.D.it(a, "expand") ? z.D.Pb(a, "expand") : z.D.Ua(a, "expand") - } - ; - z.D.it = function(a) { - if (arguments.length <= 0 || typeof a === "function") - return this; - if (this.size() <= 0) - return t; - var a = a.replace(/^\s+/g, "").replace(/\s+$/g, "").replace(/\s+/g, " "), b = a.split(" "), c; - z.forEach(this, function(a) { - for (var a = a.className, f = 0; f < b.length; f++) - if (!~(" " + a + " ").indexOf(" " + b[f] + " ")) { - c = t; - return - } - c !== t && (c = q) - }); - return c - } - ; - z.D.oj = function(a, b) { - var c = z.D - , a = c.$(a); - if (a === s) - return a; - var b = z.Wk.RO(b) - , e = a.style[b]; - if (!e) - var f = c.PB[b] - , e = a.currentStyle || (z.ca.ia ? a.style : getComputedStyle(a, s)) - , e = f && f.get ? f.get(a, e) : e[f || b]; - if (f = c.Ol) - e = f.filter(b, e, "get"); - return e - } - ; - z.oj = z.D.oj; - /opera\/(\d+\.\d)/i.test(navigator.userAgent) && (z.ca.opera = +RegExp.$1); - z.ca.HM = /webkit/i.test(navigator.userAgent); - z.ca.VY = /gecko/i.test(navigator.userAgent) && !/like gecko/i.test(navigator.userAgent); - z.ca.DE = "CSS1Compat" == document.compatMode; - z.D.ga = function(a) { - a = z.D.$(a); - if (a === s) - return a; - var b = z.D.QD(a) - , c = z.ca - , e = z.D.oj; - c.VY > 0 && b.getBoxObjectFor && e(a, "position"); - var f = { - left: 0, - top: 0 - }, g; - if (a == (c.ia && !c.DE ? b.body : b.documentElement)) - return f; - if (a.getBoundingClientRect) { - a = a.getBoundingClientRect(); - f.left = Math.floor(a.left) + Math.max(b.documentElement.scrollLeft, b.body.scrollLeft); - f.top = Math.floor(a.top) + Math.max(b.documentElement.scrollTop, b.body.scrollTop); - f.left = f.left - b.documentElement.clientLeft; - f.top = f.top - b.documentElement.clientTop; - a = b.body; - b = parseInt(e(a, "borderLeftWidth")); - e = parseInt(e(a, "borderTopWidth")); - if (c.ia && !c.DE) { - f.left = f.left - (isNaN(b) ? 2 : b); - f.top = f.top - (isNaN(e) ? 2 : e) - } - } else { - g = a; - do { - f.left = f.left + g.offsetLeft; - f.top = f.top + g.offsetTop; - if (c.HM > 0 && e(g, "position") == "fixed") { - f.left = f.left + b.body.scrollLeft; - f.top = f.top + b.body.scrollTop; - break - } - g = g.offsetParent - } while (g && g != a);if (c.opera > 0 || c.HM > 0 && e(a, "position") == "absolute") - f.top = f.top - b.body.offsetTop; - for (g = a.offsetParent; g && g != b.body; ) { - f.left = f.left - g.scrollLeft; - if (!c.opera || g.tagName != "TR") - f.top = f.top - g.scrollTop; - g = g.offsetParent - } - } - return f - } - ; - /firefox\/(\d+\.\d)/i.test(navigator.userAgent) && (z.ca.Te = +RegExp.$1); - /BIDUBrowser/i.test(navigator.userAgent) && (z.ca.n2 = q); - var ka = navigator.userAgent; - /(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(ka) && !/chrome/i.test(ka) && (z.ca.Iy = +(RegExp.$1 || RegExp.$2)); - /chrome\/(\d+\.\d)/i.test(navigator.userAgent) && (z.ca.Qw = +RegExp.$1); - z.mc = z.mc || {}; - z.mc.Fb = function(a, b) { - var c, e, f = a.length; - if ("function" == typeof b) - for (e = 0; e < f; e++) { - c = a[e]; - c = b.call(a, c, e); - if (c === t) - break - } - return a - } - ; - z.Fb = z.mc.Fb; - z.lang.aa = function() { - return "TANGRAM__" + (window[z.aa]._counter++).toString(36) - } - ; - window[z.aa]._counter = window[z.aa]._counter || 1; - window[z.aa]._instances = window[z.aa]._instances || {}; - z.lang.wt = function(a) { - return "[object Function]" == Object.prototype.toString.call(a) - } - ; - z.lang.Ca = function(a) { - this.aa = a || z.lang.aa(); - window[z.aa]._instances[this.aa] = this - } - ; - window[z.aa]._instances = window[z.aa]._instances || {}; - z.lang.Ca.prototype.ci = ga(0); - z.lang.Ca.prototype.toString = function() { - return "[object " + (this.UQ || "Object") + "]" - } - ; - z.lang.Ju = function(a, b) { - this.type = a; - this.returnValue = q; - this.target = b || s; - this.currentTarget = s - } - ; - z.lang.Ca.prototype.addEventListener = function(a, b, c) { - if (z.lang.wt(b)) { - !b.fl && (b.fl = {}); - !this.Ci && (this.Ci = {}); - var e = this.Ci, f; - if (typeof c == "string" && c) { - /[^\w\-]/.test(c) && aa("nonstandard key:" + c); - f = b.Nx = c - } - a.indexOf("on") != 0 && (a = "on" + a); - typeof e[a] != "object" && (e[a] = {}); - typeof b.fl[a] != "object" && (b.fl[a] = {}); - f = f || z.lang.aa(); - b.fl[a].Nx = f; - e[a][f] = b - } - } - ; - z.lang.Ca.prototype.removeEventListener = function(a, b) { - a.indexOf("on") != 0 && (a = "on" + a); - if (z.lang.wt(b)) { - if (!b.fl || !b.fl[a]) - return; - b = b.fl[a].Nx - } else if (!z.lang.wg(b)) - return; - !this.Ci && (this.Ci = {}); - var c = this.Ci; - c[a] && c[a][b] && delete c[a][b] - } - ; - z.lang.Ca.prototype.dispatchEvent = function(a, b) { - z.lang.wg(a) && (a = new z.lang.Ju(a)); - !this.Ci && (this.Ci = {}); - var b = b || {}, c; - for (c in b) - a[c] = b[c]; - var e = this.Ci - , f = a.type; - a.target = a.target || this; - a.currentTarget = this; - f.indexOf("on") != 0 && (f = "on" + f); - z.lang.wt(this[f]) && this[f].apply(this, arguments); - if (typeof e[f] == "object") - for (c in e[f]) - e[f][c].apply(this, arguments); - return a.returnValue - } - ; - z.lang.ta = function(a, b, c) { - var e, f, g = a.prototype; - f = new Function; - f.prototype = b.prototype; - f = a.prototype = new f; - for (e in g) - f[e] = g[e]; - a.prototype.constructor = a; - a.b0 = b.prototype; - if ("string" == typeof c) - f.UQ = c - } - ; - z.ta = z.lang.ta; - z.lang.Nc = function(a) { - return window[z.aa]._instances[a] || s - } - ; - z.platform = z.platform || {}; - z.platform.AM = /macintosh/i.test(navigator.userAgent); - z.platform.h4 = /MicroMessenger/i.test(navigator.userAgent); - z.platform.IM = /windows/i.test(navigator.userAgent); - z.platform.cZ = /x11/i.test(navigator.userAgent); - z.platform.Jm = /android/i.test(navigator.userAgent); - /android (\d+\.\d)/i.test(navigator.userAgent) && (z.platform.dK = z.dK = RegExp.$1); - z.platform.XY = /ipad/i.test(navigator.userAgent); - z.platform.zE = /iphone/i.test(navigator.userAgent); - function la(a, b) { - a.domEvent = b = window.event || b; - a.clientX = b.clientX || b.pageX; - a.clientY = b.clientY || b.pageY; - a.offsetX = b.offsetX || b.layerX; - a.offsetY = b.offsetY || b.layerY; - a.screenX = b.screenX; - a.screenY = b.screenY; - a.ctrlKey = b.ctrlKey || b.metaKey; - a.shiftKey = b.shiftKey; - a.altKey = b.altKey; - if (b.touches) { - a.touches = []; - for (var c = 0; c < b.touches.length; c++) - a.touches.push({ - clientX: b.touches[c].clientX, - clientY: b.touches[c].clientY, - screenX: b.touches[c].screenX, - screenY: b.touches[c].screenY, - pageX: b.touches[c].pageX, - pageY: b.touches[c].pageY, - target: b.touches[c].target, - identifier: b.touches[c].identifier - }) - } - if (b.changedTouches) { - a.changedTouches = []; - for (c = 0; c < b.changedTouches.length; c++) - a.changedTouches.push({ - clientX: b.changedTouches[c].clientX, - clientY: b.changedTouches[c].clientY, - screenX: b.changedTouches[c].screenX, - screenY: b.changedTouches[c].screenY, - pageX: b.changedTouches[c].pageX, - pageY: b.changedTouches[c].pageY, - target: b.changedTouches[c].target, - identifier: b.changedTouches[c].identifier - }) - } - if (b.targetTouches) { - a.targetTouches = []; - for (c = 0; c < b.targetTouches.length; c++) - a.targetTouches.push({ - clientX: b.targetTouches[c].clientX, - clientY: b.targetTouches[c].clientY, - screenX: b.targetTouches[c].screenX, - screenY: b.targetTouches[c].screenY, - pageX: b.targetTouches[c].pageX, - pageY: b.targetTouches[c].pageY, - target: b.targetTouches[c].target, - identifier: b.targetTouches[c].identifier - }) - } - a.rotation = b.rotation; - a.scale = b.scale; - return a - } - z.lang.hx = function(a) { - var b = window[z.aa]; - b.eT && delete b.eT[a] - } - ; - z.event = {}; - z.M = z.event.M = function(a, b, c) { - if (!(a = z.$(a))) - return a; - b = b.replace(/^on/, ""); - a.addEventListener ? a.addEventListener(b, c, t) : a.attachEvent && a.attachEvent("on" + b, c); - return a - } - ; - z.ed = z.event.ed = function(a, b, c) { - if (!(a = z.$(a))) - return a; - b = b.replace(/^on/, ""); - a.removeEventListener ? a.removeEventListener(b, c, t) : a.detachEvent && a.detachEvent("on" + b, c); - return a - } - ; - z.D.it = function(a, b) { - if (!a || !a.className || typeof a.className != "string") - return t; - var c = -1; - try { - c = a.className == b || a.className.search(RegExp("(\\s|^)" + b + "(\\s|$)")) - } catch (e) { - return t - } - return c > -1 - } - ; - z.iL = function() { - function a(a) { - document.addEventListener && (this.element = a, - this.lL = this.Dk ? "touchstart" : "mousedown", - this.xD = this.Dk ? "touchmove" : "mousemove", - this.wD = this.Dk ? "touchend" : "mouseup", - this.oh = t, - this.mu = this.lu = 0, - this.element.addEventListener(this.lL, this, t), - ia.M(this.element, "mousedown", u()), - this.handleEvent(s)) - } - a.prototype = { - Dk: "ontouchstart"in window || "createTouch"in document, - start: function(a) { - ma(a); - this.oh = t; - this.lu = this.Dk ? a.touches[0].clientX : a.clientX; - this.mu = this.Dk ? a.touches[0].clientY : a.clientY; - this.element.addEventListener(this.xD, this, t); - this.element.addEventListener(this.wD, this, t) - }, - move: function(a) { - na(a); - var c = this.Dk ? a.touches[0].clientY : a.clientY; - if (10 < Math.abs((this.Dk ? a.touches[0].clientX : a.clientX) - this.lu) || 10 < Math.abs(c - this.mu)) - this.oh = q - }, - end: function(a) { - na(a); - this.oh || (a = document.createEvent("Event"), - a.initEvent("tap", t, q), - this.element.dispatchEvent(a)); - this.element.removeEventListener(this.xD, this, t); - this.element.removeEventListener(this.wD, this, t) - }, - handleEvent: function(a) { - if (a) - switch (a.type) { - case this.lL: - this.start(a); - break; - case this.xD: - this.move(a); - break; - case this.wD: - this.end(a) - } - } - }; - return function(b) { - return new a(b) - } - }(); - var B = window.BMap || {}; - B.version = "3.0"; - B.gV = 0.34 > Math.random(); - 0 <= B.version.indexOf("#") && (B.version = "3.0"); - B.Fr = []; - B.Ye = function(a) { - this.Fr.push(a) - } - ; - B.ur = []; - B.Tm = function(a) { - this.ur.push(a) - } - ; - B.vV = B.apiLoad || u(); - B.Q0 = B.verify || function() { - B.version && B.version >= 1.5 && oa(B.Wc + "?qt=verify&ak=" + qa, function(a) { - if (a && a.error !== 0) { - if (typeof map !== "undefined") { - map.La().innerHTML = ""; - map.Ci = {} - } - B = s; - var b = "\u767e\u5ea6\u672a\u6388\u6743\u4f7f\u7528\u5730\u56feAPI\uff0c\u53ef\u80fd\u662f\u56e0\u4e3a\u60a8\u63d0\u4f9b\u7684\u5bc6\u94a5\u4e0d\u662f\u6709\u6548\u7684\u767e\u5ea6LBS\u5f00\u653e\u5e73\u53f0\u5bc6\u94a5\uff0c\u6216\u6b64\u5bc6\u94a5\u672a\u5bf9\u672c\u5e94\u7528\u7684\u767e\u5ea6\u5730\u56feJavaScriptAPI\u6388\u6743\u3002\u60a8\u53ef\u4ee5\u8bbf\u95ee\u5982\u4e0b\u7f51\u5740\u4e86\u89e3\u5982\u4f55\u83b7\u53d6\u6709\u6548\u7684\u5bc6\u94a5\uff1ahttp://lbsyun.baidu.com/apiconsole/key#\u3002"; - switch (a.error) { - case 101: - b = "\u5f00\u53d1\u8005\u7981\u7528\u4e86\u8be5ak\u7684jsapi\u670d\u52a1\u6743\u9650\u3002\u60a8\u53ef\u4ee5\u8bbf\u95ee\u5982\u4e0b\u7f51\u5740\u4e86\u89e3\u5982\u4f55\u83b7\u53d6\u6709\u6548\u7684\u5bc6\u94a5\uff1ahttp://lbsyun.baidu.com/apiconsole/key#\u3002"; - break; - case 102: - b = "\u5f00\u53d1\u8005Referer\u4e0d\u6b63\u786e\u3002\u60a8\u53ef\u4ee5\u8bbf\u95ee\u5982\u4e0b\u7f51\u5740\u4e86\u89e3\u5982\u4f55\u83b7\u53d6\u6709\u6548\u7684\u5bc6\u94a5\uff1ahttp://lbsyun.baidu.com/apiconsole/key#\u3002" - } - alert(b) - } - }) - } - ; - var qa = window.BMAP_AUTHENTIC_KEY; - window.BMAP_AUTHENTIC_KEY = s; - var ra = window.BMap_loadScriptTime - , sa = (new Date).getTime() - , ta = s - , ua = q - , va = 5042 - , xa = 5002 - , ya = 5003 - , za = "load_mapclick" - , Aa = 5038 - , Ba = 5041 - , Ca = 5047 - , Da = 5036 - , Ea = 5039 - , Fa = 5037 - , Ga = 5040 - , Ha = 5011 - , Ia = 7E3; - var Ja = 0; - function Ka(a, b) { - if (a = z.$(a)) { - var c = this; - z.lang.Ca.call(c); - b = b || {}; - c.K = { - tC: 200, - Wb: q, - px: t, - nD: q, - To: q, - Uo: b.enableWheelZoom || t, - gL: q, - pD: q, - Ns: q, - nx: q, - tD: q, - Ro: b.enable3DBuilding || t, - Ic: 25, - b1: 240, - iV: 450, - Vb: G.Vb, - Hd: G.Hd, - Yx: !!b.Yx, - gc: Math.round(b.minZoom) || 1, - Yb: Math.round(b.maxZoom) || 19, - Hb: b.mapType || La, - e5: t, - cL: b.drawer || Ja, - ox: q, - lx: 500, - aX: b.enableHighResolution !== t, - fj: b.enableMapClick !== t, - devicePixelRatio: b.devicePixelRatio || window.devicePixelRatio || 1, - fG: 99, - ye: b.mapStyle || s, - jZ: b.logoControl === t ? t : q, - DV: [], - Kw: b.beforeClickIcon || s, - Ms: t, - qN: q - }; - c.K.ye && (this.LY(c.K.ye.controls), - this.sM(c.K.ye.geotableId)); - c.K.ye && c.K.ye.styleId && c.O3(c.K.ye.styleId); - c.K.fm = { - dark: { - backColor: "#2D2D2D", - textColor: "#bfbfbf", - iconUrl: "dicons" - }, - normal: { - backColor: "#F3F1EC", - textColor: "#c61b1b", - iconUrl: "icons" - }, - light: { - backColor: "#EBF8FC", - textColor: "#017fb4", - iconUrl: "licons" - } - }; - b.enableAutoResize && (c.K.nx = b.enableAutoResize); - b.enableStreetEntrance === t && (c.K.tD = b.enableStreetEntrance); - b.enableDeepZoom === t && (c.K.gL = b.enableDeepZoom); - var e = c.K.DV; - if (H()) - for (var f = 0, g = e.length; f < g; f++) - if (z.ca[e[f]]) { - c.K.devicePixelRatio = 1; - break - } - e = -1 < navigator.userAgent.toLowerCase().indexOf("android"); - f = -1 < navigator.userAgent.toLowerCase().indexOf("mqqbrowser"); - if (-1 < navigator.userAgent.toLowerCase().indexOf("UCBrowser") || e && f) - c.K.fG = 99; - c.Wa = a; - c.IB(a); - a.unselectable = "on"; - a.innerHTML = ""; - a.appendChild(c.va()); - b.size && this.Ce(b.size); - e = c.cb(); - c.width = e.width; - c.height = e.height; - c.offsetX = 0; - c.offsetY = 0; - c.platform = a.firstChild; - c.ze = c.platform.firstChild; - c.ze.style.width = c.width + "px"; - c.ze.style.height = c.height + "px"; - c.Yd = {}; - c.re = new J(0,0); - c.fc = new J(0,0); - c.Oa = 3; - c.Oc = 0; - c.LC = s; - c.KC = s; - c.Ub = ""; - c.Rw = ""; - c.Jh = {}; - c.Jh.custom = {}; - c.Sa = 0; - b.useWebGL === t && Na(t); - c.P = new Oa(a,{ - of: "api", - jT: q - }); - c.P.U(); - c.P.GF(c); - b = b || {}; - e = c.Hb = c.K.Hb; - c.cd = e.wm(); - e === Qa && Ra(xa); - e === Sa && Ra(ya); - e = c.K; - e.hP = Math.round(b.minZoom); - e.gP = Math.round(b.maxZoom); - c.bv(); - c.R = { - Jc: t, - nc: 0, - Bt: 0, - MM: 0, - l4: 0, - lC: t, - pF: -1, - Qe: [] - }; - c.platform.style.cursor = c.K.Vb; - for (f = 0; f < B.Fr.length; f++) - B.Fr[f](c); - c.R.pF = f; - c.ba(); - K.load("map", function() { - c.ib() - }); - c.K.fj && (setTimeout(function() { - Ra(za) - }, 1E3), - K.load("mapclick", function() { - window.MPC_Mgr = window.MPC_Mgr || {}; - window.MPC_Mgr[c.aa] = new Ta(c) - }, q)); - Ua() && K.load("oppc", function() { - c.Dz() - }); - H() && K.load("opmb", function() { - c.Dz() - }); - a = s; - c.WB = [] - } - } - z.lang.ta(Ka, z.lang.Ca, "Map"); - z.extend(Ka.prototype, { - va: function() { - var a = L("div") - , b = a.style; - b.overflow = "visible"; - b.position = "absolute"; - b.zIndex = "0"; - b.top = b.left = "0px"; - var b = L("div", { - "class": "BMap_mask" - }) - , c = b.style; - c.position = "absolute"; - c.top = c.left = "0px"; - c.zIndex = "9"; - c.overflow = "hidden"; - c.WebkitUserSelect = "none"; - a.appendChild(b); - return a - }, - IB: function(a) { - var b = a.style; - b.overflow = "hidden"; - "absolute" !== Va(a).position && (b.position = "relative", - b.zIndex = 0); - b.backgroundColor = "#F3F1EC"; - b.color = "#000"; - b.textAlign = "left" - }, - ba: function() { - var a = this; - a.as = function() { - var b = a.cb(); - if (a.width !== b.width || a.height !== b.height) { - var c = new O(a.width,a.height) - , e = new P("onbeforeresize"); - e.size = c; - a.dispatchEvent(e); - a.ik((b.width - a.width) / 2, (b.height - a.height) / 2); - a.ze.style.width = (a.width = b.width) + "px"; - a.ze.style.height = (a.height = b.height) + "px"; - c = new P("onresize"); - c.size = b; - a.dispatchEvent(c) - } - } - ; - a.K.nx && (a.R.es = setInterval(a.as, 80)) - }, - ik: function(a, b, c, e) { - var f = this.oa().dc(this.fa()) - , g = this.cd - , i = q; - c && J.yM(c) && (this.re = new J(c.lng,c.lat), - i = t); - if (c = c && e ? g.vj(c, this.Ub) : this.fc) - if (this.fc = new J(c.lng + a * f,c.lat - b * f), - (a = g.nh(this.fc, this.Ub)) && i) - this.re = a - }, - Gg: function(a, b) { - if (Wa(a) && (this.bv(), - this.dispatchEvent(new P("onzoomstart")), - a = this.Yn(a).zoom, - a !== this.Oa)) { - this.Oc = this.Oa; - this.Oa = a; - var c; - b ? c = b : this.hh() && (c = this.hh().ga()); - c && (c = this.$b(c, this.Oc), - this.ik(this.width / 2 - c.x, this.height / 2 - c.y, this.xb(c, this.Oc), q)); - this.dispatchEvent(new P("onzoomstartcode")) - } - }, - Qc: function(a) { - this.Gg(a) - }, - kG: function(a) { - this.Gg(this.Oa + 1, a) - }, - lG: function(a) { - this.Gg(this.Oa - 1, a) - }, - qi: function(a) { - a instanceof J && (this.fc = this.cd.vj(a, this.Ub), - this.re = J.yM(a) ? new J(a.lng,a.lat) : this.cd.nh(this.fc, this.Ub)) - }, - Ag: function(a, b) { - a = Math.round(a) || 0; - b = Math.round(b) || 0; - this.ik(-a, -b) - }, - Aw: function(a) { - a && Xa(a.He) && (a.He(this), - this.dispatchEvent(new P("onaddcontrol",a))) - }, - VN: function(a) { - a && Xa(a.remove) && (a.remove(), - this.dispatchEvent(new P("onremovecontrol",a))) - }, - yo: function(a) { - a && Xa(a.na) && (a.na(this), - this.dispatchEvent(new P("onaddcontextmenu",a))) - }, - Cp: function(a) { - a && Xa(a.remove) && (this.dispatchEvent(new P("onremovecontextmenu",a)), - a.remove()) - }, - Ga: function(a) { - a && Xa(a.He) && (a.He(this), - this.dispatchEvent(new P("onaddoverlay",a))) - }, - Qb: function(a) { - a && Xa(a.remove) && (a.remove(), - this.dispatchEvent(new P("onremoveoverlay",a))) - }, - yK: function() { - this.dispatchEvent(new P("onclearoverlays")) - }, - Oe: function(a) { - a && this.dispatchEvent(new P("onaddtilelayer",a)) - }, - Yf: function(a) { - a && this.dispatchEvent(new P("onremovetilelayer",a)) - }, - Dg: function(a) { - if (this.Hb !== a) { - var b = new P("onsetmaptype"); - b.V4 = this.Hb; - this.Hb = this.K.Hb = a; - this.cd = this.Hb.wm(); - this.ik(0, 0, this.Ka(), q); - this.bv(); - var c = this.Yn(this.fa()).zoom; - this.Gg(c); - this.dispatchEvent(b); - b = new P("onmaptypechange"); - b.Oa = c; - b.Hb = a; - this.dispatchEvent(b); - (a === Ya || a === Sa) && Ra(ya) - } - }, - Zf: function(a) { - var b = this; - if (a instanceof J) - b.qi(a, { - noAnimation: q - }); - else if ($a(a)) - if (b.Hb === Qa) { - var c = G.pC[a]; - c && (pt = c.k, - b.Zf(pt)) - } else { - var e = this.WH(); - e.JF(function(c) { - 0 === e.xm() && 2 === e.Ia.result.type && (b.Zf(c.Ak(0).point), - Qa.wk(a) && b.DF(a)) - }); - e.search(a, { - log: "center" - }) - } - }, - Fd: function(a, b) { - "[object Undefined]" !== Object.prototype.toString.call(b) && (b = parseInt(b)); - B.Fn("cus.fire", "time", { - z_loadscripttime: sa - ra - }); - var c = this; - if ($a(a)) - if (c.Hb === Qa) { - var e = G.pC[a]; - e && (pt = e.k, - c.Fd(pt, b)) - } else { - var f = c.WH(); - f.JF(function(e) { - if (0 === f.xm() && (2 === f.Ia.result.type || 11 === f.Ia.result.type)) { - var e = e.Ak(0).point - , g = b || ab.tx(f.Ia.content.level, c); - c.Fd(e, g); - Qa.wk(a) && c.DF(a) - } - }); - f.search(a, { - log: "center" - }) - } - else if (a instanceof J && b) { - b = c.Yn(b).zoom; - c.Oc = c.Oa || b; - c.Oa = b; - e = c.re; - c.re = new J(a.lng,a.lat); - c.fc = c.cd.vj(c.re, c.Ub); - c.LC = c.LC || c.Oa; - c.KC = c.KC || c.re; - var g = new P("onload") - , i = new P("onloadcode"); - g.point = new J(a.lng,a.lat); - g.pixel = c.$b(c.re, c.Oa); - g.zoom = b; - c.loaded || (c.loaded = q, - c.dispatchEvent(g), - ta || (ta = bb())); - c.dispatchEvent(i); - g = new P("onmoveend"); - g.mv = "centerAndZoom"; - e.pb(c.re) || c.dispatchEvent(g); - c.dispatchEvent(new P("onmoveend")); - c.Oc !== c.Oa && (e = new P("onzoomend"), - e.mv = "centerAndZoom", - c.dispatchEvent(e)); - c.K.Ro && c.Ro() - } - }, - WH: function() { - this.R.YM || (this.R.YM = new cb(1)); - return this.R.YM - }, - reset: function() { - this.Fd(this.KC, this.LC, q) - }, - enableDragging: function() { - this.K.Wb = q - }, - disableDragging: function() { - this.K.Wb = t - }, - enableInertialDragging: function() { - this.K.ox = q - }, - disableInertialDragging: function() { - this.K.ox = t - }, - enableScrollWheelZoom: function() { - this.K.Uo = q - }, - disableScrollWheelZoom: function() { - this.K.Uo = t - }, - enableContinuousZoom: function() { - this.K.To = q - }, - disableContinuousZoom: function() { - this.K.To = t - }, - enableDoubleClickZoom: function() { - this.K.nD = q - }, - disableDoubleClickZoom: function() { - this.K.nD = t - }, - enableKeyboard: function() { - this.K.px = q - }, - disableKeyboard: function() { - this.K.px = t - }, - enablePinchToZoom: function() { - this.K.Ns = q - }, - disablePinchToZoom: function() { - this.K.Ns = t - }, - enableAutoResize: function() { - this.K.nx = q; - this.as(); - this.R.es || (this.R.es = setInterval(this.as, 80)) - }, - disableAutoResize: function() { - this.K.nx = t; - this.R.es && (clearInterval(this.R.es), - this.R.es = s) - }, - Ro: function() { - this.K.Ro = q; - this.Nn || (this.Nn = new db({ - pL: q - }), - this.Oe(this.Nn)) - }, - KW: function() { - this.K.Ro = t; - this.Nn && (this.Yf(this.Nn), - this.Nn = s, - delete this.Nn) - }, - cb: function() { - return this.xs && this.xs instanceof O ? new O(this.xs.width,this.xs.height) : new O(this.Wa.clientWidth,this.Wa.clientHeight) - }, - Ce: function(a) { - a && a instanceof O ? (this.xs = a, - this.Wa.style.width = a.width + "px", - this.Wa.style.height = a.height + "px") : this.xs = s - }, - Ka: w("re"), - fa: w("Oa"), - ZV: function() { - this.as() - }, - Yn: function(a) { - var b = this.K.gc - , c = this.K.Yb - , e = t - , a = Math.round(a); - a < b && (e = q, - a = b); - a > c && (e = q, - a = c); - return { - zoom: a, - yD: e - } - }, - La: w("Wa"), - $b: function(a, b) { - b = b || this.fa(); - return this.cd.$b(a, b, this.fc, this.cb(), this.Ub) - }, - xb: function(a, b) { - b = b || this.fa(); - return this.cd.xb(a, b, this.fc, this.cb(), this.Ub) - }, - Xe: function(a, b) { - if (a) { - var c = this.$b(new J(a.lng,a.lat), b); - c.x -= this.offsetX; - c.y -= this.offsetY; - return c - } - }, - JN: function(a, b) { - if (a) { - var c = new Q(a.x,a.y); - c.x += this.offsetX; - c.y += this.offsetY; - return this.xb(c, b) - } - }, - pointToPixelFor3D: function(a, b) { - var c = map.Ub; - this.Hb === Qa && c && eb.EK(a, this, b) - }, - P4: function(a, b) { - var c = map.Ub; - this.Hb === Qa && c && eb.DK(a, this, b) - }, - Q4: function(a, b) { - var c = this - , e = map.Ub; - c.Hb === Qa && e && eb.EK(a, c, function(a) { - a.x -= c.offsetX; - a.y -= c.offsetY; - b && b(a) - }) - }, - L4: function(a, b) { - var c = map.Ub; - this.Hb === Qa && c && (a.x += this.offsetX, - a.y += this.offsetY, - eb.DK(a, this, b)) - }, - ve: function(a) { - if (!this.Xx()) - return new fb; - var b = a || {} - , a = b.margins || [0, 0, 0, 0] - , c = b.zoom || s - , b = this.xb({ - x: a[3], - y: this.height - a[2] - }, c) - , a = this.xb({ - x: this.width - a[1], - y: a[0] - }, c); - return new fb(b,a) - }, - Xx: function() { - return !!this.loaded - }, - nS: function(a, b) { - for (var c = this.oa(), e = b.margins || [10, 10, 10, 10], f = b.zoomFactor || 0, g = e[1] + e[3], e = e[0] + e[2], i = c.bp(), k = c = c.sm(); k >= i; k--) { - var m = this.oa().dc(k); - if (a.YF().lng / m < this.width - g && a.YF().lat / m < this.height - e) - break - } - k += f; - k < i && (k = i); - k > c && (k = c); - return k - }, - ht: function(a, b) { - var c = { - center: this.Ka(), - zoom: this.fa() - }; - if (!a || !a instanceof fb && 0 === a.length || a instanceof fb && a.tj()) - return c; - var e = []; - a instanceof fb ? (e.push(a.Rf()), - e.push(a.Ve())) : e = a.slice(0); - for (var b = b || {}, f = [], g = 0, i = e.length; g < i; g++) - f.push(this.cd.vj(e[g], this.Ub)); - e = new fb; - for (g = f.length - 1; 0 <= g; g--) - e.extend(f[g]); - if (e.tj()) - return c; - c = e.Ka(); - f = this.nS(e, b); - b.margins && (e = b.margins, - g = (e[1] - e[3]) / 2, - e = (e[0] - e[2]) / 2, - i = this.oa().dc(f), - b.offset && (g = b.offset.width, - e = b.offset.height), - c.lng += i * g, - c.lat += i * e); - c = this.cd.nh(c, this.Ub); - return { - center: c, - zoom: f - } - }, - yh: function(a, b) { - var c; - c = a && a.center ? a : this.ht(a, b); - var b = b || {} - , e = b.delay || 200; - if (c.zoom === this.Oa && b.enableAnimation !== t) { - var f = this; - setTimeout(function() { - f.qi(c.center, { - duration: 210 - }) - }, e) - } else - this.Fd(c.center, c.zoom) - }, - Tf: w("Yd"), - hh: function() { - return this.R.qb && this.R.qb.Xa() ? this.R.qb : s - }, - getDistance: function(a, b) { - if (a && b) { - if (a.pb(b)) - return 0; - var c = 0 - , c = S.$o(a, b); - if (c === s || c === l) - c = 0; - return c - } - }, - Hx: function() { - var a = [] - , b = this.ya - , c = this.Ee; - if (b) - for (var e in b) - b[e]instanceof gb && a.push(b[e]); - if (c) { - e = 0; - for (b = c.length; e < b; e++) - a.push(c[e]) - } - return a - }, - oa: w("Hb"), - Dz: function() { - for (var a = this.R.pF; a < B.Fr.length; a++) - B.Fr[a](this); - this.R.pF = a - }, - DF: function(a) { - //修改 setCurrentCity - //i_setCurrentCity(this, a); - this.Ub = Qa.wk(a); - this.Rw = Qa.BL(this.Ub); - this.Hb === Qa && this.cd instanceof hb && (this.cd.$i = this.Ub) - }, - setDefaultCursor: function(a) { - this.K.Vb = a; - this.platform && (this.platform.style.cursor = this.K.Vb) - }, - getDefaultCursor: function() { - return this.K.Vb - }, - setDraggingCursor: function(a) { - this.K.Hd = a - }, - getDraggingCursor: function() { - return this.K.Hd - }, - Sx: function() { - return this.K.aX && 1.5 <= this.K.devicePixelRatio - }, - Cw: function(a, b) { - b ? this.Jh[b] || (this.Jh[b] = {}) : b = "custom"; - a.tag = b; - a instanceof ib && (this.Jh[b][a.aa] = a, - a.na(this)); - var c = this; - K.load("hotspot", function() { - c.Dz() - }, q) - }, - VZ: function(a, b) { - b || (b = "custom"); - this.Jh[b][a.aa] && delete this.Jh[b][a.aa] - }, - dm: function(a) { - a || (a = "custom"); - this.Jh[a] = {} - }, - bv: function() { - var a = this.Hb.bp() - , b = this.Hb.sm() - , c = this.K; - c.gc = c.hP || a; - c.Yb = c.gP || b; - c.gc < a && (c.gc = a); - c.Yb > b && (c.Yb = b) - }, - setMinZoom: function(a) { - a = Math.round(a); - a > this.K.Yb && (a = this.K.Yb); - this.K.hP = a; - this.HJ() - }, - setMaxZoom: function(a) { - a = Math.round(a); - a < this.K.gc && (a = this.K.gc); - this.K.gP = a; - this.HJ() - }, - HJ: function() { - this.bv(); - var a = this.K; - this.Oa < a.gc ? this.Qc(a.gc) : this.Oa > a.Yb && this.Qc(a.Yb); - var b = new P("onzoomspanchange"); - b.gc = a.gc; - b.Yb = a.Yb; - this.dispatchEvent(b) - }, - Q3: w("WB"), - getKey: function() { - return qa - }, - Zt: function(a) { - var b = this; - window.MPC_Mgr && window.MPC_Mgr[b.aa] && window.MPC_Mgr[b.aa].close(); - b.K.fj = t; - B.Fn("cus.fire", "count", "z_setmapstylecount"); - if (a) { - b = this; - a.styleJson && (a.styleStr = b.Z_(a.styleJson)); - H() && z.ca.Iy ? setTimeout(function() { - b.K.ye = a; - b.dispatchEvent(new P("onsetcustomstyles",a)) - }, 50) : (this.K.ye = a, - this.dispatchEvent(new P("onsetcustomstyles",a)), - this.sM(b.K.ye.geotableId)); - var c = { - style: a.style - }; - a.features && 0 < a.features.length && (c.features = q); - a.styleJson && 0 < a.styleJson.length && (c.styleJson = q); - Ra(5050, c); - a.style && (c = b.K.fm[a.style] ? b.K.fm[a.style].backColor : b.K.fm.normal.backColor) && (this.La().style.backgroundColor = c) - } - }, - LY: function(a) { - this.controls || (this.controls = { - navigationControl: new jb, - scaleControl: new kb, - overviewMapControl: new lb, - mapTypeControl: new mb - }); - var b = this, c; - for (c in this.controls) - b.VN(b.controls[c]); - a = a || []; - z.mc.Fb(a, function(a) { - b.Aw(b.controls[a]) - }) - }, - sM: function(a) { - a ? this.vs && this.vs.Cf === a || (this.Yf(this.vs), - this.vs = new nb({ - geotableId: a - }), - this.Oe(this.vs)) : this.Yf(this.vs) - }, - Sb: function() { - var a = this.fa() >= this.K.fG && this.oa() === La && 18 >= this.fa() - , b = t; - try { - document.createElement("canvas").getContext("2d"), - b = q - } catch (c) { - b = t - } - return a && b - }, - getCurrentCity: function() { - return { - name: this.$g, - code: this.fs - } - }, - tm: function() { - this.P.co(); - return this.P - }, - PY: function(a) { - B.alog("cus.fire", "count", "z_loadindoormapcount"); - La.setMaxZoom(a.maxZoom || 19); - var b = new P("oninitindoorlayer"); - b.vf = a; - this.dispatchEvent(b); - this.K.Ms = t - }, - D_: function(a) { - this.K.qN = a; - this.Va.Jb.parentElement.style.display = a ? "block" : "none" - }, - setPanorama: function(a) { - this.P = a; - this.P.GF(this) - }, - Z_: function(a) { - for (var b = { - featureType: "t", - elementType: "e", - visibility: "v", - color: "c", - lightness: "l", - saturation: "s", - weight: "w", - zoom: "z", - hue: "h" - }, c = { - all: "all", - geometry: "g", - "geometry.fill": "g.f", - "geometry.stroke": "g.s", - labels: "l", - "labels.text.fill": "l.t.f", - "labels.text.stroke": "l.t.s", - "lables.text": "l.t", - "labels.icon": "l.i" - }, e = [], f = 0, g; g = a[f]; f++) { - var i = g.stylers; - delete g.stylers; - z.extend(g, i); - var i = [], k; - for (k in b) - if (g[k]) - if ("elementType" === k) - i.push(b[k] + ":" + c[g[k]]); - else { - switch (g[k]) { - case "poilabel": - g[k] = "poi"; - break; - case "districtlabel": - g[k] = "label" - } - i.push(b[k] + ":" + g[k]) - } - 2 < i.length && e.push(i.join("|")) - } - return e.join(",") - } - }); - function Ra(a, b) { - if (a) { - var b = b || {}, c = "", e; - for (e in b) - c = c + "&" + e + "=" + encodeURIComponent(b[e]); - var f = function(a) { - a && (ob = q, - setTimeout(function() { - pb.src = B.Wc + "images/blank.gif?" + a.src - }, 50)) - } - , g = function() { - var a = qb.shift(); - a && f(a) - }; - e = (1E8 * Math.random()).toFixed(0); - ob ? qb.push({ - src: "product=jsapi&sub_product=jsapi&v=" + B.version + "&sub_product_v=" + B.version + "&t=" + e + "&code=" + a + "&da_src=" + a + c - }) : f({ - src: "product=jsapi&sub_product=jsapi&v=" + B.version + "&sub_product_v=" + B.version + "&t=" + e + "&code=" + a + "&da_src=" + a + c - }); - rb || (z.M(pb, "load", function() { - ob = t; - g() - }), - z.M(pb, "error", function() { - ob = t; - g() - }), - rb = q) - } - } - var ob, rb, qb = [], pb = new Image; - Ra(5E3, { - device_pixel_ratio: window.devicePixelRatio, - platform: navigator.platform - }); - B.mM = { - TILE_BASE_URLS: ["gss0.bdstatic.com/5bwHcj7lABFU8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFV8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFS8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFT8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFY8t_jkk_Z1zRvfdw6buu"], - TILE_ONLINE_URLS: ["gss0.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlRMgBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlRcgBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlRsgBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlQ1gBo1vgoIiO_jowehsv"], - TIlE_PERSPECT_URLS: ["gss0.bdstatic.com/-OR1cTe9KgQFm2e88IuM_a", "gss0.bdstatic.com/-ON1cTe9KgQFm2e88IuM_a", "gss0.bdstatic.com/-OZ1cTe9KgQFm2e88IuM_a", "gss0.bdstatic.com/-OV1cTe9KgQFm2e88IuM_a"], - geolocControl: "gsp0.baidu.com/8LkJsjOpB1gCo2Kml5_Y_D3", - TILES_YUN_HOST: ["gsp0.baidu.com/-eR1bSahKgkFkRGko9WTAnF6hhy", "gsp0.baidu.com/-eN1bSahKgkFkRGko9WTAnF6hhy", "gsp0.baidu.com/-eZ1bSahKgkFkRGko9WTAnF6hhy", "gsp0.baidu.com/-eV1bSahKgkFkRGko9WTAnF6hhy"], - traffic: "gsp0.baidu.com/7_AZsjOpB1gCo2Kml5_Y_DAcsMJiwa", - iw_pano: "gss0.bdstatic.com/5LUZemba_QUU8t7mm9GUKT-xh_", - message: "gsp0.baidu.com/7vo0bSba2gU2pMbgoY3K", - baidumap: "gsp0.baidu.com/80MWsjip0QIZ8tyhnq", - wuxian: "gsp0.baidu.com/6a1OdTeaKgQFm2e88IuM_a", - pano: ["gss0.bdstatic.com/5LUZemba_QUU8t7mm9GUKT-xh_", "gss0.bdstatic.com/5LUZemfa_QUU8t7mm9GUKT-xh_", "gss0.bdstatic.com/5LUZemja_QUU8t7mm9GUKT-xh_"], - main_domain_nocdn: { - baidu: "gsp0.baidu.com/9_Q4sjOpB1gCo2Kml5_Y_D3", - other: "api.map.baidu.com" - }, - main_domain_cdn: { - baidu: ["gss0.bdstatic.com/9_Q4vHSd2RZ3otebn9fN2DJv", "gss0.baidu.com/9_Q4vXSd2RZ3otebn9fN2DJv", "gss0.bdstatic.com/9_Q4vnSd2RZ3otebn9fN2DJv"], - other: ["api.map.baidu.com"], - webmap: ["gss0.baidu.com/6b1IcTe9R1gBo1vgoIiO_jowehsv"] - }, - map_click: "gsp0.baidu.com/80MWbzKh2wt3n2qy8IqW0jdnxx1xbK", - vector_traffic: "gss0.bdstatic.com/8aZ1cTe9KgQIm2_p8IuM_a" - }; - B.DY = { - TILE_BASE_URLS: ["shangetu0.map.bdimg.com", "shangetu1.map.bdimg.com", "shangetu2.map.bdimg.com", "shangetu3.map.bdimg.com", "shangetu4.map.bdimg.com"], - TILE_ONLINE_URLS: ["online0.map.bdimg.com", "online1.map.bdimg.com", "online2.map.bdimg.com", "online3.map.bdimg.com", "online4.map.bdimg.com"], - TIlE_PERSPECT_URLS: ["d0.map.baidu.com", "d1.map.baidu.com", "d2.map.baidu.com", "d3.map.baidu.com"], - geolocControl: "loc.map.baidu.com", - TILES_YUN_HOST: ["g0.api.map.baidu.com", "g1.api.map.baidu.com", "g2.api.map.baidu.com", "g3.api.map.baidu.com"], - traffic: "its.map.baidu.com:8002", - iw_pano: "pcsv0.map.bdimg.com", - message: "j.map.baidu.com", - baidumap: "map.baidu.com", - wuxian: "wuxian.baidu.com", - pano: ["pcsv0.map.bdimg.com", "pcsv1.map.bdimg.com", "pcsv2.map.bdimg.com"], - main_domain_nocdn: { - baidu: "api.map.baidu.com" - }, - main_domain_cdn: { - baidu: ["api0.map.bdimg.com", "api1.map.bdimg.com", "api2.map.bdimg.com"], - webmap: ["webmap0.map.bdimg.com"] - }, - map_click: "mapclick.map.baidu.com", - vector_traffic: "or.map.bdimg.com" - }; - B.F0 = { - "0": { - proto: "http://", - domain: B.DY - }, - 1: { - proto: "https://", - domain: B.mM - }, - 2: { - proto: "https://", - domain: B.mM - } - }; - window.BMAP_PROTOCOL && "https" === window.BMAP_PROTOCOL && (window.HOST_TYPE = 2); - B.xu = window.HOST_TYPE || "0"; - B.url = B.F0[B.xu]; - B.vp = B.url.proto + B.url.domain.baidumap + "/"; - //B.vp =bmapcfg.home; //修改,本地工具资源引用(离线路径) - B.Wc = B.url.proto + ("2" == B.xu ? B.url.domain.main_domain_nocdn.other : B.url.domain.main_domain_nocdn.baidu) + "/"; - //B.Wc =bmapcfg.home; //修改,本地工具资源引用(离线路径) - //B.ka=B.url.proto+("2"==B.xu?B.url.domain.main_domain_cdn.other[0]:B.url.domain.main_domain_cdn.baidu[0])+"/"; - B.ka = bmapcfg.home; //修改,本地工具资源引用(离线路径) - B.Yi = B.url.proto + B.url.domain.main_domain_cdn.webmap[0] + "/"; - //B.Yi =bmapcfg.home; //修改,本地工具资源引用(离线路径) - B.vg = function(a, b) { - var c, e, b = b || ""; - switch (a) { - case "main_domain_nocdn": - c = B.Wc + b; - break; - case "main_domain_cdn": - c = B.ka + b; - break; - default: - e = B.url.domain[a], - "[object Array]" == Object.prototype.toString.call(e) ? (c = [], - z.mc.Fb(e, function(a, e) { - c[e] = B.url.proto + a + "/" + b - })) : c = B.url.proto + B.url.domain[a] + "/" + b - } - return c - } - ; - function tb(a) { - var b = { - duration: 1E3, - Ic: 30, - No: 0, - kc: ub.UM, - Kt: u() - }; - this.dg = []; - if (a) - for (var c in a) - b[c] = a[c]; - this.j = b; - if (Wa(b.No)) { - var e = this; - setTimeout(function() { - e.start() - }, b.No) - } else - b.No != vb && this.start() - } - var vb = "INFINITE"; - tb.prototype.start = function() { - this.Uu = bb(); - this.gA = this.Uu + this.j.duration; - wb(this) - } - ; - tb.prototype.add = function(a) { - this.dg.push(a) - } - ; - function wb(a) { - var b = bb(); - b >= a.gA ? (Xa(a.j.va) && a.j.va(a.j.kc(1)), - Xa(a.j.finish) && a.j.finish(), - 0 < a.dg.length && (b = a.dg[0], - b.dg = [].concat(a.dg.slice(1)), - b.start())) : (a.Jy = a.j.kc((b - a.Uu) / a.j.duration), - Xa(a.j.va) && a.j.va(a.Jy), - a.TF || (a.Yr = setTimeout(function() { - wb(a) - }, 1E3 / a.j.Ic))) - } - tb.prototype.stop = function(a) { - this.TF = q; - for (var b = 0; b < this.dg.length; b++) - this.dg[b].stop(), - this.dg[b] = s; - this.dg.length = 0; - this.Yr && (clearTimeout(this.Yr), - this.Yr = s); - this.j.Kt(this.Jy); - a && (this.gA = this.Uu, - wb(this)) - } - ; - tb.prototype.cancel = ga(1); - var ub = { - UM: function(a) { - return a - }, - reverse: function(a) { - return 1 - a - }, - iD: function(a) { - return a * a - }, - hD: function(a) { - return Math.pow(a, 3) - }, - Ks: function(a) { - return -(a * (a - 2)) - }, - eL: function(a) { - return Math.pow(a - 1, 3) + 1 - }, - dL: function(a) { - return 0.5 > a ? 2 * a * a : -2 * (a - 2) * a - 1 - }, - R2: function(a) { - return 0.5 > a ? 4 * Math.pow(a, 3) : 4 * Math.pow(a - 1, 3) + 1 - }, - S2: function(a) { - return (1 - Math.cos(Math.PI * a)) / 2 - } - }; - ub["ease-in"] = ub.iD; - ub["ease-out"] = ub.Ks; - var G = { - oG: 34, - pG: 21, - qG: new O(21,32), - wP: new O(10,32), - vP: new O(24,36), - uP: new O(12,36), - mG: new O(13,1), - qa: B.ka + "images/", - a4: "http://api0.map.bdimg.com/images/", - nG: B.ka + "images/markers_new.png", - sP: 24, - tP: 73, - pC: { - "\u5317\u4eac": { - yy: "bj", - k: new J(116.403874,39.914889) - }, - "\u4e0a\u6d77": { - yy: "sh", - k: new J(121.487899,31.249162) - }, - "\u6df1\u5733": { - yy: "sz", - k: new J(114.025974,22.546054) - }, - "\u5e7f\u5dde": { - yy: "gz", - k: new J(113.30765,23.120049) - } - }, - fontFamily: "arial,sans-serif" - }; - z.ca.Te ? (z.extend(G, { - TK: "url(" + G.qa + "ruler.cur),crosshair", - Vb: "-moz-grab", - Hd: "-moz-grabbing" - }), - z.platform.IM && (G.fontFamily = "arial,simsun,sans-serif")) : z.ca.Qw || z.ca.Iy ? z.extend(G, { - TK: "url(" + G.qa + "ruler.cur) 2 6,crosshair", - Vb: "url(" + G.qa + "openhand.cur) 8 8,default", - Hd: "url(" + G.qa + "closedhand.cur) 8 8,move" - }) : z.extend(G, { - TK: "url(" + G.qa + "ruler.cur),crosshair", - Vb: "url(" + G.qa + "openhand.cur),default", - Hd: "url(" + G.qa + "closedhand.cur),move" - }); - function xb(a, b) { - var c = a.style; - c.left = b[0] + "px"; - c.top = b[1] + "px" - } - function yb(a) { - 0 < z.ca.ia ? a.unselectable = "on" : a.style.MozUserSelect = "none" - } - function zb(a) { - return a && a.parentNode && 11 !== a.parentNode.nodeType - } - function Ab(a, b) { - z.D.Vx(a, "beforeEnd", b); - return a.lastChild - } - function Bb(a) { - for (var b = { - left: 0, - top: 0 - }; a && a.offsetParent; ) - b.left += a.offsetLeft, - b.top += a.offsetTop, - a = a.offsetParent; - return b - } - function ma(a) { - a = window.event || a; - a.stopPropagation ? a.stopPropagation() : a.cancelBubble = q - } - function Cb(a) { - a = window.event || a; - a.preventDefault ? a.preventDefault() : a.returnValue = t; - return t - } - function na(a) { - ma(a); - return Cb(a) - } - function Eb() { - var a = document.documentElement - , b = document.body; - return a && (a.scrollTop || a.scrollLeft) ? [a.scrollTop, a.scrollLeft] : b ? [b.scrollTop, b.scrollLeft] : [0, 0] - } - function Fb(a, b) { - if (a && b) - return Math.round(Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2))) - } - function Gb(a, b) { - var c = [], b = b || function(a) { - return a - } - , e; - for (e in a) - c.push(e + "=" + b(a[e])); - return c.join("&") - } - function L(a, b, c) { - var e = document.createElement(a); - c && (e = document.createElementNS(c, a)); - return z.D.CF(e, b || {}) - } - function Va(a) { - if (a.currentStyle) - return a.currentStyle; - if (a.ownerDocument && a.ownerDocument.defaultView) - return a.ownerDocument.defaultView.getComputedStyle(a, s) - } - function Xa(a) { - return "function" === typeof a - } - function Wa(a) { - return "number" === typeof a - } - function $a(a) { - return "string" == typeof a - } - function Hb(a) { - return "undefined" != typeof a - } - function Ib(a) { - return "object" == typeof a - } - var Jb = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - function Kb(a) { - for (var b = "", c = 0; c < a.length; c++) { - var e = a.charCodeAt(c) << 1 - , f = e = e.toString(2); - 8 > e.length && (f = "00000000" + e, - f = f.substr(e.length, 8)); - b += f - } - a = 5 - b.length % 5; - e = []; - for (c = 0; c < a; c++) - e[c] = "0"; - b = e.join("") + b; - f = []; - for (c = 0; c < b.length / 5; c++) - e = b.substr(5 * c, 5), - f.push(String.fromCharCode(parseInt(e, 2) + 50)); - return f.join("") + a.toString() - } - function Lb(a) { - var b = "", c, e, f = "", g, i = "", k = 0; - g = /[^A-Za-z0-9\+\/\=]/g; - if (!a || g.exec(a)) - return a; - a = a.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - do - c = Jb.indexOf(a.charAt(k++)), - e = Jb.indexOf(a.charAt(k++)), - g = Jb.indexOf(a.charAt(k++)), - i = Jb.indexOf(a.charAt(k++)), - c = c << 2 | e >> 4, - e = (e & 15) << 4 | g >> 2, - f = (g & 3) << 6 | i, - b += String.fromCharCode(c), - 64 != g && (b += String.fromCharCode(e)), - 64 != i && (b += String.fromCharCode(f)); - while (k < a.length);return b - } - var P = z.lang.Ju; - function H() { - return !(!z.platform.zE && !z.platform.XY && !z.platform.Jm) - } - function Ua() { - return !(!z.platform.IM && !z.platform.AM && !z.platform.cZ) - } - function bb() { - return (new Date).getTime() - } - function Mb() { - var a = document.body.appendChild(L("div")); - a.innerHTML = ''; - var b = a.firstChild; - if (!b.style) - return t; - b.style.behavior = "url(#default#VML)"; - b = b ? "object" === typeof b.adj : q; - a.parentNode.removeChild(a); - return b - } - function Nb() { - return !!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Shape", "1.1") - } - function Ob() { - return !!L("canvas").getContext - } - function Pb(a) { - return a * Math.PI / 180 - } - B.iZ = function() { - var a = q - , b = q - , c = q - , e = q - , f = 0 - , g = 0 - , i = 0 - , k = 0; - return { - eR: function() { - f += 1; - a && (a = t, - setTimeout(function() { - Ra(5054, { - pic: f - }); - a = q; - f = 0 - }, 1E4)) - }, - v1: function() { - g += 1; - b && (b = t, - setTimeout(function() { - Ra(5055, { - move: g - }); - b = q; - g = 0 - }, 1E4)) - }, - x1: function() { - i += 1; - c && (c = t, - setTimeout(function() { - Ra(5056, { - zoom: i - }); - c = q; - i = 0 - }, 1E4)) - }, - w1: function(a) { - k += a; - e && (e = t, - setTimeout(function() { - Ra(5057, { - tile: k - }); - e = q; - k = 0 - }, 5E3)) - } - } - }(); - B.iq = { - DG: "#83a1ff", - kq: "#808080" - }; - function Qb(a, b, c) { - b.Om || (b.Om = [], - b.handle = {}); - b.Om.push({ - filter: c, - nm: a - }); - b.addEventListener || (b.addEventListener = function(a, c) { - b.attachEvent("on" + a, c) - } - ); - b.handle.click || (b.addEventListener("click", function(a) { - for (var c = a.target || a.srcElement; c != b; ) { - Rb(b.Om, function(b, i) { - RegExp(i.filter).test(c.getAttribute("filter")) && i.nm.call(c, a, c.getAttribute("filter")) - }); - c = c.parentNode - } - }, t), - b.handle.click = q) - } - function Rb(a, b) { - for (var c = 0, e = a.length; c < e; c++) - b(c, a[c]) - } - void function(a, b, c) { - void function(a, b, c) { - function i(a) { - if (!a.Mo) { - for (var c = q, e = [], g = a.ZZ, k = 0; g && k < g.length; k++) { - var m = g[k] - , n = pa[m] = pa[m] || {}; - if (n.Mo || n == a) - e.push(n.Nc); - else { - c = t; - if (!n.DW && (m = (Ma.get("alias") || {})[m] || m + ".js", - !R[m])) { - R[m] = q; - var o = b.createElement("script") - , p = b.getElementsByTagName("script")[0]; - o.async = q; - o.src = m; - p.parentNode.insertBefore(o, p) - } - n.bz = n.bz || {}; - n.bz[a.name] = a - } - } - if (c) { - a.Mo = q; - a.KK && (a.Nc = a.KK.apply(a, e)); - for (var v in a.bz) - i(a.bz[v]) - } - } - } - function k(a) { - return (a || new Date) - F - } - function m(a, b, c) { - if (a) { - "string" == typeof a && (c = b, - b = a, - a = M); - try { - a == M ? (N[b] = N[b] || [], - N[b].unshift(c)) : a.addEventListener ? a.addEventListener(b, c, t) : a.attachEvent && a.attachEvent("on" + b, c) - } catch (e) {} - } - } - function n(a, b, c) { - if (a) { - "string" == typeof a && (c = b, - b = a, - a = M); - try { - if (a == M) { - var e = N[b]; - if (e) - for (var f = e.length; f--; ) - e[f] === c && e.splice(f, 1) - } else - a.removeEventListener ? a.removeEventListener(b, c, t) : a.detachEvent && a.detachEvent("on" + b, c) - } catch (g) {} - } - } - function o(a) { - var b = N[a] - , c = 0; - if (b) { - for (var e = [], f = arguments, g = 1; g < f.length; g++) - e.push(f[g]); - for (g = b.length; g--; ) - b[g].apply(this, e) && c++; - return c - } - } - function p(a, b) { - if (a && b) { - var c = new Image(1,1), e = [], f = "img_" + +new Date, g; - for (g in b) - b[g] && e.push(g + "=" + encodeURIComponent(b[g])); - M[f] = c; - c.onload = c.onerror = function() { - M[f] = c = c.onload = c.onerror = s; - delete M[f] - } - ; - c.src = a + "?" + e.join("&") - } - } - function v() { - var a = arguments - , b = a[0]; - if (this.JK || /^(on|un|set|get|create)$/.test(b)) { - for (var b = y.prototype[b], c = [], e = 1, f = a.length; e < f; e++) - c.push(a[e]); - "function" == typeof b && b.apply(this, c) - } else - this.iK.push(a) - } - function x(a, b) { - var c = {}, e; - for (e in a) - a.hasOwnProperty(e) && (c[e] = a[e]); - for (e in b) - b.hasOwnProperty(e) && (c[e] = b[e]); - return c - } - function y(a) { - this.name = a; - this.Ps = { - protocolParameter: { - postUrl: s, - protocolParameter: s - } - }; - this.iK = []; - this.alog = M - } - function A(a) { - a = a || "default"; - if ("*" == a) { - var a = [], b; - for (b in fa) - a.push(fa[b]); - return a - } - (b = fa[a]) || (b = fa[a] = new y(a)); - return b - } - var E = c.alog; - if (!E || !E.Mo) { - var C = b.all && a.attachEvent - , F = E && E.IE || +new Date - , D = a.o4 || (+new Date).toString(36) + Math.random().toString(36).substr(2, 3) - , I = 0 - , R = {} - , M = function(a) { - var b = arguments, c, e, f, g; - if ("define" == a || "require" == a) { - for (e = 1; e < b.length; e++) - switch (typeof b[e]) { - case "string": - c = b[e]; - break; - case "object": - f = b[e]; - break; - case "function": - g = b[e] - } - "require" == a && (c && !f && (f = [c]), - c = s); - c = !c ? "#" + I++ : c; - e = pa[c] = pa[c] || {}; - e.Mo || (e.name = c, - e.ZZ = f, - e.KK = g, - "define" == a && (e.DW = q), - i(e)) - } else - "function" == typeof a ? a(M) : ("" + a).replace(/^(?:([\w$_]+)\.)?(\w+)$/, function(a, c, e) { - b[0] = e; - v.apply(M.bG(c), b) - }) - } - , N = {} - , fa = {} - , pa = { - i2: { - name: "alog", - Mo: q, - Nc: M - } - }; - y.prototype.start = y.prototype.create = function(a) { - if (!this.JK) { - "object" == typeof a && this.set(a); - this.JK = new Date; - for (this.Qs("create", this); a = this.iK.shift(); ) - v.apply(this, a) - } - } - ; - y.prototype.send = function(a, b) { - var c = x({ - ts: k().toString(36), - t: a, - sid: D - }, this.Ps); - if ("object" == typeof b) - c = x(c, b); - else { - var e = arguments; - switch (a) { - case "pageview": - e[1] && (c.page = e[1]); - e[2] && (c.title = e[2]); - break; - case "event": - e[1] && (c.eventCategory = e[1]); - e[2] && (c.eventAction = e[2]); - e[3] && (c.eventLabel = e[3]); - e[4] && (c.eventValue = e[4]); - break; - case "timing": - e[1] && (c.timingCategory = e[1]); - e[2] && (c.timingVar = e[2]); - e[3] && (c.timingValue = e[3]); - e[4] && (c.timingLabel = e[4]); - break; - case "exception": - e[1] && (c.exDescription = e[1]); - e[2] && (c.exFatal = e[2]); - break; - default: - return - } - } - this.Qs("send", c); - var f; - if (e = this.Ps.protocolParameter) { - var g = {}; - for (f in c) - e[f] !== s && (g[e[f] || f] = c[f]); - f = g - } else - f = c; - p(this.Ps.postUrl, f) - } - ; - y.prototype.set = function(a, b) { - if ("string" == typeof a) - "protocolParameter" == a && (b = x({ - postUrl: s, - protocolParameter: s - }, b)), - this.Ps[a] = b; - else if ("object" == typeof a) - for (var c in a) - this.set(c, a[c]) - } - ; - y.prototype.get = function(a, b) { - var c = this.Ps[a]; - "function" == typeof b && b(c); - return c - } - ; - y.prototype.Qs = function(a, b) { - return M.Qs(this.name + "." + a, b) - } - ; - y.prototype.M = function(a, b) { - M.M(this.name + "." + a, b) - } - ; - y.prototype.ed = function(a, b) { - M.ed(this.name + "." + a, b) - } - ; - M.name = "alog"; - M.BO = D; - M.Mo = q; - M.timestamp = k; - M.ed = n; - M.M = m; - M.Qs = o; - M.bG = A; - M("init"); - var wa = y.prototype; - T(wa, { - start: wa.start, - create: wa.create, - send: wa.send, - set: wa.set, - get: wa.get, - on: wa.M, - un: wa.ed, - fire: wa.Qs - }); - var Ma = A(); - Ma.set("protocolParameter", { - h2: s - }); - if (E) { - wa = [].concat(E.wb || [], E.Wm || []); - E.wb = E.Wm = s; - for (var sb in M) - M.hasOwnProperty(sb) && (E[sb] = M[sb]); - M.wb = M.Wm = { - push: function(a) { - M.apply(M, a) - } - }; - for (E = 0; E < wa.length; E++) - M.apply(M, wa[E]) - } - c.alog = M; - C && m(b, "mouseup", function(a) { - a = a.target || a.srcElement; - 1 == a.nodeType && /^ajavascript:/i.test(a.tagName + a.href) - }); - var Za = t; - a.onerror = function(a, b, e, f) { - var i = q; - !b && /^script error/i.test(a) && (Za ? i = t : Za = q); - i && c.alog("exception.send", "exception", { - Ht: a, - HE: b, - Dt: e, - hs: f - }); - return t - } - ; - c.alog("exception.on", "catch", function(a) { - c.alog("exception.send", "exception", { - Ht: a.Ht, - HE: a.path, - Dt: a.Dt, - method: a.method, - rL: "catch" - }) - }) - } - }(a, b, c); - void function(a, b, c) { - var i = "18_3"; - H() && (i = "18_4"); - var k = "http://static.tieba.baidu.com"; - "https:" === a.location.protocol && (k = "https://gsp0.baidu.com/5aAHeD3nKhI2p27j8IqW0jdnxx1xbK"); - var m = Math.random - , k = k + "/tb/pms/img/st.gif" - , n = { - wh: "0.1" - } - , o = { - wh: "0.1" - } - , p = { - wh: "0.1" - } - , v = { - wh: "0" - }; - if (n && n.wh && m() < n.wh) { - var x = c.alog.bG("monkey"), y, n = a.screen, A = b.referrer; - x.set("ver", 5); - x.set("pid", 241); - n && x.set("px", n.width + "*" + n.height); - x.set("ref", A); - c.alog("monkey.on", "create", function() { - y = c.alog.timestamp; - x.set("protocolParameter", { - reports: s - }) - }); - c.alog("monkey.on", "send", function(a) { - "pageview" == a.t && (a.cmd = "open"); - a.now && (a.ts = y(a.now).toString(36), - a.now = "") - }); - c.alog("monkey.create", { - page: i, - pid: "241", - p: "18", - dv: 6, - postUrl: k, - reports: { - refer: 1 - } - }); - c.alog("monkey.send", "pageview", { - now: +new Date - }) - } - if (o && o.wh && m() < o.wh) { - var E = t; - a.onerror = function(a, b, e, f) { - var i = q; - !b && /^script error/i.test(a) && (E ? i = t : E = q); - i && c.alog("exception.send", "exception", { - Ht: a, - HE: b, - Dt: e, - hs: f - }); - return t - } - ; - c.alog("exception.on", "catch", function(a) { - c.alog("exception.send", "exception", { - Ht: a.Ht, - HE: a.path, - Dt: a.Dt, - method: a.method, - rL: "catch" - }) - }); - c.alog("exception.create", { - postUrl: k, - dv: 7, - page: i, - pid: "170", - p: "18" - }) - } - p && (p.wh && m() < p.wh) && (c.alog("cus.on", "time", function(a) { - var b = {}, e = t, f; - if ("[object Object]" === a.toString()) { - for (var i in a) - "page" == i ? b.page = a[i] : (f = parseInt(a[i]), - 0 < f && /^z_/.test(i) && (e = q, - b[i] = f)); - e && c.alog("cus.send", "time", b) - } - }), - c.alog("cus.on", "count", function(a) { - var b = {} - , e = t; - "string" === typeof a && (a = [a]); - if (a instanceof Array) - for (var f = 0; f < a.length; f++) - /^z_/.test(a[f]) ? (e = q, - b[a[f]] = 1) : /^page:/.test(a[f]) && (b.page = a[f].substring(5)); - e && c.alog("cus.send", "count", b) - }), - c.alog("cus.create", { - dv: 3, - postUrl: k, - page: i, - p: "18" - })); - if (v && v.wh && m() < v.wh) { - var C = ["Moz", "O", "ms", "Webkit"] - , F = ["-webkit-", "-moz-", "-o-", "-ms-"] - , D = function() { - return typeof b.createElement !== "function" ? b.createElement(arguments[0]) : b.createElement.apply(b, arguments) - } - , I = D("dpFeatureTest").style - , R = function(a) { - return M(a, l, l) - } - , M = function(a, b, c) { - var e = a.charAt(0).toUpperCase() + a.slice(1) - , f = (a + " " + C.join(e + " ") + e).split(" "); - if (typeof b === "string" || typeof b === "undefined") - return N(f, b); - f = (a + " " + C.join(e + " ") + e).split(" "); - a: { - var a = f, g; - for (g in a) - if (a[g]in b) { - if (c === t) { - b = a[g]; - break a - } - g = b[a[g]]; - b = typeof g === "function" ? fnBind(g, c || b) : g; - break a - } - b = t - } - return b - } - , N = function(a, b) { - var c, e, f; - e = a.length; - for (c = 0; c < e; c++) { - f = a[c]; - ~("" + f).indexOf("-") && (f = fa(f)); - if (I[f] !== l) - return b == "pfx" ? f : q - } - return t - } - , fa = function(a) { - return a.replace(/([a-z])-([a-z])/g, function(a, b, c) { - return b + c.toUpperCase() - }).replace(/^-/, "") - } - , pa = function(a, b, c) { - if (a.indexOf("@") === 0) - return atRule(a); - a.indexOf("-") != -1 && (a = fa(a)); - return !b ? M(a, "pfx") : M(a, b, c) - } - , wa = function() { - var a = D("canvas"); - return !(!a.getContext || !a.getContext("2d")) - } - , Ma = function() { - var a = D("div"); - return "draggable"in a || "ondragstart"in a && "ondrop"in a - } - , sb = function() { - try { - localStorage.setItem("localStorage", "localStorage"); - localStorage.removeItem("localStorage"); - return q - } catch (a) { - return t - } - } - , Za = function() { - return "content"in b.createElement("template") - } - , Pa = function() { - return "createShadowRoot"in b.createElement("a") - } - , oi = function() { - return "registerElement"in b - } - , pi = function() { - return "import"in b.createElement("link") - } - , qi = function() { - return "getItems"in b - } - , ri = function() { - return "EventSource"in window - } - , re = function(a, b) { - var c = new Image; - c.onload = function() { - b(a, c.width > 0 && c.height > 0) - } - ; - c.onerror = function() { - b(a, t) - } - ; - c.src = "data:image/webp;base64," + { - r4: "UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA", - q4: "UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==", - alpha: "UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==", - kk: "UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA" - }[a] - } - , se = function(a, b) { - return Tb.ei["WebP-" + a] = b - } - , si = function() { - return "openDatabase"in a - } - , ti = function() { - return "performance"in a && "timing"in a.performance - } - , ui = function() { - return "performance"in a && "mark"in a.performance - } - , vi = function() { - return !(!Array.prototype || !Array.prototype.every || !Array.prototype.filter || !Array.prototype.forEach || !Array.prototype.indexOf || !Array.prototype.lastIndexOf || !Array.prototype.map || !Array.prototype.some || !Array.prototype.reduce || !Array.prototype.reduceRight || !Array.isArray) - } - , wi = function() { - return "Promise"in a && "cast"in a.lq && "resolve"in a.lq && "reject"in a.lq && "all"in a.lq && "race"in a.lq && function() { - var b; - new a.lq(function(a) { - b = a - } - ); - return typeof b === "function" - }() - } - , xi = function() { - var b = !!a.i1 - , c = a.XMLHttpRequest && "withCredentials"in new XMLHttpRequest; - return !!a.l1 && b && c - } - , yi = function() { - return "geolocation"in navigator - } - , zi = function() { - var b = D("canvas") - , c = "probablySupportsContext"in b ? "probablySupportsContext" : "supportsContext"; - return c in b ? b[c]("webgl") || b[c]("experimental-webgl") : "WebGLRenderingContext"in a - } - , Ai = function() { - return !!b.createElementNS && !!b.createElementNS("http://www.w3.org/2000/svg", "svg").A2 - } - , Bi = function() { - return !!a.s1 - } - , Ci = function() { - return "WebSocket"in a && a.p1.f1 === 2 - } - , Di = function() { - return !!b.createElement("video").canPlayType - } - , Ei = function() { - return !!b.createElement("audio").canPlayType - } - , Fi = function() { - return !!(a.history && "pushState"in a.history) - } - , Gi = function() { - return !(!a.g1 || !a.h1) - } - , Hi = function() { - return "postMessage"in window - } - , Ii = function() { - return !!a.webkitNotifications || "Notification"in a && "permission"in a.PP && "requestPermission"in a.PP - } - , Ji = function() { - for (var b = ["webkit", "moz", "o", "ms"], c = a.requestAnimationFrame, f = 0; f < b.length && !c; ++f) - c = a[b[f] + "RequestAnimationFrame"]; - return !!c - } - , Ki = function() { - return "JSON"in a && "parse"in JSON && "stringify"in JSON - } - , Li = function() { - return !(!pa("exitFullscreen", b, t) && !pa("cancelFullScreen", b, t)) - } - , Mi = function() { - return !!pa("Intl", a) - } - , Ni = function() { - return R("flexBasis") - } - , Oi = function() { - return !!R("perspective") - } - , Pi = function() { - return R("shapeOutside") - } - , Qi = function() { - var a = D("div"); - a.style.cssText = F.join("filter:blur(2px); "); - return !!a.style.length && (b.documentMode === l || b.documentMode > 9) - } - , Ri = function() { - return "XMLHttpRequest"in a && "withCredentials"in new XMLHttpRequest - } - , Si = function() { - return D("progress").max !== l - } - , Ti = function() { - return D("meter").max !== l - } - , Ui = function() { - return "sendBeacon"in navigator - } - , Vi = function() { - return R("borderRadius") - } - , Wi = function() { - return R("boxShadow") - } - , Xi = function() { - var a = D("div").style; - a.cssText = F.join("opacity:.55;"); - return /^0.55$/.test(a.opacity) - } - , Yi = function() { - return N(["textShadow"], l) - } - , Zi = function() { - return R("animationName") - } - , $i = function() { - return R("transition") - } - , aj = function() { - return navigator.userAgent.indexOf("Android 2.") === -1 && R("transform") - } - , Tb = { - ei: {}, - pa: function(a, b, c) { - this.ei[a] = b.apply(this, [].slice.call(arguments, 2)) - }, - Ed: function(a, b) { - a.apply(this, [].slice.call(arguments, 1)) - }, - f_: function() { - this.pa("bdrs", Vi); - this.pa("bxsd", Wi); - this.pa("opat", Xi); - this.pa("txsd", Yi); - this.pa("anim", Zi); - this.pa("trsi", $i); - this.pa("trfm", aj); - this.pa("flex", Ni); - this.pa("3dtr", Oi); - this.pa("shpe", Pi); - this.pa("fltr", Qi); - this.pa("cavs", wa); - this.pa("dgdp", Ma); - this.pa("locs", sb); - this.pa("wctem", Za); - this.pa("wcsdd", Pa); - this.pa("wccse", oi); - this.pa("wchti", pi); - this.Ed(re, "lossy", se); - this.Ed(re, "lossless", se); - this.Ed(re, "alpha", se); - this.Ed(re, "animation", se); - this.pa("wsql", si); - this.pa("natm", ti); - this.pa("ustm", ui); - this.pa("arra", vi); - this.pa("prms", wi); - this.pa("xhr2", xi); - this.pa("wbgl", zi); - this.pa("geol", yi); - this.pa("svg", Ai); - this.pa("work", Bi); - this.pa("wbsk", Ci); - this.pa("vido", Di); - this.pa("audo", Ei); - this.pa("hsty", Fi); - this.pa("file", Gi); - this.pa("psmg", Hi); - this.pa("wknf", Ii); - this.pa("rqaf", Ji); - this.pa("json", Ki); - this.pa("flsc", Li); - this.pa("i18n", Mi); - this.pa("cors", Ri); - this.pa("prog", Si); - this.pa("metr", Ti); - this.pa("becn", Ui); - this.pa("mcrd", qi); - this.pa("esrc", ri) - } - } - , x = c.alog.bG("feature"); - x.M("commit", function() { - Tb.f_(); - var a = setInterval(function() { - if ("WebP-lossy"in Tb.ei && "WebP-lossless"in Tb.ei && "WebP-alpha"in Tb.ei && "WebP-animation"in Tb.ei) { - for (var b in Tb.ei) - Tb.ei[b] = Tb.ei[b] ? "y" : "n"; - x.send("feature", Tb.ei); - clearInterval(a) - } - }, 500) - }); - c.alog("feature.create", { - P2: 4, - R4: k, - page: i, - wb: "18" - }); - c.alog("feature.fire", "commit") - } - }(a, b, c) - }(window, document, B); - B.Fn = B.alog || u(); - B.alog("cus.fire", "count", "z_loadscriptcount"); - "https:" === location.protocol && B.alog("cus.fire", "count", "z_httpscount"); - function Sb(a) { - var b = window.TILE_VERSION - , c = "20170927"; - b && b.ditu && (b = b.ditu, - b[a] && b[a].updateDate && (c = b[a].updateDate)); - return c - } - ;function oa(a, b) { - if (/^http/.test(a)) return;//修改 屏蔽ak验证,若调用外部资源直接返回 - - if (b) { - var c = (1E5 * Math.random()).toFixed(0); - B._rd["_cbk" + c] = function(a) { - b && b(a); - delete B._rd["_cbk" + c] - } - ; - a += "&callback=BMap._rd._cbk" + c - } - var e = L("script", { - type: "text/javascript" - }); - e.charset = "utf-8"; - e.src = a; - e.addEventListener ? e.addEventListener("load", function(a) { - a = a.target; - a.parentNode.removeChild(a) - }, t) : e.attachEvent && e.attachEvent("onreadystatechange", function() { - var a = window.event.srcElement; - a && ("loaded" == a.readyState || "complete" == a.readyState) && a.parentNode.removeChild(a) - }); - setTimeout(function() { - document.getElementsByTagName("head")[0].appendChild(e); - e = s - }, 1) - } - ;var Ub = { //修改,这里是所有的模块,用到时自动加载(在线),离线的话要先下载下来放到本地,如http://api0.map.bdimg.com/getmodules?v=3.0&mod=模块1,模块2 - //模块命名格式是map_dbwcej,直接拼接起来 - map: "dbwcej", - common: "wkrfcz", - style: "fkofpc", - tile: "ok3b3m", - vectordrawlib: "4pdipq", - newvectordrawlib: "wbnuee", - groundoverlay: "ekozhc", - pointcollection: "feabuc", - marker: "00uyqy", - symbol: "cq3a5n", - canvablepath: "dia5aw", - vmlcontext: "phwtog", - markeranimation: "rfnmxu", - poly: "r52vuo", - draw: "jb4osz", - drawbysvg: "vxyn51", - drawbyvml: "whxmqq", - drawbycanvas: "ufwkvb", - infowindow: "wtflsn", - oppc: "10riq5", - opmb: "2c1ejz", - menu: "152mop", - control: "hlzh1t", - navictrl: "h32mnb", - geoctrl: "xprajs", - copyrightctrl: "gmc2ps", - citylistcontrol: "ms3ahy", - scommon: "oadc3d", - local: "k0pcpi", - route: "v4yyam", - othersearch: "pwg4ey", - mapclick: "e40viw", - buslinesearch: "vxmb31", - hotspot: "vuwxs4", - autocomplete: "punr3o", - coordtrans: "lmf5kv", - coordtransutils: "d33qf1", - convertor: "d0ze2w", - clayer: "0hwrfx", - pservice: "j5tlrp", - pcommon: "yqek4k", - panorama: "jbqj24", - panoramaflash: "dm4xq2", - vector: "2hrruc" - }; - z.Wy = function() { - function a(a) { - return e && !!c[b + a + "_" + Ub[a]] - } - var b = "BMap_" - , c = window.localStorage - , e = "localStorage"in window && c !== s && c !== l; - return { - ZY: e, - set: function(a, g) { - if (e) { - for (var i = b + a + "_", k = c.length, m; k--; ) - m = c.key(k), - -1 < m.indexOf(i) && c.removeItem(m); - try { - c.setItem(b + a + "_" + Ub[a], g) - } catch (n) { - c.clear() - } - } - }, - get: function(f) { - return e && a(f) ? c.getItem(b + f + "_" + Ub[f]) : t - }, - uK: a - } - }(); - function K() {} - z.object.extend(K, { - Cj: { - EG: -1, - cQ: 0, - cq: 1 - }, - GL: function() { - var a = "canvablepath" - , b = B.gV ? "newvectordrawlib" : "vectordrawlib"; - if (!H() || !Ob()) - Nb() || (Mb() ? a = "vmlcontext" : Ob()); - return { - tile: [b, "style"], - control: [], - marker: ["symbol"], - symbol: ["canvablepath", "common"], - canvablepath: "canvablepath" === a ? [] : [a], - vmlcontext: [], - style: [], - poly: ["marker", "drawbycanvas", "drawbysvg", "drawbyvml"], - drawbysvg: ["draw"], - drawbyvml: ["draw"], - drawbycanvas: ["draw"], - infowindow: ["common", "marker"], - menu: [], - oppc: [], - opmb: [], - scommon: [], - local: ["scommon"], - route: ["scommon"], - othersearch: ["scommon"], - autocomplete: ["scommon"], - citylistcontrol: ["autocomplete"], - mapclick: ["scommon"], - buslinesearch: ["route"], - hotspot: [], - coordtransutils: ["coordtrans"], - convertor: [], - clayer: ["tile"], - pservice: [], - pcommon: ["style", "pservice"], - panorama: ["pcommon"], - panoramaflash: ["pcommon"] - } - }, - U4: {}, - wG: { - tQ: B.ka + "getmodules?v=3.0", - WU: 5E3 - }, - MC: t, - Rd: { - xl: {}, - Hn: [], - cw: [] - }, - load: function(a, b, c) { - var e = this.kb(a); - if (e.Me == this.Cj.cq) - c && b(); - else { - if (e.Me == this.Cj.EG) { - this.AK(a); - this.SN(a); - var f = this; - f.MC == t && (f.MC = q, - setTimeout(function() { - for (var a = [], b = 0, c = f.Rd.Hn.length; b < c; b++) { - var e = f.Rd.Hn[b] - , n = ""; - ia.Wy.uK(e) ? n = ia.Wy.get(e) : (n = "", - a.push(e + "_" + Ub[e])); - f.Rd.cw.push({ - jN: e, - ZE: n - }) - } - f.MC = t; - f.Rd.Hn.length = 0; - //0 == a.length ? f.kL() : oa(f.wG.tQ + "&mod=" + a.join(",")) - // 修改 加载本地模块文件,在 modules 目录下 - console.log(a); //打印所需模块 - if( a.length > 0 ){ - for(i=0; i"); - this.Qa == t && z.D.U(this.C); - return this.C - }, - Nr: function() { - this.uc(this.j.anchor) - }, - uc: function(a) { - if (this.j2 || !Wa(a) || isNaN(a) || a < Wb || 3 < a) - a = this.defaultAnchor; - this.j = this.j || { - Cg: t - }; - this.j.za = this.j.za || this.defaultOffset; - var b = this.j.anchor; - this.j.anchor = a; - if (this.C) { - var c = this.C - , e = this.j.za.width - , f = this.j.za.height; - c.style.left = c.style.top = c.style.right = c.style.bottom = "auto"; - switch (a) { - case Wb: - c.style.top = f + "px"; - c.style.left = e + "px"; - break; - case Xb: - c.style.top = f + "px"; - c.style.right = e + "px"; - break; - case Yb: - c.style.bottom = f + "px"; - c.style.left = e + "px"; - break; - case 3: - c.style.bottom = f + "px", - c.style.right = e + "px" - } - c = ["TL", "TR", "BL", "BR"]; - z.D.Pb(this.C, "anchor" + c[b]); - z.D.Ua(this.C, "anchor" + c[a]) - } - }, - HD: function() { - return this.j.anchor - }, - getContainer: w("C"), - Ze: function(a) { - a instanceof O && (this.j = this.j || { - Cg: t - }, - this.j.za = new O(a.width,a.height), - this.C && this.uc(this.j.anchor)) - }, - Sf: function() { - return this.j.za - }, - Jd: w("C"), - show: function() { - this.Qa != q && (this.Qa = q, - this.C && z.D.show(this.C)) - }, - U: function() { - this.Qa != t && (this.Qa = t, - this.C && z.D.U(this.C)) - }, - isPrintable: function() { - return !!this.j.Cg - }, - jh: function() { - return !this.C && !this.B ? t : !!this.Qa - } - }); - var Wb = 0 - , Xb = 1 - , Yb = 2; - function jb(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - OF: a.showZoomInfo || q, - anchor: a.anchor, - za: a.offset, - type: a.type, - $W: a.enableGeolocation || t - }; - this.defaultAnchor = H() ? 3 : Wb; - this.defaultOffset = new O(10,10); - this.uc(a.anchor); - this.hn(a.type); - this.De() - } - z.lang.ta(jb, Vb, "NavigationControl"); - z.extend(jb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - hn: function(a) { - this.j.type = Wa(a) && 0 <= a && 3 >= a ? a : 0 - }, - ip: function() { - return this.j.type - }, - De: function() { - var a = this; - K.load("navictrl", function() { - a.zf() - }) - } - }); - function Zb(a) { - Vb.call(this); - a = a || {}; - this.j = { - anchor: a.anchor || Yb, - za: a.offset || new O(10,30), - O_: a.showAddressBar !== t, - U2: a.enableAutoLocation || t, - bN: a.locationIcon || s - }; - var b = this; - this.Hz = 1200; - b.I0 = []; - this.pe = []; - K.load("geoctrl", function() { - (function e() { - if (0 !== b.pe.length) { - var a = b.pe.shift(); - b[a.method].apply(b, a.arguments); - e() - } - } - )(); - b.sQ() - }); - Ra(Ia) - } - z.lang.ta(Zb, Vb, "GeolocationControl"); - z.extend(Zb.prototype, { - location: function() { - this.pe.push({ - method: "location", - arguments: arguments - }) - }, - getAddressComponent: ca(s) - }); - function $b(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - anchor: a.anchor, - za: a.offset - }; - this.cc = []; - this.defaultAnchor = Yb; - this.defaultOffset = new O(5,2); - this.uc(a.anchor); - this.nK = t; - this.De() - } - z.lang.ta($b, Vb, "CopyrightControl"); - z.object.extend($b.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - Bw: function(a) { - if (a && Wa(a.id) && !isNaN(a.id)) { - var b = { - bounds: s, - content: "" - }, c; - for (c in a) - b[c] = a[c]; - if (a = this.pm(a.id)) - for (var e in b) - a[e] = b[e]; - else - this.cc.push(b) - } - }, - pm: function(a) { - for (var b = 0, c = this.cc.length; b < c; b++) - if (this.cc[b].id == a) - return this.cc[b] - }, - PD: w("cc"), - qF: function(a) { - for (var b = 0, c = this.cc.length; b < c; b++) - this.cc[b].id == a && (r = this.cc.splice(b, 1), - b--, - c = this.cc.length) - }, - De: function() { - var a = this; - K.load("copyrightctrl", function() { - a.zf() - }) - } - }); - function lb(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - size: a.size || new O(150,150), - padding: 5, - Xa: a.isOpen === q ? q : t, - $0: 4, - za: a.offset, - anchor: a.anchor - }; - this.defaultAnchor = 3; - this.defaultOffset = new O(0,0); - this.Bq = this.Cq = 13; - this.uc(a.anchor); - this.Ce(this.j.size); - this.De() - } - z.lang.ta(lb, Vb, "OverviewMapControl"); - z.extend(lb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - uc: function(a) { - Vb.prototype.uc.call(this, a) - }, - se: function() { - this.se.mo = q; - this.j.Xa = !this.j.Xa; - this.C || (this.se.mo = t) - }, - Ce: function(a) { - a instanceof O || (a = new O(150,150)); - a.width = 0 < a.width ? a.width : 150; - a.height = 0 < a.height ? a.height : 150; - this.j.size = a - }, - cb: function() { - return this.j.size - }, - Xa: function() { - return this.j.Xa - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }) - } - }); - function ac(a) { - Vb.call(this); - a = a || {}; - this.defaultAnchor = Wb; - this.TV = a.canCheckSize === t ? t : q; - this.$i = ""; - this.defaultOffset = new O(10,10); - this.onChangeBefore = []; - this.onChangeAfter = []; - this.onChangeSuccess = []; - this.j = { - Cg: t, - za: a.offset || this.defaultOffset, - anchor: a.anchor || this.defaultAnchor, - expand: !!a.expand - }; - a.onChangeBefore && Xa(a.onChangeBefore) && this.onChangeBefore.push(a.onChangeBefore); - a.onChangeAfter && Xa(a.onChangeAfter) && this.onChangeAfter.push(a.onChangeAfter); - a.onChangeSuccess && Xa(a.onChangeSuccess) && this.onChangeSuccess.push(a.onChangeSuccess); - this.uc(a.anchor); - this.De() - } - z.lang.ta(ac, Vb, "CityListControl"); - z.object.extend(ac.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - De: function() { - var a = this; - K.load("citylistcontrol", function() { - a.zf() - }, q) - } - }); - function kb(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - color: "black", - fd: "metric", - za: a.offset - }; - this.defaultAnchor = Yb; - this.defaultOffset = new O(81,18); - this.uc(a.anchor); - this.Uh = { - metric: { - name: "metric", - CK: 1, - rM: 1E3, - bP: "\u7c73", - cP: "\u516c\u91cc" - }, - us: { - name: "us", - CK: 3.2808, - rM: 5280, - bP: "\u82f1\u5c3a", - cP: "\u82f1\u91cc" - } - }; - this.Uh[this.j.fd] || (this.j.fd = "metric"); - this.gJ = s; - this.GI = {}; - this.De() - } - z.lang.ta(kb, Vb, "ScaleControl"); - z.object.extend(kb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - Pk: function(a) { - this.j.color = a + "" - }, - n3: function() { - return this.j.color - }, - LF: function(a) { - this.j.fd = this.Uh[a] && this.Uh[a].name || this.j.fd - }, - sY: function() { - return this.j.fd - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }) - } - }); - var bc = 0; - function mb(a) { - Vb.call(this); - a = a || {}; - this.defaultAnchor = Xb; - this.defaultOffset = new O(10,10); - this.j = { - Cg: t, - mh: [La, Ya, Sa, Qa], - BW: ["B_DIMENSIONAL_MAP", "B_SATELLITE_MAP", "B_NORMAL_MAP"], - type: a.type || bc, - za: a.offset || this.defaultOffset, - dX: q - }; - this.uc(a.anchor); - "[object Array]" == Object.prototype.toString.call(a.mapTypes) && (this.j.mh = a.mapTypes.slice(0)); - this.De() - } - z.lang.ta(mb, Vb, "MapTypeControl"); - z.object.extend(mb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - Xy: function(a) { - this.B.ao = a - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }, q) - } - }); - function cc(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - za: a.offset, - anchor: a.anchor - }; - this.Ni = t; - this.hw = s; - this.QI = new dc({ - of: "api" - }); - this.RI = new ec(s,{ - of: "api" - }); - this.defaultAnchor = Xb; - this.defaultOffset = new O(10,10); - this.uc(a.anchor); - this.De(); - Ra(va) - } - z.lang.ta(cc, Vb, "PanoramaControl"); - z.extend(cc.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }) - } - }); - function fc(a) { - z.lang.Ca.call(this); - this.j = { - Wa: s, - cursor: "default" - }; - this.j = z.extend(this.j, a); - this.Mb = "contextmenu"; - this.B = s; - this.xa = []; - this.Kf = []; - this.Fe = []; - this.fx = this.qs = s; - this.Kh = t; - var b = this; - K.load("menu", function() { - b.ib() - }) - } - z.lang.ta(fc, z.lang.Ca, "ContextMenu"); - z.object.extend(fc.prototype, { - na: function(a, b) { - this.B = a; - this.Cl = b || s - }, - remove: function() { - this.B = this.Cl = s - }, - Dw: function(a) { - if (a && !("menuitem" != a.Mb || "" == a.Wg || 0 >= a.Vi)) { - for (var b = 0, c = this.xa.length; b < c; b++) - if (this.xa[b] === a) - return; - this.xa.push(a); - this.Kf.push(a) - } - }, - removeItem: function(a) { - if (a && "menuitem" == a.Mb) { - for (var b = 0, c = this.xa.length; b < c; b++) - this.xa[b] === a && (this.xa[b].remove(), - this.xa.splice(b, 1), - c--); - b = 0; - for (c = this.Kf.length; b < c; b++) - this.Kf[b] === a && (this.Kf[b].remove(), - this.Kf.splice(b, 1), - c--) - } - }, - bC: function() { - this.xa.push({ - Mb: "divider", - Lj: this.Fe.length - }); - this.Fe.push({ - D: s - }) - }, - sF: function(a) { - if (this.Fe[a]) { - for (var b = 0, c = this.xa.length; b < c; b++) - this.xa[b] && ("divider" == this.xa[b].Mb && this.xa[b].Lj == a) && (this.xa.splice(b, 1), - c--), - this.xa[b] && ("divider" == this.xa[b].Mb && this.xa[b].Lj > a) && this.xa[b].Lj--; - this.Fe.splice(a, 1) - } - }, - Jd: w("C"), - show: function() { - this.Kh != q && (this.Kh = q) - }, - U: function() { - this.Kh != t && (this.Kh = t) - }, - t_: function(a) { - a && (this.j.cursor = a) - }, - getItem: function(a) { - return this.Kf[a] - } - }); - var gc = G.qa + "menu_zoom_in.png" - , hc = G.qa + "menu_zoom_out.png"; - function ic(a, b, c) { - if (a && Xa(b)) { - z.lang.Ca.call(this); - this.j = { - width: 100, - id: "", - Dm: "" - }; - c = c || {}; - this.j.width = 1 * c.width ? c.width : 100; - this.j.id = c.id ? c.id : ""; - this.j.Dm = c.iconUrl ? c.iconUrl : ""; - this.Wg = a + ""; - this.Kz = b; - this.B = s; - this.Mb = "menuitem"; - this.Ur = this.yv = this.C = this.Eh = s; - this.Ih = q; - var e = this; - K.load("menu", function() { - e.ib() - }) - } - } - z.lang.ta(ic, z.lang.Ca, "MenuItem"); - z.object.extend(ic.prototype, { - na: function(a, b) { - this.B = a; - this.Eh = b - }, - remove: function() { - this.B = this.Eh = s - }, - cu: function(a) { - a && (this.Wg = a + "") - }, - Rb: function(a) { - a && (this.j.Dm = a) - }, - Jd: w("C"), - enable: function() { - this.Ih = q - }, - disable: function() { - this.Ih = t - } - }); - function fb(a, b) { - a && !b && (b = a); - this.Ie = this.Xd = this.Ne = this.Zd = this.Pl = this.Al = s; - a && (this.Pl = new J(a.lng,a.lat), - this.Al = new J(b.lng,b.lat), - this.Ne = a.lng, - this.Zd = a.lat, - this.Ie = b.lng, - this.Xd = b.lat) - } - z.object.extend(fb.prototype, { - tj: function() { - return !this.Pl || !this.Al - }, - pb: function(a) { - return !(a instanceof fb) || this.tj() ? t : this.Ve().pb(a.Ve()) && this.Rf().pb(a.Rf()) - }, - Ve: w("Pl"), - Rf: w("Al"), - kW: function(a) { - return !(a instanceof fb) || this.tj() || a.tj() ? t : a.Ne > this.Ne && a.Ie < this.Ie && a.Zd > this.Zd && a.Xd < this.Xd - }, - Ka: function() { - return this.tj() ? s : new J((this.Ne + this.Ie) / 2,(this.Zd + this.Xd) / 2) - }, - ot: function(a) { - if (!(a instanceof fb) || Math.max(a.Ne, a.Ie) < Math.min(this.Ne, this.Ie) || Math.min(a.Ne, a.Ie) > Math.max(this.Ne, this.Ie) || Math.max(a.Zd, a.Xd) < Math.min(this.Zd, this.Xd) || Math.min(a.Zd, a.Xd) > Math.max(this.Zd, this.Xd)) - return s; - var b = Math.max(this.Ne, a.Ne) - , c = Math.min(this.Ie, a.Ie) - , e = Math.max(this.Zd, a.Zd) - , a = Math.min(this.Xd, a.Xd); - return new fb(new J(b,e),new J(c,a)) - }, - js: function(a) { - return !(a instanceof J) || this.tj() ? t : a.lng >= this.Ne && a.lng <= this.Ie && a.lat >= this.Zd && a.lat <= this.Xd - }, - extend: function(a) { - if (a instanceof J) { - var b = a.lng - , a = a.lat; - this.Pl || (this.Pl = new J(0,0)); - this.Al || (this.Al = new J(0,0)); - if (!this.Ne || this.Ne > b) - this.Pl.lng = this.Ne = b; - if (!this.Ie || this.Ie < b) - this.Al.lng = this.Ie = b; - if (!this.Zd || this.Zd > a) - this.Pl.lat = this.Zd = a; - if (!this.Xd || this.Xd < a) - this.Al.lat = this.Xd = a - } - }, - YF: function() { - return this.tj() ? new J(0,0) : new J(Math.abs(this.Ie - this.Ne),Math.abs(this.Xd - this.Zd)) - } - }); - function J(a, b) { - isNaN(a) && (a = Lb(a), - a = isNaN(a) ? 0 : a); - $a(a) && (a = parseFloat(a)); - isNaN(b) && (b = Lb(b), - b = isNaN(b) ? 0 : b); - $a(b) && (b = parseFloat(b)); - this.lng = a; - this.lat = b - } - J.yM = function(a) { - return a && 180 >= a.lng && -180 <= a.lng && 74 >= a.lat && -74 <= a.lat - } - ; - J.prototype.pb = function(a) { - return a && this.lat == a.lat && this.lng == a.lng - } - ; - function jc() {} - jc.prototype.kh = function() { - aa("lngLatToPoint\u65b9\u6cd5\u672a\u5b9e\u73b0") - } - ; - jc.prototype.xj = function() { - aa("pointToLngLat\u65b9\u6cd5\u672a\u5b9e\u73b0") - } - ; - function kc() {} - ;var eb = { - EK: function(a, b, c) { - K.load("coordtransutils", function() { - eb.AV(a, b, c) - }, q) - }, - DK: function(a, b, c) { - K.load("coordtransutils", function() { - eb.zV(a, b, c) - }, q) - } - }; - function lc() { - this.Pa = []; - var a = this; - K.load("convertor", function() { - a.qQ() - }) - } - z.ta(lc, z.lang.Ca, "Convertor"); - z.extend(lc.prototype, { - translate: function(a, b, c, e) { - this.Pa.push({ - method: "translate", - arguments: [a, b, c, e] - }) - } - }); - T(lc.prototype, { - translate: lc.prototype.translate - }); - function S() {} - S.prototype = new jc; - z.extend(S, { - GP: 6370996.81, - IG: [1.289059486E7, 8362377.87, 5591021, 3481989.83, 1678043.12, 0], - Nu: [75, 60, 45, 30, 15, 0], - MP: [[1.410526172116255E-8, 8.98305509648872E-6, -1.9939833816331, 200.9824383106796, -187.2403703815547, 91.6087516669843, -23.38765649603339, 2.57121317296198, -0.03801003308653, 1.73379812E7], [-7.435856389565537E-9, 8.983055097726239E-6, -0.78625201886289, 96.32687599759846, -1.85204757529826, -59.36935905485877, 47.40033549296737, -16.50741931063887, 2.28786674699375, 1.026014486E7], [-3.030883460898826E-8, 8.98305509983578E-6, 0.30071316287616, 59.74293618442277, 7.357984074871, -25.38371002664745, 13.45380521110908, -3.29883767235584, 0.32710905363475, 6856817.37], [-1.981981304930552E-8, 8.983055099779535E-6, 0.03278182852591, 40.31678527705744, 0.65659298677277, -4.44255534477492, 0.85341911805263, 0.12923347998204, -0.04625736007561, 4482777.06], [3.09191371068437E-9, 8.983055096812155E-6, 6.995724062E-5, 23.10934304144901, -2.3663490511E-4, -0.6321817810242, -0.00663494467273, 0.03430082397953, -0.00466043876332, 2555164.4], [2.890871144776878E-9, 8.983055095805407E-6, -3.068298E-8, 7.47137025468032, -3.53937994E-6, -0.02145144861037, -1.234426596E-5, 1.0322952773E-4, -3.23890364E-6, 826088.5]], - FG: [[-0.0015702102444, 111320.7020616939, 1704480524535203, -10338987376042340, 26112667856603880, -35149669176653700, 26595700718403920, -10725012454188240, 1800819912950474, 82.5], [8.277824516172526E-4, 111320.7020463578, 6.477955746671607E8, -4.082003173641316E9, 1.077490566351142E10, -1.517187553151559E10, 1.205306533862167E10, -5.124939663577472E9, 9.133119359512032E8, 67.5], [0.00337398766765, 111320.7020202162, 4481351.045890365, -2.339375119931662E7, 7.968221547186455E7, -1.159649932797253E8, 9.723671115602145E7, -4.366194633752821E7, 8477230.501135234, 52.5], [0.00220636496208, 111320.7020209128, 51751.86112841131, 3796837.749470245, 992013.7397791013, -1221952.21711287, 1340652.697009075, -620943.6990984312, 144416.9293806241, 37.5], [-3.441963504368392E-4, 111320.7020576856, 278.2353980772752, 2485758.690035394, 6070.750963243378, 54821.18345352118, 9540.606633304236, -2710.55326746645, 1405.483844121726, 22.5], [-3.218135878613132E-4, 111320.7020701615, 0.00369383431289, 823725.6402795718, 0.46104986909093, 2351.343141331292, 1.58060784298199, 8.77738589078284, 0.37238884252424, 7.45]], - t3: function(a, b) { - if (!a || !b) - return 0; - var c, e, a = this.Tb(a); - if (!a) - return 0; - c = this.Xk(a.lng); - e = this.Xk(a.lat); - b = this.Tb(b); - return !b ? 0 : this.pf(c, this.Xk(b.lng), e, this.Xk(b.lat)) - }, - $o: function(a, b) { - if (!a || !b) - return 0; - a.lng = this.WD(a.lng, -180, 180); - a.lat = this.aE(a.lat, -74, 74); - b.lng = this.WD(b.lng, -180, 180); - b.lat = this.aE(b.lat, -74, 74); - return this.pf(this.Xk(a.lng), this.Xk(b.lng), this.Xk(a.lat), this.Xk(b.lat)) - }, - Tb: function(a) { - if (a === s || a === l) - return new J(0,0); - var b, c; - b = new J(Math.abs(a.lng),Math.abs(a.lat)); - for (var e = 0; e < this.IG.length; e++) - if (b.lat >= this.IG[e]) { - c = this.MP[e]; - break - } - a = this.FK(a, c); - return a = new J(a.lng.toFixed(6),a.lat.toFixed(6)) - }, - Eb: function(a) { - if (a === s || a === l || 180 < a.lng || -180 > a.lng || 90 < a.lat || -90 > a.lat) - return new J(0,0); - var b, c; - a.lng = this.WD(a.lng, -180, 180); - a.lat = this.aE(a.lat, -74, 74); - b = new J(a.lng,a.lat); - for (var e = 0; e < this.Nu.length; e++) - if (b.lat >= this.Nu[e]) { - c = this.FG[e]; - break - } - if (!c) - for (e = 0; e < this.Nu.length; e++) - if (b.lat <= -this.Nu[e]) { - c = this.FG[e]; - break - } - a = this.FK(a, c); - return a = new J(a.lng.toFixed(2),a.lat.toFixed(2)) - }, - FK: function(a, b) { - if (a && b) { - var c = b[0] + b[1] * Math.abs(a.lng) - , e = Math.abs(a.lat) / b[9] - , e = b[2] + b[3] * e + b[4] * e * e + b[5] * e * e * e + b[6] * e * e * e * e + b[7] * e * e * e * e * e + b[8] * e * e * e * e * e * e - , c = c * (0 > a.lng ? -1 : 1) - , e = e * (0 > a.lat ? -1 : 1); - return new J(c,e) - } - }, - pf: function(a, b, c, e) { - return this.GP * Math.acos(Math.sin(c) * Math.sin(e) + Math.cos(c) * Math.cos(e) * Math.cos(b - a)) - }, - Xk: function(a) { - return Math.PI * a / 180 - }, - B5: function(a) { - return 180 * a / Math.PI - }, - aE: function(a, b, c) { - b != s && (a = Math.max(a, b)); - c != s && (a = Math.min(a, c)); - return a - }, - WD: function(a, b, c) { - for (; a > c; ) - a -= c - b; - for (; a < b; ) - a += c - b; - return a - } - }); - z.extend(S.prototype, { - vj: function(a) { - return S.Eb(a) - }, - kh: function(a) { - a = S.Eb(a); - return new Q(a.lng,a.lat) - }, - nh: function(a) { - return S.Tb(a) - }, - xj: function(a) { - a = new J(a.x,a.y); - return S.Tb(a) - }, - $b: function(a, b, c, e, f) { - if (a) - return a = this.vj(a, f), - b = this.dc(b), - new Q(Math.round((a.lng - c.lng) / b + e.width / 2),Math.round((c.lat - a.lat) / b + e.height / 2)) - }, - xb: function(a, b, c, e, f) { - if (a) - return b = this.dc(b), - this.nh(new J(c.lng + b * (a.x - e.width / 2),c.lat - b * (a.y - e.height / 2)), f) - }, - dc: function(a) { - return Math.pow(2, 18 - a) - } - }); - function hb() { - this.$i = "bj" - } - hb.prototype = new S; - z.extend(hb.prototype, { - vj: function(a, b) { - return this.bR(b, S.Eb(a)) - }, - nh: function(a, b) { - return S.Tb(this.cR(b, a)) - }, - lngLatToPointFor3D: function(a, b) { - var c = this - , e = S.Eb(a); - K.load("coordtrans", function() { - var a = kc.ZD(c.$i || "bj", e) - , a = new Q(a.x,a.y); - b && b(a) - }, q) - }, - pointToLngLatFor3D: function(a, b) { - var c = this - , e = new J(a.x,a.y); - K.load("coordtrans", function() { - var a = kc.XD(c.$i || "bj", e) - , a = new J(a.lng,a.lat) - , a = S.Tb(a); - b && b(a) - }, q) - }, - bR: function(a, b) { - if (K.kb("coordtrans").Me == K.Cj.cq) { - var c = kc.ZD(a || "bj", b); - return new J(c.x,c.y) - } - K.load("coordtrans", u()); - return new J(0,0) - }, - cR: function(a, b) { - if (K.kb("coordtrans").Me == K.Cj.cq) { - var c = kc.XD(a || "bj", b); - return new J(c.lng,c.lat) - } - K.load("coordtrans", u()); - return new J(0,0) - }, - dc: function(a) { - return Math.pow(2, 20 - a) - } - }); - function mc() { - this.Mb = "overlay" - } - z.lang.ta(mc, z.lang.Ca, "Overlay"); - mc.Ck = function(a) { - a *= 1; - return !a ? 0 : -1E5 * a << 1 - } - ; - z.extend(mc.prototype, { - He: function(a) { - if (!this.V && Xa(this.initialize) && (this.V = this.initialize(a))) - this.V.style.WebkitUserSelect = "none"; - this.draw() - }, - initialize: function() { - aa("initialize\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - draw: function() { - aa("draw\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - remove: function() { - this.V && this.V.parentNode && this.V.parentNode.removeChild(this.V); - this.V = s; - this.dispatchEvent(new P("onremove")) - }, - U: function() { - this.V && z.D.U(this.V) - }, - show: function() { - this.V && z.D.show(this.V) - }, - jh: function() { - return !this.V || "none" == this.V.style.display || "hidden" == this.V.style.visibility ? t : q - } - }); - B.Ye(function(a) { - function b(a, b) { - var c = L("div") - , i = c.style; - i.position = "absolute"; - i.top = i.left = i.width = i.height = "0"; - i.zIndex = b; - a.appendChild(c); - return c - } - var c = a.R; - c.rd = a.rd = b(a.platform, 200); - a.Yd.BD = b(c.rd, 800); - a.Yd.RE = b(c.rd, 700); - a.Yd.sL = b(c.rd, 600); - a.Yd.KE = b(c.rd, 500); - a.Yd.fN = b(c.rd, 400); - a.Yd.gN = b(c.rd, 300); - a.Yd.nP = b(c.rd, 201); - a.Yd.Et = b(c.rd, 200) - }); - function gb() { - z.lang.Ca.call(this); - mc.call(this); - this.map = s; - this.Qa = q; - this.zb = s; - this.vH = 0 - } - z.lang.ta(gb, mc, "OverlayInternal"); - z.extend(gb.prototype, { - initialize: function(a) { - this.map = a; - z.lang.Ca.call(this, this.aa); - return s - }, - Dx: w("map"), - draw: u(), - Ej: u(), - remove: function() { - this.map = s; - z.lang.hx(this.aa); - mc.prototype.remove.call(this) - }, - U: function() { - this.Qa !== t && (this.Qa = t) - }, - show: function() { - this.Qa !== q && (this.Qa = q) - }, - jh: function() { - return !this.V ? t : !!this.Qa - }, - La: w("V"), - lO: function(a) { - var a = a || {}, b; - for (b in a) - this.z[b] = a[b] - }, - Sp: ba("zIndex"), - gj: function() { - this.z.gj = q - }, - MW: function() { - this.z.gj = t - }, - yo: ba("lg"), - Cp: function() { - this.lg = s - } - }); - function nc() { - this.map = s; - this.ya = {}; - this.Ee = [] - } - B.Ye(function(a) { - var b = new nc; - b.map = a; - a.ya = b.ya; - a.Ee = b.Ee; - a.addEventListener("load", function(a) { - b.draw(a) - }); - a.addEventListener("moveend", function(a) { - b.draw(a) - }); - z.ca.ia && 8 > z.ca.ia || "BackCompat" === document.compatMode ? a.addEventListener("zoomend", function(a) { - setTimeout(function() { - b.draw(a) - }, 20) - }) : a.addEventListener("zoomend", function(a) { - b.draw(a) - }); - a.addEventListener("maptypechange", function(a) { - b.draw(a) - }); - a.addEventListener("addoverlay", function(a) { - a = a.target; - if (a instanceof gb) - b.ya[a.aa] || (b.ya[a.aa] = a); - else { - for (var e = t, f = 0, g = b.Ee.length; f < g; f++) - if (b.Ee[f] === a) { - e = q; - break - } - e || b.Ee.push(a) - } - }); - a.addEventListener("removeoverlay", function(a) { - a = a.target; - if (a instanceof gb) - delete b.ya[a.aa]; - else - for (var e = 0, f = b.Ee.length; e < f; e++) - if (b.Ee[e] === a) { - b.Ee.splice(e, 1); - break - } - }); - a.addEventListener("clearoverlays", function() { - this.Yc(); - for (var a in b.ya) - b.ya[a].z.gj && (b.ya[a].remove(), - delete b.ya[a]); - a = 0; - for (var e = b.Ee.length; a < e; a++) - b.Ee[a].enableMassClear !== t && (b.Ee[a].remove(), - b.Ee[a] = s, - b.Ee.splice(a, 1), - a--, - e--) - }); - a.addEventListener("infowindowopen", function() { - var a = this.zb; - a && (z.D.U(a.Ac), - z.D.U(a.ac)) - }); - a.addEventListener("movestart", function() { - this.hh() && this.hh().mJ() - }); - a.addEventListener("moveend", function() { - this.hh() && this.hh().cJ() - }) - }); - nc.prototype.draw = function(a) { - if (B.hq) { - var b = B.hq.Ws(this.map); - "canvas" === b.Mb && b.canvas && b.XQ(b.canvas.getContext("2d")) - } - for (var c in this.ya) - this.ya[c].draw(a); - z.mc.Fb(this.Ee, function(a) { - a.draw() - }); - this.map.R.qb && this.map.R.qb.sa(); - B.hq && b.IF() - } - ; - function oc(a) { - gb.call(this); - a = a || {}; - this.z = { - strokeColor: a.strokeColor || "#3a6bdb", - rc: a.strokeWeight || 5, - td: a.strokeOpacity || 0.65, - strokeStyle: a.strokeStyle || "solid", - gj: a.enableMassClear === t ? t : q, - zk: s, - um: s, - mf: a.enableEditing === q ? q : t, - kN: 5, - G0: t, - jf: a.enableClicking === t ? t : q, - ji: a.icons && 0 < a.icons.length ? a.icons : s - }; - 0 >= this.z.rc && (this.z.rc = 5); - if (0 > this.z.td || 1 < this.z.td) - this.z.td = 0.65; - if (0 > this.z.tg || 1 < this.z.tg) - this.z.tg = 0.65; - "solid" != this.z.strokeStyle && "dashed" != this.z.strokeStyle && (this.z.strokeStyle = "solid"); - this.V = s; - this.Vu = new fb(0,0); - this.gf = []; - this.tc = []; - this.Ra = {} - } - z.lang.ta(oc, gb, "Graph"); - oc.yx = function(a) { - var b = []; - if (!a) - return b; - $a(a) && z.mc.Fb(a.split(";"), function(a) { - a = a.split(","); - b.push(new J(a[0],a[1])) - }); - "[object Array]" == Object.prototype.toString.apply(a) && 0 < a.length && (b = a); - return b - } - ; - oc.eF = [0.09, 0.0050, 1.0E-4, 1.0E-5]; - z.extend(oc.prototype, { - initialize: function(a) { - this.map = a; - return s - }, - draw: u(), - Mr: function(a) { - this.gf.length = 0; - this.ja = oc.yx(a).slice(0); - this.Bh() - }, - ke: function(a) { - this.Mr(a) - }, - Bh: function() { - if (this.ja) { - var a = this; - a.Vu = new fb; - z.mc.Fb(this.ja, function(b) { - a.Vu.extend(b) - }) - } - }, - Ue: w("ja"), - gn: function(a, b) { - b && this.ja[a] && (this.gf.length = 0, - this.ja[a] = new J(b.lng,b.lat), - this.Bh()) - }, - setStrokeColor: function(a) { - this.z.strokeColor = a - }, - jY: function() { - return this.z.strokeColor - }, - Rp: function(a) { - 0 < a && (this.z.rc = a) - }, - WL: function() { - return this.z.rc - }, - Pp: function(a) { - a == l || (1 < a || 0 > a) || (this.z.td = a) - }, - kY: function() { - return this.z.td - }, - Xt: function(a) { - 1 < a || 0 > a || (this.z.tg = a) - }, - HX: function() { - return this.z.tg - }, - Qp: function(a) { - "solid" != a && "dashed" != a || (this.z.strokeStyle = a) - }, - VL: function() { - return this.z.strokeStyle - }, - setFillColor: function(a) { - this.z.fillColor = a || "" - }, - GX: function() { - return this.z.fillColor - }, - ve: w("Vu"), - remove: function() { - this.map && this.map.removeEventListener("onmousemove", this.vv); - gb.prototype.remove.call(this); - this.gf.length = 0 - }, - mf: function() { - if (!(2 > this.ja.length)) { - this.z.mf = q; - var a = this; - K.load("poly", function() { - a.Ul() - }, q) - } - }, - LW: function() { - this.z.mf = t; - var a = this; - K.load("poly", function() { - a.nk() - }, q) - }, - DX: function() { - return this.z.mf - } - }); - function pc(a) { - gb.call(this); - this.V = this.map = s; - this.z = { - width: 0, - height: 0, - za: new O(0,0), - opacity: 1, - background: "transparent", - ey: 1, - SM: "#000", - hZ: "solid", - point: s - }; - this.lO(a); - this.point = this.z.point - } - z.lang.ta(pc, gb, "Division"); - z.extend(pc.prototype, { - Ej: function() { - var a = this.z - , b = this.content - , c = ['
'); - c.push(b); - c.push("
"); - this.V = Ab(this.map.Tf().RE, c.join("")) - }, - initialize: function(a) { - this.map = a; - this.Ej(); - this.V && z.M(this.V, H() ? "touchstart" : "mousedown", function(a) { - ma(a) - }); - return this.V - }, - draw: function() { - var a = this.map.Xe(this.z.point); - this.z.za = new O(-Math.round(this.z.width / 2) - Math.round(this.z.ey),-Math.round(this.z.height / 2) - Math.round(this.z.ey)); - this.V.style.left = a.x + this.z.za.width + "px"; - this.V.style.top = a.y + this.z.za.height + "px" - }, - ga: function() { - return this.z.point - }, - L1: function() { - return this.map.$b(this.ga()) - }, - sa: function(a) { - this.z.point = a; - this.draw() - }, - u_: function(a, b) { - this.z.width = Math.round(a); - this.z.height = Math.round(b); - this.V && (this.V.style.width = this.z.width + "px", - this.V.style.height = this.z.height + "px", - this.draw()) - } - }); - function qc(a, b, c) { - a && b && (this.imageUrl = a, - this.size = b, - a = new O(Math.floor(b.width / 2),Math.floor(b.height / 2)), - c = c || {}, - a = c.anchor || a, - b = c.imageOffset || new O(0,0), - this.imageSize = c.imageSize, - this.anchor = a, - this.imageOffset = b, - this.infoWindowAnchor = c.infoWindowAnchor || this.anchor, - this.printImageUrl = c.printImageUrl || "") - } - z.extend(qc.prototype, { - mO: function(a) { - a && (this.imageUrl = a) - }, - K_: function(a) { - a && (this.printImageUrl = a) - }, - Ce: function(a) { - a && (this.size = new O(a.width,a.height)) - }, - uc: function(a) { - a && (this.anchor = new O(a.width,a.height)) - }, - Yt: function(a) { - a && (this.imageOffset = new O(a.width,a.height)) - }, - z_: function(a) { - a && (this.infoWindowAnchor = new O(a.width,a.height)) - }, - w_: function(a) { - a && (this.imageSize = new O(a.width,a.height)) - }, - toString: ca("Icon") - }); - function rc(a, b) { - if (a) { - b = b || {}; - this.style = { - anchor: b.anchor || new O(0,0), - fillColor: b.fillColor || "#000", - tg: b.fillOpacity || 0, - scale: b.scale || 1, - rotation: b.rotation || 0, - strokeColor: b.strokeColor || "#000", - td: b.strokeOpacity || 1, - rc: b.strokeWeight - }; - this.Mb = "number" === typeof a ? a : "UserDefined"; - this.Di = this.style.anchor; - this.rr = new O(0,0); - this.anchor = s; - this.vB = a; - var c = this; - K.load("symbol", function() { - c.Mn() - }, q) - } - } - z.extend(rc.prototype, { - setPath: ba("vB"), - setAnchor: function(a) { - this.Di = this.style.anchor = a - }, - setRotation: function(a) { - this.style.rotation = a - }, - setScale: function(a) { - this.style.scale = a - }, - setStrokeWeight: function(a) { - this.style.rc = a - }, - setStrokeColor: function(a) { - a = z.is.AC(a, this.style.td); - this.style.strokeColor = a - }, - setStrokeOpacity: function(a) { - this.style.td = a - }, - setFillOpacity: function(a) { - this.style.tg = a - }, - setFillColor: function(a) { - this.style.fillColor = a - } - }); - function sc(a, b, c, e) { - a && (this.Ov = {}, - this.qL = e ? !!e : t, - this.Vc = [], - this.c0 = a instanceof rc ? a : s, - this.WI = b === l ? q : !!(b.indexOf("%") + 1), - this.Zj = isNaN(parseFloat(b)) ? 1 : this.WI ? parseFloat(b) / 100 : parseFloat(b), - this.XI = !!(c.indexOf("%") + 1), - this.repeat = c != l ? this.XI ? parseFloat(c) / 100 : parseFloat(c) : 0) - } - ;function tc(a, b) { - z.lang.Ca.call(this); - this.content = a; - this.map = s; - b = b || {}; - this.z = { - width: b.width || 0, - height: b.height || 0, - maxWidth: b.maxWidth || 730, - za: b.offset || new O(0,0), - title: b.title || "", - SE: b.maxContent || "", - dh: b.enableMaximize || t, - Ls: b.enableAutoPan === t ? t : q, - lD: b.enableCloseOnClick === t ? t : q, - margin: b.margin || [10, 10, 40, 10], - vC: b.collisions || [[10, 10], [10, 10], [10, 10], [10, 10]], - GY: t, - AZ: b.onClosing || ca(q), - hL: t, - qD: b.enableParano === q ? q : t, - message: b.message, - sD: b.enableSearchTool === q ? q : t, - Ox: b.headerContent || "", - mD: b.enableContentScroll || t - }; - if (0 != this.z.width && (220 > this.z.width && (this.z.width = 220), - 730 < this.z.width)) - this.z.width = 730; - if (0 != this.z.height && (60 > this.z.height && (this.z.height = 60), - 650 < this.z.height)) - this.z.height = 650; - if (0 != this.z.maxWidth && (220 > this.z.maxWidth && (this.z.maxWidth = 220), - 730 < this.z.maxWidth)) - this.z.maxWidth = 730; - this.de = t; - this.yi = G.qa; - this.fb = s; - var c = this; - K.load("infowindow", function() { - c.ib() - }) - } - z.lang.ta(tc, z.lang.Ca, "InfoWindow"); - z.extend(tc.prototype, { - setWidth: function(a) { - !a && 0 != a || (isNaN(a) || 0 > a) || (0 != a && (220 > a && (a = 220), - 730 < a && (a = 730)), - this.z.width = a) - }, - setHeight: function(a) { - !a && 0 != a || (isNaN(a) || 0 > a) || (0 != a && (60 > a && (a = 60), - 650 < a && (a = 650)), - this.z.height = a) - }, - qO: function(a) { - !a && 0 != a || (isNaN(a) || 0 > a) || (0 != a && (220 > a && (a = 220), - 730 < a && (a = 730)), - this.z.maxWidth = a) - }, - Ec: function(a) { - this.z.title = a - }, - getTitle: function() { - return this.z.title - }, - dd: ba("content"), - xk: w("content"), - $t: function(a) { - this.z.SE = a + "" - }, - je: u(), - Ls: function() { - this.z.Ls = q - }, - disableAutoPan: function() { - this.z.Ls = t - }, - enableCloseOnClick: function() { - this.z.lD = q - }, - disableCloseOnClick: function() { - this.z.lD = t - }, - dh: function() { - this.z.dh = q - }, - kx: function() { - this.z.dh = t - }, - show: function() { - this.Qa = q - }, - U: function() { - this.Qa = t - }, - close: function() { - this.U() - }, - hy: function() { - this.de = q - }, - restore: function() { - this.de = t - }, - jh: function() { - return this.Xa() - }, - Xa: ca(t), - ga: function() { - if (this.fb && this.fb.ga) - return this.fb.ga() - }, - Sf: function() { - return this.z.za - } - }); - Ka.prototype.pc = function(a, b) { - if (a instanceof tc && b instanceof J) { - var c = this.R; - c.Nm ? c.Nm.sa(b) : (c.Nm = new U(b,{ - icon: new qc(G.qa + "blank.gif",{ - width: 1, - height: 1 - }), - offset: new O(0,0), - clickable: t - }), - c.Nm.bS = 1); - this.Ga(c.Nm); - c.Nm.pc(a) - } - } - ; - Ka.prototype.Yc = function() { - var a = this.R.qb || this.R.rl; - a && a.fb && a.fb.Yc() - } - ; - gb.prototype.pc = function(a) { - this.map && (this.map.Yc(), - a.Qa = q, - this.map.R.rl = a, - a.fb = this, - z.lang.Ca.call(a, a.aa)) - } - ; - gb.prototype.Yc = function() { - this.map && this.map.R.rl && (this.map.R.rl.Qa = t, - z.lang.hx(this.map.R.rl.aa), - this.map.R.rl = s) - } - ; - function uc(a, b) { - gb.call(this); - this.content = a; - this.V = this.map = s; - b = b || {}; - this.z = { - width: 0, - za: b.offset || new O(0,0), - Wp: { - backgroundColor: "#fff", - border: "1px solid #f00", - padding: "1px", - whiteSpace: "nowrap", - font: "12px " + G.fontFamily, - zIndex: "80", - MozUserSelect: "none" - }, - position: b.position || s, - gj: b.enableMassClear === t ? t : q, - jf: q - }; - 0 > this.z.width && (this.z.width = 0); - Hb(b.enableClicking) && (this.z.jf = b.enableClicking); - this.point = this.z.position; - var c = this; - K.load("marker", function() { - c.ib() - }) - } - z.lang.ta(uc, gb, "Label"); - z.extend(uc.prototype, { - ga: function() { - return this.Dv ? this.Dv.ga() : this.point - }, - sa: function(a) { - a instanceof J && !this.Ex() && (this.point = this.z.position = new J(a.lng,a.lat)) - }, - dd: ba("content"), - HF: function(a) { - 0 <= a && 1 >= a && (this.z.opacity = a) - }, - Ze: function(a) { - a instanceof O && (this.z.za = new O(a.width,a.height)) - }, - Sf: function() { - return this.z.za - }, - Md: function(a) { - a = a || {}; - this.z.Wp = z.extend(this.z.Wp, a) - }, - ti: function(a) { - return this.Md(a) - }, - Ec: function(a) { - this.z.title = a || "" - }, - getTitle: function() { - return this.z.title - }, - pO: function(a) { - this.point = (this.Dv = a) ? this.z.position = a.ga() : this.z.position = s - }, - Ex: function() { - return this.Dv || s - }, - xk: w("content") - }); - function vc(a, b) { - if (0 !== arguments.length) { - gb.apply(this, arguments); - b = b || {}; - this.z = { - bb: a, - opacity: b.opacity || 1, - Gm: b.Gm || "", - Bs: b.displayOnMinLevel || 1, - gj: b.enableMassClear === t ? t : q, - As: b.displayOnMaxLevel || 19, - X_: b.stretch || t - }; - var c = this; - K.load("groundoverlay", function() { - c.ib() - }) - } - } - z.lang.ta(vc, gb, "GroundOverlay"); - z.extend(vc.prototype, { - setBounds: function(a) { - this.z.bb = a - }, - getBounds: function() { - return this.z.bb - }, - setOpacity: function(a) { - this.z.opacity = a - }, - getOpacity: function() { - return this.z.opacity - }, - setImageURL: function(a) { - this.z.Gm = a - }, - getImageURL: function() { - return this.z.Gm - }, - setDisplayOnMinLevel: function(a) { - this.z.Bs = a - }, - getDisplayOnMinLevel: function() { - return this.z.Bs - }, - setDisplayOnMaxLevel: function(a) { - this.z.As = a - }, - getDisplayOnMaxLevel: function() { - return this.z.As - } - }); - var wc = 3 - , xc = 4; - function yc() { - var a = document.createElement("canvas"); - return !(!a.getContext || !a.getContext("2d")) - } - function zc(a, b) { - var c = this; - yc() && (a === l && aa(Error("\u6ca1\u6709\u4f20\u5165points\u6570\u636e")), - "[object Array]" !== Object.prototype.toString.call(a) && aa(Error("points\u6570\u636e\u4e0d\u662f\u6570\u7ec4")), - b = b || {}, - gb.apply(c, arguments), - c.ea = { - ja: a - }, - c.z = { - shape: b.shape || wc, - size: b.size || xc, - color: b.color || "#fa937e", - gj: q - }, - this.sB = [], - this.pe = [], - K.load("pointcollection", function() { - for (var a = 0, b; b = c.sB[a]; a++) - c[b.method].apply(c, b.arguments); - for (a = 0; b = c.pe[a]; a++) - c[b.method].apply(c, b.arguments) - })) - } - z.lang.ta(zc, gb, "PointCollection"); - z.extend(zc.prototype, { - initialize: function(a) { - this.sB && this.sB.push({ - method: "initialize", - arguments: arguments - }) - }, - setPoints: function(a) { - this.pe && this.pe.push({ - method: "setPoints", - arguments: arguments - }) - }, - setStyles: function(a) { - this.pe && this.pe.push({ - method: "setStyles", - arguments: arguments - }) - }, - clear: function() { - this.pe && this.pe.push({ - method: "clear", - arguments: arguments - }) - }, - remove: function() { - this.pe && this.pe.push({ - method: "remove", - arguments: arguments - }) - } - }); - var Ac = new qc(G.qa + "marker_red_sprite.png",new O(19,25),{ - anchor: new O(10,25), - infoWindowAnchor: new O(10,0) - }) - , Bc = new qc(G.qa + "marker_red_sprite.png",new O(20,11),{ - anchor: new O(6,11), - imageOffset: new O(-19,-13) - }); - function U(a, b) { - gb.call(this); - b = b || {}; - this.point = a; - this.yq = this.map = s; - this.z = { - za: b.offset || new O(0,0), - rj: b.icon || Ac, - Sk: Bc, - title: b.title || "", - label: s, - lK: b.baseZIndex || 0, - jf: q, - X5: t, - EE: t, - gj: b.enableMassClear === t ? t : q, - Wb: t, - UN: b.raiseOnDrag === q ? q : t, - aO: t, - Hd: b.draggingCursor || G.Hd, - rotation: b.rotation || 0 - }; - b.icon && !b.shadow && (this.z.Sk = s); - b.enableDragging && (this.z.Wb = b.enableDragging); - Hb(b.enableClicking) && (this.z.jf = b.enableClicking); - var c = this; - K.load("marker", function() { - c.ib() - }) - } - U.Qu = mc.Ck(-90) + 1E6; - U.AG = U.Qu + 1E6; - z.lang.ta(U, gb, "Marker"); - z.extend(U.prototype, { - Rb: function(a) { - if (a instanceof qc || a instanceof rc) - this.z.rj = a - }, - ap: function() { - return this.z.rj - }, - Oy: function(a) { - a instanceof qc && (this.z.Sk = a) - }, - getShadow: function() { - return this.z.Sk - }, - dn: function(a) { - this.z.label = a || s - }, - VD: function() { - return this.z.label - }, - Wb: function() { - this.z.Wb = q - }, - TC: function() { - this.z.Wb = t - }, - ga: w("point"), - sa: function(a) { - a instanceof J && (this.point = new J(a.lng,a.lat)) - }, - ui: function(a, b) { - this.z.EE = !!a; - a && (this.XG = b || 0) - }, - Ec: function(a) { - this.z.title = a + "" - }, - getTitle: function() { - return this.z.title - }, - Ze: function(a) { - a instanceof O && (this.z.za = a) - }, - Sf: function() { - return this.z.za - }, - bn: ba("yq"), - Op: function(a) { - this.z.rotation = a - }, - TL: function() { - return this.z.rotation - } - }); - function Cc(a) { - this.options = a || {}; - this.GZ = this.options.paneName || "labelPane"; - this.zIndex = this.options.zIndex || 0 - } - z.lang.ta(Cc, gb, "CanvasLayer"); - Cc.prototype.initialize = function(a) { - this.B = a; - var b = this.canvas = document.createElement("canvas") - , c = this.canvas.getContext("2d"); - b.style.cssText = "position:absolute;left:0;top:0;z-index:" + this.zIndex + ";"; - Dc(this); - Ec(c); - a.getPanes()[this.GZ].appendChild(b); - var e = this; - a.addEventListener("resize", function() { - Dc(e); - e.ib() - }); - return this.canvas - } - ; - function Dc(a) { - var b = a.B.cb() - , a = a.canvas; - a.width = b.width; - a.height = b.height; - a.style.width = a.width + "px"; - a.style.height = a.height + "px" - } - function Ec(a) { - var b = (window.devicePixelRatio || 1) / (a.CV || a.T5 || a.x4 || a.y4 || a.B4 || a.CV || 1) - , c = a.canvas.width - , e = a.canvas.height; - a.canvas.width = c * b; - a.canvas.height = e * b; - a.canvas.style.width = c + "px"; - a.canvas.style.height = e + "px"; - a.scale(b, b) - } - Cc.prototype.draw = function() { - var a = this - , b = arguments; - clearTimeout(a.j0); - a.j0 = setTimeout(function() { - a.ib.apply(a, b) - }, 15) - } - ; - da = Cc.prototype; - da.ib = function() { - var a = this.B; - this.canvas.style.left = -a.offsetX + "px"; - this.canvas.style.top = -a.offsetY + "px"; - this.dispatchEvent("draw"); - this.options.update && this.options.update.apply(this, arguments) - } - ; - da.La = w("canvas"); - da.show = function() { - this.canvas || this.B.Ga(this); - this.canvas.style.display = "block" - } - ; - da.U = function() { - this.canvas.style.display = "none" - } - ; - da.Sp = function(a) { - this.canvas.style.zIndex = a - } - ; - da.Ck = w("zIndex"); - function Fc(a, b) { - oc.call(this, b); - b = b || {}; - this.z.tg = b.fillOpacity ? b.fillOpacity : 0.65; - this.z.fillColor = "" == b.fillColor ? "" : b.fillColor ? b.fillColor : "#fff"; - this.ke(a); - var c = this; - K.load("poly", function() { - c.ib() - }) - } - z.lang.ta(Fc, oc, "Polygon"); - z.extend(Fc.prototype, { - ke: function(a, b) { - this.vo = oc.yx(a).slice(0); - var c = oc.yx(a).slice(0); - 1 < c.length && c.push(new J(c[0].lng,c[0].lat)); - oc.prototype.ke.call(this, c, b) - }, - gn: function(a, b) { - this.vo[a] && (this.vo[a] = new J(b.lng,b.lat), - this.ja[a] = new J(b.lng,b.lat), - 0 == a && !this.ja[0].pb(this.ja[this.ja.length - 1]) && (this.ja[this.ja.length - 1] = new J(b.lng,b.lat)), - this.Bh()) - }, - Ue: function() { - var a = this.vo; - 0 == a.length && (a = this.ja); - return a - } - }); - function Gc(a, b) { - oc.call(this, b); - this.Mr(a); - var c = this; - K.load("poly", function() { - c.ib() - }) - } - z.lang.ta(Gc, oc, "Polyline"); - function Hc(a, b, c) { - this.point = a; - this.wa = Math.abs(b); - Fc.call(this, [], c) - } - Hc.eF = [0.01, 1.0E-4, 1.0E-5, 4.0E-6]; - z.lang.ta(Hc, Fc, "Circle"); - z.extend(Hc.prototype, { - initialize: function(a) { - this.map = a; - this.ja = this.qv(this.point, this.wa); - this.Bh(); - return s - }, - Ka: w("point"), - Zf: function(a) { - a && (this.point = a) - }, - RL: w("wa"), - xf: function(a) { - this.wa = Math.abs(a) - }, - qv: function(a, b) { - if (!a || !b || !this.map) - return []; - for (var c = [], e = b / 6378800, f = Math.PI / 180 * a.lat, g = Math.PI / 180 * a.lng, i = 0; 360 > i; i += 9) { - var k = Math.PI / 180 * i - , m = Math.asin(Math.sin(f) * Math.cos(e) + Math.cos(f) * Math.sin(e) * Math.cos(k)) - , k = new J(((g - Math.atan2(Math.sin(k) * Math.sin(e) * Math.cos(f), Math.cos(e) - Math.sin(f) * Math.sin(m)) + Math.PI) % (2 * Math.PI) - Math.PI) * (180 / Math.PI),m * (180 / Math.PI)); - c.push(k) - } - e = c[0]; - c.push(new J(e.lng,e.lat)); - return c - } - }); - var Ic = {}; - function Jc(a) { - this.map = a; - this.Mm = []; - this.$f = []; - this.Fg = []; - this.OV = 300; - this.oF = 0; - this.yg = {}; - this.Zi = {}; - this.ph = 0; - this.yE = q; - this.MK = {}; - this.eo = this.Kj(1); - this.od = this.Kj(2); - this.Bl = this.Kj(3); - this.Ki = this.Kj(4); - a.platform.appendChild(this.eo); - a.platform.appendChild(this.od); - a.platform.appendChild(this.Bl); - a.platform.appendChild(this.Ki); - var b = 256 * Math.pow(2, 15) - , c = 3 * b - , a = S.Eb(new J(180,0)).lng - , c = c - a - , b = -3 * b - , e = S.Eb(new J(-180,0)).lng; - this.yI = a; - this.zI = e; - this.ZA = c + (e - b); - this.AI = a - e - } - B.Ye(function(a) { - var b = new Jc(a); - b.na(); - a.Va = b - }); - z.extend(Jc.prototype, { - na: function() { - var a = this - , b = a.map; - b.addEventListener("loadcode", function() { - a.up() - }); - b.addEventListener("addtilelayer", function(b) { - a.Oe(b) - }); - b.addEventListener("removetilelayer", function(b) { - a.Yf(b) - }); - b.addEventListener("setmaptype", function(b) { - a.Dg(b) - }); - b.addEventListener("zoomstartcode", function(b) { - a.Mc(b) - }); - b.addEventListener("setcustomstyles", function(b) { - a.Zt(b.target); - a.Wf(q) - }); - b.addEventListener("initindoorlayer", function(b) { - a.tE(b) - }) - }, - up: function() { - var a = this; - if (z.ca.ia) - try { - document.execCommand("BackgroundImageCache", t, q) - } catch (b) {} - this.loaded || a.Ux(); - a.Wf(); - this.loaded || (this.loaded = q, - K.load("tile", function() { - a.rQ() - })) - }, - tE: function(a) { - this.zu = new Kc(this); - this.zu.Oe(new Lc(this.map,this.zu,a.vf)) - }, - Ux: function() { - for (var a = this.map.oa().ff, b = 0; b < a.length; b++) { - var c = new Mc; - z.extend(c, a[b]); - this.Mm.push(c); - c.na(this.map, this.eo) - } - this.Zt() - }, - Kj: function(a) { - var b = L("div"); - b.style.position = "absolute"; - b.style.overflow = "visible"; - b.style.left = b.style.top = "0"; - b.style.zIndex = a; - return b - }, - Af: function() { - this.ph--; - var a = this; - this.yE && (this.map.dispatchEvent(new P("onfirsttileloaded")), - this.yE = t); - 0 == this.ph && (this.Hi && (clearTimeout(this.Hi), - this.Hi = s), - this.Hi = setTimeout(function() { - if (a.ph == 0) { - a.map.dispatchEvent(new P("ontilesloaded")); - a.yE = q - } - a.Hi = s - }, 80)) - }, - fE: function(a, b) { - return "TILE-" + b.aa + "-" + a[0] + "-" + a[1] + "-" + a[2] - }, - Rx: function(a) { - var b = a.Gb; - b && zb(b) && b.parentNode.removeChild(b); - delete this.yg[a.name]; - a.loaded || (Nc(a), - a.Gb = s, - a.Pm = s) - }, - pj: function(a, b, c) { - var e = this.map - , f = e.oa() - , g = e.Oa - , i = e.fc - , k = f.dc(g) - , m = this.DL() - , n = m[0] - , o = m[1] - , p = m[2] - , v = m[3] - , x = m[4] - , c = "undefined" != typeof c ? c : 0 - , f = f.$c() - , m = e.aa.replace(/^TANGRAM_/, ""); - for (this.hc ? this.hc.length = 0 : this.hc = []; n < p; n++) - for (var y = o; y < v; y++) { - var A = n - , E = y; - this.hc.push([A, E]); - A = m + "_" + b + "_" + A + "_" + E + "_" + g; - this.MK[A] = A - } - this.hc.sort(function(a) { - return function(b, c) { - return 0.4 * Math.abs(b[0] - a[0]) + 0.6 * Math.abs(b[1] - a[1]) - (0.4 * Math.abs(c[0] - a[0]) + 0.6 * Math.abs(c[1] - a[1])) - } - }([x[0] - 1, x[1] - 1])); - i = [Math.round(-i.lng / k), Math.round(i.lat / k)]; - n = -e.offsetY + e.height / 2; - a.style.left = -e.offsetX + e.width / 2 + "px"; - a.style.top = n + "px"; - this.Cc ? this.Cc.length = 0 : this.Cc = []; - n = 0; - for (e = a.childNodes.length; n < e; n++) - y = a.childNodes[n], - y.Sj = t, - this.Cc.push(y); - if (n = this.qh) - for (var C in n) - delete n[C]; - else - this.qh = {}; - this.Dc ? this.Dc.length = 0 : this.Dc = []; - n = 0; - for (e = this.hc.length; n < e; n++) { - C = this.hc[n][0]; - k = this.hc[n][1]; - y = 0; - for (o = this.Cc.length; y < o; y++) - if (p = this.Cc[y], - p.id == m + "_" + b + "_" + C + "_" + k + "_" + g) { - p.Sj = q; - this.qh[p.id] = p; - break - } - } - n = 0; - for (e = this.Cc.length; n < e; n++) - p = this.Cc[n], - p.Sj || this.Dc.push(p); - this.nn = []; - y = (f + c) * this.map.K.devicePixelRatio; - n = 0; - for (e = this.hc.length; n < e; n++) - C = this.hc[n][0], - k = this.hc[n][1], - v = C * f + i[0] - c / 2, - x = (-1 - k) * f + i[1] - c / 2, - A = m + "_" + b + "_" + C + "_" + k + "_" + g, - o = this.qh[A], - p = s, - o ? (p = o.style, - p.left = v + "px", - p.top = x + "px", - o.yd || this.nn.push([C, k, o])) : (0 < this.Dc.length ? (o = this.Dc.shift(), - o.getContext("2d").clearRect(-c / 2, -c / 2, y, y), - p = o.style) : (o = document.createElement("canvas"), - p = o.style, - p.position = "absolute", - p.width = f + c + "px", - p.height = f + c + "px", - this.Zx() && (p.WebkitTransform = "scale(1.001)"), - o.setAttribute("width", y), - o.setAttribute("height", y), - a.appendChild(o)), - o.id = A, - p.left = v + "px", - p.top = x + "px", - -1 < A.indexOf("bg") && (v = "#F3F1EC", - this.map.K.Eo && (v = this.map.K.Eo), - p.background = v ? v : ""), - this.nn.push([C, k, o])), - o.style.visibility = ""; - n = 0; - for (e = this.Dc.length; n < e; n++) - this.Dc[n].style.visibility = "hidden"; - return this.nn - }, - Zx: function() { - return /M040/i.test(navigator.userAgent) - }, - DL: function() { - var a = this.map - , b = a.oa() - , c = b.mE(a.Oa) - , e = a.fc - , f = Math.ceil(e.lng / c) - , g = Math.ceil(e.lat / c) - , b = b.$c() - , c = [f, g, (e.lng - f * c) / c * b, (e.lat - g * c) / c * b]; - return [c[0] - Math.ceil((a.width / 2 - c[2]) / b), c[1] - Math.ceil((a.height / 2 - c[3]) / b), c[0] + Math.ceil((a.width / 2 + c[2]) / b), c[1] + Math.ceil((a.height / 2 + c[3]) / b), c] - }, - R_: function(a, b, c, e) { - var f = this; - f.u2 = b; - var g = this.map.oa() - , i = f.fE(a, c) - , k = g.$c() - , b = [a[0] * k + b[0], (-1 - a[1]) * k + b[1]] - , m = this.yg[i]; - if (this.map.oa() !== Ya && this.map.oa() !== Sa) { - var n = this.Lw(a[0], a[2]).offsetX; - b[0] += n; - b.Q1 = n - } - m && m.Gb ? (xb(m.Gb, b), - e && (e = new Q(a[0],a[1]), - g = this.map.K.ye ? this.map.K.ye.style : "normal", - e = c.getTilesUrl(e, a[2], g), - m.loaded = t, - Oc(m, e)), - m.loaded ? this.Af() : Pc(m, function() { - f.Af() - })) : (m = this.Zi[i]) && m.Gb ? (c.Jb.insertBefore(m.Gb, c.Jb.lastChild), - this.yg[i] = m, - xb(m.Gb, b), - e && (e = new Q(a[0],a[1]), - g = this.map.K.ye ? this.map.K.ye.style : "normal", - e = c.getTilesUrl(e, a[2], g), - m.loaded = t, - Oc(m, e)), - m.loaded ? this.Af() : Pc(m, function() { - f.Af() - })) : (m = k * Math.pow(2, g.sm() - a[2]), - new J(a[0] * m,a[1] * m), - e = new Q(a[0],a[1]), - g = this.map.K.ye ? this.map.K.ye.style : "normal", - e = c.getTilesUrl(e, a[2], g), - m = new Qc(this,e,b,a,c), - Pc(m, function() { - f.Af() - }), - m.co(), - this.yg[i] = m) - }, - Af: function() { - this.ph--; - var a = this; - 0 == this.ph && (this.Hi && (clearTimeout(this.Hi), - this.Hi = s), - this.Hi = setTimeout(function() { - if (a.ph == 0) { - a.map.dispatchEvent(new P("ontilesloaded")); - if (ua) { - if (ra && sa && ta) { - var b = bb() - , c = a.map.cb(); - setTimeout(function() { - Ra(5030, { - load_script_time: sa - ra, - load_tiles_time: b - ta, - map_width: c.width, - map_height: c.height, - map_size: c.width * c.height - }) - }, 1E4); - B.Fn("cus.fire", "time", { - z_imgfirstloaded: b - ta - }) - } - ua = t - } - } - a.Hi = s - }, 80)) - }, - fE: function(a, b) { - return this.map.oa() === Qa ? "TILE-" + b.aa + "-" + this.map.Rw + "-" + a[0] + "-" + a[1] + "-" + a[2] : "TILE-" + b.aa + "-" + a[0] + "-" + a[1] + "-" + a[2] - }, - Rx: function(a) { - var b = a.Gb; - b && (Rc(b), - zb(b) && b.parentNode.removeChild(b)); - delete this.yg[a.name]; - a.loaded || (Rc(b), - Nc(a), - a.Gb = s, - a.Pm = s) - }, - Lw: function(a, b) { - for (var c = 0, e = 6 * Math.pow(2, b - 3), f = e / 2 - 1, g = -e / 2; a > f; ) - a -= e, - c -= this.ZA; - for (; a < g; ) - a += e, - c += this.ZA; - c = Math.round(c / Math.pow(2, 18 - b)); - return { - offsetX: c, - hs: a - } - }, - QV: function(a) { - for (var b = a.lng; b > this.yI; ) - b -= this.AI; - for (; b < this.zI; ) - b += this.AI; - a.lng = b; - return a - }, - RV: function(a, b) { - for (var c = 256 * Math.pow(2, 18 - b), e = Math.floor(this.yI / c), f = Math.floor(this.zI / c), c = Math.floor(this.ZA / c), g = [], i = 0; i < a.length; i++) { - var k = a[i] - , m = k[0] - , k = k[1]; - if (m >= e) { - var m = m + c - , n = "id_" + m + "_" + k + "_" + b; - a[n] || (a[n] = q, - g.push([m, k])) - } else - m <= f && (m -= c, - n = "id_" + m + "_" + k + "_" + b, - a[n] || (a[n] = q, - g.push([m, k]))) - } - for (i = 0; i < g.length; i++) - a.push(g[i]); - return a - }, - Wf: function(a) { - var b = this; - if (b.map.oa() == Qa) - K.load("coordtrans", function() { - b.map.Ub || (b.map.Ub = Qa.wk(b.map.$g), - b.map.Rw = Qa.BL(b.map.Ub)); - b.CI() - }, q); - else { - if (a && a) - for (var c in this.Zi) - delete this.Zi[c]; - b.CI(a) - } - }, - CI: function(a) { - var b = this.Mm.concat(this.$f) - , c = b.length - , e = this.map - , f = e.oa() - , g = e.fc; - this.map.oa() !== Ya && this.map.oa() !== Sa && (g = this.QV(g)); - for (var i = 0; i < c; i++) { - var k = b[i]; - if (k.gc && e.Oa < k.gc) - break; - if (k.Jw) { - var m = this.Jb = k.Jb; - if (a) { - var n = m; - if (n && n.childNodes) - for (var o = n.childNodes.length, p = o - 1; 0 <= p; p--) - o = n.childNodes[p], - n.removeChild(o), - o = s - } - if (this.map.Sb()) { - this.od.style.display = "block"; - m.style.display = "none"; - this.map.dispatchEvent(new P("vectorchanged"), { - isvector: q - }); - continue - } else - m.style.display = "block", - this.od.style.display = "none", - this.map.dispatchEvent(new P("vectorchanged"), { - isvector: t - }) - } - if (!k.pI && !(k.pp && !this.map.Sb() || k.GM && this.map.Sb())) { - e = this.map; - f = e.oa(); - m = f.wm(); - o = e.Oa; - g = e.fc; - f == Qa && g.pb(new J(0,0)) && (g = e.fc = m.vj(e.re, e.Ub)); - var v = f.dc(o) - , m = f.mE(o) - , n = Math.ceil(g.lng / m) - , x = Math.ceil(g.lat / m) - , y = f.$c() - , m = [n, x, (g.lng - n * m) / m * y, (g.lat - x * m) / m * y] - , p = m[0] - Math.ceil((e.width / 2 - m[2]) / y) - , n = m[1] - Math.ceil((e.height / 2 - m[3]) / y) - , x = m[0] + Math.ceil((e.width / 2 + m[2]) / y) - , A = 0; - f === Qa && 15 == e.fa() && (A = 1); - f = m[1] + Math.ceil((e.height / 2 + m[3]) / y) + A; - this.gK = new J(g.lng,g.lat); - var E = this.yg, y = -this.gK.lng / v, A = this.gK.lat / v, v = [Math.ceil(y), Math.ceil(A)], g = e.fa(), C; - for (C in E) { - var F = E[C] - , D = F.info; - (D[2] != g || D[2] == g && (p > D[0] || x <= D[0] || n > D[1] || f <= D[1])) && this.Rx(F) - } - E = -e.offsetX + e.width / 2; - F = -e.offsetY + e.height / 2; - k.Jb && (k.Jb.style.left = Math.ceil(y + E) - v[0] + "px", - k.Jb.style.top = Math.ceil(A + F) - v[1] + "px", - k.Jb.style.WebkitTransform = "translate3d(0,0,0)"); - y = []; - for (e.WB = []; p < x; p++) - for (A = n; A < f; A++) - y.push([p, A]), - e.WB.push({ - x: p, - y: A - }); - this.map.oa() !== Ya && this.map.oa() !== Sa && (y = this.RV(y, o)); - y.sort(function(a) { - return function(b, c) { - return 0.4 * Math.abs(b[0] - a[0]) + 0.6 * Math.abs(b[1] - a[1]) - (0.4 * Math.abs(c[0] - a[0]) + 0.6 * Math.abs(c[1] - a[1])) - } - }([m[0] - 1, m[1] - 1])); - o = y.length; - this.ph += o; - for (p = 0; p < o; p++) - this.R_([y[p][0], y[p][1], g], v, k, a) - } - } - }, - Oe: function(a) { - var b = this - , c = a.target - , a = b.map.Sb(); - if (c instanceof db) - a && !c.Im && (c.na(this.map, this.od), - c.Im = q); - else if (c.ag && this.map.Oe(c.ag), - c.pp) { - for (a = 0; a < b.Fg.length; a++) - if (b.Fg[a] == c) - return; - K.load("vector", function() { - c.na(b.map, b.od); - b.Fg.push(c) - }, q) - } else { - for (a = 0; a < b.$f.length; a++) - if (b.$f[a] == c) - return; - c.na(this.map, this.Bl); - b.$f.push(c) - } - }, - Yf: function(a) { - var a = a.target - , b = this.map.Sb(); - if (a instanceof db) - b && a.Im && (a.remove(), - a.Im = t); - else { - a.ag && this.map.Yf(a.ag); - if (a.pp) - for (var b = 0, c = this.Fg.length; b < c; b++) - a == this.Fg[b] && this.Fg.splice(b, 1); - else { - b = 0; - for (c = this.$f.length; b < c; b++) - a == this.$f[b] && this.$f.splice(b, 1) - } - a.remove() - } - }, - Dg: function() { - for (var a = this.Mm, b = 0, c = a.length; b < c; b++) - a[b].remove(); - delete this.Jb; - this.Mm = []; - this.Zi = this.yg = {}; - this.Ux(); - this.Wf() - }, - Mc: function() { - var a = this; - a.vd && z.D.U(a.vd); - setTimeout(function() { - a.Wf(); - a.map.dispatchEvent(new P("onzoomend")) - }, 10) - }, - L5: u(), - Zt: function(a) { - var b = this.map.oa(); - if (!this.map.Sb() && (a ? this.map.K.$_ = a : a = this.map.K.$_, - a)) - for (var c = s, c = "2" == B.xu ? [B.url.proto + B.url.domain.main_domain_cdn.other[0] + "/"] : [B.url.proto + B.url.domain.main_domain_cdn.baidu[0] + "/", B.url.proto + B.url.domain.main_domain_cdn.baidu[1] + "/", B.url.proto + B.url.domain.main_domain_cdn.baidu[2] + "/"], e = 0, f; f = this.Mm[e]; e++) - if (f.M_ == q) { - b.j.Yb = 18; - f.getTilesUrl = function(b, e) { - var f = b.x - , f = this.map.Va.Lw(f, e).hs - , m = b.y - , n = Sb("normal") - , o = 1; - this.map.Sx() && (o = 2); - n = "customimage/tile?&x=" + f + "&y=" + m + "&z=" + e + "&udt=" + n + "&scale=" + o + "&ak=" + qa; - n = a.styleStr ? n + ("&styles=" + encodeURIComponent(a.styleStr)) : n + ("&customid=" + a.style); - return c[Math.abs(f + m) % c.length] + n - } - ; - break - } - } - }); - function Qc(a, b, c, e, f) { - this.Pm = a; - this.position = c; - this.$u = []; - this.name = a.fE(e, f); - this.info = e; - this.GJ = f.zt(); - e = L("img"); - yb(e); - e.uL = t; - var g = e.style - , a = a.map.oa(); - g.position = "absolute"; - g.border = "none"; - g.width = a.$c() + "px"; - g.height = a.$c() + "px"; - g.left = c[0] + "px"; - g.top = c[1] + "px"; - g.maxWidth = "none"; - this.Gb = e; - this.src = b; - Sc && (this.Gb.style.opacity = 0); - var i = this; - this.Gb.onload = function() { - B.iZ.eR(); - i.loaded = q; - if (i.Pm) { - var a = i.Pm - , b = a.Zi; - if (!b[i.name]) { - a.oF++; - b[i.name] = i - } - if (i.Gb && !zb(i.Gb) && f.Jb) { - f.Jb.appendChild(i.Gb); - if (z.ca.ia <= 6 && z.ca.ia > 0 && i.GJ) - i.Gb.style.cssText = i.Gb.style.cssText + (';filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + i.src + '",sizingMethod=scale);') - } - var c = a.oF - a.OV, e; - for (e in b) { - if (c <= 0) - break; - if (!a.yg[e]) { - b[e].Pm = s; - var g = b[e].Gb; - if (g && g.parentNode) { - g.parentNode.removeChild(g); - Rc(g) - } - g = s; - b[e].Gb = s; - delete b[e]; - a.oF--; - c-- - } - } - Sc && new tb({ - Ic: 20, - duration: 200, - va: function(a) { - if (i.Gb && i.Gb.style) - i.Gb.style.opacity = a * 1 - }, - finish: function() { - i.Gb && i.Gb.style && delete i.Gb.style.opacity - } - }); - Nc(i) - } - } - ; - this.Gb.onerror = function() { - Nc(i); - if (i.Pm) { - var a = i.Pm.map.oa(); - if (a.j.vD) { - i.error = q; - i.Gb.src = a.j.vD; - i.Gb && !zb(i.Gb) && f.Jb.appendChild(i.Gb) - } - } - } - ; - e = s - } - function Pc(a, b) { - a.$u.push(b) - } - Qc.prototype.co = function() { - this.Gb.src = 0 < z.ca.ia && 6 >= z.ca.ia && this.GJ ? G.qa + "blank.gif" : "" !== this.src && this.Gb.src == this.src ? this.src + "&t = " + Date.now() : this.src - } - ; - function Nc(a) { - for (var b = 0; b < a.$u.length; b++) - a.$u[b](); - a.$u.length = 0 - } - function Rc(a) { - if (a) { - a.onload = a.onerror = s; - var b = a.attributes, c, e, f; - if (b) { - e = b.length; - for (c = 0; c < e; c += 1) - f = b[c].name, - Xa(a[f]) && (a[f] = s) - } - if (b = a.children) { - e = b.length; - for (c = 0; c < e; c += 1) - Rc(a.children[c]) - } - } - } - function Oc(a, b) { - a.src = b; - a.co() - } - var Sc = !z.ca.ia || 8 < z.ca.ia; - function Mc(a) { - this.vf = a || {}; - this.mW = this.vf.copyright || s; - this.B0 = this.vf.transparentPng || t; - this.Jw = this.vf.baseLayer || t; - this.zIndex = this.vf.zIndex || 0; - this.aa = Mc.SS++ - } - Mc.SS = 0; - z.lang.ta(Mc, z.lang.Ca, "TileLayer"); - z.extend(Mc.prototype, { - na: function(a, b) { - this.Jw && (this.zIndex = -100); - this.map = a; - if (!this.Jb) { - var c = L("div") - , e = c.style; - e.position = "absolute"; - e.overflow = "visible"; - e.zIndex = this.zIndex; - e.left = Math.ceil(-a.offsetX + a.width / 2) + "px"; - e.top = Math.ceil(-a.offsetY + a.height / 2) + "px"; - b.appendChild(c); - this.Jb = c - } - }, - remove: function() { - this.Jb && this.Jb.parentNode && (this.Jb.innerHTML = "", - this.Jb.parentNode.removeChild(this.Jb)); - delete this.Jb - }, - zt: w("B0"), - getTilesUrl: function(a, b) { - if (this.map.oa() !== Ya && this.map.oa() !== Sa) - var c = this.map.Va.Lw(a.x, b).hs; - var e = ""; - this.vf.tileUrlTemplate && (e = this.vf.tileUrlTemplate.replace(/\{X\}/, c), - e = e.replace(/\{Y\}/, a.y), - e = e.replace(/\{Z\}/, b)); - return e - }, - pm: w("mW"), - oa: function() { - return this.Hb || La - } - }); - function Tc(a, b) { - Ib(a) ? b = a || {} : (b = b || {}, - b.databoxId = a); - this.j = { - OK: b.databoxId, - eh: b.geotableId, - Wm: b.q || "", - pu: b.tags || "", - filter: b.filter || "", - Vy: b.sortby || "", - Y_: b.styleId || "", - Vl: b.ak || qa, - Gw: b.age || 36E5, - zIndex: 11, - fZ: "VectorCloudLayer", - Fk: b.hotspotName || "vector_md_" + (1E5 * Math.random()).toFixed(0), - uV: "LBS\u4e91\u9ebb\u70b9\u5c42" - }; - this.pp = q; - Mc.call(this, this.j); - this.GW = B.Wc + "geosearch/detail/"; - this.HW = B.Wc + "geosearch/v2/detail/"; - this.lp = {} - } - z.ta(Tc, Mc, "VectorCloudLayer"); - function Uc(a) { - a = a || {}; - this.j = z.extend(a, { - zIndex: 1, - fZ: "VectorTrafficLayer", - uV: "\u77e2\u91cf\u8def\u51b5\u5c42" - }); - this.pp = q; - Mc.call(this, this.j); - this.x0 = B.url.proto + B.url.domain.vector_traffic + "/gvd/?qt=lgvd&styles=pl&layers=tf"; - this.Db = { - "0": [2, 1354709503, 2, 2, 0, [], 0, 0], - 1: [2, 1354709503, 3, 2, 0, [], 0, 0], - 10: [2, -231722753, 2, 2, 0, [], 0, 0], - 11: [2, -231722753, 3, 2, 0, [], 0, 0], - 12: [2, -231722753, 4, 2, 0, [], 0, 0], - 13: [2, -231722753, 5, 2, 0, [], 0, 0], - 14: [2, -231722753, 6, 2, 0, [], 0, 0], - 15: [2, -1, 4, 0, 0, [], 0, 0], - 16: [2, -1, 5.5, 0, 0, [], 0, 0], - 17: [2, -1, 7, 0, 0, [], 0, 0], - 18: [2, -1, 8.5, 0, 0, [], 0, 0], - 19: [2, -1, 10, 0, 0, [], 0, 0], - 2: [2, 1354709503, 4, 2, 0, [], 0, 0], - 3: [2, 1354709503, 5, 2, 0, [], 0, 0], - 4: [2, 1354709503, 6, 2, 0, [], 0, 0], - 5: [2, -6350337, 2, 2, 0, [], 0, 0], - 6: [2, -6350337, 3, 2, 0, [], 0, 0], - 7: [2, -6350337, 4, 2, 0, [], 0, 0], - 8: [2, -6350337, 5, 2, 0, [], 0, 0], - 9: [2, -6350337, 6, 2, 0, [], 0, 0] - } - } - z.ta(Uc, Mc, "VectorTrafficLayer"); - function db(a) { - this.PV = [B.url.proto + B.url.domain.TILE_ONLINE_URLS[1] + "/gvd/?", B.url.proto + B.url.domain.TILE_ONLINE_URLS[2] + "/gvd/?", B.url.proto + B.url.domain.TILE_ONLINE_URLS[3] + "/gvd/?", B.url.proto + B.url.domain.TILE_ONLINE_URLS[4] + "/gvd/?"]; - this.j = { - pL: t - }; - for (var b in a) - this.j[b] = a[b]; - this.Th = this.Fh = this.Ya = this.C = this.B = s; - this.LM = 0; - var c = this; - K.load("vector", function() { - c.De() - }) - } - z.extend(db.prototype, { - na: function(a, b) { - this.B = a; - this.C = b - }, - remove: function() { - this.C = this.B = s - } - }); - function Vc(a) { - Mc.call(this, a); - this.j = a || {}; - this.GM = q; - this.ag = new Uc; - this.ag.$y = this; - if (this.j.predictDate) { - if (1 > this.j.predictDate.weekday || 7 < this.j.predictDate.weekday) - this.j.predictDate = 1; - if (0 > this.j.predictDate.hour || 23 < this.j.predictDate.hour) - this.j.predictDate.hour = 0 - } - this.VU = B.url.proto + B.url.domain.traffic + "/traffic/" - } - Vc.prototype = new Mc; - Vc.prototype.na = function(a, b) { - Mc.prototype.na.call(this, a, b); - this.B = a - } - ; - Vc.prototype.zt = ca(q); - Vc.prototype.getTilesUrl = function(a, b) { - var c = ""; - this.j.predictDate ? c = "HistoryService?day=" + (this.j.predictDate.weekday - 1) + "&hour=" + this.j.predictDate.hour + "&t=" + (new Date).getTime() + "&" : (c = "TrafficTileService?time=" + (new Date).getTime() + "&", - c += "label=web2D&v=016&"); - var c = this.VU + c + "level=" + b + "&x=" + a.x + "&y=" + a.y - , e = 1; - this.B.Sx() && (e = 2); - return (c + "&scaler=" + e).replace(/-(\d+)/gi, "M$1") - } - ; - var Wc = [B.url.proto + B.url.domain.TILES_YUN_HOST[0] + "/georender/gss", B.url.proto + B.url.domain.TILES_YUN_HOST[1] + "/georender/gss", B.url.proto + B.url.domain.TILES_YUN_HOST[2] + "/georender/gss", B.url.proto + B.url.domain.TILES_YUN_HOST[3] + "/georender/gss"] - , Xc = B.url.proto + B.url.domain.main_domain_nocdn.baidu + "/style/poi/rangestyle" - , Yc = 100; - function nb(a, b) { - Mc.call(this); - var c = this; - this.GM = q; - var e = t; - try { - document.createElement("canvas").getContext("2d"), - e = q - } catch (f) { - e = t - } - e && (this.ag = new Tc(a,b), - this.ag.$y = this); - Ib(a) ? b = a || {} : (c.Rn = a, - b = b || {}); - b.geotableId && (c.Cf = b.geotableId); - b.databoxId && (c.Rn = b.databoxId); - e = B.Wc + "geosearch"; - c.ub = { - ON: b.pointDensity || Yc, - BY: e + "/detail/", - CY: e + "/v2/detail/", - Gw: b.age || 36E5, - Wm: b.q || "", - i0: "png", - X3: [5, 5, 5, 5], - eZ: { - backgroundColor: "#FFFFD5", - borderColor: "#808080" - }, - Vl: b.ak || qa, - pu: b.tags || "", - filter: b.filter || "", - Vy: b.sortby || "", - Fk: b.hotspotName || "tile_md_" + (1E5 * Math.random()).toFixed(0), - dG: q - }; - K.load("clayer", function() { - c.Sd() - }) - } - nb.prototype = new Mc; - nb.prototype.na = function(a, b) { - Mc.prototype.na.call(this, a, b); - this.B = a - } - ; - nb.prototype.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y - , f = this.ub - , c = Wc[Math.abs(c + e) % Wc.length] + "/image?grids=" + c + "_" + e + "_" + b + "&q=" + f.Wm + "&tags=" + f.pu + "&filter=" + f.filter + "&sortby=" + f.Vy + "&ak=" + this.ub.Vl + "&age=" + f.Gw + "&page_size=" + f.ON + "&format=" + f.i0; - f.dG || (f = (1E5 * Math.random()).toFixed(0), - c += "&timeStamp=" + f); - this.Cf ? c += "&geotable_id=" + this.Cf : this.Rn && (c += "&databox_id=" + this.Rn); - return c - } - ; - nb.prototype.enableUseCache = function() { - this.ub.dG = q - } - ; - nb.prototype.disableUseCache = function() { - this.ub.dG = t - } - ; - nb.tU = /^point\(|\)$/ig; - nb.uU = /\s+/; - nb.wU = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; - var Zc = {}; - function $c(a, b) { - this.kd = a; - this.uQ = 18; - this.j = { - le: 256, - cd: new S - }; - z.extend(this.j, b || {}) - } - var ad = [0, 0, 0, 8, 7, 7, 6, 6, 5, 5, 4, 3, 3, 3, 2, 2, 1, 1, 0, 0, 0, 0] - , bd = [512, 2048, 4096, 32768, 65536, 262144, 1048576, 4194304, 8388608] - , cd = [0, 0, 0, 3, 5, 5, 7, 7, 9, 9, 10, 12, 12, 12, 15, 15, 17, 17, 19, 19, 19, 19] - , dd = [0, 0, 0, 256, 256, 512, 256, 512, 256, 512, 256, 256, 512, 1024, 256, 512, 512, 1024, 512, 1024, 2048, 4096]; - $c.prototype = { - getName: w("kd"), - $c: function(a) { - return "na" === this.kd ? dd[a] : this.j.le - }, - FL: function(a) { - return "na" === this.kd ? cd[a] : a - }, - wm: function() { - return this.j.cd - }, - dc: function(a) { - return Math.pow(2, this.uQ - a) - }, - RX: function(a) { - return "na" === this.kd ? bd[ad[a]] : this.dc(a) * this.$c(a) - } - }; - P = z.lang.Ju; - function Lc(a, b, c) { - this.B = a; - this.cV = b; - this.Cd = b.qc; - this.ub = { - h0: "na", - zIndex: 0, - OO: c.tileUrls, - AO: q - }; - this.UB = ""; - this.qT = {}; - var c = c.urlOpts || {}, e; - for (e in c) - c.hasOwnProperty(e) && (this.UB = this.UB + "&" + e + "=" + c[e]); - this.GC = []; - this.JE = 0; - this.zM = t; - a = this.ub.h0; - Zc[a] ? a = Zc[a] : (b = new $c(a,l), - a = Zc[a] = b); - this.Wr = a - } - window.VectorIndoorTileLayer = "VectorIndoorTileLayer"; - da = Lc.prototype; - da.na = function() { - var a = this.B - , b = a.Va; - if (!this.Vh) { - var c = b.Kj(this.ub.zIndex); - c.style.WebkitTransform = "translate3d(0px, 0px, 0)"; - this.Vh = c - } - b.Ki.appendChild(this.Vh); - b.b4 = c; - if (this.ub.AO) { - ed(this); - var e = this; - a.addEventListener("checkvectorclick", function(a) { - var b; - a: { - b = a.offsetX; - var c = a.offsetY - , k = e.GC.N4; - if (k) - for (var m = 0; m < k.length; m++) - for (var n = k[m], o = 0; o < n.length; o++) - if (a = n[o], - !a.f4 && a.EY && b > a.WE && b < a.TE && c > a.XE && c < a.UE) { - b = a.EY; - b = { - type: 9, - name: a.name, - uid: a.uid, - point: { - x: b.H2 + b.width / 2, - y: b.I2 + 6 - } - }; - break a - } - b = s - } - b && (a = new P("onvectorclick"), - a.Y3 = b, - a.of = "base", - this.dispatchEvent(a)) - }) - } - } - ; - function ed(a) { - var b = a.B - , c = b.Va - , e = a.Cd - , f = b.cb() - , g = f.width - , f = f.height - , i = L("canvas"); - i.style.cssText = "position: absolute;left:0;top:0;width:" + g + "px;height:" + f + "px;z-index:2;"; - i.width = g * e; - i.height = f * e; - a.by = i; - a.At = i.getContext("2d"); - a.At.scale(e, e); - a.At.textBaseline = "top"; - c.Ki.appendChild(i); - b.ZS = i - } - da.update = function(a, b) { - b = b || {}; - if (this.ub.AO && (b.Tw && this.Tw(), - b.S_)) { - var c = this.Cd - , e = this.B.cb() - , f = e.width - , e = e.height - , g = this.by - , i = g.style; - i.width = f + "px"; - i.height = e + "px"; - g.width = f * c; - g.height = e * c; - this.At.scale(c, c); - this.At.textBaseline = "top" - } - if (b.M5) { - c = this.Vh; - f = 0; - for (e = c.childNodes.length; f < e; f++) - c.childNodes[f].yd = t - } - this.NK = a; - this.up(a) - } - ; - da.up = function(a) { - this.GC = []; - var b = this.B - , c = b.fa() - , e = b.cd.vj(b.re) - , f = this.Wr.dc(c) - , e = [Math.round(-e.lng / f), Math.round(e.lat / f)] - , f = this.Wr.$c(c) - , g = b.aa.replace(/^TANGRAM_/, "") - , i = this.Wr.FL(c) - , b = this.B - , k = -b.offsetY + b.height / 2 - , m = this.Vh; - m.style.left = -b.offsetX + b.width / 2 + "px"; - m.style.top = k + "px"; - this.Cc ? this.Cc.length = 0 : this.Cc = []; - b = 0; - for (k = m.childNodes.length; b < k; b++) { - var n = m.childNodes[b]; - n.Sj = t; - this.Cc.push(n) - } - if (b = this.qh) - for (var o in b) - delete b[o]; - else - this.qh = {}; - this.Dc ? this.Dc.length = 0 : this.Dc = []; - b = 0; - for (k = a.length; b < k; b++) { - var n = a[b][0] - , p = a[b][1]; - o = 0; - for (var v = this.Cc.length; o < v; o++) { - var x = this.Cc[o]; - if (x.id === g + "_" + n + "_" + p + "_" + i + "_" + c) { - x.Sj = q; - this.qh[x.id] = x; - break - } - } - } - b = 0; - for (k = this.Cc.length; b < k; b++) - x = this.Cc[b], - x.Sj || (x.Lc = s, - delete x.Lc, - x.yd = t, - this.Dc.push(x)); - o = []; - v = f * this.Cd; - b = 0; - for (k = a.length; b < k; b++) { - var n = a[b][0] - , p = a[b][1] - , x = n * f + e[0] - , y = (-1 - p) * f + e[1] - , A = g + "_" + n + "_" + p + "_" + i + "_" + c - , E = this.qh[A] - , C = s; - if (E) - C = E.style, - C.left = x + "px", - C.top = y + "px", - C.width = f + "px", - C.height = f + "px", - E.yd ? E.MO && E.MO && this.GC.push(E.MO) : (E.NR = q, - E.Lc = s, - delete E.Lc, - o.push([n, p, E])); - else { - if (0 < this.Dc.length) { - var E = this.Dc.shift() - , F = E.getContext("2d"); - E.getAttribute("width") !== v && (E._scale = t); - E.setAttribute("width", v); - E.setAttribute("height", v); - C = E.style; - C.width = f + "px"; - C.height = f + "px"; - F.clearRect(0, 0, v, v) - } else - E = document.createElement("canvas"), - C = E.style, - C.position = "absolute", - this.ub.backgroundColor && (C.background = this.ub.backgroundColor), - C.width = f + "px", - C.height = f + "px", - E.setAttribute("width", v), - E.setAttribute("height", v), - m.appendChild(E); - E.id = A; - C.left = x + "px"; - C.top = y + "px"; - o.push([n, p, E]) - } - E.style.visibility = "" - } - b = 0; - for (k = this.Dc.length; b < k; b++) - this.Dc[b].style.visibility = "hidden"; - if (0 === o.length) - fd(this); - else { - this.JE = o.length; - this.zM = t; - c = this.Wr.FL(this.B.fa()); - for (e = 0; e < a.length; e++) - a[e][3] = c; - for (e = 0; e < o.length; e++) - a = o[e][2], - f = o[e][0], - g = o[e][1], - o[e][3] = c, - a.yd = t, - a.NR = t, - gd(this, f, g, c, a) - } - } - ; - function gd(a, b, c, e, f) { - var g = b + "_" + c + "_" + e - , i = a.qT; - if (i[g]) { - if ("loading" === i[g].status) - return - } else - i[g] = { - status: "init", - bO: 0 - }; - var k = a - , m = k.B - , n = [] - , n = "0" === B.xu ? k.ub.OO.http : k.ub.OO.https - , o = Math.abs(b + c) % n.length - , p = "x=" + b + "&y=" + c + "&z=" + e - , v = hd(a.cV) - , x = v.O0 - , v = v.C0 - , y = "_" + (0 > b ? "_" : "") + (0 > c ? "$" : "") + parseInt(Math.abs(b) + "" + Math.abs(c) + "" + e, 10).toString(36) - , p = p + a.UB + "v=" + x + "&udt=" + v + "&fn=window." + y - , x = n[o] + "&" + p - , x = n[o] + "¶m=" + window.encodeURIComponent(Kb(p)); - window[y] = function(a) { - clearTimeout(i[g].Od); - i[g] = s; - if (a) { - m.fa(); - var n; - a: { - for (n = 0; n < k.NK.length; n++) { - var o = k.NK[n]; - if (o[0] === b && o[1] === c && o[3] === e) { - n = q; - break a - } - } - n = t - } - n !== t && (n = new P("updateindoor"), - n.IndoorCanvas = [], - n.IndoorCanvas.push({ - canvasDom: f, - data: a, - canvasID: f.id, - ratio: k.Cd - }), - m.dispatchEvent(n), - k.JE--, - (0 === k.JE || k.zM === q) && fd(k), - delete window[y]) - } - } - ; - oa(x); - i[g].status = "loading"; - k = a; - i[g].Od = setTimeout(function() { - 3 > i[g].bO ? (i[g].bO++, - i[g].status = "init", - gd(k, b, c, e, f)) : i[g] = s - }, 4E3) - } - function fd(a) { - if (a.by) { - var b = a.B; - a.by.style.left = -b.offsetX + "px"; - a.by.style.top = -b.offsetY + "px"; - a = new P("updateindoorlabel"); - a.labelCanvasDom = b.ZS; - b.dispatchEvent(a) - } - } - da.Tw = function() { - var a = this.B.cb() - , b = this.Cd; - this.At.clearRect(0, 0, a.width * b, a.height * b) - } - ; - da.remove = function() { - var a = this.B.Va; - this.Vh && a.Ki.removeChild(this.Vh) - } - ; - function Kc(a) { - this.B = a.map; - this.ff = []; - this.Xr = {}; - this.qc = this.B.K.devicePixelRatio; - this.na() - } - window.VectorIndoorTileMgr = "VectorIndoorTileMgr"; - da = Kc.prototype; - da.na = function() { - var a = this - , b = this.B; - b.addEventListener("addtilelayer", function(b) { - a.Oe(b.target) - }); - b.addEventListener("removetilelayer", function(b) { - a.Yf(b.target) - }); - setTimeout(function() { - b.addEventListener("onmoveend", function(b) { - "centerAndZoom" !== b.mv && a.update() - }); - b.addEventListener("onzoomend", function(b) { - "centerAndZoom" !== b.mv && a.update({ - Tw: q - }) - }); - b.addEventListener("centerandzoom", function() { - a.update({ - Tw: q - }) - }) - }, 1); - b.addEventListener("indoor_data_refresh", u()); - b.addEventListener("onresize", function() { - a.update({ - S_: q - }) - }); - a.update() - } - ; - da.Oe = function(a) { - if (a instanceof Lc) { - for (var b = 0; b < this.ff.length; b++) - if (this.ff[b] === a) - return; - this.ff.push(a); - a.na(); - this.B.loaded && this.update() - } - } - ; - da.Yf = function(a) { - if (a instanceof Lc) { - for (var b = 0; b < this.ff.length; b++) - if (this.ff[b] === a) { - this.ff.splice(b, 1); - break - } - a.remove() - } - } - ; - da.pj = function(a) { - var b = a.getName(); - if (this.Xr[b]) - return this.Xr[b]; - var c = this.B - , e = c.fa() - , f = c.fc - , g = a.RX(e); - c.aa.replace(/^TANGRAM_/, ""); - var i = Math.ceil(f.lng / g) - , k = Math.ceil(f.lat / g) - , a = a.$c(e) - , m = [i, k, (f.lng / g - i) * a, (f.lat / g - k) * a] - , e = m[0] - Math.ceil((c.width / 2 - m[2]) / a) - , f = m[1] - Math.ceil((c.height / 2 - m[3]) / a) - , g = m[0] + Math.ceil((c.width / 2 + m[2]) / a) - , c = m[1] + Math.ceil((c.height / 2 + m[3]) / a); - this.hc ? this.hc.length = 0 : this.hc = []; - for (a = e; a < g; a++) - for (e = f; e < c; e++) - this.hc.push([a, e]); - this.hc.sort(function(a) { - return function(b, c) { - return 0.4 * Math.abs(b[0] - a[0]) + 0.6 * Math.abs(b[1] - a[1]) - (0.4 * Math.abs(c[0] - a[0]) + 0.6 * Math.abs(c[1] - a[1])) - } - }([i, k])); - this.Xr[b] = this.hc.slice(0); - return this.Xr[b] - } - ; - function hd(a) { - if (a.gG) - return a.gG; - var b = "undefined" !== typeof TVC ? TVC.K2.z4 : {}; - a.gG = { - O0: b.version ? b.version : "001", - C0: b.wn ? b.wn : "20171110" - }; - return a.gG - } - da.update = function(a) { - this.Xr = {}; - for (var b = 0; b < this.ff.length; b++) { - var c = this.ff[b] - , e = this.pj(c.Wr); - c.update(e, a) - } - } - ; - function id(a, b, c) { - this.kd = a; - this.ff = b instanceof Mc ? [b] : b.slice(0); - c = c || {}; - this.j = { - k0: c.tips || "", - LE: "", - gc: c.minZoom || 3, - Yb: c.maxZoom || 18, - W3: c.minZoom || 3, - V3: c.maxZoom || 18, - le: 256, - UF: c.textColor || "black", - vD: c.errorImageUrl || "", - bb: new fb(new J(-21364736,-16023552),new J(23855104,19431424)), - cd: c.projection || new S - }; - 1 <= this.ff.length && (this.ff[0].Jw = q); - z.extend(this.j, c) - } - z.extend(id.prototype, { - getName: w("kd"), - gt: function() { - return this.j.k0 - }, - B3: function() { - return this.j.LE - }, - oY: function() { - return this.ff[0] - }, - P3: w("ff"), - $c: function() { - return this.j.le - }, - bp: function() { - return this.j.gc - }, - sm: function() { - return this.j.Yb - }, - setMaxZoom: function(a) { - this.j.Yb = a - }, - zm: function() { - return this.j.UF - }, - wm: function() { - return this.j.cd - }, - u3: function() { - return this.j.vD - }, - $c: function() { - return this.j.le - }, - dc: function(a) { - return Math.pow(2, 18 - a) - }, - mE: function(a) { - return this.dc(a) * this.$c() - } - }); - var jd = [B.url.proto + B.url.domain.TILE_BASE_URLS[0] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[1] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[2] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[3] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[4] + "/it/"] - , kd = [B.url.proto + B.url.domain.TILE_ONLINE_URLS[0] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[1] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[2] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[3] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[4] + "/tile/"] - , ld = { - dark: "dl", - light: "ll", - normal: "pl" - } - , md = new Mc; - md.M_ = q; - md.getTilesUrl = function(a, b, c) { - var e = a.x - , a = a.y - , f = Sb("normal") - , g = 1 - , c = ld[c]; - //this.map.Sx() && (g = 2); //修改 - //e = this.map.Va.Lw(e, b).hs; - //return (kd[Math.abs(e + a) % kd.length] + "?qt=tile&x=" + (e + "").replace(/-/gi, "M") + "&y=" + (a + "").replace(/-/gi, "M") + "&z=" + b + "&styles=" + c + "&scaler=" + g + (6 == z.ca.ia ? "&color_dep=32&colors=50" : "") + "&udt=" + f).replace(/-(\d+)/gi, "M$1") - - var tdir = bmapcfg.tiles_dir.length>0?bmapcfg.tiles_dir:bmapcfg.home + "tiles"; - return tdir + "/" + b + "/" + e + "/" + a + bmapcfg.imgext; // 使用本地的瓦片 - } - ; - var La = new id("\u5730\u56fe",md,{ - tips: "\u663e\u793a\u666e\u901a\u5730\u56fe", - maxZoom: 19 - }) - , nd = new Mc; - nd.NO = [B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[0] + "/resource/mappic/", B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[1] + "/resource/mappic/", B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[2] + "/resource/mappic/", B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[3] + "/resource/mappic/"]; - nd.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y - , f = 256 * Math.pow(2, 20 - b) - , e = Math.round((9998336 - f * e) / f) - 1; - /*var tdir = bmapcfg.tiles_hybrid.length > 0 ? bmapcfg.tiles_hybrid : bmapcfg.home + "tiles_hybrid";//修改 使用本地卫星的瓦片 - tdir = tdir + "/" + b + "/" + c + "/" + e + bmapcfg.imgext; //修改 使用本地卫星的瓦片 - return tdir;*/ - return url = this.NO[Math.abs(c + e) % this.NO.length] + this.map.Ub + "/" + this.map.Rw + "/3/lv" + (21 - b) + "/" + c + "," + e + ".jpg" - } - ; - var Qa = new id("\u4e09\u7ef4",nd,{ - tips: "\u663e\u793a\u4e09\u7ef4\u5730\u56fe", - minZoom: 15, - maxZoom: 20, - textColor: "white", - projection: new hb - }); - Qa.dc = function(a) { - return Math.pow(2, 20 - a) - } - ; - Qa.wk = function(a) { - if (!a) - return ""; - var b = G.pC, c; - for (c in b) - if (-1 < a.search(c)) - return b[c].yy; - return "" - } - ; - Qa.BL = function(a) { - return { - bj: 2, - gz: 1, - sz: 14, - sh: 4 - }[a] - } - ; - var od = new Mc({ - Jw: q - }); - od.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y; - return (jd[Math.abs(c + e) % jd.length] + "u=x=" + c + ";y=" + e + ";z=" + b + ";v=009;type=sate&fm=46&udt=" + Sb("satellite")).replace(/-(\d+)/gi, "M$1") - } - ; - var Ya = new id("\u536b\u661f",od,{ - tips: "\u663e\u793a\u536b\u661f\u5f71\u50cf", - minZoom: 1, - maxZoom: 19, - textColor: "white" - }) - , pd = new Mc({ - transparentPng: q - }); - pd.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y - , f = Sb("satelliteStreet"); - return (kd[Math.abs(c + e) % kd.length] + "?qt=vtile&x=" + (c + "").replace(/-/gi, "M") + "&y=" + (e + "").replace(/-/gi, "M") + "&z=" + b + "&styles=sl" + (6 == z.ca.ia ? "&color_dep=32&colors=50" : "") + "&udt=" + f).replace(/-(\d+)/gi, "M$1") - } - ; - var Sa = new id("\u6df7\u5408",[od, pd],{ - tips: "\u663e\u793a\u5e26\u6709\u8857\u9053\u7684\u536b\u661f\u5f71\u50cf", - labelText: "\u8def\u7f51", - minZoom: 1, - maxZoom: 19, - textColor: "white" - }); - var qd = 1 - , V = {}; - window.c1 = V; - function W(a, b) { - z.lang.Ca.call(this); - this.Ad = {}; - this.fn(a); - b = b || {}; - b.la = b.renderOptions || {}; - this.j = { - la: { - Ma: b.la.panel || s, - map: b.la.map || s, - Zg: b.la.autoViewport || q, - Ut: b.la.selectFirstResult, - kt: b.la.highlightMode, - Wb: b.la.enableDragging || t - }, - py: b.onSearchComplete || u(), - BN: b.onMarkersSet || u(), - AN: b.onInfoHtmlSet || u(), - DN: b.onResultsHtmlSet || u(), - zN: b.onGetBusListComplete || u(), - yN: b.onGetBusLineComplete || u(), - wN: b.onBusListHtmlSet || u(), - vN: b.onBusLineHtmlSet || u(), - bF: b.onPolylinesSet || u(), - Dp: b.reqFrom || "" - }; - this.j.la.Zg = "undefined" != typeof b && "undefined" != typeof b.renderOptions && "undefined" != typeof b.renderOptions.autoViewport ? b.renderOptions.autoViewport : q; - this.j.la.Ma = z.Fc(this.j.la.Ma) - } - z.ta(W, z.lang.Ca); - z.extend(W.prototype, { - getResults: function() { - return this.Hc ? this.Ei : this.ha - }, - enableAutoViewport: function() { - this.j.la.Zg = q - }, - disableAutoViewport: function() { - this.j.la.Zg = t - }, - fn: function(a) { - a && (this.Ad.src = a) - }, - JF: function(a) { - this.j.py = a || u() - }, - setMarkersSetCallback: function(a) { - this.j.BN = a || u() - }, - setPolylinesSetCallback: function(a) { - this.j.bF = a || u() - }, - setInfoHtmlSetCallback: function(a) { - this.j.AN = a || u() - }, - setResultsHtmlSetCallback: function(a) { - this.j.DN = a || u() - }, - xm: w("Me") - }); - var rd = { - KG: B.Wc, - ab: function(a, b, c, e, f) { - this.SZ(b); - var g = (1E5 * Math.random()).toFixed(0); - B._rd["_cbk" + g] = function(b) { - b.result && b.result.error && 202 === b.result.error ? alert("\u8be5AK\u56e0\u4e3a\u6076\u610f\u884c\u4e3a\u5df2\u7ecf\u88ab\u7ba1\u7406\u5458\u5c01\u7981\uff01") : (c = c || {}, - a && a(b, c), - delete B._rd["_cbk" + g]) - } - ; - e = e || ""; - b = c && c.H0 ? Gb(b, encodeURI) : Gb(b, encodeURIComponent); - this.KG = c && c.jL ? c.$N ? c.$N : B.vp : B.Wc; - e = this.KG + e + "?" + b + "&ie=utf-8&oue=1&fromproduct=jsapi"; - f || (e += "&res=api"); - e = e + ("&callback=BMap._rd._cbk" + g) + ("&ak=" + qa); - oa(e) - }, - SZ: function(a) { - if (a.qt) { - var b = ""; - switch (a.qt) { - case "bt": - b = "z_qt|bt"; - break; - case "nav": - b = "z_qt|nav"; - break; - case "walk": - b = "z_qt|walk"; - break; - case "bse": - b = "z_qt|bse"; - break; - case "nse": - b = "z_qt|nse"; - break; - case "drag": - b = "z_qt|drag" - } - "" !== b && B.alog("cus.fire", "count", b) - } - } - }; - window.o1 = rd; - B._rd = {}; - var ab = {}; - window.n1 = ab; - ab.WN = function(a) { - a = a.replace(/<\/?[^>]*>/g, ""); - return a = a.replace(/[ | ]* /g, " ") - } - ; - ab.JZ = function(a) { - return a.replace(/([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g, "$1,$2;") - } - ; - ab.KZ = function(a, b) { - return a.replace(RegExp("(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){" + b + "}", "ig"), "$1") - } - ; - var sd = 2 - , td = 6 - , ud = 8 - , vd = 2 - , wd = 3 - , xd = 6 - , yd = 0 - , zd = "bt" - , Ad = "nav" - , Bd = "walk" - , Cd = "bl" - , Dd = "bsl" - , Ed = "ride" - , Fd = 15 - , Gd = 18; - B.I = window.Instance = z.lang.Nc; - function Hd(a, b, c) { - z.lang.Ca.call(this); - if (a) { - this.Wa = "object" == typeof a ? a : z.Fc(a); - this.page = 1; - this.Kd = 100; - this.hK = "pg"; - this.Xf = 4; - this.qK = b; - this.update = q; - a = { - page: 1, - $e: 100, - Kd: 100, - Xf: 4, - hK: "pg", - update: q - }; - c || (c = a); - for (var e in c) - "undefined" != typeof c[e] && (this[e] = c[e]); - this.va() - } - } - z.extend(Hd.prototype, { - va: function() { - this.na() - }, - na: function() { - this.YV(); - this.Wa.innerHTML = this.uW() - }, - YV: function() { - isNaN(parseInt(this.page)) && (this.page = 1); - isNaN(parseInt(this.Kd)) && (this.Kd = 1); - 1 > this.page && (this.page = 1); - 1 > this.Kd && (this.Kd = 1); - this.page > this.Kd && (this.page = this.Kd); - this.page = parseInt(this.page); - this.Kd = parseInt(this.Kd) - }, - G3: function() { - location.search.match(RegExp("[?&]?" + this.hK + "=([^&]*)[&$]?", "gi")); - this.page = RegExp.$1 - }, - uW: function() { - var a = [] - , b = this.page - 1 - , c = this.page + 1; - a.push('

'); - if (!(1 > b)) { - if (this.page >= this.Xf) { - var e; - a.push('\u9996\u9875'.replace("{temp1}", "BMap.I('" + this.aa + "').toPage(1);")) - } - a.push('\u4e0a\u4e00\u9875'.replace("{temp2}", "BMap.I('" + this.aa + "').toPage(" + b + ");")) - } - if (this.page < this.Xf) - e = 0 == this.page % this.Xf ? this.page - this.Xf - 1 : this.page - this.page % this.Xf + 1, - b = e + this.Xf - 1; - else { - e = Math.floor(this.Xf / 2); - var f = this.Xf % 2 - 1 - , b = this.Kd > this.page + e ? this.page + e : this.Kd; - e = this.page - e - f - } - this.page > this.Kd - this.Xf && this.page >= this.Xf && (e = this.Kd - this.Xf + 1, - b = this.Kd); - for (f = e; f <= b; f++) - 0 < f && (f == this.page ? a.push('' + f + "") : 1 <= f && f <= this.Kd && (e = '[' + f + "]", - a.push(e.replace("{temp3}", "BMap.I('" + this.aa + "').toPage(" + f + ");")))); - c > this.Kd || a.push('\u4e0b\u4e00\u9875'.replace("{temp4}", "BMap.I('" + this.aa + "').toPage(" + c + ");")); - a.push("

"); - return a.join("") - }, - toPage: function(a) { - a = a ? a : 1; - "function" == typeof this.qK && (this.qK(a), - this.page = a); - this.update && this.va() - } - }); - function cb(a, b) { - W.call(this, a, b); - b = b || {}; - b.renderOptions = b.renderOptions || {}; - this.Np(b.pageCapacity); - "undefined" != typeof b.renderOptions.selectFirstResult && !b.renderOptions.selectFirstResult ? this.UC() : this.oD(); - this.ya = []; - this.yf = []; - this.mb = -1; - this.Pa = []; - var c = this; - K.load("local", function() { - c.Nz() - }, q) - } - z.ta(cb, W, "LocalSearch"); - cb.fq = 10; - cb.k1 = 1; - cb.En = 100; - cb.zG = 2E3; - cb.HG = 1E5; - z.extend(cb.prototype, { - search: function(a, b) { - this.Pa.push({ - method: "search", - arguments: [a, b] - }) - }, - an: function(a, b, c) { - this.Pa.push({ - method: "searchInBounds", - arguments: [a, b, c] - }) - }, - Jp: function(a, b, c, e) { - this.Pa.push({ - method: "searchNearby", - arguments: [a, b, c, e] - }) - }, - Pe: function() { - delete this.Ia; - delete this.Me; - delete this.ha; - delete this.ua; - this.mb = -1; - this.Ta(); - this.j.la.Ma && (this.j.la.Ma.innerHTML = "") - }, - Am: u(), - oD: function() { - this.j.la.Ut = q - }, - UC: function() { - this.j.la.Ut = t - }, - Np: function(a) { - this.j.Jk = "number" == typeof a && !isNaN(a) ? 1 > a ? cb.fq : a > cb.En ? cb.fq : a : cb.fq - }, - qf: function() { - return this.j.Jk - }, - toString: ca("LocalSearch") - }); - var Id = cb.prototype; - T(Id, { - clearResults: Id.Pe, - setPageCapacity: Id.Np, - getPageCapacity: Id.qf, - gotoPage: Id.Am, - searchNearby: Id.Jp, - searchInBounds: Id.an, - search: Id.search, - enableFirstResultSelection: Id.oD, - disableFirstResultSelection: Id.UC - }); - function Jd(a, b) { - W.call(this, a, b) - } - z.ta(Jd, W, "BaseRoute"); - z.extend(Jd.prototype, { - Pe: u() - }); - function Kd(a, b) { - W.call(this, a, b); - b = b || {}; - this.bu(b.policy); - this.oO(b.intercityPolicy); - this.xO(b.transitTypePolicy); - this.Np(b.pageCapacity); - this.Ab = zd; - this.mq = qd; - this.ya = []; - this.mb = -1; - this.j.Vn = b.enableTraffic || t; - this.Pa = []; - var c = this; - K.load("route", function() { - c.Sd() - }) - } - Kd.En = 100; - Kd.HP = [0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 1]; - Kd.IP = [0, 3, 4, 0, 0, 0, 5]; - z.ta(Kd, Jd, "TransitRoute"); - z.extend(Kd.prototype, { - bu: function(a) { - this.j.ie = 0 <= a && 5 >= a ? a : 0 - }, - oO: function(a) { - this.j.Hm = 0 <= a && 2 >= a ? a : 0 - }, - xO: function(a) { - this.j.tn = 0 <= a && 2 >= a ? a : 0 - }, - NA: function(a, b) { - this.Pa.push({ - method: "_internalSearch", - arguments: [a, b] - }) - }, - search: function(a, b) { - this.Pa.push({ - method: "search", - arguments: [a, b] - }) - }, - Np: function(a) { - if ("string" === typeof a && (a = parseInt(a, 10), - isNaN(a))) { - this.j.Jk = Kd.En; - return - } - this.j.Jk = "number" !== typeof a ? Kd.En : 1 <= a && a <= Kd.En ? Math.round(a) : Kd.En - }, - toString: ca("TransitRoute"), - Z1: function(a) { - return a.replace(/\(.*\)/, "") - } - }); - var Ld = Kd.prototype; - T(Ld, { - _internalSearch: Ld.NA - }); - function Md(a, b) { - W.call(this, a, b); - this.ya = []; - this.mb = -1; - this.Pa = []; - var c = this - , e = this.j.la; - 1 !== e.kt && 2 !== e.kt && (e.kt = 1); - this.kv = this.j.la.Wb ? q : t; - K.load("route", function() { - c.Sd() - }); - this.vE && this.vE() - } - Md.WP = " \u73af\u5c9b \u65e0\u5c5e\u6027\u9053\u8def \u4e3b\u8def \u9ad8\u901f\u8fde\u63a5\u8def \u4ea4\u53c9\u70b9\u5185\u8def\u6bb5 \u8fde\u63a5\u9053\u8def \u505c\u8f66\u573a\u5185\u90e8\u9053\u8def \u670d\u52a1\u533a\u5185\u90e8\u9053\u8def \u6865 \u6b65\u884c\u8857 \u8f85\u8def \u531d\u9053 \u5168\u5c01\u95ed\u9053\u8def \u672a\u5b9a\u4e49\u4ea4\u901a\u533a\u57df POI\u8fde\u63a5\u8def \u96a7\u9053 \u6b65\u884c\u9053 \u516c\u4ea4\u4e13\u7528\u9053 \u63d0\u524d\u53f3\u8f6c\u9053".split(" "); - z.ta(Md, Jd, "DWRoute"); - z.extend(Md.prototype, { - search: function(a, b, c) { - this.Pa.push({ - method: "search", - arguments: [a, b, c] - }) - } - }); - function Nd(a, b) { - Md.call(this, a, b); - b = b || {}; - this.j.Vn = b.enableTraffic || t; - this.bu(b.policy); - this.Ab = Ad; - this.mq = wd - } - z.ta(Nd, Md, "DrivingRoute"); - Nd.prototype.bu = function(a) { - this.j.ie = 0 <= a && 5 >= a ? a : 0 - } - ; - function Od(a, b) { - Md.call(this, a, b); - this.Ab = Bd; - this.mq = vd; - this.kv = t - } - z.ta(Od, Md, "WalkingRoute"); - function Pd(a, b) { - Md.call(this, a, b); - this.Ab = Ed; - this.mq = xd; - this.kv = t - } - z.ta(Pd, Md, "RidingRoute"); - function Qd(a, b) { - z.lang.Ca.call(this); - this.Vf = []; - this.Kk = []; - this.j = b; - this.uj = a; - this.map = this.j.la.map || s; - this.hO = this.j.hO; - this.zb = s; - this.pk = 0; - this.SF = ""; - this.nf = 1; - this.uD = ""; - this.Ep = [0, 0, 0, 0, 0, 0, 0]; - this.XM = []; - this.os = [1, 1, 1, 1, 1, 1, 1]; - this.VO = [1, 1, 1, 1, 1, 1, 1]; - this.Fp = [0, 0, 0, 0, 0, 0, 0]; - this.Zm = [0, 0, 0, 0, 0, 0, 0]; - this.Ib = [{ - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }]; - this.bi = -1; - this.ru = []; - this.aG = []; - K.load("route", u()) - } - z.lang.ta(Qd, z.lang.Ca, "RouteAddr"); - var Rd = navigator.userAgent; - /ipad|iphone|ipod|iph/i.test(Rd); - var Sd = /android/i.test(Rd); - function Td(a) { - this.vf = a || {} - } - z.extend(Td.prototype, { - gO: function(a, b, c) { - var e = this; - K.load("route", function() { - e.Sd(a, b, c) - }) - } - }); - function Ud(a) { - this.j = {}; - z.extend(this.j, a); - this.Pa = []; - var b = this; - K.load("othersearch", function() { - b.Sd() - }) - } - z.ta(Ud, z.lang.Ca, "Geocoder"); - z.extend(Ud.prototype, { - vm: function(a, b, c) { - this.Pa.push({ - method: "getPoint", - arguments: [a, b, c] - }) - }, - rm: function(a, b, c) { - this.Pa.push({ - method: "getLocation", - arguments: [a, b, c] - }) - }, - toString: ca("Geocoder") - }); - var Vd = Ud.prototype; - T(Vd, { - getPoint: Vd.vm, - getLocation: Vd.rm - }); - function Geolocation(a) { - a = a || {}; - this.K = { - timeout: a.timeout || 1E4, - maximumAge: a.maximumAge || 6E5, - enableHighAccuracy: a.enableHighAccuracy || t, - zi: a.SDKLocation || t - }; - this.pe = []; - var b = this; - K.load("othersearch", function() { - for (var a = 0, e; e = b.pe[a]; a++) - b[e.method].apply(b, e.arguments) - }) - } - z.extend(Geolocation.prototype, { - getCurrentPosition: function(a, b) { - this.pe.push({ - method: "getCurrentPosition", - arguments: arguments - }) - }, - getStatus: function() { - return sd - }, - enableSDKLocation: function() { - H() && (this.K.zi = q) - }, - disableSDKLocation: function() { - this.K.zi = t - } - }); - function Wd(a) { - a = a || {}; - a.la = a.renderOptions || {}; - this.j = { - la: { - map: a.la.map || s - } - }; - this.Pa = []; - var b = this; - K.load("othersearch", function() { - b.Sd() - }) - } - z.ta(Wd, z.lang.Ca, "LocalCity"); - z.extend(Wd.prototype, { - get: function(a) { - this.Pa.push({ - method: "get", - arguments: [a] - }) - }, - toString: ca("LocalCity") - }); - function Xd() { - this.Pa = []; - var a = this; - K.load("othersearch", function() { - a.Sd() - }) - } - z.ta(Xd, z.lang.Ca, "Boundary"); - z.extend(Xd.prototype, { - get: function(a, b) { - this.Pa.push({ - method: "get", - arguments: [a, b] - }) - }, - toString: ca("Boundary") - }); - function Yd(a, b) { - W.call(this, a, b); - this.TP = Cd; - this.VP = Fd; - this.SP = Dd; - this.UP = Gd; - this.Pa = []; - var c = this; - K.load("buslinesearch", function() { - c.Sd() - }) - } - Yd.zv = G.qa + "iw_plus.gif"; - Yd.YS = G.qa + "iw_minus.gif"; - Yd.RU = G.qa + "stop_icon.png"; - z.ta(Yd, W); - z.extend(Yd.prototype, { - getBusList: function(a) { - this.Pa.push({ - method: "getBusList", - arguments: [a] - }) - }, - getBusLine: function(a) { - this.Pa.push({ - method: "getBusLine", - arguments: [a] - }) - }, - setGetBusListCompleteCallback: function(a) { - this.j.zN = a || u() - }, - setGetBusLineCompleteCallback: function(a) { - this.j.yN = a || u() - }, - setBusListHtmlSetCallback: function(a) { - this.j.wN = a || u() - }, - setBusLineHtmlSetCallback: function(a) { - this.j.vN = a || u() - }, - setPolylinesSetCallback: function(a) { - this.j.bF = a || u() - } - }); - function Zd(a) { - W.call(this, a); - a = a || {}; - this.ub = { - input: a.input || s, - gC: a.baseDom || s, - types: a.types || [], - py: a.onSearchComplete || u() - }; - this.Ad.src = a.location || "\u5168\u56fd"; - this.Wi = ""; - this.pg = s; - this.lI = ""; - this.Mi(); - Ra(Ha); - var b = this; - K.load("autocomplete", function() { - b.Sd() - }) - } - z.ta(Zd, W, "Autocomplete"); - z.extend(Zd.prototype, { - Mi: u(), - show: u(), - U: u(), - KF: function(a) { - this.ub.types = a - }, - fn: function(a) { - this.Ad.src = a - }, - search: ba("Wi"), - Ly: ba("lI") - }); - var Ta; - function Oa(a, b) { - function c() { - f.j.visible ? ("inter" === f.Ke && f.j.haveBreakId && f.j.indoorExitControl === q ? z.D.show(f.GA) : z.D.U(f.GA), - this.j.closeControl && this.Bf && this.B && this.B.La() === this.C ? z.D.show(f.Bf) : z.D.U(f.Bf), - this.j.forceCloseControl && z.D.show(f.Bf)) : (z.D.U(f.Bf), - z.D.U(f.GA)) - } - this.C = "string" == typeof a ? z.$(a) : a; - this.aa = $d++; - this.j = { - enableScrollWheelZoom: q, - panoramaRenderer: "flash", - swfSrc: B.vg("main_domain_nocdn", "res/swf/") + "APILoader.swf", - visible: q, - indoorExitControl: q, - indoorFloorControl: t, - linksControl: q, - clickOnRoad: q, - navigationControl: q, - closeControl: q, - indoorSceneSwitchControl: q, - albumsControl: t, - albumsControlOptions: {}, - copyrightControlOptions: {}, - forceCloseControl: t, - haveBreakId: t - }; - var b = b || {}, e; - for (e in b) - this.j[e] = b[e]; - b.closeControl === q && (this.j.forceCloseControl = q); - b.useWebGL === t && Na(t); - this.Da = { - heading: 0, - pitch: 0 - }; - this.bo = []; - this.Lb = this.Za = s; - this.dk = this.er(); - this.ya = []; - this.Mc = 1; - this.Ke = this.xT = this.jl = ""; - this.Je = {}; - this.Of = s; - this.Sg = []; - this.xr = []; - "cvsRender" == this.dk || Na() ? (this.Vj = 90, - this.Xj = -90) : "cssRender" == this.dk && (this.Vj = 45, - this.Xj = -45); - this.Br = t; - var f = this; - this.co = function() { - this.dk === "flashRender" ? K.load("panoramaflash", function() { - f.Mi() - }, q) : K.load("panorama", function() { - f.ib() - }, q); - b.of == "api" ? Ra(Da) : Ra(Ea); - this.co = u() - } - ; - this.j.jT !== q && (this.co(), - B.Fn("cus.fire", "count", "z_loadpanoramacount")); - this.aU(this.C); - this.addEventListener("id_changed", function() { - Ra(Ca, { - from: b.of - }) - }); - this.mQ(); - this.addEventListener("indoorexit_options_changed", c); - this.addEventListener("scene_type_changed", c); - this.addEventListener("onclose_options_changed", c); - this.addEventListener("onvisible_changed", c) - } - var ae = 4 - , be = 1 - , $d = 0; - z.lang.ta(Oa, z.lang.Ca, "Panorama"); - z.extend(Oa.prototype, { - mQ: function() { - var a = this - , b = this.Bf = L("div"); - b.className = "pano_close"; - b.style.cssText = "z-index: 1201;display: none"; - b.title = "\u9000\u51fa\u5168\u666f"; - b.onclick = function() { - a.U() - } - ; - this.C.appendChild(b); - var c = this.GA = L("a"); - c.className = "pano_pc_indoor_exit"; - c.style.cssText = "z-index: 1201;display: none"; - c.innerHTML = '\u51fa\u53e3'; - c.title = "\u9000\u51fa\u5ba4\u5185\u666f"; - c.onclick = function() { - a.Vo() - } - ; - this.C.appendChild(c); - window.ActiveXObject && !document.addEventListener && (b.style.backgroundColor = "rgb(37,37,37)", - c.style.backgroundColor = "rgb(37,37,37)") - }, - Vo: u(), - aU: function(a) { - var b, c; - b = a.style; - c = Va(a).position; - "absolute" != c && "relative" != c && (b.position = "relative", - b.zIndex = 0); - if ("absolute" === c || "relative" === c) - if (a = Va(a).zIndex, - !a || "auto" === a) - b.zIndex = 0 - }, - OX: w("bo"), - Xb: w("Za"), - pY: w("jw"), - wO: w("jw"), - ga: w("Lb"), - Ea: w("Da"), - fa: w("Mc"), - jj: w("jl"), - I3: function() { - return this.U1 || [] - }, - D3: w("xT"), - ft: w("Ke"), - Ny: function(a) { - a !== this.Ke && (this.Ke = a, - this.dispatchEvent(new P("onscene_type_changed"))) - }, - vc: function(a, b, c) { - "object" === typeof b && (c = b, - b = l); - a != this.Za && (this.ul = this.Za, - this.vl = this.Lb, - this.Za = a, - this.Ke = b || "street", - this.Lb = s, - c && c.pov && this.Pc(c.pov)) - }, - sa: function(a) { - a.pb(this.Lb) || (this.ul = this.Za, - this.vl = this.Lb, - this.Lb = a, - this.Za = s) - }, - Pc: function(a) { - a && (this.Da = a, - a = this.Da.pitch, - a > this.Vj ? a = this.Vj : a < this.Xj && (a = this.Xj), - this.Br = q, - this.Da.pitch = a) - }, - H_: function(a, b) { - this.Xj = 0 <= a ? 0 : a; - this.Vj = 0 >= b ? 0 : b - }, - Qc: function(a) { - a != this.Mc && (a > ae && (a = ae), - a < be && (a = be), - a != this.Mc && (this.Mc = a), - "cssRender" === this.dk && this.Pc(this.Da)) - }, - GB: function() { - if (this.B) - for (var a = this.B.Hx(), b = 0; b < a.length; b++) - (a[b]instanceof U || a[b]instanceof uc) && a[b].point && this.ya.push(a[b]) - }, - GF: ba("B"), - au: function(a) { - this.Of = a || "none" - }, - Qk: function(a) { - for (var b in a) { - if ("object" == typeof a[b]) - for (var c in a[b]) - this.j[b][c] = a[b][c]; - else - this.j[b] = a[b]; - a.closeControl === q && (this.j.forceCloseControl = q); - a.closeControl === t && (this.j.forceCloseControl = t); - switch (b) { - case "linksControl": - this.dispatchEvent(new P("onlinks_visible_changed")); - break; - case "clickOnRoad": - this.dispatchEvent(new P("onclickonroad_changed")); - break; - case "navigationControl": - this.dispatchEvent(new P("onnavigation_visible_changed")); - break; - case "indoorSceneSwitchControl": - this.dispatchEvent(new P("onindoor_default_switch_mode_changed")); - break; - case "albumsControl": - this.dispatchEvent(new P("onalbums_visible_changed")); - break; - case "albumsControlOptions": - this.dispatchEvent(new P("onalbums_options_changed")); - break; - case "copyrightControlOptions": - this.dispatchEvent(new P("oncopyright_options_changed")); - break; - case "closeControl": - this.dispatchEvent(new P("onclose_options_changed")); - break; - case "indoorExitControl": - this.dispatchEvent(new P("onindoorexit_options_changed")); - break; - case "indoorFloorControl": - this.dispatchEvent(new P("onindoorfloor_options_changed")) - } - } - }, - Ek: function() { - this.Dl.style.visibility = "hidden" - }, - Ry: function() { - this.Dl.style.visibility = "visible" - }, - cX: function() { - this.j.enableScrollWheelZoom = q - }, - NW: function() { - this.j.enableScrollWheelZoom = t - }, - show: function() { - this.j.visible = q - }, - U: function() { - this.j.visible = t - }, - er: function() { - return Ua() && !H() && "javascript" != this.j.panoramaRenderer ? "flashRender" : !H() && Ob() ? "cvsRender" : "cssRender" - }, - Ga: function(a) { - this.Je[a.ld] = a - }, - Qb: function(a) { - delete this.Je[a] - }, - kE: function() { - return this.j.visible - }, - fh: function() { - return new O(this.C.clientWidth,this.C.clientHeight) - }, - La: w("C"), - yL: function() { - var a = B.vg("baidumap", "?") - , b = this.Xb(); - if (b) { - var b = { - panotype: this.ft(), - heading: this.Ea().heading, - pitch: this.Ea().pitch, - pid: b, - panoid: b, - from: "api" - }, c; - for (c in b) - a += c + "=" + b[c] + "&" - } - return a.slice(0, -1) - }, - Px: function() { - this.Qk({ - copyrightControlOptions: { - logoVisible: t - } - }) - }, - NF: function() { - this.Qk({ - copyrightControlOptions: { - logoVisible: q - } - }) - }, - aC: function(a) { - function b(a, b) { - return function() { - a.xr.push({ - iN: b, - hN: arguments - }) - } - } - for (var c = a.getPanoMethodList(), e = "", f = 0, g = c.length; f < g; f++) - e = c[f], - this[e] = b(this, e); - this.Sg.push(a) - }, - rF: function(a) { - for (var b = this.Sg.length; b--; ) - this.Sg[b] === a && this.Sg.splice(b, 1) - }, - FF: u() - }); - var ce = Oa.prototype; - T(ce, { - setId: ce.vc, - setPosition: ce.sa, - setPov: ce.Pc, - setZoom: ce.Qc, - setOptions: ce.Qk, - getId: ce.Xb, - getPosition: ce.ga, - getPov: ce.Ea, - getZoom: ce.fa, - getLinks: ce.OX, - getBaiduMapUrl: ce.yL, - hideMapLogo: ce.Px, - showMapLogo: ce.NF, - enableDoubleClickZoom: ce.W2, - disableDoubleClickZoom: ce.J2, - enableScrollWheelZoom: ce.cX, - disableScrollWheelZoom: ce.NW, - show: ce.show, - hide: ce.U, - addPlugin: ce.aC, - removePlugin: ce.rF, - getVisible: ce.kE, - addOverlay: ce.Ga, - removeOverlay: ce.Qb, - getSceneType: ce.ft, - setPanoramaPOIType: ce.au, - exitInter: ce.Vo, - setInteractiveState: ce.FF - }); - T(window, { - BMAP_PANORAMA_POI_HOTEL: "hotel", - BMAP_PANORAMA_POI_CATERING: "catering", - BMAP_PANORAMA_POI_MOVIE: "movie", - BMAP_PANORAMA_POI_TRANSIT: "transit", - BMAP_PANORAMA_POI_INDOOR_SCENE: "indoor_scene", - BMAP_PANORAMA_POI_NONE: "none", - BMAP_PANORAMA_INDOOR_SCENE: "inter", - BMAP_PANORAMA_STREET_SCENE: "street" - }); - function de() { - z.lang.Ca.call(this); - this.ld = "PanoramaOverlay_" + this.aa; - this.P = s; - this.Qa = q - } - z.lang.ta(de, z.lang.Ca, "PanoramaOverlayBase"); - z.extend(de.prototype, { - E3: w("ld"), - na: function() { - aa("initialize\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - remove: function() { - aa("remove\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - Nf: function() { - aa("_setOverlayProperty\u65b9\u6cd5\u672a\u5b9e\u73b0") - } - }); - function ee(a, b) { - de.call(this); - var c = { - position: s, - altitude: 2, - displayDistance: q - }, b = b || {}, e; - for (e in b) - c[e] = b[e]; - this.Lb = c.position; - this.Ij = a; - this.xq = c.altitude; - this.zR = c.displayDistance; - this.UF = c.color; - this.kM = c.hoverColor; - this.backgroundColor = c.backgroundColor; - this.jK = c.backgroundHoverColor; - this.borderColor = c.borderColor; - this.oK = c.borderHoverColor; - this.fontSize = c.fontSize; - this.padding = c.padding; - this.pE = c.imageUrl; - this.size = c.size; - this.xe = c.image; - this.width = c.width; - this.height = c.height; - this.HY = c.imageData; - this.borderWidth = c.borderWidth - } - z.lang.ta(ee, de, "PanoramaLabel"); - z.extend(ee.prototype, { - j3: w("borderWidth"), - getImageData: w("HY"), - zm: w("UF"), - y3: w("kM"), - f3: w("backgroundColor"), - g3: w("jK"), - h3: w("borderColor"), - i3: w("oK"), - w3: w("fontSize"), - F3: w("padding"), - z3: w("pE"), - cb: w("size"), - zx: w("xe"), - sa: function(a) { - this.Lb = a; - this.Nf("position", a) - }, - ga: w("Lb"), - dd: function(a) { - this.Ij = a; - this.Nf("content", a) - }, - xk: w("Ij"), - AF: function(a) { - this.xq = a; - this.Nf("altitude", a) - }, - Yo: w("xq"), - Ea: function() { - var a = this.ga() - , b = s - , c = s; - this.P && (c = this.P.ga()); - if (a && c) - if (a.pb(c)) - b = this.P.Ea(); - else { - b = {}; - b.heading = fe(a.lng - c.lng, a.lat - c.lat) || 0; - var a = b - , c = this.Yo() - , e = this.Xn(); - a.pitch = Math.round(180 * (Math.atan(c / e) / Math.PI)) || 0 - } - return b - }, - Xn: function() { - var a = 0, b, c; - this.P && (b = this.P.ga(), - (c = this.ga()) && !c.pb(b) && (a = S.$o(b, c))); - return a - }, - U: function() { - aa("hide\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - show: function() { - aa("show\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - Nf: u() - }); - var ge = ee.prototype; - T(ge, { - setPosition: ge.sa, - getPosition: ge.ga, - setContent: ge.dd, - getContent: ge.xk, - setAltitude: ge.AF, - getAltitude: ge.Yo, - getPov: ge.Ea, - show: ge.show, - hide: ge.U - }); - function he(a, b) { - de.call(this); - var c = { - icon: "", - title: "", - panoInfo: s, - altitude: 2 - }, b = b || {}, e; - for (e in b) - c[e] = b[e]; - this.Lb = a; - this.gI = c.icon; - this.DJ = c.title; - this.xq = c.altitude; - this.OT = c.panoInfo; - this.Da = { - heading: 0, - pitch: 0 - } - } - z.lang.ta(he, de, "PanoramaMarker"); - z.extend(he.prototype, { - sa: function(a) { - this.Lb = a; - this.Nf("position", a) - }, - ga: w("Lb"), - Ec: function(a) { - this.DJ = a; - this.Nf("title", a) - }, - gp: w("DJ"), - Rb: function(a) { - this.gI = icon; - this.Nf("icon", a) - }, - ap: w("gI"), - AF: function(a) { - this.xq = a; - this.Nf("altitude", a) - }, - Yo: w("xq"), - $D: w("OT"), - Ea: function() { - var a = s; - if (this.P) { - var a = this.P.ga() - , b = this.ga() - , a = fe(b.lng - a.lng, b.lat - a.lat); - isNaN(a) && (a = 0); - a = { - heading: a, - pitch: 0 - } - } else - a = this.Da; - return a - }, - Nf: u() - }); - var ie = he.prototype; - T(ie, { - setPosition: ie.sa, - getPosition: ie.ga, - setTitle: ie.Ec, - getTitle: ie.gp, - setAltitude: ie.AF, - getAltitude: ie.Yo, - getPanoInfo: ie.$D, - getIcon: ie.ap, - setIcon: ie.Rb, - getPov: ie.Ea - }); - function fe(a, b) { - var c = 0; - if (0 !== a && 0 !== b) { - var c = 180 * (Math.atan(a / b) / Math.PI) - , e = 0; - 0 < a && 0 > b && (e = 90); - 0 > a && 0 > b && (e = 180); - 0 > a && 0 < b && (e = 270); - c = (c + 90) % 90 + e - } else - 0 === a ? c = 0 > b ? 180 : 0 : 0 === b && (c = 0 < a ? 90 : 270); - return Math.round(c) - } - function Na(a) { - if ("boolean" === typeof je) - return je; - if (a === t || !window.WebGLRenderingContext) - return je = t; - if (z.platform.Jm) { - a = 0; - try { - a = navigator.userAgent.split("Android ")[1].charAt(0) - } catch (b) {} - if (5 > a) - return je = t - } - var a = document.createElement("canvas") - , c = s; - try { - c = a.getContext("webgl") - } catch (e) { - je = t - } - return je = c === s ? t : q - } - var je; - function ke() { - if ("boolean" === typeof le) - return le; - le = q; - if (z.platform.zE) - return q; - var a = navigator.userAgent; - return -1 < a.indexOf("Chrome") || -1 < a.indexOf("SAMSUNG-GT-I9508") ? q : le = t - } - var le; - function ec(a, b) { - this.P = a || s; - var c = this; - c.P && c.ba(); - K.load("pservice", function() { - c.SQ() - }); - "api" == (b || {}).of ? Ra(Fa) : Ra(Ga); - this.xd = { - getPanoramaById: [], - getPanoramaByLocation: [], - getVisiblePOIs: [], - getRecommendPanosById: [], - getPanoramaVersions: [], - checkPanoSupportByCityCode: [], - getPanoramaByPOIId: [], - getCopyrightProviders: [] - } - } - B.Tm(function(a) { - "flashRender" !== a.er() && new ec(a,{ - of: "api" - }) - }); - z.extend(ec.prototype, { - ba: function() { - function a(a) { - if (a) { - if (a.id != b.jw) { - b.wO(a.id); - b.ea = a; - ke() || b.dispatchEvent(new P("onthumbnail_complete")); - b.Za != s && (b.vl = b._position); - for (var c in a) - if (a.hasOwnProperty(c)) - switch (b["_" + c] = a[c], - c) { - case "position": - b.Lb = a[c]; - break; - case "id": - b.Za = a[c]; - break; - case "links": - b.bo = a[c]; - break; - case "zoom": - b.Mc = a[c] - } - if (b.vl) { - var g = b.vl - , i = b._position; - c = g.lat; - var k = i.lat - , m = Pb(k - c) - , g = Pb(i.lng - g.lng); - c = Math.sin(m / 2) * Math.sin(m / 2) + Math.cos(Pb(c)) * Math.cos(Pb(k)) * Math.sin(g / 2) * Math.sin(g / 2); - b.wH = 6371E3 * 2 * Math.atan2(Math.sqrt(c), Math.sqrt(1 - c)) - } - c = new P("ondataload"); - c.data = a; - b.dispatchEvent(c); - b.dispatchEvent(new P("onposition_changed")); - b.dispatchEvent(new P("onlinks_changed")); - b.dispatchEvent(new P("oncopyright_changed"), { - copyright: a.copyright - }); - a.bm && b.j.closeControl ? z.D.show(b.WR) : z.D.U(b.WR) - } - } else - b.Za = b.ul, - b.Lb = b.vl, - b.dispatchEvent(new P("onnoresult")) - } - var b = this.P - , c = this; - b.addEventListener("id_changed", function() { - c.ep(b.Xb(), a) - }); - b.addEventListener("iid_changed", function() { - c.Tg(ec.el + "qt=idata&iid=" + b.CA + "&fn=", function(b) { - if (b && b.result && 0 == b.result.error) { - var b = b.content[0].interinfo - , f = {}; - f.bm = b.BreakID; - for (var g = b.Defaultfloor, i = s, k = 0; k < b.Floors.length; k++) - if (b.Floors[k].Floor == g) { - i = b.Floors[k]; - break - } - f.id = i.StartID || i.Points[0].PID; - c.ep(f.id, a, f) - } - }) - }); - b.addEventListener("position_changed_inner", function() { - c.kj(b.ga(), a) - }) - }, - ep: function(a, b) { - this.xd.getPanoramaById.push(arguments) - }, - kj: function(a, b, c) { - this.xd.getPanoramaByLocation.push(arguments) - }, - lE: function(a, b, c, e) { - this.xd.getVisiblePOIs.push(arguments) - }, - Kx: function(a, b) { - this.xd.getRecommendPanosById.push(arguments) - }, - Jx: function(a) { - this.xd.getPanoramaVersions.push(arguments) - }, - nC: function(a, b) { - this.xd.checkPanoSupportByCityCode.push(arguments) - }, - Ix: function(a, b) { - this.xd.getPanoramaByPOIId.push(arguments) - }, - CL: function(a) { - this.xd.getCopyrightProviders.push(arguments) - } - }); - var ne = ec.prototype; - T(ne, { - getPanoramaById: ne.ep, - getPanoramaByLocation: ne.kj, - getPanoramaByPOIId: ne.Ix - }); - function dc(a) { - Mc.call(this); - "api" == (a || {}).of ? Ra(Aa) : Ra(Ba) - } - dc.OG = B.vg("pano", "tile/"); - dc.prototype = new Mc; - dc.prototype.getTilesUrl = function(a, b) { - var c = dc.OG[(a.x + a.y) % dc.OG.length] + "?udt=20150114&qt=tile&styles=pl&x=" + a.x + "&y=" + a.y + "&z=" + b; - z.ca.ia && 6 >= z.ca.ia && (c += "&color_dep=32"); - return c - } - ; - dc.prototype.zt = ca(q); - oe.Wd = new S; - function oe() {} - z.extend(oe, { - OW: function(a, b, c) { - c = z.lang.Nc(c); - b = { - data: b - }; - "position_changed" == a && (b.data = oe.Wd.xj(new Q(b.data.mercatorX,b.data.mercatorY))); - c.dispatchEvent(new P("on" + a), b) - } - }); - var pe = oe; - T(pe, { - dispatchFlashEvent: pe.OW - }); - var qe = { - KP: 50 - }; - qe.Ou = B.vg("pano")[0]; - qe.Mu = { - width: 220, - height: 60 - }; - z.extend(qe, { - tM: function(a, b, c, e) { - if (!b || !c || !c.lngLat || !c.panoInstance) - e(); - else { - this.jo === l && (this.jo = new ec(s,{ - of: "api" - })); - var f = this; - this.jo.nC(b, function(b) { - b ? f.jo.kj(c.lngLat, qe.KP, function(b) { - if (b && b.id) { - var g = b.id - , m = b.rh - , b = b.th - , n = ec.Wd.kh(c.lngLat) - , o = f.AS(n, { - x: m, - y: b - }) - , m = f.PL(g, o, 0, qe.Mu.width, qe.Mu.height); - a.content = f.BS(a.content, m, c.titleTip, c.beforeDomId); - a.addEventListener("open", function() { - ia.M(z.Fc("infoWndPano"), "click", function() { - c.panoInstance.vc(g); - c.panoInstance.show(); - c.panoInstance.Pc({ - heading: o, - pitch: 0 - }) - }) - }) - } - e() - }) : e() - }) - } - }, - BS: function(a, b, c, e) { - var c = c || "", f; - !e || !a.split(e)[0] ? (e = a, - a = "") : (e = a.split(e)[0], - f = e.lastIndexOf("<"), - e = a.substring(0, f), - a = a.substring(f)); - f = []; - var g = qe.Mu.width - , i = qe.Mu.height; - f.push(e); - f.push("
"); - f.push("" + c + "\u5916\u666f"); - f.push("
\u8fdb\u5165\u5168\u666f>>"); - f.push("
"); - f.push(a); - return f.join("") - }, - AS: function(a, b) { - var c = 90 - 180 * Math.atan2(a.y - b.y, a.x - b.x) / Math.PI; - 0 > c && (c += 360); - return c - }, - PL: function(a, b, c, e, f) { - var g = { - panoId: a, - panoHeading: b || 0, - panoPitch: c || 0, - width: e, - height: f - }; - return (qe.Ou + "?qt=pr3d&fovy=75&quality=80&panoid={panoId}&heading={panoHeading}&pitch={panoPitch}&width={width}&height={height}").replace(/\{(.*?)\}/g, function(a, b) { - return g[b] - }) - } - }); - var te = document, ue = Math, ve = te.createElement("div").style, we; - a: { - for (var xe = ["t", "webkitT", "MozT", "msT", "OT"], ye, ze = 0, Ae = xe.length; ze < Ae; ze++) - if (ye = xe[ze] + "ransform", - ye in ve) { - we = xe[ze].substr(0, xe[ze].length - 1); - break a - } - we = t - } - var Be = we ? "-" + we.toLowerCase() + "-" : "" - , De = Ce("transform") - , Ee = Ce("transitionProperty") - , Fe = Ce("transitionDuration") - , Ge = Ce("transformOrigin") - , He = Ce("transitionTimingFunction") - , Ie = Ce("transitionDelay") - , Sd = /android/gi.test(navigator.appVersion) - , Je = /iphone|ipad/gi.test(navigator.appVersion) - , Ke = /hp-tablet/gi.test(navigator.appVersion) - , Le = Ce("perspective")in ve - , Me = "ontouchstart"in window && !Ke - , Ne = we !== t - , Oe = Ce("transition")in ve - , Pe = "onorientationchange"in window ? "orientationchange" : "resize" - , Qe = Me ? "touchstart" : "mousedown" - , Re = Me ? "touchmove" : "mousemove" - , Se = Me ? "touchend" : "mouseup" - , Te = Me ? "touchcancel" : "mouseup" - , Ue = we === t ? t : { - "": "transitionend", - webkit: "webkitTransitionEnd", - Moz: "transitionend", - O: "otransitionend", - ms: "MSTransitionEnd" - }[we] - , Ve = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(a) { - return setTimeout(a, 1) - } - , We = window.cancelRequestAnimationFrame || window.U5 || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || clearTimeout - , Xe = Le ? " translateZ(0)" : ""; - function Ye(a, b) { - var c = this, e; - c.zn = "object" == typeof a ? a : te.getElementById(a); - c.zn.style.overflow = "hidden"; - c.Nb = c.zn.children[0]; - c.options = { - kp: q, - xn: q, - x: 0, - y: 0, - Go: q, - LV: t, - iy: q, - OE: q, - Yk: q, - wi: t, - n0: 0, - Pw: t, - Mx: q, - ii: q, - xi: q, - AD: Sd, - Qx: Je, - kX: Je && Le, - xF: "", - zoom: t, - $k: 1, - aq: 4, - QW: 2, - qP: "scroll", - iu: t, - Uy: 1, - CN: s, - uN: function(a) { - a.preventDefault() - }, - FN: s, - tN: s, - EN: s, - sN: s, - oy: s, - GN: s, - xN: s, - zp: s, - HN: s, - yp: s - }; - for (e in b) - c.options[e] = b[e]; - c.x = c.options.x; - c.y = c.options.y; - c.options.Yk = Ne && c.options.Yk; - c.options.ii = c.options.kp && c.options.ii; - c.options.xi = c.options.xn && c.options.xi; - c.options.zoom = c.options.Yk && c.options.zoom; - c.options.wi = Oe && c.options.wi; - c.options.zoom && Sd && (Xe = ""); - c.Nb.style[Ee] = c.options.Yk ? Be + "transform" : "top left"; - c.Nb.style[Fe] = "0"; - c.Nb.style[Ge] = "0 0"; - c.options.wi && (c.Nb.style[He] = "cubic-bezier(0.33,0.66,0.66,1)"); - c.options.Yk ? c.Nb.style[De] = "translate(" + c.x + "px," + c.y + "px)" + Xe : c.Nb.style.cssText += ";position:absolute;top:" + c.y + "px;left:" + c.x + "px"; - c.options.wi && (c.options.AD = q); - c.refresh(); - c.ba(Pe, window); - c.ba(Qe); - !Me && "none" != c.options.qP && (c.ba("DOMMouseScroll"), - c.ba("mousewheel")); - c.options.Pw && (c.XV = setInterval(function() { - c.PQ() - }, 500)); - this.options.Mx && (Event.prototype.stopImmediatePropagation || (document.body.removeEventListener = function(a, b, c) { - var e = Node.prototype.removeEventListener; - a === "click" ? e.call(document.body, a, b.iM || b, c) : e.call(document.body, a, b, c) - } - , - document.body.addEventListener = function(a, b, c) { - var e = Node.prototype.addEventListener; - a === "click" ? e.call(document.body, a, b.iM || (b.iM = function(a) { - a.RZ || b(a) - } - ), c) : e.call(document.body, a, b, c) - } - ), - c.ba("click", document.body, q)) - } - Ye.prototype = { - enabled: q, - x: 0, - y: 0, - yj: [], - scale: 1, - HC: 0, - IC: 0, - We: [], - wf: [], - fC: s, - cz: 0, - handleEvent: function(a) { - switch (a.type) { - case Qe: - if (!Me && 0 !== a.button) - break; - this.aw(a); - break; - case Re: - this.zT(a); - break; - case Se: - case Te: - this.lv(a); - break; - case Pe: - this.zB(); - break; - case "DOMMouseScroll": - case "mousewheel": - this.eV(a); - break; - case Ue: - this.$U(a); - break; - case "click": - this.$Q(a) - } - }, - PQ: function() { - !this.oh && (!this.al && !(this.Yl || this.Ky == this.Nb.offsetWidth * this.scale && this.Ip == this.Nb.offsetHeight * this.scale)) && this.refresh() - }, - Sv: function(a) { - var b; - this[a + "Scrollbar"] ? (this[a + "ScrollbarWrapper"] || (b = te.createElement("div"), - this.options.xF ? b.className = this.options.xF + a.toUpperCase() : b.style.cssText = "position:absolute;z-index:100;" + ("h" == a ? "height:7px;bottom:1px;left:2px;right:" + (this.xi ? "7" : "2") + "px" : "width:7px;bottom:" + (this.ii ? "7" : "2") + "px;top:2px;right:1px"), - b.style.cssText += ";pointer-events:none;" + Be + "transition-property:opacity;" + Be + "transition-duration:" + (this.options.kX ? "350ms" : "0") + ";overflow:hidden;opacity:" + (this.options.Qx ? "0" : "1"), - this.zn.appendChild(b), - this[a + "ScrollbarWrapper"] = b, - b = te.createElement("div"), - this.options.xF || (b.style.cssText = "position:absolute;z-index:100;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);" + Be + "background-clip:padding-box;" + Be + "box-sizing:border-box;" + ("h" == a ? "height:100%" : "width:100%") + ";" + Be + "border-radius:3px;border-radius:3px"), - b.style.cssText += ";pointer-events:none;" + Be + "transition-property:" + Be + "transform;" + Be + "transition-timing-function:cubic-bezier(0.33,0.66,0.66,1);" + Be + "transition-duration:0;" + Be + "transform: translate(0,0)" + Xe, - this.options.wi && (b.style.cssText += ";" + Be + "transition-timing-function:cubic-bezier(0.33,0.66,0.66,1)"), - this[a + "ScrollbarWrapper"].appendChild(b), - this[a + "ScrollbarIndicator"] = b), - "h" == a ? (this.fM = this.gM.clientWidth, - this.yY = ue.max(ue.round(this.fM * this.fM / this.Ky), 8), - this.xY.style.width = this.yY + "px") : (this.iP = this.jP.clientHeight, - this.L0 = ue.max(ue.round(this.iP * this.iP / this.Ip), 8), - this.K0.style.height = this.L0 + "px"), - this.AB(a, q)) : this[a + "ScrollbarWrapper"] && (Ne && (this[a + "ScrollbarIndicator"].style[De] = ""), - this[a + "ScrollbarWrapper"].parentNode.removeChild(this[a + "ScrollbarWrapper"]), - this[a + "ScrollbarWrapper"] = s, - this[a + "ScrollbarIndicator"] = s) - }, - zB: function() { - var a = this; - setTimeout(function() { - a.refresh() - }, Sd ? 200 : 0) - }, - Ar: function(a, b) { - this.al || (a = this.kp ? a : 0, - b = this.xn ? b : 0, - this.options.Yk ? this.Nb.style[De] = "translate(" + a + "px," + b + "px) scale(" + this.scale + ")" + Xe : (a = ue.round(a), - b = ue.round(b), - this.Nb.style.left = a + "px", - this.Nb.style.top = b + "px"), - this.x = a, - this.y = b, - this.AB("h"), - this.AB("v")) - }, - AB: function(a, b) { - var c = "h" == a ? this.x : this.y; - this[a + "Scrollbar"] && (c *= this[a + "ScrollbarProp"], - 0 > c ? (this.options.AD || (c = this[a + "ScrollbarIndicatorSize"] + ue.round(3 * c), - 8 > c && (c = 8), - this[a + "ScrollbarIndicator"].style["h" == a ? "width" : "height"] = c + "px"), - c = 0) : c > this[a + "ScrollbarMaxScroll"] && (this.options.AD ? c = this[a + "ScrollbarMaxScroll"] : (c = this[a + "ScrollbarIndicatorSize"] - ue.round(3 * (c - this[a + "ScrollbarMaxScroll"])), - 8 > c && (c = 8), - this[a + "ScrollbarIndicator"].style["h" == a ? "width" : "height"] = c + "px", - c = this[a + "ScrollbarMaxScroll"] + (this[a + "ScrollbarIndicatorSize"] - c))), - this[a + "ScrollbarWrapper"].style[Ie] = "0", - this[a + "ScrollbarWrapper"].style.opacity = b && this.options.Qx ? "0" : "1", - this[a + "ScrollbarIndicator"].style[De] = "translate(" + ("h" == a ? c + "px,0)" : "0," + c + "px)") + Xe) - }, - $Q: function(a) { - if (a.XR === q) - return this.YB = a.target, - this.sx = Date.now(), - q; - if (this.YB && this.sx) { - if (600 < Date.now() - this.sx) - return this.sx = this.YB = s, - q - } else { - for (var b = a.target; b != this.Nb && b != document.body; ) - b = b.parentNode; - if (b == document.body) - return q - } - for (b = a.target; 1 != b.nodeType; ) - b = b.parentNode; - b = b.tagName.toLowerCase(); - if ("select" != b && "input" != b && "textarea" != b) - return a.stopImmediatePropagation ? a.stopImmediatePropagation() : a.RZ = q, - a.stopPropagation(), - a.preventDefault(), - this.sx = this.YB = s, - t - }, - aw: function(a) { - var b = Me ? a.touches[0] : a, c, e; - if (this.enabled) { - this.options.uN && this.options.uN.call(this, a); - (this.options.wi || this.options.zoom) && this.FJ(0); - this.al = this.Yl = this.oh = t; - this.RC = this.QC = this.vw = this.uw = this.XC = this.WC = 0; - this.options.zoom && (Me && 1 < a.touches.length) && (e = ue.abs(a.touches[0].pageX - a.touches[1].pageX), - c = ue.abs(a.touches[0].pageY - a.touches[1].pageY), - this.p0 = ue.sqrt(e * e + c * c), - this.qy = ue.abs(a.touches[0].pageX + a.touches[1].pageX - 2 * this.iG) / 2 - this.x, - this.ty = ue.abs(a.touches[0].pageY + a.touches[1].pageY - 2 * this.jG) / 2 - this.y, - this.options.zp && this.options.zp.call(this, a)); - if (this.options.iy && (this.options.Yk ? (c = getComputedStyle(this.Nb, s)[De].replace(/[^0-9\-.,]/g, "").split(","), - e = +(c[12] || c[4]), - c = +(c[13] || c[5])) : (e = +getComputedStyle(this.Nb, s).left.replace(/[^0-9-]/g, ""), - c = +getComputedStyle(this.Nb, s).top.replace(/[^0-9-]/g, "")), - e != this.x || c != this.y)) - this.options.wi ? this.$d(Ue) : We(this.fC), - this.yj = [], - this.Ar(e, c), - this.options.oy && this.options.oy.call(this); - this.ww = this.x; - this.xw = this.y; - this.lu = this.x; - this.mu = this.y; - this.rh = b.pageX; - this.th = b.pageY; - this.startTime = a.timeStamp || Date.now(); - this.options.FN && this.options.FN.call(this, a); - this.ba(Re, window); - this.ba(Se, window); - this.ba(Te, window) - } - }, - zT: function(a) { - var b = Me ? a.touches[0] : a - , c = b.pageX - this.rh - , e = b.pageY - this.th - , f = this.x + c - , g = this.y + e - , i = a.timeStamp || Date.now(); - this.options.tN && this.options.tN.call(this, a); - if (this.options.zoom && Me && 1 < a.touches.length) - f = ue.abs(a.touches[0].pageX - a.touches[1].pageX), - g = ue.abs(a.touches[0].pageY - a.touches[1].pageY), - this.o0 = ue.sqrt(f * f + g * g), - this.al = q, - b = 1 / this.p0 * this.o0 * this.scale, - b < this.options.$k ? b = 0.5 * this.options.$k * Math.pow(2, b / this.options.$k) : b > this.options.aq && (b = 2 * this.options.aq * Math.pow(0.5, this.options.aq / b)), - this.rp = b / this.scale, - f = this.qy - this.qy * this.rp + this.x, - g = this.ty - this.ty * this.rp + this.y, - this.Nb.style[De] = "translate(" + f + "px," + g + "px) scale(" + b + ")" + Xe, - this.options.HN && this.options.HN.call(this, a); - else { - this.rh = b.pageX; - this.th = b.pageY; - if (0 < f || f < this.he) - f = this.options.Go ? this.x + c / 2 : 0 <= f || 0 <= this.he ? 0 : this.he; - if (g > this.sf || g < this.qd) - g = this.options.Go ? this.y + e / 2 : g >= this.sf || 0 <= this.qd ? this.sf : this.qd; - this.WC += c; - this.XC += e; - this.uw = ue.abs(this.WC); - this.vw = ue.abs(this.XC); - 6 > this.uw && 6 > this.vw || (this.options.OE && (this.uw > this.vw + 5 ? (g = this.y, - e = 0) : this.vw > this.uw + 5 && (f = this.x, - c = 0)), - this.oh = q, - this.Ar(f, g), - this.QC = 0 < c ? -1 : 0 > c ? 1 : 0, - this.RC = 0 < e ? -1 : 0 > e ? 1 : 0, - 300 < i - this.startTime && (this.startTime = i, - this.lu = this.x, - this.mu = this.y), - this.options.EN && this.options.EN.call(this, a)) - } - }, - lv: function(a) { - if (!(Me && 0 !== a.touches.length)) { - var b = this, c = Me ? a.changedTouches[0] : a, e, f, g = { - Ba: 0, - time: 0 - }, i = { - Ba: 0, - time: 0 - }, k = (a.timeStamp || Date.now()) - b.startTime; - e = b.x; - f = b.y; - b.$d(Re, window); - b.$d(Se, window); - b.$d(Te, window); - b.options.sN && b.options.sN.call(b, a); - if (b.al) - e = b.scale * b.rp, - e = Math.max(b.options.$k, e), - e = Math.min(b.options.aq, e), - b.rp = e / b.scale, - b.scale = e, - b.x = b.qy - b.qy * b.rp + b.x, - b.y = b.ty - b.ty * b.rp + b.y, - b.Nb.style[Fe] = "200ms", - b.Nb.style[De] = "translate(" + b.x + "px," + b.y + "px) scale(" + b.scale + ")" + Xe, - b.al = t, - b.refresh(), - b.options.yp && b.options.yp.call(b, a); - else { - if (b.oh) { - if (300 > k && b.options.iy) { - g = e ? b.BI(e - b.lu, k, -b.x, b.Ky - b.Cu + b.x, b.options.Go ? b.Cu : 0) : g; - i = f ? b.BI(f - b.mu, k, -b.y, 0 > b.qd ? b.Ip - b.An + b.y - b.sf : 0, b.options.Go ? b.An : 0) : i; - e = b.x + g.Ba; - f = b.y + i.Ba; - if (0 < b.x && 0 < e || b.x < b.he && e < b.he) - g = { - Ba: 0, - time: 0 - }; - if (b.y > b.sf && f > b.sf || b.y < b.qd && f < b.qd) - i = { - Ba: 0, - time: 0 - } - } - g.Ba || i.Ba ? (c = ue.max(ue.max(g.time, i.time), 10), - b.options.iu && (g = e - b.ww, - i = f - b.xw, - ue.abs(g) < b.options.Uy && ue.abs(i) < b.options.Uy ? b.scrollTo(b.ww, b.xw, 200) : (g = b.vJ(e, f), - e = g.x, - f = g.y, - c = ue.max(g.time, c))), - b.scrollTo(ue.round(e), ue.round(f), c)) : b.options.iu ? (g = e - b.ww, - i = f - b.xw, - ue.abs(g) < b.options.Uy && ue.abs(i) < b.options.Uy ? b.scrollTo(b.ww, b.xw, 200) : (g = b.vJ(b.x, b.y), - (g.x != b.x || g.y != b.y) && b.scrollTo(g.x, g.y, g.time))) : b.lo(200) - } else { - if (Me) - if (b.VK && b.options.zoom) - clearTimeout(b.VK), - b.VK = s, - b.options.zp && b.options.zp.call(b, a), - b.zoom(b.rh, b.th, 1 == b.scale ? b.options.QW : 1), - b.options.yp && setTimeout(function() { - b.options.yp.call(b, a) - }, 200); - else if (this.options.Mx) { - for (e = c.target; 1 != e.nodeType; ) - e = e.parentNode; - f = e.tagName.toLowerCase(); - "select" != f && "input" != f && "textarea" != f ? (f = te.createEvent("MouseEvents"), - f.initMouseEvent("click", q, q, a.view, 1, c.screenX, c.screenY, c.clientX, c.clientY, a.ctrlKey, a.altKey, a.shiftKey, a.metaKey, 0, s), - f.XR = q, - e.dispatchEvent(f)) : e.focus() - } - b.lo(400) - } - b.options.GN && b.options.GN.call(b, a) - } - } - }, - lo: function(a) { - var b = 0 <= this.x ? 0 : this.x < this.he ? this.he : this.x - , c = this.y >= this.sf || 0 < this.qd ? this.sf : this.y < this.qd ? this.qd : this.y; - if (b == this.x && c == this.y) { - if (this.oh && (this.oh = t, - this.options.oy && this.options.oy.call(this)), - this.ii && this.options.Qx && ("webkit" == we && (this.gM.style[Ie] = "300ms"), - this.gM.style.opacity = "0"), - this.xi && this.options.Qx) - "webkit" == we && (this.jP.style[Ie] = "300ms"), - this.jP.style.opacity = "0" - } else - this.scrollTo(b, c, a || 0) - }, - eV: function(a) { - var b = this, c, e; - if ("wheelDeltaX"in a) - c = a.wheelDeltaX / 12, - e = a.wheelDeltaY / 12; - else if ("wheelDelta"in a) - c = e = a.wheelDelta / 12; - else if ("detail"in a) - c = e = 3 * -a.detail; - else - return; - if ("zoom" == b.options.qP) { - if (e = b.scale * Math.pow(2, 1 / 3 * (e ? e / Math.abs(e) : 0)), - e < b.options.$k && (e = b.options.$k), - e > b.options.aq && (e = b.options.aq), - e != b.scale) - !b.cz && b.options.zp && b.options.zp.call(b, a), - b.cz++, - b.zoom(a.pageX, a.pageY, e, 400), - setTimeout(function() { - b.cz--; - !b.cz && b.options.yp && b.options.yp.call(b, a) - }, 400) - } else - c = b.x + c, - e = b.y + e, - 0 < c ? c = 0 : c < b.he && (c = b.he), - e > b.sf ? e = b.sf : e < b.qd && (e = b.qd), - 0 > b.qd && b.scrollTo(c, e, 0) - }, - $U: function(a) { - a.target == this.Nb && (this.$d(Ue), - this.MB()) - }, - MB: function() { - var a = this, b = a.x, c = a.y, e = Date.now(), f, g, i; - a.Yl || (a.yj.length ? (f = a.yj.shift(), - f.x == b && f.y == c && (f.time = 0), - a.Yl = q, - a.oh = q, - a.options.wi) ? (a.FJ(f.time), - a.Ar(f.x, f.y), - a.Yl = t, - f.time ? a.ba(Ue) : a.lo(0)) : (i = function() { - var k = Date.now(), m; - if (k >= e + f.time) { - a.Ar(f.x, f.y); - a.Yl = t; - a.options.zZ && a.options.zZ.call(a); - a.MB() - } else { - k = (k - e) / f.time - 1; - g = ue.sqrt(1 - k * k); - k = (f.x - b) * g + b; - m = (f.y - c) * g + c; - a.Ar(k, m); - if (a.Yl) - a.fC = Ve(i) - } - } - , - i()) : a.lo(400)) - }, - FJ: function(a) { - a += "ms"; - this.Nb.style[Fe] = a; - this.ii && (this.xY.style[Fe] = a); - this.xi && (this.K0.style[Fe] = a) - }, - BI: function(a, b, c, e, f) { - var b = ue.abs(a) / b - , g = b * b / 0.0012; - 0 < a && g > c ? (c += f / (6 / (6.0E-4 * (g / b))), - b = b * c / g, - g = c) : 0 > a && g > e && (e += f / (6 / (6.0E-4 * (g / b))), - b = b * e / g, - g = e); - return { - Ba: g * (0 > a ? -1 : 1), - time: ue.round(b / 6.0E-4) - } - }, - Zj: function(a) { - for (var b = -a.offsetLeft, c = -a.offsetTop; a = a.offsetParent; ) - b -= a.offsetLeft, - c -= a.offsetTop; - a != this.zn && (b *= this.scale, - c *= this.scale); - return { - left: b, - top: c - } - }, - vJ: function(a, b) { - var c, e, f; - f = this.We.length - 1; - c = 0; - for (e = this.We.length; c < e; c++) - if (a >= this.We[c]) { - f = c; - break - } - f == this.HC && (0 < f && 0 > this.QC) && f--; - a = this.We[f]; - e = (e = ue.abs(a - this.We[this.HC])) ? 500 * (ue.abs(this.x - a) / e) : 0; - this.HC = f; - f = this.wf.length - 1; - for (c = 0; c < f; c++) - if (b >= this.wf[c]) { - f = c; - break - } - f == this.IC && (0 < f && 0 > this.RC) && f--; - b = this.wf[f]; - c = (c = ue.abs(b - this.wf[this.IC])) ? 500 * (ue.abs(this.y - b) / c) : 0; - this.IC = f; - f = ue.round(ue.max(e, c)) || 200; - return { - x: a, - y: b, - time: f - } - }, - ba: function(a, b, c) { - (b || this.Nb).addEventListener(a, this, !!c) - }, - $d: function(a, b, c) { - (b || this.Nb).removeEventListener(a, this, !!c) - }, - NC: ga(2), - refresh: function() { - var a, b, c, e = 0; - b = 0; - this.scale < this.options.$k && (this.scale = this.options.$k); - this.Cu = this.zn.clientWidth || 1; - this.An = this.zn.clientHeight || 1; - this.sf = -this.options.n0 || 0; - this.Ky = ue.round(this.Nb.offsetWidth * this.scale); - this.Ip = ue.round((this.Nb.offsetHeight + this.sf) * this.scale); - this.he = this.Cu - this.Ky; - this.qd = this.An - this.Ip + this.sf; - this.RC = this.QC = 0; - this.options.CN && this.options.CN.call(this); - this.kp = this.options.kp && 0 > this.he; - this.xn = this.options.xn && (!this.options.LV && !this.kp || this.Ip > this.An); - this.ii = this.kp && this.options.ii; - this.xi = this.xn && this.options.xi && this.Ip > this.An; - a = this.Zj(this.zn); - this.iG = -a.left; - this.jG = -a.top; - if ("string" == typeof this.options.iu) { - this.We = []; - this.wf = []; - c = this.Nb.querySelectorAll(this.options.iu); - a = 0; - for (b = c.length; a < b; a++) - e = this.Zj(c[a]), - e.left += this.iG, - e.top += this.jG, - this.We[a] = e.left < this.he ? this.he : e.left * this.scale, - this.wf[a] = e.top < this.qd ? this.qd : e.top * this.scale - } else if (this.options.iu) { - for (this.We = []; e >= this.he; ) - this.We[b] = e, - e -= this.Cu, - b++; - this.he % this.Cu && (this.We[this.We.length] = this.he - this.We[this.We.length - 1] + this.We[this.We.length - 1]); - b = e = 0; - for (this.wf = []; e >= this.qd; ) - this.wf[b] = e, - e -= this.An, - b++; - this.qd % this.An && (this.wf[this.wf.length] = this.qd - this.wf[this.wf.length - 1] + this.wf[this.wf.length - 1]) - } - this.Sv("h"); - this.Sv("v"); - this.al || (this.Nb.style[Fe] = "0", - this.lo(400)) - }, - scrollTo: function(a, b, c, e) { - var f = a; - this.stop(); - f.length || (f = [{ - x: a, - y: b, - time: c, - TZ: e - }]); - a = 0; - for (b = f.length; a < b; a++) - f[a].TZ && (f[a].x = this.x - f[a].x, - f[a].y = this.y - f[a].y), - this.yj.push({ - x: f[a].x, - y: f[a].y, - time: f[a].time || 0 - }); - this.MB() - }, - disable: function() { - this.stop(); - this.lo(0); - this.enabled = t; - this.$d(Re, window); - this.$d(Se, window); - this.$d(Te, window) - }, - enable: function() { - this.enabled = q - }, - stop: function() { - this.options.wi ? this.$d(Ue) : We(this.fC); - this.yj = []; - this.Yl = this.oh = t - }, - zoom: function(a, b, c, e) { - var f = c / this.scale; - this.options.Yk && (this.al = q, - e = e === l ? 200 : e, - a = a - this.iG - this.x, - b = b - this.jG - this.y, - this.x = a - a * f + this.x, - this.y = b - b * f + this.y, - this.scale = c, - this.refresh(), - this.x = 0 < this.x ? 0 : this.x < this.he ? this.he : this.x, - this.y = this.y > this.sf ? this.sf : this.y < this.qd ? this.qd : this.y, - this.Nb.style[Fe] = e + "ms", - this.Nb.style[De] = "translate(" + this.x + "px," + this.y + "px) scale(" + c + ")" + Xe, - this.al = t) - } - }; - function Ce(a) { - if ("" === we) - return a; - a = a.charAt(0).toUpperCase() + a.substr(1); - return we + a - } - ve = s; - function Ze(a) { - this.j = { - anchor: Yb, - offset: new O(0,0), - maxWidth: "100%", - imageHeight: 80 - }; - var a = a || {}, b; - for (b in a) - this.j[b] = a[b]; - this.Ll = new ec(s,{ - of: "api" - }); - this.bk = []; - this.P = s; - this.ig = { - height: this.j.imageHeight, - width: this.j.imageHeight * $e - }; - this.Rc = this.BB = this.bm = this.Zc = s - } - var af = [0, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 5, 6, 6, 7, 8, 8, 8, 9, 10] - , bf = "\u5176\u4ed6 \u6b63\u95e8 \u623f\u578b \u8bbe\u65bd \u6b63\u95e8 \u9910\u996e\u8bbe\u65bd \u5176\u4ed6\u8bbe\u65bd \u6b63\u95e8 \u8bbe\u65bd \u89c2\u5f71\u5385 \u5176\u4ed6\u8bbe\u65bd".split(" "); - B.Tm(function(a) { - var b = s; - a.addEventListener("position_changed", function() { - a.j.visible && a.j.albumsControl === q && (b ? b.Ey(a.Xb()) : (b = new Ze(a.j.albumsControlOptions), - b.na(a))) - }); - a.addEventListener("albums_visible_changed", function() { - a.j.albumsControl === q ? (b ? b.Ey(a.Xb()) : (b = new Ze(a.j.albumsControlOptions), - b.na(a)), - b.show()) : b.U() - }); - a.addEventListener("albums_options_changed", function() { - b && b.Qk(a.j.albumsControlOptions) - }); - a.addEventListener("visible_changed", function() { - b && (a.kE() ? a.j.albumsControl === q && (b.C.style.visibility = "visible") : b.C.style.visibility = "hidden") - }) - }); - var $e = 1.8; - H() && ($e = 1); - z.extend(Ze.prototype, { - Qk: function(a) { - for (var b in a) - this.j[b] = a[b]; - a = this.j.imageHeight + "px"; - this.uc(this.j.anchor); - this.C.style.width = isNaN(Number(this.j.maxWidth)) === q ? this.j.maxWidth : this.j.maxWidth + "px"; - this.C.style.height = a; - this.gk.style.height = a; - this.Rh.style.height = a; - this.ig = { - height: this.j.imageHeight, - width: this.j.imageHeight * $e - }; - this.fk.style.height = this.ig.height - 6 + "px"; - this.fk.style.width = this.ig.width - 6 + "px"; - this.Ey(this.P.Xb(), q) - }, - na: function(a) { - this.P = a; - this.ls(); - this.yQ(); - this.OY(); - this.Ey(a.Xb()) - }, - ls: function() { - var a = this.j.imageHeight + "px"; - this.C = L("div"); - var b = this.C.style; - b.cssText = "background:rgb(37,37,37);background:rgba(37,37,37,0.9);"; - b.position = "absolute"; - b.zIndex = "2000"; - b.width = isNaN(Number(this.j.maxWidth)) === q ? this.j.maxWidth : this.j.maxWidth + "px"; - b.padding = "8px 0"; - b.visibility = "hidden"; - b.height = a; - this.gk = L("div"); - b = this.gk.style; - b.position = "absolute"; - b.overflow = "hidden"; - b.width = "100%"; - b.height = a; - this.Rh = L("div"); - b = this.Rh.style; - b.height = a; - this.gk.appendChild(this.Rh); - this.C.appendChild(this.gk); - this.P.C.appendChild(this.C); - this.fk = L("div", { - "class": "pano_photo_item_seleted" - }); - this.fk.style.height = this.ig.height - 6 + "px"; - this.fk.style.width = this.ig.width - 6 + "px"; - this.uc(this.j.anchor) - }, - RH: function(a) { - for (var b = this.bk, c = b.length - 1; 0 <= c; c--) - if (b[c].panoId == a) - return c; - return -1 - }, - Ey: function(a, b) { - if (b || !this.bk[this.Zc] || !(this.bk[this.Zc].panoId == a && 3 !== this.bk[this.Zc].recoType)) { - var c = this - , e = this.RH(a); - !b && -1 !== e && this.bk[e] && 3 !== this.bk[e].recoType ? this.Mp(e) : this.dY(function(a) { - for (var b = {}, e, k, m = t, n = [], o = 0, p = a.length; o < p; o++) - e = a[o].catlog, - k = a[o].floor, - l !== e && ("" === e && l !== k ? (m = q, - b[k] || (b[k] = []), - b[k].push(a[o])) : (b[af[e]] || (b[af[e]] = []), - b[af[e]].push(a[o]))); - for (var v in b) - m ? n.push({ - data: v + "F", - index: v - }) : n.push({ - data: bf[v], - index: v - }); - c.jH = b; - c.Ji = n; - c.Il(a); - 0 == a.length ? c.U() : c.show() - }) - } - }, - vW: function() { - if (!this.Gi) { - var a = this.SX(this.Ji) - , b = L("div"); - b.style.cssText = ["width:" + 134 * this.Ji.length + "px;", "overflow:hidden;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;"].join(""); - b.innerHTML = a; - a = L("div"); - a.appendChild(b); - a.style.cssText = "position:absolute;top:-25px;background:rgb(37,37,37);background:rgba(37,37,37,0.9);border-bottom:1px solid #4e596a;width:100%;line-height:25px;height:25px;overflow:scroll;outline:0"; - new Ye(a,{ - Go: t, - iy: q, - ii: t, - xi: t, - xn: t, - OE: q, - Pw: q, - Mx: q - }); - this.C.appendChild(a); - for (var c = this, e = b.getElementsByTagName("span"), f = 0, g = e.length; f < g; f++) - b = e[f], - z.M(b, "click", function() { - if (this.getAttribute("dataindex")) { - c.Il(c.jH[this.getAttribute("dataindex")]); - for (var a = 0, b = e.length; a < b; a++) - e[a].style.color = "#FFFFFF"; - this.style.color = "#3383FF" - } - }); - this.Gi = a - } - }, - sW: function() { - if (this.Gi) - a = this.AL(this.Ji), - this.OQ.innerHTML = a; - else { - var a = this.AL(this.Ji) - , b = L("ul") - , c = this; - b.style.cssText = "list-style: none;padding:0px;margin:0px;display:block;width:60px;position:absolute;top:7px"; - b.innerHTML = a; - z.M(b, "click", function(a) { - if (a = (a.srcElement || a.target).getAttribute("dataindex")) { - c.Il(c.jH[a]); - for (var e = b.getElementsByTagName("li"), f = 0, g = e.length; f < g; f++) - e[f].childNodes[0].getAttribute("dataindex") === a ? z.D.Ua(e[f], "pano_catlogLiActive") : z.D.Pb(e[f], "pano_catlogLiActive") - } - }); - var a = L("div") - , e = L("a") - , f = L("span") - , g = L("a") - , i = L("span") - , k = ["background:url(" + G.qa + "panorama/catlog_icon.png) no-repeat;", "display:block;width:10px;height:7px;margin:0 auto;"].join(""); - f.style.cssText = k + "background-position:-18px 0;"; - e.style.cssText = "background:#1C1C1C;display:block;position:absolute;width:58px;"; - i.style.cssText = k + "background-position:0 0;"; - g.style.cssText = "background:#1C1C1C;display:block;position:absolute;width:58px;"; - g.style.top = this.j.imageHeight - 7 + "px"; - a.style.cssText = "position:absolute;top:0px;left:0px;width:60px;"; - e.appendChild(f); - g.appendChild(i); - z.M(e, "mouseover", function() { - var a = parseInt(b.style.top, 10); - 7 !== a && (f.style.backgroundPosition = "-27px 0"); - new tb({ - Ic: 60, - kc: ub.Ks, - duration: 300, - va: function(c) { - b.style.top = a + (7 - a) * c + "px" - } - }) - }); - z.M(e, "mouseout", function() { - f.style.backgroundPosition = "-18px 0" - }); - z.M(g, "mouseover", function() { - var a = parseInt(b.style.top, 10) - , e = c.j.imageHeight - 14; - if (!(parseInt(b.offsetHeight, 10) < e)) { - var f = e - parseInt(b.offsetHeight, 10) + 7; - f !== a && (i.style.backgroundPosition = "-9px 0"); - new tb({ - Ic: 60, - kc: ub.Ks, - duration: 300, - va: function(c) { - b.style.top = a + (f - a) * c + "px" - } - }) - } - }); - z.M(g, "mouseout", function() { - i.style.backgroundPosition = "0 0" - }); - a.appendChild(e); - a.appendChild(g); - e = L("div"); - e.style.cssText = ["position:absolute;z-index:2001;left:20px;", "height:" + this.j.imageHeight + "px;", "width:62px;overflow:hidden;background:rgb(37,37,37);background:rgba(37,37,37,0.9);"].join(""); - e.appendChild(b); - e.appendChild(a); - this.Gi = e; - this.OQ = b; - this.C.appendChild(e) - } - }, - tW: function() { - if (this.Ji && !(0 >= this.Ji.length)) { - var a = L("div"); - a.innerHTML = this.hA; - a.style.cssText = "position:absolute;background:#252525"; - this.C.appendChild(a); - this.Os = a; - this.Rc.jg.style.left = this.ig.width + 8 + "px"; - this.Gi && (this.Gi.style.left = parseInt(this.Gi.style.left, 10) + this.ig.width + 8 + "px"); - var b = this; - z.M(a, "click", function() { - b.P.vc(b.gX) - }) - } - }, - Il: function(a) { - this.bk = a; - this.j.showCatalog && (0 < this.Ji.length ? (Ua() ? this.sW() : this.vW(), - this.Rc.offsetLeft = 60) : (this.Os && (this.C.removeChild(this.Os), - this.Os = s, - this.Rc.jg.style.left = "0px"), - this.Gi && (this.C.removeChild(this.Gi), - this.Gi = s), - this.Rc.offsetLeft = 0)); - var b = this.LX(a); - Ua() && (this.Ji && 0 < this.Ji.length && this.j.showExit && this.hA) && (this.Rc.offsetLeft += this.ig.width + 8, - this.Os ? this.Os.innerHTML = this.hA : this.tW()); - this.Rh.innerHTML = b; - this.Rh.style.width = (this.ig.width + 8) * a.length + 8 + "px"; - a = this.C.offsetWidth; - b = this.Rh.offsetWidth; - this.Rc.Vs && (b += this.Rc.Vs()); - b < a - 2 * this.Rc.Ai - this.Rc.offsetLeft ? this.C.style.width = b + this.Rc.offsetLeft + "px" : (this.C.style.width = isNaN(Number(this.j.maxWidth)) === q ? this.j.maxWidth : this.j.maxWidth + "px", - b < this.C.offsetWidth - 2 * this.Rc.Ai - this.Rc.offsetLeft && (this.C.style.width = b + this.Rc.offsetLeft + "px")); - this.Rc.refresh(); - this.BB = this.Rh.children; - this.Rh.appendChild(this.fk); - this.fk.style.left = "-100000px"; - a = this.RH(this.P.Xb(), this.Y1); - -1 !== a && this.Mp(a) - }, - SX: function(a) { - for (var b = "", c, e = 0, f = a.length; e < f; e++) - c = '
' + a[e].data + "
", - b += c; - return b - }, - AL: function(a) { - for (var b = "", c, e = 0, f = a.length; e < f; e++) - c = '
  • ' + a[e].data + "
  • ", - b += c; - return b - }, - LX: function(a) { - for (var b, c, e, f, g = [], i = this.ig.height, k = this.ig.width, m = 0; m < a.length; m++) - b = a[m], - recoType = b.recoType, - e = b.panoId, - f = b.name, - c = b.heading, - b = b.pitch, - c = qe.PL(e, c, b, 198, 108), - b = '' + f + '' + f + "", - 3 === recoType ? Ua() ? (this.hA = b, - this.gX = e, - a.splice(m, 1), - m--) : (b = '' + f + '
    ', - g.push(b)) : g.push(b); - return g.join("") - }, - dY: function(a) { - var b = this - , c = this.P.Xb(); - c && this.Ll.Kx(c, function(e) { - b.P.Xb() === c && a(e) - }) - }, - uc: function(a) { - if (!Wa(a) || isNaN(a) || a < Wb || 3 < a) - a = this.defaultAnchor; - var b = this.C - , c = this.j.offset.width - , e = this.j.offset.height; - b.style.left = b.style.top = b.style.right = b.style.bottom = "auto"; - switch (a) { - case Wb: - b.style.top = e + "px"; - b.style.left = c + "px"; - break; - case Xb: - b.style.top = e + "px"; - b.style.right = c + "px"; - break; - case Yb: - b.style.bottom = e + "px"; - b.style.left = c + "px"; - break; - case 3: - b.style.bottom = e + "px", - b.style.right = c + "px" - } - }, - yQ: function() { - this.wQ() - }, - wQ: function() { - var a = this; - z.M(this.C, "touchstart", function(a) { - a.stopPropagation() - }); - z.M(this.gk, "click", function(b) { - if ((b = (b.srcElement || b.target).getAttribute("data-index")) && b != a.Zc) - a.Mp(b), - a.P.vc(a.bk[b].panoId) - }); - z.M(this.Rh, "mouseover", function(b) { - b = (b.srcElement || b.target).getAttribute("data-index"); - b !== s && a.BK(b, q) - }); - this.P.addEventListener("size_changed", function() { - isNaN(Number(a.j.maxWidth)) && a.Qk({ - maxWidth: a.j.maxWidth - }) - }) - }, - Mp: function(a) { - this.fk.style.left = this.BB[a].offsetLeft + 8 + "px"; - this.fk.setAttribute("data-index", this.BB[a].getAttribute("data-index")); - this.Zc = a; - this.BK(a) - }, - BK: function(a, b) { - var c = this.ig.width + 8 - , e = 0; - this.Rc.Vs && (e = this.Rc.Vs() / 2); - var f = this.gk.offsetWidth - 2 * e - , g = this.Rh.offsetLeft || this.Rc.x - , g = g - e - , i = -a * c; - i > g && this.Rc.scrollTo(i + e); - c = i - c; - g -= f; - c < g && (!b || b && 8 < i - g) && this.Rc.scrollTo(c + f + e) - }, - OY: function() { - this.Rc = H() ? new Ye(this.gk,{ - Go: t, - iy: q, - ii: t, - xi: t, - xn: t, - OE: q, - Pw: q, - Mx: q - }) : new cf(this.gk) - }, - U: function() { - this.C.style.visibility = "hidden" - }, - show: function() { - this.C.style.visibility = "visible" - } - }); - function cf(a) { - this.C = a; - this.Vg = a.children[0]; - this.Pr = s; - this.Ai = 20; - this.offsetLeft = 0; - this.na() - } - cf.prototype = { - na: function() { - this.Vg.style.position = "relative"; - this.refresh(); - this.ls(); - this.$l() - }, - refresh: function() { - this.ho = this.C.offsetWidth - this.Vs(); - this.aB = -(this.Vg.offsetWidth - this.ho - this.Ai); - this.Ev = this.Ai + this.offsetLeft; - this.Vg.style.left = this.Ev + "px"; - this.Vg.children[0] && (this.Pr = this.Vg.children[0].offsetWidth); - this.jg && (this.jg.children[0].style.marginTop = this.Hr.children[0].style.marginTop = this.jg.offsetHeight / 2 - this.jg.children[0].offsetHeight / 2 + "px") - }, - Vs: function() { - return 2 * this.Ai - }, - ls: function() { - this.Tv = L("div"); - this.Tv.innerHTML = ''; - this.jg = this.Tv.children[0]; - this.Hr = this.Tv.children[1]; - this.C.appendChild(this.Tv); - this.jg.children[0].style.marginTop = this.Hr.children[0].style.marginTop = this.jg.offsetHeight / 2 - this.jg.children[0].offsetHeight / 2 + "px" - }, - $l: function() { - var a = this; - z.M(this.jg, "click", function() { - a.scrollTo(a.Vg.offsetLeft + a.ho) - }); - z.M(this.Hr, "click", function() { - a.scrollTo(a.Vg.offsetLeft - a.ho) - }) - }, - aV: function() { - z.D.Pb(this.jg, "pano_arrow_disable"); - z.D.Pb(this.Hr, "pano_arrow_disable"); - var a = this.Vg.offsetLeft; - a >= this.Ev && z.D.Ua(this.jg, "pano_arrow_disable"); - a - this.ho <= this.aB && z.D.Ua(this.Hr, "pano_arrow_disable") - }, - scrollTo: function(a) { - a = a < this.Vg.offsetLeft ? Math.ceil((a - this.Ai - this.ho) / this.Pr) * this.Pr + this.ho + this.Ai - 8 : Math.ceil((a - this.Ai) / this.Pr) * this.Pr + this.Ai; - a < this.aB ? a = this.aB : a > this.Ev && (a = this.Ev); - var b = this.Vg.offsetLeft - , c = this; - new tb({ - Ic: 60, - kc: ub.Ks, - duration: 300, - va: function(e) { - c.Vg.style.left = b + (a - b) * e + "px" - }, - finish: function() { - c.aV() - } - }) - } - }; - B.Map = Ka; - B.Hotspot = ib; - B.MapType = id; - B.Point = J; - B.Pixel = Q; - B.Size = O; - B.Bounds = fb; - B.TileLayer = Mc; - B.Projection = jc; - B.MercatorProjection = S; - B.PerspectiveProjection = hb; - B.Copyright = function(a, b, c) { - this.id = a; - this.bb = b; - this.content = c - } - ; - B.Overlay = mc; - B.Label = uc; - B.GroundOverlay = vc; - B.PointCollection = zc; - B.Marker = U; - B.CanvasLayer = Cc; - B.Icon = qc; - B.IconSequence = sc; - B.Symbol = rc; - B.Polyline = Gc; - B.Polygon = Fc; - B.InfoWindow = tc; - B.Circle = Hc; - B.Control = Vb; - B.NavigationControl = jb; - B.GeolocationControl = Zb; - B.OverviewMapControl = lb; - B.CopyrightControl = $b; - B.ScaleControl = kb; - B.MapTypeControl = mb; - B.CityListControl = ac; - B.PanoramaControl = cc; - B.TrafficLayer = Vc; - B.CustomLayer = nb; - B.ContextMenu = fc; - B.MenuItem = ic; - B.LocalSearch = cb; - B.TransitRoute = Kd; - B.DrivingRoute = Nd; - B.WalkingRoute = Od; - B.RidingRoute = Pd; - B.Autocomplete = Zd; - B.RouteSearch = Td; - B.Geocoder = Ud; - B.LocalCity = Wd; - B.Geolocation = Geolocation; - B.Convertor = lc; - B.BusLineSearch = Yd; - B.Boundary = Xd; - B.VectorCloudLayer = Tc; - B.VectorTrafficLayer = Uc; - B.Panorama = Oa; - B.PanoramaLabel = ee; - B.PanoramaService = ec; - B.PanoramaCoverageLayer = dc; - B.PanoramaFlashInterface = oe; - function T(a, b) { - for (var c in b) - a[c] = b[c] - } - T(window, { - BMap: B, - _jsload2: function(a, b) { - ia.Wy.ZY && ia.Wy.set(a, b); - K.WV(a, b) - }, - BMAP_API_VERSION: "2.0" - }); - var X = Ka.prototype; - T(X, { - getBounds: X.ve, - getCenter: X.Ka, - getMapType: X.oa, - getSize: X.cb, - setSize: X.Ce, - getViewport: X.ht, - getZoom: X.fa, - centerAndZoom: X.Fd, - panTo: X.qi, - panBy: X.Ag, - setCenter: X.Zf, - setCurrentCity: X.DF, - setMapType: X.Dg, - setViewport: X.yh, - setZoom: X.Qc, - highResolutionEnabled: X.Sx, - zoomTo: X.Gg, - zoomIn: X.kG, - zoomOut: X.lG, - addHotspot: X.Cw, - removeHotspot: X.VZ, - clearHotspots: X.dm, - checkResize: X.ZV, - addControl: X.Aw, - removeControl: X.VN, - getContainer: X.La, - addContextMenu: X.yo, - removeContextMenu: X.Cp, - addOverlay: X.Ga, - removeOverlay: X.Qb, - clearOverlays: X.yK, - openInfoWindow: X.pc, - closeInfoWindow: X.Yc, - pointToOverlayPixel: X.Xe, - overlayPixelToPoint: X.JN, - getInfoWindow: X.hh, - getOverlays: X.Hx, - getPanes: function() { - return { - floatPane: this.Yd.BD, - markerMouseTarget: this.Yd.RE, - floatShadow: this.Yd.sL, - labelPane: this.Yd.KE, - markerPane: this.Yd.fN, - markerShadow: this.Yd.gN, - mapPane: this.Yd.Et, - vertexPane: this.Yd.nP - } - }, - addTileLayer: X.Oe, - removeTileLayer: X.Yf, - pixelToPoint: X.xb, - pointToPixel: X.$b, - setFeatureStyle: X.Lp, - selectBaseElement: X.j5, - setMapStyle: X.Zt, - enable3DBuilding: X.Ro, - disable3DBuilding: X.KW, - getPanorama: X.tm, - initIndoorLayer: X.PY, - setNormalMapDisplay: X.D_ - }); - var df = id.prototype; - T(df, { - getTileLayer: df.oY, - getMinZoom: df.bp, - getMaxZoom: df.sm, - getProjection: df.wm, - getTextColor: df.zm, - getTips: df.gt - }); - T(window, { - BMAP_NORMAL_MAP: La, - BMAP_PERSPECTIVE_MAP: Qa, - BMAP_SATELLITE_MAP: Ya, - BMAP_HYBRID_MAP: Sa - }); - var ef = S.prototype; - T(ef, { - lngLatToPoint: ef.kh, - pointToLngLat: ef.xj - }); - var ff = hb.prototype; - T(ff, { - lngLatToPoint: ff.kh, - pointToLngLat: ff.xj - }); - var gf = fb.prototype; - T(gf, { - equals: gf.pb, - containsPoint: gf.js, - containsBounds: gf.kW, - intersects: gf.ot, - extend: gf.extend, - getCenter: gf.Ka, - isEmpty: gf.tj, - getSouthWest: gf.Ve, - getNorthEast: gf.Rf, - toSpan: gf.YF - }); - var hf = mc.prototype; - T(hf, { - isVisible: hf.jh, - show: hf.show, - hide: hf.U - }); - mc.getZIndex = mc.Ck; - var jf = gb.prototype; - T(jf, { - openInfoWindow: jf.pc, - closeInfoWindow: jf.Yc, - enableMassClear: jf.gj, - disableMassClear: jf.MW, - show: jf.show, - hide: jf.U, - getMap: jf.Dx, - addContextMenu: jf.yo, - removeContextMenu: jf.Cp - }); - var kf = U.prototype; - T(kf, { - setIcon: kf.Rb, - getIcon: kf.ap, - setPosition: kf.sa, - getPosition: kf.ga, - setOffset: kf.Ze, - getOffset: kf.Sf, - getLabel: kf.VD, - setLabel: kf.dn, - setTitle: kf.Ec, - setTop: kf.ui, - enableDragging: kf.Wb, - disableDragging: kf.TC, - setZIndex: kf.Sp, - getMap: kf.Dx, - setAnimation: kf.bn, - setShadow: kf.Oy, - hide: kf.U, - setRotation: kf.Op, - getRotation: kf.TL - }); - T(window, { - BMAP_ANIMATION_DROP: 1, - BMAP_ANIMATION_BOUNCE: 2 - }); - var lf = uc.prototype; - T(lf, { - setStyle: lf.Md, - setStyles: lf.ti, - setContent: lf.dd, - setPosition: lf.sa, - getPosition: lf.ga, - setOffset: lf.Ze, - getOffset: lf.Sf, - setTitle: lf.Ec, - setZIndex: lf.Sp, - getMap: lf.Dx, - getContent: lf.xk - }); - var mf = qc.prototype; - T(mf, { - setImageUrl: mf.mO, - setSize: mf.Ce, - setAnchor: mf.uc, - setImageOffset: mf.Yt, - setImageSize: mf.w_, - setInfoWindowAnchor: mf.z_, - setPrintImageUrl: mf.K_ - }); - var nf = tc.prototype; - T(nf, { - redraw: nf.je, - setTitle: nf.Ec, - setContent: nf.dd, - getContent: nf.xk, - getPosition: nf.ga, - enableMaximize: nf.dh, - disableMaximize: nf.kx, - isOpen: nf.Xa, - setMaxContent: nf.$t, - maximize: nf.hy, - enableAutoPan: nf.Ls - }); - var of = oc.prototype; - T(of, { - getPath: of.Ue, - setPath: of.ke, - setPositionAt: of.gn, - getStrokeColor: of.jY, - setStrokeWeight: of.Rp, - getStrokeWeight: of.WL, - setStrokeOpacity: of.Pp, - getStrokeOpacity: of.kY, - setFillOpacity: of.Xt, - getFillOpacity: of.HX, - setStrokeStyle: of.Qp, - getStrokeStyle: of.VL, - getFillColor: of.GX, - getBounds: of.ve, - enableEditing: of.mf, - disableEditing: of.LW, - getEditing: of.DX - }); - var pf = Hc.prototype; - T(pf, { - setCenter: pf.Zf, - getCenter: pf.Ka, - getRadius: pf.RL, - setRadius: pf.xf - }); - var qf = Fc.prototype; - T(qf, { - getPath: qf.Ue, - setPath: qf.ke, - setPositionAt: qf.gn - }); - var rf = ib.prototype; - T(rf, { - getPosition: rf.ga, - setPosition: rf.sa, - getText: rf.eE, - setText: rf.cu - }); - J.prototype.equals = J.prototype.pb; - Q.prototype.equals = Q.prototype.pb; - O.prototype.equals = O.prototype.pb; - T(window, { - BMAP_ANCHOR_TOP_LEFT: Wb, - BMAP_ANCHOR_TOP_RIGHT: Xb, - BMAP_ANCHOR_BOTTOM_LEFT: Yb, - BMAP_ANCHOR_BOTTOM_RIGHT: 3 - }); - var sf = Vb.prototype; - T(sf, { - setAnchor: sf.uc, - getAnchor: sf.HD, - setOffset: sf.Ze, - getOffset: sf.Sf, - show: sf.show, - hide: sf.U, - isVisible: sf.jh, - toString: sf.toString - }); - var tf = jb.prototype; - T(tf, { - getType: tf.ip, - setType: tf.hn - }); - T(window, { - BMAP_NAVIGATION_CONTROL_LARGE: 0, - BMAP_NAVIGATION_CONTROL_SMALL: 1, - BMAP_NAVIGATION_CONTROL_PAN: 2, - BMAP_NAVIGATION_CONTROL_ZOOM: 3 - }); - var uf = lb.prototype; - T(uf, { - changeView: uf.se, - setSize: uf.Ce, - getSize: uf.cb - }); - var vf = kb.prototype; - T(vf, { - getUnit: vf.sY, - setUnit: vf.LF - }); - T(window, { - BMAP_UNIT_METRIC: "metric", - BMAP_UNIT_IMPERIAL: "us" - }); - var wf = $b.prototype; - T(wf, { - addCopyright: wf.Bw, - removeCopyright: wf.qF, - getCopyright: wf.pm, - getCopyrightCollection: wf.PD - }); - T(window, { - BMAP_MAPTYPE_CONTROL_HORIZONTAL: bc, - BMAP_MAPTYPE_CONTROL_DROPDOWN: 1, - BMAP_MAPTYPE_CONTROL_MAP: 2 - }); - var xf = Mc.prototype; - T(xf, { - getMapType: xf.oa, - getCopyright: xf.pm, - isTransparentPng: xf.zt - }); - var yf = fc.prototype; - T(yf, { - addItem: yf.Dw, - addSeparator: yf.bC, - removeSeparator: yf.sF - }); - var zf = ic.prototype; - T(zf, { - setText: zf.cu - }); - var Af = W.prototype; - T(Af, { - getStatus: Af.xm, - setSearchCompleteCallback: Af.JF, - getPageCapacity: Af.qf, - setPageCapacity: Af.Np, - setLocation: Af.fn, - disableFirstResultSelection: Af.UC, - enableFirstResultSelection: Af.oD, - gotoPage: Af.Am, - searchNearby: Af.Jp, - searchInBounds: Af.an, - search: Af.search - }); - T(window, { - BMAP_STATUS_SUCCESS: 0, - BMAP_STATUS_CITY_LIST: 1, - BMAP_STATUS_UNKNOWN_LOCATION: sd, - BMAP_STATUS_UNKNOWN_ROUTE: 3, - BMAP_STATUS_INVALID_KEY: 4, - BMAP_STATUS_INVALID_REQUEST: 5, - BMAP_STATUS_PERMISSION_DENIED: td, - BMAP_STATUS_SERVICE_UNAVAILABLE: 7, - BMAP_STATUS_TIMEOUT: ud - }); - T(window, { - BMAP_POI_TYPE_NORMAL: 0, - BMAP_POI_TYPE_BUSSTOP: 1, - BMAP_POI_TYPE_BUSLINE: 2, - BMAP_POI_TYPE_SUBSTOP: 3, - BMAP_POI_TYPE_SUBLINE: 4 - }); - T(window, { - BMAP_TRANSIT_POLICY_RECOMMEND: 0, - BMAP_TRANSIT_POLICY_LEAST_TIME: 4, - BMAP_TRANSIT_POLICY_LEAST_TRANSFER: 1, - BMAP_TRANSIT_POLICY_LEAST_WALKING: 2, - BMAP_TRANSIT_POLICY_AVOID_SUBWAYS: 3, - BMAP_TRANSIT_POLICY_FIRST_SUBWAYS: 5, - BMAP_LINE_TYPE_BUS: 0, - BMAP_LINE_TYPE_SUBWAY: 1, - BMAP_LINE_TYPE_FERRY: 2, - BMAP_LINE_TYPE_TRAIN: 3, - BMAP_LINE_TYPE_AIRPLANE: 4, - BMAP_LINE_TYPE_COACH: 5 - }); - T(window, { - BMAP_TRANSIT_TYPE_POLICY_TRAIN: 0, - BMAP_TRANSIT_TYPE_POLICY_AIRPLANE: 1, - BMAP_TRANSIT_TYPE_POLICY_COACH: 2 - }); - T(window, { - BMAP_INTERCITY_POLICY_LEAST_TIME: 0, - BMAP_INTERCITY_POLICY_EARLY_START: 1, - BMAP_INTERCITY_POLICY_CHEAP_PRICE: 2 - }); - T(window, { - BMAP_TRANSIT_TYPE_IN_CITY: 0, - BMAP_TRANSIT_TYPE_CROSS_CITY: 1 - }); - T(window, { - BMAP_TRANSIT_PLAN_TYPE_ROUTE: 0, - BMAP_TRANSIT_PLAN_TYPE_LINE: 1 - }); - var Bf = Jd.prototype; - T(Bf, { - clearResults: Bf.Pe - }); - Ld = Kd.prototype; - T(Ld, { - setPolicy: Ld.bu, - toString: Ld.toString, - setPageCapacity: Ld.Np, - setIntercityPolicy: Ld.oO, - setTransitTypePolicy: Ld.xO - }); - T(window, { - BMAP_DRIVING_POLICY_DEFAULT: 0, - BMAP_DRIVING_POLICY_AVOID_HIGHWAYS: 3, - BMAP_DRIVING_POLICY_AVOID_CONGESTION: 5, - BMAP_DRIVING_POLICY_FIRST_HIGHWAYS: 4 - }); - T(window, { - BMAP_MODE_DRIVING: "driving", - BMAP_MODE_TRANSIT: "transit", - BMAP_MODE_WALKING: "walking", - BMAP_MODE_NAVIGATION: "navigation" - }); - var Cf = Td.prototype; - T(Cf, { - routeCall: Cf.gO - }); - T(window, { - BMAP_HIGHLIGHT_STEP: 1, - BMAP_HIGHLIGHT_ROUTE: 2 - }); - T(window, { - BMAP_ROUTE_TYPE_DRIVING: wd, - BMAP_ROUTE_TYPE_WALKING: vd, - BMAP_ROUTE_TYPE_RIDING: xd - }); - T(window, { - BMAP_ROUTE_STATUS_NORMAL: yd, - BMAP_ROUTE_STATUS_EMPTY: 1, - BMAP_ROUTE_STATUS_ADDRESS: 2 - }); - var Df = Nd.prototype; - T(Df, { - setPolicy: Df.bu - }); - var Ef = Zd.prototype; - T(Ef, { - show: Ef.show, - hide: Ef.U, - setTypes: Ef.KF, - setLocation: Ef.fn, - search: Ef.search, - setInputValue: Ef.Ly - }); - T(nb.prototype, {}); - var Ff = Xd.prototype; - T(Ff, { - get: Ff.get - }); - T(dc.prototype, {}); - T(db.prototype, {}); - T(window, { - BMAP_POINT_DENSITY_HIGH: 200, - BMAP_POINT_DENSITY_MEDIUM: Yc, - BMAP_POINT_DENSITY_LOW: 50 - }); - T(window, { - BMAP_POINT_SHAPE_STAR: 1, - BMAP_POINT_SHAPE_WATERDROP: 2, - BMAP_POINT_SHAPE_CIRCLE: wc, - BMAP_POINT_SHAPE_SQUARE: 4, - BMAP_POINT_SHAPE_RHOMBUS: 5 - }); - T(window, { - BMAP_POINT_SIZE_TINY: 1, - BMAP_POINT_SIZE_SMALLER: 2, - BMAP_POINT_SIZE_SMALL: 3, - BMAP_POINT_SIZE_NORMAL: xc, - BMAP_POINT_SIZE_BIG: 5, - BMAP_POINT_SIZE_BIGGER: 6, - BMAP_POINT_SIZE_HUGE: 7 - }); - T(window, { - BMap_Symbol_SHAPE_CAMERA: 11, - BMap_Symbol_SHAPE_WARNING: 12, - BMap_Symbol_SHAPE_SMILE: 13, - BMap_Symbol_SHAPE_CLOCK: 14, - BMap_Symbol_SHAPE_POINT: 9, - BMap_Symbol_SHAPE_PLANE: 10, - BMap_Symbol_SHAPE_CIRCLE: 1, - BMap_Symbol_SHAPE_RECTANGLE: 2, - BMap_Symbol_SHAPE_RHOMBUS: 3, - BMap_Symbol_SHAPE_STAR: 4, - BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW: 5, - BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW: 6, - BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW: 7, - BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW: 8 - }); - T(window, { - BMAP_CONTEXT_MENU_ICON_ZOOMIN: gc, - BMAP_CONTEXT_MENU_ICON_ZOOMOUT: hc - }); - T(window, { - BMAP_SYS_DRAWER: Ja, - BMAP_SVG_DRAWER: 1, - BMAP_VML_DRAWER: 2, - BMAP_CANVAS_DRAWER: 3, - BMAP_SVG_DRAWER_FIRST: 4 - }); - B.vV(); - B.Q0(); -} -)() diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls1d3.gif b/static/BMap/images/mapctrls1d3.gif deleted file mode 100644 index 522c6f8..0000000 --- a/static/BMap/images/mapctrls1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls2d0.png b/static/BMap/images/mapctrls2d0.png deleted file mode 100644 index fc6b518..0000000 --- a/static/BMap/images/mapctrls2d0.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/marker_red_sprite.png b/static/BMap/images/marker_red_sprite.png deleted file mode 100644 index 38a5900..0000000 --- a/static/BMap/images/marker_red_sprite.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/openhand.cur b/static/BMap/images/openhand.cur deleted file mode 100644 index cb444f9..0000000 --- a/static/BMap/images/openhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.jpg b/static/BMap/images/simulator.jpg deleted file mode 100644 index 7eccb40..0000000 --- a/static/BMap/images/simulator.jpg +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.png b/static/BMap/images/simulator.png deleted file mode 100644 index 981b8d7..0000000 --- a/static/BMap/images/simulator.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/st-close.png b/static/BMap/images/st-close.png deleted file mode 100644 index b516fa2..0000000 --- a/static/BMap/images/st-close.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/well-gas.svg b/static/BMap/images/well-gas.svg deleted file mode 100644 index 50cdd83..0000000 --- a/static/BMap/images/well-gas.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-heat.svg b/static/BMap/images/well-heat.svg deleted file mode 100644 index baee123..0000000 --- a/static/BMap/images/well-heat.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-power.svg b/static/BMap/images/well-power.svg deleted file mode 100644 index e731bcd..0000000 --- a/static/BMap/images/well-power.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-rain.svg b/static/BMap/images/well-rain.svg deleted file mode 100644 index f2ef906..0000000 --- a/static/BMap/images/well-rain.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-sewage.svg b/static/BMap/images/well-sewage.svg deleted file mode 100644 index a9a1662..0000000 --- a/static/BMap/images/well-sewage.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/js/apiv1.3.min.js b/static/BMap/js/apiv1.3.min.js deleted file mode 100644 index 63c0ac1..0000000 --- a/static/BMap/js/apiv1.3.min.js +++ /dev/null @@ -1,6424 +0,0 @@ -window.BMAP_AUTHENTIC_KEY = ""; -(function() { - var b2, a8 = b2 = a8 || { - version : "1.3.4" - }; - a8.guid = "$BAIDU$"; - window[a8.guid] = window[a8.guid] || {}; - a8.object = a8.object || {}; - a8.extend = a8.object.extend = function(cM, T) { - for ( var cL in T) { - if (T.hasOwnProperty(cL)) { - cM[cL] = T[cL] - } - } - return cM - }; - a8.dom = a8.dom || {}; - a8.dom.g = function(T) { - if ("string" == typeof T || T instanceof String) { - return document.getElementById(T) - } else { - if (T && T.nodeName && (T.nodeType == 1 || T.nodeType == 9)) { - return T - } - } - return null - }; - a8.g = a8.G = a8.dom.g; - a8.dom.hide = function(T) { - T = a8.dom.g(T); - T.style.display = "none"; - return T - }; - a8.hide = a8.dom.hide; - a8.lang = a8.lang || {}; - a8.lang.isString = function(T) { - return "[object String]" == Object.prototype.toString.call(T) - }; - a8.isString = a8.lang.isString; - a8.dom._g = function(T) { - if (a8.lang.isString(T)) { - return document.getElementById(T) - } - return T - }; - a8._g = a8.dom._g; - a8.dom.contains = function(T, cL) { - var cM = a8.dom._g; - T = cM(T); - cL = cM(cL); - return T.contains ? T != cL && T.contains(cL) : !!(T - .compareDocumentPosition(cL) & 16) - }; - a8.browser = a8.browser || {}; - if (/msie (\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.ie = a8.ie = document.documentMode || +RegExp["\x241"] - } - a8.dom._NAME_ATTRS = (function() { - var T = { - cellpadding : "cellPadding", - cellspacing : "cellSpacing", - colspan : "colSpan", - rowspan : "rowSpan", - valign : "vAlign", - usemap : "useMap", - frameborder : "frameBorder" - }; - if (a8.browser.ie < 8) { - T["for"] = "htmlFor"; - T["class"] = "className" - } else { - T.htmlFor = "for"; - T.className = "class" - } - return T - })(); - a8.dom.setAttr = function(cL, T, cM) { - cL = a8.dom.g(cL); - if ("style" == T) { - cL.style.cssText = cM - } else { - T = a8.dom._NAME_ATTRS[T] || T; - cL.setAttribute(T, cM) - } - return cL - }; - a8.setAttr = a8.dom.setAttr; - a8.dom.setAttrs = function(cM, T) { - cM = a8.dom.g(cM); - for ( var cL in T) { - a8.dom.setAttr(cM, cL, T[cL]) - } - return cM - }; - a8.setAttrs = a8.dom.setAttrs; - a8.string = a8.string || {}; - (function() { - var T = new RegExp( - "(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+\x24)", "g"); - a8.string.trim = function(cL) { - return String(cL).replace(T, "") - } - })(); - a8.trim = a8.string.trim; - a8.string.format = function(cM, T) { - cM = String(cM); - var cL = Array.prototype.slice.call(arguments, 1), cN = Object.prototype.toString; - if (cL.length) { - cL = cL.length == 1 ? (T !== null - && (/\[object Array\]|\[object Object\]/.test(cN.call(T))) ? T - : cL) - : cL; - return cM.replace(/#\{(.+?)\}/g, function(cO, cQ) { - var cP = cL[cQ]; - if ("[object Function]" == cN.call(cP)) { - cP = cP(cQ) - } - return ("undefined" == typeof cP ? "" : cP) - }) - } - return cM - }; - a8.format = a8.string.format; - a8.dom.removeClass = function(cP, cQ) { - cP = a8.dom.g(cP); - var cN = cP.className.split(/\s+/), cR = cQ.split(/\s+/), cL, T = cR.length, cM, cO = 0; - for (; cO < T; ++cO) { - for (cM = 0, cL = cN.length; cM < cL; ++cM) { - if (cN[cM] == cR[cO]) { - cN.splice(cM, 1); - break - } - } - } - cP.className = cN.join(" "); - return cP - }; - a8.removeClass = a8.dom.removeClass; - a8.dom.insertHTML = function(cN, T, cM) { - cN = a8.dom.g(cN); - var cL, cO; - if (cN.insertAdjacentHTML) { - cN.insertAdjacentHTML(T, cM) - } else { - cL = cN.ownerDocument.createRange(); - T = T.toUpperCase(); - if (T == "AFTERBEGIN" || T == "BEFOREEND") { - cL.selectNodeContents(cN); - cL.collapse(T == "AFTERBEGIN") - } else { - cO = T == "BEFOREBEGIN"; - cL[cO ? "setStartBefore" : "setEndAfter"](cN); - cL.collapse(cO) - } - cL.insertNode(cL.createContextualFragment(cM)) - } - return cN - }; - a8.insertHTML = a8.dom.insertHTML; - a8.dom.show = function(T) { - T = a8.dom.g(T); - T.style.display = ""; - return T - }; - a8.show = a8.dom.show; - a8.dom.getDocument = function(T) { - T = a8.dom.g(T); - return T.nodeType == 9 ? T : T.ownerDocument || T.document - }; - a8.dom.addClass = function(cP, cQ) { - cP = a8.dom.g(cP); - var cL = cQ.split(/\s+/), T = cP.className, cO = " " + T + " ", cN = 0, cM = cL.length; - for (; cN < cM; cN++) { - if (cO.indexOf(" " + cL[cN] + " ") < 0) { - T += " " + cL[cN] - } - } - cP.className = T; - return cP - }; - a8.addClass = a8.dom.addClass; - a8.dom._styleFixer = a8.dom._styleFixer || {}; - a8.dom._styleFilter = a8.dom._styleFilter || []; - a8.dom._styleFilter.filter = function(cL, cO, cP) { - for ( var T = 0, cN = a8.dom._styleFilter, cM; cM = cN[T]; T++) { - if (cM = cM[cP]) { - cO = cM(cL, cO) - } - } - return cO - }; - a8.string.toCamelCase = function(T) { - if (T.indexOf("-") < 0 && T.indexOf("_") < 0) { - return T - } - return T.replace(/[-_][^-_]/g, function(cL) { - return cL.charAt(1).toUpperCase() - }) - }; - a8.dom.getStyle = function(cM, cL) { - var cP = a8.dom; - cM = cP.g(cM); - cL = a8.string.toCamelCase(cL); - var cO = cM.style[cL]; - if (!cO) { - var T = cP._styleFixer[cL], cN = cM.currentStyle - || (a8.browser.ie ? cM.style : getComputedStyle(cM, null)); - cO = T && T.get ? T.get(cM, cN) : cN[T || cL] - } - if (T = cP._styleFilter) { - cO = T.filter(cL, cO, "get") - } - return cO - }; - a8.getStyle = a8.dom.getStyle; - if (/opera\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.opera = +RegExp["\x241"] - } - a8.browser.isWebkit = /webkit/i.test(navigator.userAgent); - a8.browser.isGecko = /gecko/i.test(navigator.userAgent) - && !/like gecko/i.test(navigator.userAgent); - a8.browser.isStrict = document.compatMode == "CSS1Compat"; - a8.dom.getPosition = function(T) { - T = a8.dom.g(T); - var cT = a8.dom.getDocument(T), cN = a8.browser, cQ = a8.dom.getStyle, cM = cN.isGecko > 0 - && cT.getBoxObjectFor - && cQ(T, "position") == "absolute" - && (T.style.top === "" || T.style.left === ""), cR = { - left : 0, - top : 0 - }, cP = (cN.ie && !cN.isStrict) ? cT.body : cT.documentElement, cU, cL; - if (T == cP) { - return cR - } - if (T.getBoundingClientRect) { - cL = T.getBoundingClientRect(); - cR.left = Math.floor(cL.left) - + Math.max(cT.documentElement.scrollLeft, - cT.body.scrollLeft); - cR.top = Math.floor(cL.top) - + Math.max(cT.documentElement.scrollTop, cT.body.scrollTop); - cR.left -= cT.documentElement.clientLeft; - cR.top -= cT.documentElement.clientTop; - var cS = cT.body, cV = parseInt(cQ(cS, "borderLeftWidth")), cO = parseInt(cQ( - cS, "borderTopWidth")); - if (cN.ie && !cN.isStrict) { - cR.left -= isNaN(cV) ? 2 : cV; - cR.top -= isNaN(cO) ? 2 : cO - } - } else { - cU = T; - do { - cR.left += cU.offsetLeft; - cR.top += cU.offsetTop; - if (cN.isWebkit > 0 && cQ(cU, "position") == "fixed") { - cR.left += cT.body.scrollLeft; - cR.top += cT.body.scrollTop; - break - } - cU = cU.offsetParent - } while (cU && cU != T); - if (cN.opera > 0 - || (cN.isWebkit > 0 && cQ(T, "position") == "absolute")) { - cR.top -= cT.body.offsetTop - } - cU = T.offsetParent; - while (cU && cU != cT.body) { - cR.left -= cU.scrollLeft; - if (!cN.opera || cU.tagName != "TR") { - cR.top -= cU.scrollTop - } - cU = cU.offsetParent - } - } - return cR - }; - if (/firefox\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.firefox = +RegExp["\x241"] - } - (function() { - var T = navigator.userAgent; - if (/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(T) - && !/chrome/i.test(T)) { - a8.browser.safari = +(RegExp["\x241"] || RegExp["\x242"]) - } - })(); - if (/chrome\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.chrome = +RegExp["\x241"] - } - a8.array = a8.array || {}; - a8.array.each = function(cP, cN) { - var cM, cO, cL, T = cP.length; - if ("function" == typeof cN) { - for (cL = 0; cL < T; cL++) { - cO = cP[cL]; - cM = cN.call(cP, cO, cL); - if (cM === false) { - break - } - } - } - return cP - }; - a8.each = a8.array.each; - a8.lang.guid = function() { - return "TANGRAM__" + (window[a8.guid]._counter++).toString(36) - }; - window[a8.guid]._counter = window[a8.guid]._counter || 1; - window[a8.guid]._instances = window[a8.guid]._instances || {}; - a8.lang.isFunction = function(T) { - return "[object Function]" == Object.prototype.toString.call(T) - }; - a8.lang.Class = function(T) { - this.guid = T || a8.lang.guid(); - window[a8.guid]._instances[this.guid] = this - }; - window[a8.guid]._instances = window[a8.guid]._instances || {}; - a8.lang.Class.prototype.dispose = function() { - delete window[a8.guid]._instances[this.guid]; - for ( var T in this) { - if (!a8.lang.isFunction(this[T])) { - delete this[T] - } - } - this.disposed = true - }; - a8.lang.Class.prototype.toString = function() { - return "[object " + (this._className || "Object") + "]" - }; - a8.lang.Event = function(T, cL) { - this.type = T; - this.returnValue = true; - this.target = cL || null; - this.currentTarget = null - }; - a8.lang.Class.prototype.addEventListener = function(cN, cM, cL) { - if (!a8.lang.isFunction(cM)) { - return - } - !this.__listeners && (this.__listeners = {}); - var T = this.__listeners, cO; - if (typeof cL == "string" && cL) { - if (/[^\w\-]/.test(cL)) { - throw ("nonstandard key:" + cL) - } else { - cM.hashCode = cL; - cO = cL - } - } - cN.indexOf("on") != 0 && (cN = "on" + cN); - typeof T[cN] != "object" && (T[cN] = {}); - cO = cO || a8.lang.guid(); - cM.hashCode = cO; - T[cN][cO] = cM - }; - a8.lang.Class.prototype.removeEventListener = function(cM, cL) { - if (a8.lang.isFunction(cL)) { - cL = cL.hashCode - } else { - if (!a8.lang.isString(cL)) { - return - } - } - !this.__listeners && (this.__listeners = {}); - cM.indexOf("on") != 0 && (cM = "on" + cM); - var T = this.__listeners; - if (!T[cM]) { - return - } - T[cM][cL] && delete T[cM][cL] - }; - a8.lang.Class.prototype.dispatchEvent = function(cN, T) { - if (a8.lang.isString(cN)) { - cN = new a8.lang.Event(cN) - } - !this.__listeners && (this.__listeners = {}); - T = T || {}; - for ( var cM in T) { - cN[cM] = T[cM] - } - var cM, cL = this.__listeners, cO = cN.type; - cN.target = cN.target || this; - cN.currentTarget = this; - cO.indexOf("on") != 0 && (cO = "on" + cO); - a8.lang.isFunction(this[cO]) && this[cO].apply(this, arguments); - if (typeof cL[cO] == "object") { - for (cM in cL[cO]) { - cL[cO][cM].apply(this, arguments) - } - } - return cN.returnValue - }; - a8.lang.inherits = function(cQ, cO, cN) { - var cM, cP, T = cQ.prototype, cL = new Function(); - cL.prototype = cO.prototype; - cP = cQ.prototype = new cL(); - for (cM in T) { - cP[cM] = T[cM] - } - cQ.prototype.constructor = cQ; - cQ.superClass = cO.prototype; - if ("string" == typeof cN) { - cP._className = cN - } - }; - a8.inherits = a8.lang.inherits; - a8.lang.instance = function(T) { - return window[a8.guid]._instances[T] || null - }; - a8.platform = a8.platform || {}; - a8.platform.isMacintosh = /macintosh/i.test(navigator.userAgent); - a8.platform.isWindows = /windows/i.test(navigator.userAgent); - a8.platform.isX11 = /x11/i.test(navigator.userAgent); - a8.platform.isAndroid = /android/i.test(navigator.userAgent); - a8.platform.isIpad = /ipad/i.test(navigator.userAgent); - a8.platform.isIphone = /iphone/i.test(navigator.userAgent); - a8.lang.Event.prototype.inherit = function(cM) { - var cL = this; - this.domEvent = cM = window.event || cM; - cL.clientX = cM.clientX || cM.pageX; - cL.clientY = cM.clientY || cM.pageY; - cL.offsetX = cM.offsetX || cM.layerX; - cL.offsetY = cM.offsetY || cM.layerY; - cL.screenX = cM.screenX; - cL.screenY = cM.screenY; - cL.ctrlKey = cM.ctrlKey || cM.metaKey; - cL.shiftKey = cM.shiftKey; - cL.altKey = cM.altKey; - if (cM.touches) { - cL.touches = []; - for ( var T = 0; T < cM.touches.length; T++) { - cL.touches.push( { - clientX : cM.touches[T].clientX, - clientY : cM.touches[T].clientY, - screenX : cM.touches[T].screenX, - screenY : cM.touches[T].screenY, - pageX : cM.touches[T].pageX, - pageY : cM.touches[T].pageY, - target : cM.touches[T].target, - identifier : cM.touches[T].identifier - }) - } - } - if (cM.changedTouches) { - cL.changedTouches = []; - for ( var T = 0; T < cM.changedTouches.length; T++) { - cL.changedTouches.push( { - clientX : cM.changedTouches[T].clientX, - clientY : cM.changedTouches[T].clientY, - screenX : cM.changedTouches[T].screenX, - screenY : cM.changedTouches[T].screenY, - pageX : cM.changedTouches[T].pageX, - pageY : cM.changedTouches[T].pageY, - target : cM.changedTouches[T].target, - identifier : cM.changedTouches[T].identifier - }) - } - } - if (cM.targetTouches) { - cL.targetTouches = []; - for ( var T = 0; T < cM.targetTouches.length; T++) { - cL.targetTouches.push( { - clientX : cM.targetTouches[T].clientX, - clientY : cM.targetTouches[T].clientY, - screenX : cM.targetTouches[T].screenX, - screenY : cM.targetTouches[T].screenY, - pageX : cM.targetTouches[T].pageX, - pageY : cM.targetTouches[T].pageY, - target : cM.targetTouches[T].target, - identifier : cM.targetTouches[T].identifier - }) - } - } - cL.rotation = cM.rotation; - cL.scale = cM.scale; - return cL - }; - a8.lang.decontrol = function(cL) { - var T = window[a8.guid]; - T._instances && (delete T._instances[cL]) - }; - a8.event = {}; - a8.on = a8.event.on = function(cM, cL, T) { - if (!(cM = a8.g(cM))) { - return cM - } - cL = cL.replace(/^on/, ""); - if (cM.addEventListener) { - cM.addEventListener(cL, T, false) - } else { - if (cM.attachEvent) { - cM.attachEvent("on" + cL, T) - } - } - return cM - }; - a8.un = a8.event.un = function(cM, cL, T) { - if (!(cM = a8.g(cM))) { - return cM - } - cL = cL.replace(/^on/, ""); - if (cM.removeEventListener) { - cM.removeEventListener(cL, T, false) - } else { - if (cM.detachEvent) { - cM.detachEvent("on" + cL, T) - } - } - return cM - }; - a8.dom.hasClass = function(cM, cL) { - if (!cM || !cM.className || typeof cM.className != "string") { - return false - } - var T = -1; - try { - T = cM.className == cL - || cM.className.search(new RegExp("(\\s|^)" + cL - + "(\\s|$)")) - } catch (cN) { - return false - } - return T > -1 - }; - window.BMap = window.BMap || {}; - window.BMap.version = "1.3"; - window.BMap._register = []; - window.BMap.register = function(T) { - this._register.push(T) - }; - window.BMap.apiLoad = window.BMap.apiLoad || function() { - }; - var bJ = window.BMAP_AUTHENTIC_KEY; - window.BMAP_AUTHENTIC_KEY = null; - function bz(cN, cP) { - cN = a8.g(cN); - if (!cN) { - return - } - var cO = this; - a8.lang.Class.call(cO); - cO.config = { - clickInterval : 200, - enableDragging : true, - enableKeyboard : false, - enableDblclickZoom : true, - enableContinuousZoom : false, - enableWheelZoom : false, - enableMouseDown : true, - enablePinchToZoom : true, - enableAutoResize : true, - fps : 25, - zoomerDuration : 240, - actionDuration : 450, - defaultCursor : cc.defaultCursor, - draggingCursor : cc.draggingCursor, - isOverviewMap : false, - minZoom : 1, - maxZoom : 18, - mapType : BMAP_NORMAL_MAP, - restrictBounds : false, - drawer : BMAP_SYS_DRAWER, - enableInertialDragging : false, - drawMargin : 500, - enableHighResolution : false - }; - a8.extend(cO.config, cP || {}); - if (cO.highResolutionEnabled()) { - var cR = document.querySelector("meta[name=viewport]"); - cR.content = "initial-scale=0.5, minimum-scale=0.5, maximum-scale=0.5, user-scalable=no, target-densitydpi=high-dpi" - } - cO.container = cN; - cO._setStyle(cN); - cN.unselectable = "on"; - cN.innerHTML = ""; - cN.appendChild(cO.render()); - var cL = cO.getSize(); - cO.width = cL.width; - cO.height = cL.height; - cO.offsetX = 0; - cO.offsetY = 0; - cO.platform = cN.firstChild; - cO.maskLayer = cO.platform.firstChild; - cO.maskLayer.style.width = cO.width + "px"; - cO.maskLayer.style.height = cO.height + "px"; - cO._panes = {}; - cO.centerPoint = new cd(0, 0); - cO.mercatorCenter = new cd(0, 0); - cO.zoomLevel = 1; - cO.lastLevel = 0; - cO.defaultZoomLevel = null; - cO.defaultCenter = null; - cO.currentCity = ""; - cO.cityCode = ""; - cO._hotspots = {}; - cO.currentOperation = 0; - cP = cP || {}; - var cQ = cO.mapType = cO.config.mapType; - cO.projection = cQ.getProjection(); - if (cQ === BMAP_PERSPECTIVE_MAP) { - _addStat(5002) - } - if (cQ === BMAP_SATELLITE_MAP || cQ === BMAP_HYBRID_MAP) { - _addStat(5003) - } - var T = cO.config; - T.userMinZoom = cP.minZoom; - T.userMaxZoom = cP.maxZoom; - cO._checkZoom(); - cO.temp = { - operating : false, - arrow : 0, - lastDomMoveTime : 0, - lastLoadTileTime : 0, - lastMovingTime : 0, - canKeyboard : false, - registerIndex : -1, - curSpots : [] - }; - cO.platform.style.cursor = cO.config.defaultCursor; - for ( var cM = 0; cM < BMap._register.length; cM++) { - BMap._register[cM](cO) - } - cO.temp.registerIndex = cM; - cO._bind(); - cA.load("map", function() { - cO._draw() - }); - if (bO()) { - cA.load("oppc", function() { - cO._asyncRegister() - }) - } - if (aA()) { - cA.load("opmb", function() { - cO._asyncRegister() - }) - } - cN = null - } - a8.lang.inherits(bz, a8.lang.Class, "Map"); - a8 - .extend( - bz.prototype, - { - render : function() { - var T = aa("div"); - var cN = T.style; - cN.overflow = "visible"; - cN.position = "absolute"; - cN.zIndex = "0"; - cN.top = cN.left = "0px"; - var cL = aa("div", { - "class" : "BMap_mask" - }); - var cM = cL.style; - cM.position = "absolute"; - cM.top = cM.left = "0px"; - cM.zIndex = "9"; - cM.overflow = "hidden"; - cM.WebkitUserSelect = "none"; - T.appendChild(cL); - return T - }, - _setStyle : function(cL) { - var T = cL.style; - T.overflow = "hidden"; - if (aJ(cL).position != "absolute") { - T.position = "relative"; - T.zIndex = 0 - } - T.backgroundColor = "#F3F1EC"; - T.color = "#000"; - T.textAlign = "left" - }, - _bind : function() { - var T = this; - T._watchSize = function() { - var cL = T.getSize(); - if (T.width != cL.width - || T.height != cL.height) { - var cN = new aH(T.width, T.height); - var cO = new bg("onbeforeresize"); - cO.size = cN; - T.dispatchEvent(cO); - T._updateCenterPoint( - (cL.width - T.width) / 2, - (cL.height - T.height) / 2); - T.maskLayer.style.width = (T.width = cL.width) - + "px"; - T.maskLayer.style.height = (T.height = cL.height) - + "px"; - var cM = new bg("onresize"); - cM.size = cL; - T.dispatchEvent(cM) - } - }; - if (T.config.enableAutoResize) { - T.temp.autoResizeTimer = setInterval( - T._watchSize, 80) - } - }, - _updateCenterPoint : function(cN, cL, cR, cQ) { - var cO = this.getMapType().getZoomUnits( - this.getZoom()); - var cS = this.projection; - var cP = true; - if (cR && cd.isInRange(cR)) { - this.centerPoint = new cd(cR.lng, cR.lat); - cP = false - } - var cM = (cR && cQ) ? cS.lngLatToMercator(cR, - this.currentCity) : this.mercatorCenter; - if (cM) { - this.mercatorCenter = new cd(cM.lng + cN * cO, - cM.lat - cL * cO); - var T = cS.mercatorToLngLat( - this.mercatorCenter, this.currentCity); - if (T && cP) { - this.centerPoint = T - } - } - }, - zoomTo : function(cN, cL) { - if (!aK(cN)) { - return - } - cN = this._getProperZoom(cN).zoom; - if (cN == this.zoomLevel) { - return - } - this.lastLevel = this.zoomLevel; - this.zoomLevel = cN; - var cM; - if (cL) { - cM = cL - } else { - if (this.getInfoWindow()) { - cM = this.getInfoWindow().getPosition() - } - } - if (cM) { - var T = this.pointToPixel(cM, this.lastLevel); - this._updateCenterPoint(this.width / 2 - T.x, - this.height / 2 - T.y, - this.pixelToPoint(T, this.lastLevel), - true) - } - this.dispatchEvent(new bg("onzoomstart")); - this.dispatchEvent(new bg("onzoomstartcode")) - }, - setZoom : function(T) { - this.zoomTo(T) - }, - zoomIn : function(T) { - this.zoomTo(this.zoomLevel + 1, T) - }, - zoomOut : function(T) { - this.zoomTo(this.zoomLevel - 1, T) - }, - panTo : function(T, cL) { - if (!(T instanceof cd)) { - return - } - this.mercatorCenter = this.projection - .lngLatToMercator(T, this.currentCity); - if (cd.isInRange(T)) { - this.centerPoint = new cd(T.lng, T.lat) - } else { - this.centerPoint = this.projection - .mercatorToLngLat(this.mercatorCenter, - this.currentCity) - } - }, - panBy : function(cL, T) { - cL = Math.round(cL) || 0; - T = Math.round(T) || 0; - this._updateCenterPoint(-cL, -T) - }, - addControl : function(T) { - if (T && I(T._i)) { - T._i(this); - this.dispatchEvent(new bg("onaddcontrol", T)) - } - }, - removeControl : function(T) { - if (T && I(T.remove)) { - T.remove(); - this - .dispatchEvent(new bg( - "onremovecontrol", T)) - } - }, - addContextMenu : function(T) { - if (T && I(T.initialize)) { - T.initialize(this); - this - .dispatchEvent(new bg( - "onaddcontextmenu", T)) - } - }, - removeContextMenu : function(T) { - if (T && I(T.remove)) { - this.dispatchEvent(new bg( - "onremovecontextmenu", T)); - T.remove() - } - }, - addOverlay : function(T) { - if (T && I(T._i)) { - T._i(this); - this.dispatchEvent(new bg("onaddoverlay", T)) - } - }, - removeOverlay : function(T) { - if (T && I(T.remove)) { - T.remove(); - this - .dispatchEvent(new bg( - "onremoveoverlay", T)) - } - }, - clearOverlays : function() { - this.dispatchEvent(new bg("onclearoverlays")) - }, - addTileLayer : function(T) { - if (T) { - this.dispatchEvent(new bg("onaddtilelayer", T)) - } - }, - removeTileLayer : function(T) { - if (T) { - this.dispatchEvent(new bg("onremovetilelayer", - T)) - } - }, - setMapType : function(cL) { - if (this.mapType === cL) { - return - } - var cM = new bg("onsetmaptype"); - var T = this.mapType; - cM.preMapType = T; - this.mapType = this.config.mapType = cL; - this.projection = this.mapType.getProjection(); - this._updateCenterPoint(0, 0, this.getCenter(), - true); - this._checkZoom(); - var cN = this._getProperZoom(this.getZoom()).zoom; - this.zoomTo(cN); - this.dispatchEvent(cM); - var cM = new bg("onmaptypechange"); - cM.zoomLevel = cN; - cM.mapType = cL; - this.dispatchEvent(cM); - if (cL === BMAP_SATELLITE_MAP - || cL === BMAP_HYBRID_MAP) { - _addStat(5003) - } - }, - setCenter : function(T) { - var cM = this; - if (T instanceof cd) { - cM.panTo(T, { - noAnimation : true - }) - } else { - if (b3(T)) { - var cL = this._getLocal(); - cL.setSearchCompleteCallback(function(cN) { - if (cL.getStatus() == 0 - && cL._json.result.type == 2) { - cM.setCenter(cN.getPoi(0).point); - if (BMAP_PERSPECTIVE_MAP - .getCityName(T)) { - cM.setCurrentCity(T) - } - } - }); - cL.search(T) - } - } - }, - centerAndZoom : function(T, cM) { - var cL = this; - if (b3(T)) { - var cP = cL._getLocal(); - cP - .setSearchCompleteCallback(function(cQ) { - if (cP.getStatus() == 0 - && cP._json.result.type == 2) { - var cS = cQ.getPoi(0).point; - var cR = cM - || S - .getBestLevel( - cP._json.content.level, - cL); - cL.centerAndZoom(cS, cR); - if (BMAP_PERSPECTIVE_MAP - .getCityName(T)) { - cL.setCurrentCity(T) - } - } - }); - cP.search(T); - return - } - if (!(T instanceof cd) || !cM) { - return - } - cM = cL._getProperZoom(cM).zoom; - cL.lastLevel = cL.zoomLevel || cM; - cL.zoomLevel = cM; - cL.centerPoint = new cd(T.lng, T.lat); - cL.mercatorCenter = cL.projection.lngLatToMercator( - cL.centerPoint, cL.currentCity); - cL.defaultZoomLevel = cL.defaultZoomLevel - || cL.zoomLevel; - cL.defaultCenter = cL.defaultCenter - || cL.centerPoint; - var cO = new bg("onload"); - var cN = new bg("onloadcode"); - cO.point = new cd(T.lng, T.lat); - cO.pixel = cL.pointToPixel(cL.centerPoint, - cL.zoomLevel); - cO.zoom = cM; - if (!cL.loaded) { - cL.loaded = true; - cL.dispatchEvent(cO) - } - cL.dispatchEvent(cN); - cL.dispatchEvent(new bg("onmoveend")); - if (cL.lastLevel != cL.zoomLevel) { - cL.dispatchEvent(new bg("onzoomend")) - } - }, - _getLocal : function() { - if (!this.temp.local) { - this.temp.local = new a4(1) - } - return this.temp.local - }, - reset : function() { - this.centerAndZoom(this.defaultCenter, - this.defaultZoomLevel, true) - }, - enableDragging : function() { - this.config.enableDragging = true - }, - disableDragging : function() { - this.config.enableDragging = false - }, - enableInertialDragging : function() { - this.config.enableInertialDragging = true - }, - disableInertialDragging : function() { - this.config.enableInertialDragging = false - }, - enableScrollWheelZoom : function() { - this.config.enableWheelZoom = true - }, - disableScrollWheelZoom : function() { - this.config.enableWheelZoom = false - }, - enableContinuousZoom : function() { - this.config.enableContinuousZoom = true - }, - disableContinuousZoom : function() { - this.config.enableContinuousZoom = false - }, - enableDoubleClickZoom : function() { - this.config.enableDblclickZoom = true - }, - disableDoubleClickZoom : function() { - this.config.enableDblclickZoom = false - }, - enableKeyboard : function() { - this.config.enableKeyboard = true - }, - disableKeyboard : function() { - this.config.enableKeyboard = false - }, - enablePinchToZoom : function() { - this.config.enablePinchToZoom = true - }, - disablePinchToZoom : function() { - this.config.enablePinchToZoom = false - }, - enableAutoResize : function() { - this.config.enableAutoResize = true; - this._watchSize(); - if (!this.temp.autoResizeTimer) { - this.temp.autoResizeTimer = setInterval( - this._watchSize, 80) - } - }, - disableAutoResize : function() { - this.config.enableAutoResize = false; - if (this.temp.autoResizeTimer) { - clearInterval(this.temp.autoResizeTimer); - this.temp.autoResizeTimer = null - } - }, - getSize : function() { - return new aH(this.container.clientWidth, - this.container.clientHeight) - }, - getCenter : function() { - return this.centerPoint - }, - getZoom : function() { - return this.zoomLevel - }, - checkResize : function() { - this._watchSize() - }, - _getProperZoom : function(cM) { - var cL = this.config.minZoom, T = this.config.maxZoom, cN = false; - if (cM < cL) { - cN = true; - cM = cL - } - if (cM > T) { - cN = true; - cM = T - } - return { - zoom : cM, - exceeded : cN - } - }, - getContainer : function() { - return this.container - }, - pointToPixel : function(T, cL) { - cL = cL || this.getZoom(); - return this.projection.pointToPixel(T, cL, - this.mercatorCenter, this.getSize(), - this.currentCity) - }, - pixelToPoint : function(T, cL) { - cL = cL || this.getZoom(); - return this.projection.pixelToPoint(T, cL, - this.mercatorCenter, this.getSize(), - this.currentCity) - }, - pointToOverlayPixel : function(T, cM) { - if (!T) { - return - } - var cN = new cd(T.lng, T.lat); - var cL = this.pointToPixel(cN, cM); - cL.x -= this.offsetX; - cL.y -= this.offsetY; - return cL - }, - overlayPixelToPoint : function(T, cM) { - if (!T) { - return - } - var cL = new bu(T.x, T.y); - cL.x += this.offsetX; - cL.y += this.offsetY; - return this.pixelToPoint(cL, cM) - }, - getBounds : function() { - if (!this.isLoaded()) { - return new bN() - } - var cL = arguments[0] || {}, cN = cL.margins - || [ 0, 0, 0, 0 ], T = cL.zoom || null, cO = this - .pixelToPoint( { - x : cN[3], - y : this.height - cN[2] - }, T), cM = this.pixelToPoint( { - x : this.width - cN[1], - y : cN[0] - }, T); - return new bN(cO, cM) - }, - isLoaded : function() { - return !!this.loaded - }, - _getBestLevel : function(cL, cM) { - var cP = this.getMapType(); - var cR = cM.margins || [ 10, 10, 10, 10 ], cO = cM.zoomFactor || 0, cS = cR[1] - + cR[3], cQ = cR[0] + cR[2], T = cP - .getMinZoom(), cU = cP.getMaxZoom(); - for ( var cN = cU; cN >= T; cN--) { - var cT = this.getMapType().getZoomUnits(cN); - if (cL.toSpan().lng / cT < this.width - cS - && cL.toSpan().lat / cT < this.height - - cQ) { - break - } - } - cN += cO; - if (cN < T) { - cN = T - } - if (cN > cU) { - cN = cU - } - return cN - }, - getViewport : function(cT, cL) { - var cX = { - center : this.getCenter(), - zoom : this.getZoom() - }; - if (!cT || !cT instanceof bN && cT.length == 0 - || cT instanceof bN && cT.isEmpty()) { - return cX - } - var cV = []; - if (cT instanceof bN) { - cV.push(cT.getNorthEast()); - cV.push(cT.getSouthWest()) - } else { - cV = cT.slice(0) - } - cL = cL || {}; - var cP = []; - for ( var cQ = 0, cO = cV.length; cQ < cO; cQ++) { - cP.push(this.projection.lngLatToMercator( - cV[cQ], this.currentCity)) - } - var cM = new bN(); - for ( var cQ = cP.length - 1; cQ >= 0; cQ--) { - cM.extend(cP[cQ]) - } - if (cM.isEmpty()) { - return cX - } - var T = cM.getCenter(); - var cW = this._getBestLevel(cM, cL); - if (cL.margins) { - var cS = cL.margins, cR = (cS[1] - cS[3]) / 2, cU = (cS[0] - cS[2]) / 2, cN = this - .getMapType().getZoomUnits(cW); - T.lng = T.lng + cN * cR; - T.lat = T.lat + cN * cU - } - T = this.projection.mercatorToLngLat(T, - this.currentCity); - return { - center : T, - zoom : cW - } - }, - setViewport : function(cL, cO) { - var T; - if (cL && cL.center) { - T = cL - } else { - T = this.getViewport(cL, cO) - } - cO = cO || {}; - var cM = cO.delay || 200; - if (T.zoom == this.zoomLevel - && cO.enableAnimation != false) { - var cN = this; - setTimeout(function() { - cN.panTo(T.center, { - duration : 210 - }) - }, cM) - } else { - this.centerAndZoom(T.center, T.zoom) - } - }, - getPanes : function() { - return this._panes - }, - getInfoWindow : function() { - if (this.temp.infoWin && this.temp.infoWin.isOpen()) { - return this.temp.infoWin - } - return null - }, - getDistance : function(cM, T) { - if (!cM || !T) { - return - } - var cL = 0; - cL = ba.getDistanceByLL(cM, T); - return cL - }, - getOverlays : function() { - var cN = [], cO = this._overlays, cM = this._customOverlays; - if (cO) { - for ( var cL in cO) { - if (cO[cL] instanceof Y) { - cN.push(cO[cL]) - } - } - } - if (cM) { - for ( var cL = 0, T = cM.length; cL < T; cL++) { - cN.push(cM[cL]) - } - } - return cN - }, - getMapType : function() { - return this.mapType - }, - _asyncRegister : function() { - for ( var T = this.temp.registerIndex; T < BMap._register.length; T++) { - BMap._register[T](this) - } - this.temp.registerIndex = T - }, - setCurrentCity : function(T) { - this.currentCity = BMAP_PERSPECTIVE_MAP - .getCityName(T); - this.cityCode = BMAP_PERSPECTIVE_MAP - .getCityCode(this.currentCity) - }, - setDefaultCursor : function(T) { - if (a8.browser.firefox && T.indexOf("url") == 0) { - T = T += ", -moz-grab" - } - this.config.defaultCursor = T; - if (this.platform) { - this.platform.style.cursor = this.config.defaultCursor - } - }, - getDefaultCursor : function() { - return this.config.defaultCursor - }, - setDraggingCursor : function(T) { - if (a8.browser.firefox && T.indexOf("url") == 0) { - T = T += ", -moz-grabbing" - } - this.config.draggingCursor = T - }, - getDraggingCursor : function() { - return this.config.draggingCursor - }, - highResolutionEnabled : function() { - return this.config.enableHighResolution - && window.devicePixelRatio > 1 - }, - addHotspot : function(cL) { - if (cL instanceof cm) { - this._hotspots[cL.guid] = cL; - cL.initialize(this) - } - var T = this; - cA.load("hotspot", function() { - T._asyncRegister() - }) - }, - removeHotspot : function(T) { - if (this._hotspots[T.guid]) { - delete this._hotspots[T.guid] - } - }, - clearHotspots : function() { - this._hotspots = {} - }, - _checkZoom : function() { - var cL = this.mapType.getMinZoom(); - var cM = this.mapType.getMaxZoom(); - var T = this.config; - T.minZoom = T.userMinZoom || cL; - T.maxZoom = T.userMaxZoom || cM; - if (T.minZoom < cL) { - T.minZoom = cL - } - if (T.maxZoom > cM) { - T.maxZoom = cM - } - }, - setMinZoom : function(T) { - if (T > this.config.maxZoom) { - T = this.config.maxZoom - } - this.config.userMinZoom = T; - this._updateZoom() - }, - setMaxZoom : function(T) { - if (T < this.config.minZoom) { - T = this.config.minZoom - } - this.config.userMaxZoom = T; - this._updateZoom() - }, - _updateZoom : function() { - this._checkZoom(); - var T = this.config; - if (this.zoomLevel < T.minZoom) { - this.setZoom(T.minZoom) - } else { - if (this.zoomLevel > T.maxZoom) { - this.setZoom(T.maxZoom) - } - } - var cL = new bg("onzoomspanchange"); - cL.minZoom = T.minZoom; - cL.maxZoom = T.maxZoom; - this.dispatchEvent(cL) - } - }); - window.BMAP_API_VERSION = "1.3"; - window.BMAP_COORD_LNGLAT = 0; - window.BMAP_COORD_MERCATOR = 1; - window.BMAP_SYS_DRAWER = 0; - window.BMAP_SVG_DRAWER = 1; - window.BMAP_VML_DRAWER = 2; - window.BMAP_CANVAS_DRAWER = 3; - window._addStat = function(cP, cO) { - if (!cP) { - return - } - cO = cO || {}; - var cN = ""; - for ( var cL in cO) { - cN = cN + "&" + cL + "=" + encodeURIComponent(cO[cL]) - } - var cQ = function(cR) { - if (!cR) { - return - } - _addStat._sending = true; - setTimeout(function() { - _addStat._img.src = cc.imgPath + "blank.gif?" + cR.src - }, 50) - }; - var T = function() { - var cR = _addStat._reqQueue.shift(); - if (cR) { - cQ(cR) - } - }; - var cM = (Math.random() * 100000000).toFixed(0); - if (_addStat._sending) { - _addStat._reqQueue.push( { - src : "t=" + cM + "&code=" + cP + cN - }) - } else { - cQ( { - src : "t=" + cM + "&code=" + cP + cN - }) - } - if (!_addStat._binded) { - a8.on(_addStat._img, "load", function() { - _addStat._sending = false; - T() - }); - a8.on(_addStat._img, "error", function() { - _addStat._sending = false; - T() - }); - _addStat._binded = true - } - }; - window._addStat._reqQueue = []; - window._addStat._img = new Image(); - _addStat(5000, { - v : BMap.version - }); - function g(cN) { - var T = { - duration : 1000, - fps : 30, - delay : 0, - transition : aw.linear, - onStop : function() { - } - }; - this._anis = []; - if (cN) { - for ( var cL in cN) { - T[cL] = cN[cL] - } - } - this._opts = T; - if (aK(T.delay)) { - var cM = this; - setTimeout(function() { - cM.start() - }, T.delay) - } else { - if (T.delay != g.INFINITE) { - this.start() - } - } - } - g.INFINITE = "INFINITE"; - g.prototype.start = function() { - this._beginTime = aE(); - this._endTime = this._beginTime + this._opts.duration; - this._launch() - }; - g.prototype.add = function(T) { - this._anis.push(T) - }; - g.prototype._launch = function() { - var cM = this; - var T = aE(); - if (T >= cM._endTime) { - if (I(cM._opts.render)) { - cM._opts.render(cM._opts.transition(1)) - } - if (I(cM._opts.finish)) { - cM._opts.finish() - } - if (cM._anis.length > 0) { - var cL = cM._anis[0]; - cL._anis = [].concat(cM._anis.slice(1)); - cL.start() - } - return - } - cM.schedule = cM._opts.transition((T - cM._beginTime) - / cM._opts.duration); - if (I(cM._opts.render)) { - cM._opts.render(cM.schedule) - } - if (!cM.terminative) { - cM._timer = setTimeout(function() { - cM._launch() - }, 1000 / cM._opts.fps) - } - }; - g.prototype.stop = function(cL) { - this.terminative = true; - for ( var T = 0; T < this._anis.length; T++) { - this._anis[T].stop(); - this._anis[T] = null - } - this._anis.length = 0; - if (this._timer) { - clearTimeout(this._timer); - this._timer = null - } - this._opts.onStop(this.schedule); - if (cL) { - this._endTime = this._beginTime; - this._launch() - } - }; - g.prototype.cancel = function() { - if (this._timer) { - clearTimeout(this._timer) - } - this._endTime = this._beginTime; - this.schedule = 0 - }; - g.prototype.setFinishCallback = function(T) { - if (this._anis.length > 0) { - this._anis[this._anis.length - 1]._opts.finish = T - } else { - this._opts.finish = T - } - }; - var aw = { - linear : function(T) { - return T - }, - reverse : function(T) { - return 1 - T - }, - easeInQuad : function(T) { - return T * T - }, - easeInCubic : function(T) { - return Math.pow(T, 3) - }, - easeOutQuad : function(T) { - return -(T * (T - 2)) - }, - easeOutCubic : function(T) { - return Math.pow((T - 1), 3) + 1 - }, - easeInOutQuad : function(T) { - if (T < 0.5) { - return T * T * 2 - } else { - return -2 * (T - 2) * T - 1 - } - return - }, - easeInOutCubic : function(T) { - if (T < 0.5) { - return Math.pow(T, 3) * 4 - } else { - return Math.pow(T - 1, 3) * 4 + 1 - } - }, - easeInOutSine : function(T) { - return (1 - Math.cos(Math.PI * T)) / 2 - } - }; - aw["ease-in"] = aw.easeInQuad; - aw["ease-out"] = aw.easeOutQuad; - var m = !!(window.BMAP_PROTOCOL == "https"); - var x = m ? "https://sapi.map.baidu.com/" : "http://api.map.baidu.com/"; - var cc = { - imgPath : "static/BMap/images/", //******* �Ķ�ͼƬimages·�� ******* - cityNames : { - "\u5317\u4eac" : "bj", - "\u4e0a\u6d77" : "sh", - "\u6df1\u5733" : "sz", - "\u5e7f\u5dde" : "gz" - }, - fontFamily : "arial,sans-serif" - }; - if (a8.browser.firefox) { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur),crosshair", - defaultCursor : "-moz-grab", - draggingCursor : "-moz-grabbing" - }); - if (a8.platform.isWindows) { - cc.fontFamily = "arial,simsun,sans-serif" - } - } else { - if (a8.browser.chrome || a8.browser.safari) { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur) 2 6,crosshair", - defaultCursor : "url(" + cc.imgPath - + "openhand.cur) 8 8,default", - draggingCursor : "url(" + cc.imgPath - + "closedhand.cur) 8 8,move" - }) - } else { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur),crosshair", - defaultCursor : "url(" + cc.imgPath + "openhand.cur),default", - draggingCursor : "url(" + cc.imgPath + "closedhand.cur),move" - }) - } - } - function av(cM, cL, T) { - this.id = cM; - this.bounds = cL; - this.content = T - } - var bn = { - undo : 1, - redo : 2, - zoom : 4, - drag : 8, - move : 16, - mousewheel : 32, - toolbarOperation : 64, - stdMapCtrlDrag : 128, - dblclick : 256 - }; - function bI(cM, T) { - var cL = cM.style; - cL.left = T[0] + "px"; - cL.top = T[1] + "px" - } - function cw(T) { - if (a8.browser.ie > 0) { - T.unselectable = "on" - } else { - T.style.MozUserSelect = "none" - } - } - function y(T) { - return T && T.parentNode && T.parentNode.nodeType != 11 - } - function at(cL, T) { - a8.dom.insertHTML(cL, "beforeEnd", T); - return cL.lastChild - } - function bY(T) { - var cL = { - left : 0, - top : 0 - }; - while (T && T.offsetParent) { - cL.left += T.offsetLeft; - cL.top += T.offsetTop; - T = T.offsetParent - } - return cL - } - function aP(T) { - var T = window.event || T; - T.stopPropagation ? T.stopPropagation() : T.cancelBubble = true - } - function cC(T) { - var T = window.event || T; - T.preventDefault ? T.preventDefault() : T.returnValue = false; - return false - } - function co(T) { - aP(T); - return cC(T) - } - function cG() { - var T = document.documentElement, cL = document.body; - if (T && (T.scrollTop || T.scrollLeft)) { - return [ T.scrollTop, T.scrollLeft ] - } else { - if (cL) { - return [ cL.scrollTop, cL.scrollLeft ] - } else { - return [ 0, 0 ] - } - } - } - function ct(cL, T) { - if (!cL || !T) { - return - } - return Math.round(Math.sqrt(Math.pow(cL.x - T.x, 2) - + Math.pow(cL.y - T.y, 2))) - } - function O(T, cM) { - var cL = []; - cM = cM || function(cO) { - return cO - }; - for ( var cN in T) { - cL.push(cN + "=" + cM(T[cN])) - } - return cL.join("&") - } - function aa(cL, T, cM) { - var cN = document.createElement(cL); - if (cM) { - cN = document.createElementNS(cM, cL) - } - return a8.dom.setAttrs(cN, T || {}) - } - function aJ(T) { - if (T.currentStyle) { - return T.currentStyle - } else { - if (T.ownerDocument && T.ownerDocument.defaultView) { - return T.ownerDocument.defaultView.getComputedStyle(T, null) - } - } - } - function I(T) { - return typeof T == "function" - } - function aK(T) { - return typeof T == "number" - } - function b3(T) { - return typeof T == "string" - } - function ch(T) { - return typeof T != "undefined" - } - function cJ(T) { - return typeof T == "object" - } - function aY(T) { - return "[object Array]" == Object.prototype.toString.call(T) - } - var cf = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - function bV(cN) { - var cL = ""; - var cU, cS, cQ = ""; - var cT, cR, cP, cO = ""; - var cM = 0; - var T = /[^A-Za-z0-9\+\/\=]/g; - if (!cN || T.exec(cN)) { - return cN - } - cN = cN.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - do { - cT = cf.indexOf(cN.charAt(cM++)); - cR = cf.indexOf(cN.charAt(cM++)); - cP = cf.indexOf(cN.charAt(cM++)); - cO = cf.indexOf(cN.charAt(cM++)); - cU = (cT << 2) | (cR >> 4); - cS = ((cR & 15) << 4) | (cP >> 2); - cQ = ((cP & 3) << 6) | cO; - cL = cL + String.fromCharCode(cU); - if (cP != 64) { - cL = cL + String.fromCharCode(cS) - } - if (cO != 64) { - cL = cL + String.fromCharCode(cQ) - } - cU = cS = cQ = ""; - cT = cR = cP = cO = "" - } while (cM < cN.length); - return cL - } - var bg = a8.lang.Event; - function aA() { - return !!(a8.platform.isIphone || a8.platform.isIpad || a8.platform.isAndroid) - } - function bO() { - return !!(a8.platform.isWindows || a8.platform.isMacintosh || a8.platform.isX11) - } - function aE() { - return (new Date).getTime() - } - var cx = { - request : function(cL) { - var T = aa("script", { - src : cL, - type : "text/javascript", - charset : "utf-8" - }); - if (T.addEventListener) { - T.addEventListener("load", function(cN) { - var cM = cN.target; - cM.parentNode.removeChild(cM) - }, false) - } else { - if (T.attachEvent) { - T - .attachEvent( - "onreadystatechange", - function(cN) { - var cM = window.event.srcElement; - if (cM - && (cM.readyState == "loaded" || cM.readyState == "complete")) { - cM.parentNode.removeChild(cM) - } - }) - } - } - setTimeout(function() { - document.getElementsByTagName("head")[0].appendChild(T); - T = null - }, 1) - } - }; - function cA() { - } - a8.object.extend(cA, { - Request : { - INITIAL : -1, - WAITING : 0, - COMPLETED : 1 - }, - Dependency : { - control : [], - marker : [], - poly : [ "marker" ], - infowindow : [ "marker" ], - menu : [], - oppc : [], - opmb : [], - scommon : [], - local : [ "scommon" ], - route : [ "scommon" ], - othersearch : [ "scommon" ], - autocomplete : [ "scommon" ], - buslinesearch : [ "route" ], - hotspot : [] - }, - preLoaded : {}, - Config : { - _baseUrl : "js/", //x + "getmodules?v=1.3", //******* �Ķ���Դ��map,oppc,tile,control��·�� ******* - _timeout : 5000 - }, - delayFlag : false, - Module : { - _modules : {}, - _arrMdls : [] - }, - load : function(cL, cN) { - var T = this.current(cL); - if (T._status == this.Request.COMPLETED) { - return - } else { - if (T._status == this.Request.INITIAL) { - this.combine(cL); - this.pushUniqueMdl(cL); - var cM = this; - if (cM.delayFlag == false) { - cM.delayFlag = true; - window.setTimeout(function() { - var cO = cM.Config._baseUrl + "/modules" //"&mod=" - //+ cM.Module._arrMdls.join(","); - cx.request(cO); - cM.Module._arrMdls.length = 0; - cM.delayFlag = false - }, 1) - } - T._status = this.Request.WAITING - } - T._callbacks.push(cN) - } - }, - combine : function(T) { - if (T && this.Dependency[T]) { - var cM = this.Dependency[T]; - for ( var cL = 0; cL < cM.length; cL++) { - this.combine(cM[cL]); - if (!this.Module._modules[cM[cL]]) { - this.pushUniqueMdl(cM[cL]) - } - } - } - }, - pushUniqueMdl : function(cL) { - for ( var T = 0; T < this.Module._arrMdls.length; T++) { - if (this.Module._arrMdls[T] == cL) { - return - } - } - this.Module._arrMdls.push(cL) - }, - run : function(cM, cO) { - var cL = this.current(cM); - try { - eval(cO) - } catch (cP) { - return - } - cL._status = this.Request.COMPLETED; - for ( var cN = 0, T = cL._callbacks.length; cN < T; cN++) { - cL._callbacks[cN]() - } - cL._callbacks.length = 0 - }, - check : function(cL, cM) { - var T = this; - T.timeout = setTimeout(function() { - var cN = T.Module._modules[cL]._status; - if (cN != T.Request.COMPLETED) { - T.remove(cL); - T.load(cL, cM) - } else { - clearTimeout(T.timeout) - } - }, T.Config._timeout) - }, - current : function(cL) { - var T; - if (!this.Module._modules[cL]) { - this.Module._modules[cL] = {}; - this.Module._modules[cL]._status = this.Request.INITIAL; - this.Module._modules[cL]._callbacks = [] - } - T = this.Module._modules[cL]; - return T - }, - remove : function(cL) { - var T = this.current(cL); - delete T - } - }); - window._jsload = function(T, cL) { - cA.run(T, cL) - }; - function bu(T, cL) { - this.x = T || 0; - this.y = cL || 0 - } - bu.prototype.equals = function(T) { - return T && T.x == this.x && T.y == this.y - }; - function aH(cL, T) { - this.width = cL || 0; - this.height = T || 0 - } - aH.prototype.equals = function(T) { - return T && this.width == T.width && this.height == T.height - }; - function cm(T, cL) { - if (!T) { - return - } - this._position = T; - this.guid = "spot" + (cm.guid++); - cL = cL || {}; - this._text = cL.text || ""; - this._offsets = cL.offsets ? cL.offsets.slice(0) : [ 5, 5, 5, 5 ]; - this._userData = cL.userData || null; - this._minZoom = cL.minZoom || null; - this._maxZoom = cL.maxZoom || null - } - cm.guid = 0; - a8.extend(cm.prototype, { - initialize : function(T) { - if (this._minZoom == null) { - this._minZoom = T.config.minZoom - } - if (this._maxZoom == null) { - this._maxZoom = T.config.maxZoom - } - }, - setPosition : function(T) { - if (T instanceof cd) { - this._position = T - } - }, - getPosition : function() { - return this._position - }, - setText : function(T) { - this._text = T - }, - getText : function() { - return this._text - }, - setUserData : function(T) { - this._userData = T - }, - getUserData : function() { - return this._userData - } - }); - function cp() { - this._map = null; - this._container; - this._type = "control"; - this.blockInfoWindow = true; - this._visible = true - } - a8.lang.inherits(cp, a8.lang.Class, "Control"); - a8 - .extend( - cp.prototype, - { - initialize : function(T) { - this._map = T; - if (this._container) { - T.container.appendChild(this._container); - return this._container - } - return - }, - _i : function(T) { - if (!this._container && this.initialize - && I(this.initialize)) { - this._container = this.initialize(T) - } - this._opts = this._opts || { - printable : false - }; - this._setStyle(); - this._setPosition(); - if (this._container) { - this._container._jsobj = this - } - }, - _setStyle : function() { - var cL = this._container; - if (cL) { - var T = cL.style; - T.position = "absolute"; - T.zIndex = this._cZIndex || "10"; - T.MozUserSelect = "none"; - T.WebkitTextSizeAdjust = "none"; - if (!this._opts.printable) { - a8.dom.addClass(cL, "BMap_noprint") - } - a8.on(cL, "contextmenu", co) - } - }, - remove : function() { - this._map = null; - if (!this._container) { - return - } - this._container.parentNode - && this._container.parentNode - .removeChild(this._container); - this._container._jsobj = null; - this._container = null - }, - _render : function() { - this._container = at(this._map.container, - "
    "); - if (this._visible == false) { - a8.dom.hide(this._container) - } - return this._container - }, - _setPosition : function() { - this.setAnchor(this._opts.anchor) - }, - setAnchor : function(cN) { - if (this.anchorFixed || !aK(cN) || isNaN(cN) - || cN < BMAP_ANCHOR_TOP_LEFT - || cN > BMAP_ANCHOR_BOTTOM_RIGHT) { - cN = this.defaultAnchor - } - this._opts = this._opts || { - printable : false - }; - this._opts.offset = this._opts.offset - || this.defaultOffset; - var cM = this._opts.anchor; - this._opts.anchor = cN; - if (!this._container) { - return - } - var cP = this._container; - var T = this._opts.offset.width; - var cO = this._opts.offset.height; - cP.style.left = cP.style.top = cP.style.right = cP.style.bottom = "auto"; - switch (cN) { - case BMAP_ANCHOR_TOP_LEFT: - cP.style.top = cO + "px"; - cP.style.left = T + "px"; - break; - case BMAP_ANCHOR_TOP_RIGHT: - cP.style.top = cO + "px"; - cP.style.right = T + "px"; - break; - case BMAP_ANCHOR_BOTTOM_LEFT: - cP.style.bottom = cO + "px"; - cP.style.left = T + "px"; - break; - case BMAP_ANCHOR_BOTTOM_RIGHT: - cP.style.bottom = cO + "px"; - cP.style.right = T + "px"; - break; - default: - break - } - var cL = [ "TL", "TR", "BL", "BR" ]; - a8.dom.removeClass(this._container, "anchor" - + cL[cM]); - a8.dom.addClass(this._container, "anchor" + cL[cN]) - }, - getAnchor : function() { - return this._opts.anchor - }, - setOffset : function(T) { - if (!(T instanceof aH)) { - return - } - this._opts = this._opts || { - printable : false - }; - this._opts.offset = new aH(T.width, T.height); - if (!this._container) { - return - } - this.setAnchor(this._opts.anchor) - }, - getOffset : function() { - return this._opts.offset - }, - getDom : function() { - return this._container - }, - show : function() { - if (this._visible == true) { - return - } - this._visible = true; - if (this._container) { - a8.dom.show(this._container) - } - }, - hide : function() { - if (this._visible == false) { - return - } - this._visible = false; - if (this._container) { - a8.dom.hide(this._container) - } - }, - isPrintable : function() { - return !!this._opts.printable - }, - isVisible : function() { - if (!this._container && !this._map) { - return false - } - return !!this._visible - } - }); - window.BMAP_ANCHOR_TOP_LEFT = 0; - window.BMAP_ANCHOR_TOP_RIGHT = 1; - window.BMAP_ANCHOR_BOTTOM_LEFT = 2; - window.BMAP_ANCHOR_BOTTOM_RIGHT = 3; - window.BMAP_NAVIGATION_CONTROL_LARGE = 0; - window.BMAP_NAVIGATION_CONTROL_SMALL = 1; - window.BMAP_NAVIGATION_CONTROL_PAN = 2; - window.BMAP_NAVIGATION_CONTROL_ZOOM = 3; - function L(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false, - showZoomInfo : true - }; - a8.object.extend(this._opts, T); - this.defaultAnchor = BMAP_ANCHOR_TOP_LEFT; - this.defaultOffset = new aH(10, 10); - this.setAnchor(T.anchor); - this.setType(T.type); - this._asyncLoadCode() - } - a8.lang.inherits(L, cp, "NavigationControl"); - a8.extend(L.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setType : function(T) { - if (aK(T) && T >= BMAP_NAVIGATION_CONTROL_LARGE - && T <= BMAP_NAVIGATION_CONTROL_ZOOM) { - this._opts.type = T - } else { - this._opts.type = BMAP_NAVIGATION_CONTROL_LARGE - } - }, - getType : function() { - return this._opts.type - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function am(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - a8.object.extend(this._opts, T); - this._copyrightCollection = []; - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_LEFT; - this.defaultOffset = new aH(5, 2); - this.setAnchor(T.anchor); - this._canShow = true; - this.blockInfoWindow = false; - this._asyncLoadCode() - } - a8.lang.inherits(am, cp, "CopyrightControl"); - a8.object - .extend( - am.prototype, - { - initialize : function(T) { - this._map = T; - return this._container - }, - addCopyright : function(cM) { - if (!cM || !aK(cM.id) || isNaN(cM.id)) { - return - } - var T = { - bounds : null, - content : "" - }; - for ( var cL in cM) { - T[cL] = cM[cL] - } - var cN = this.getCopyright(cM.id); - if (cN) { - for ( var cO in T) { - cN[cO] = T[cO] - } - } else { - this._copyrightCollection.push(T) - } - }, - getCopyright : function(cM) { - for ( var cL = 0, T = this._copyrightCollection.length; cL < T; cL++) { - if (this._copyrightCollection[cL].id == cM) { - return this._copyrightCollection[cL] - } - } - }, - getCopyrightCollection : function() { - return this._copyrightCollection - }, - removeCopyright : function(cM) { - for ( var cL = 0, T = this._copyrightCollection.length; cL < T; cL++) { - if (this._copyrightCollection[cL].id == cM) { - r = this._copyrightCollection.splice(cL, 1); - cL--; - T = this._copyrightCollection.length - } - } - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function cK(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - this._opts = a8.extend(a8.extend(this._opts, { - size : new aH(150, 150), - padding : 5, - isOpen : false, - zoomInterval : 4 - }), T); - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_RIGHT; - this.defaultOffset = new aH(0, 0); - this._btnWidth = 13; - this._btnHeight = 13; - this.setAnchor(T.anchor); - this.setSize(this._opts.size); - this._asyncLoadCode() - } - a8.lang.inherits(cK, cp, "OverviewMapControl"); - a8.extend(cK.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setAnchor : function(T) { - cp.prototype.setAnchor.call(this, T) - }, - changeView : function() { - this.changeView._running = true; - this._opts.isOpen = !this._opts.isOpen; - if (!this._container) { - this.changeView._running = false - } - }, - setSize : function(T) { - if (!(T instanceof aH)) { - T = new aH(150, 150) - } - T.width = T.width > 0 ? T.width : 150; - T.height = T.height > 0 ? T.height : 150; - this._opts.size = T - }, - getSize : function() { - return this._opts.size - }, - isOpen : function() { - return this._opts.isOpen - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function bK(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - this._opts = a8.object.extend(a8.object.extend(this._opts, { - color : "black", - unit : "metric" - }), T); - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_LEFT; - this.defaultOffset = new aH(81, 18); - this.setAnchor(T.anchor); - this._units = { - metric : { - name : "metric", - conv : 1, - incon : 1000, - u1 : "\u7c73", - u2 : "\u516c\u91cc" - }, - us : { - name : "us", - conv : 3.2808, - incon : 5280, - u1 : "\u82f1\u5c3a", - u2 : "\u82f1\u91cc" - } - }; - if (!this._units[this._opts.unit]) { - this._opts.unit = "metric" - } - this._scaleText = null; - this._numberArray = {}; - this._asyncLoadCode() - } - window.BMAP_UNIT_METRIC = "metric"; - window.BMAP_UNIT_IMPERIAL = "us"; - a8.lang.inherits(bK, cp, "ScaleControl"); - a8.object.extend(bK.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setColor : function(T) { - this._opts.color = T + "" - }, - getColor : function() { - return this._opts.color - }, - setUnit : function(T) { - this._opts.unit = this._units[T] && this._units[T].name - || this._opts.unit - }, - getUnit : function() { - return this._opts.unit - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - window.BMAP_MAPTYPE_CONTROL_HORIZONTAL = 0; - window.BMAP_MAPTYPE_CONTROL_DROPDOWN = 1; - function aL(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false, - mapTypes : [ BMAP_NORMAL_MAP, BMAP_SATELLITE_MAP, BMAP_HYBRID_MAP, - BMAP_PERSPECTIVE_MAP ], - type : BMAP_MAPTYPE_CONTROL_HORIZONTAL - }; - this.defaultAnchor = BMAP_ANCHOR_TOP_RIGHT; - this.defaultOffset = new aH(10, 10); - this.setAnchor(T.anchor); - this._opts = a8.extend(a8.extend(this._opts, { - offset : this.defaultOffset, - enableSwitch : true - }), T); - if (aY(T.mapTypes)) { - this._opts.mapTypes = T.mapTypes.slice(0) - } - this._asyncLoadCode() - } - a8.lang.inherits(aL, cp, "MapTypeControl"); - a8.object.extend(aL.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function cz(cL) { - a8.lang.Class.call(this); - this._opts = { - container : null, - cursor : "default" - }; - this._opts = a8.extend(this._opts, cL); - this._type = "contextmenu"; - this._map = null; - this._container; - this._shadow; - this._left = 0; - this._top = 0; - this._items = []; - this._rItems = []; - this._dividers = []; - this.curPixel = null; - this.curPoint = null; - this._isOpen = false; - var T = this; - cA.load("menu", function() { - T._draw() - }) - } - a8.lang.inherits(cz, a8.lang.Class, "ContextMenu"); - a8.object.extend(cz.prototype, { - initialize : function(cL, T) { - this._map = cL; - this._overlay = T || null - }, - remove : function() { - this._map = this._overlay = null - }, - addItem : function(cM) { - if (!cM || cM._type != "menuitem" || cM._text == "" - || cM._width <= 0) { - return - } - for ( var cL = 0, T = this._items.length; cL < T; cL++) { - if (this._items[cL] === cM) { - return - } - } - this._items.push(cM); - this._rItems.push(cM) - }, - removeItem : function(cM) { - if (!cM || cM._type != "menuitem") { - return - } - for ( var cL = 0, T = this._items.length; cL < T; cL++) { - if (this._items[cL] === cM) { - this._items[cL].remove(); - this._items.splice(cL, 1); - T-- - } - } - for ( var cL = 0, T = this._rItems.length; cL < T; cL++) { - if (this._rItems[cL] === cM) { - this._rItems[cL].remove(); - this._rItems.splice(cL, 1); - T-- - } - } - }, - addSeparator : function() { - this._items.push( { - _type : "divider", - _dIndex : this._dividers.length - }); - this._dividers.push( { - dom : null - }) - }, - removeSeparator : function(cL) { - if (!this._dividers[cL]) { - return - } - for ( var cM = 0, T = this._items.length; cM < T; cM++) { - if (this._items[cM] && this._items[cM]._type == "divider" - && this._items[cM]._dIndex == cL) { - this._items.splice(cM, 1); - T-- - } - if (this._items[cM] && this._items[cM]._type == "divider" - && this._items[cM]._dIndex > cL) { - this._items[cM]._dIndex-- - } - } - this._dividers.splice(cL, 1) - }, - getDom : function() { - return this._container - }, - show : function() { - if (this._isOpen == true) { - return - } - this._isOpen = true - }, - hide : function() { - if (this._isOpen == false) { - return - } - this._isOpen = false - }, - setCursor : function(T) { - if (!T) { - return - } - this._opts.cursor = T - }, - getItem : function(T) { - return this._rItems[T] - } - }); - function be(cM, cN, cL) { - if (!cM || !I(cN)) { - return - } - a8.lang.Class.call(this); - this._opts = { - width : 100, - id : "" - }; - cL = cL || {}; - this._opts.width = (cL.width * 1) ? cL.width : 100; - this._opts.id = cL.id ? cL.id : ""; - this._text = cM + ""; - this._callback = cN; - this._map = null; - this._type = "menuitem"; - this._contextmenu = null; - this._container = null; - this._enabled = true; - var T = this; - cA.load("menu", function() { - T._draw() - }) - } - a8.lang.inherits(be, a8.lang.Class, "MenuItem"); - a8.object.extend(be.prototype, { - initialize : function(T, cL) { - this._map = T; - this._contextmenu = cL - }, - remove : function() { - this._contextmenu = null; - this._map = null - }, - setText : function(T) { - if (!T) { - return - } - this._text = T + "" - }, - getDom : function() { - return this._container - }, - enable : function() { - this._enabled = true - }, - disable : function() { - this._enabled = false - } - }); - function bN(T, cL) { - if (T && !cL) { - cL = T - } - this._sw = this._ne = null; - this._swLng = this._swLat = null; - this._neLng = this._neLat = null; - if (T) { - this._sw = new cd(T.lng, T.lat); - this._ne = new cd(cL.lng, cL.lat); - this._swLng = T.lng; - this._swLat = T.lat; - this._neLng = cL.lng; - this._neLat = cL.lat - } - } - a8.object.extend(bN.prototype, { - isEmpty : function() { - return !this._sw || !this._ne - }, - equals : function(T) { - if (!(T instanceof bN) || this.isEmpty()) { - return false - } - return this.getSouthWest().equals(T.getSouthWest()) - && this.getNorthEast().equals(T.getNorthEast()) - }, - getSouthWest : function() { - return this._sw - }, - getNorthEast : function() { - return this._ne - }, - containsBounds : function(T) { - if (!(T instanceof bN) || this.isEmpty() || T.isEmpty()) { - return false - } - return (T._swLng > this._swLng && T._neLng < this._neLng - && T._swLat > this._swLat && T._neLat < this._neLat) - }, - getCenter : function() { - if (this.isEmpty()) { - return null - } - return new cd((this._swLng + this._neLng) / 2, - (this._swLat + this._neLat) / 2) - }, - intersects : function(cM) { - if (!(cM instanceof bN)) { - return null - } - if (Math.max(cM._swLng, cM._neLng) < Math.min(this._swLng, - this._neLng) - || Math.min(cM._swLng, cM._neLng) > Math.max(this._swLng, - this._neLng) - || Math.max(cM._swLat, cM._neLat) < Math.min(this._swLat, - this._neLat) - || Math.min(cM._swLat, cM._neLat) > Math.max(this._swLat, - this._neLat)) { - return null - } - var cO = Math.max(this._swLng, cM._swLng); - var cL = Math.min(this._neLng, cM._neLng); - var cN = Math.max(this._swLat, cM._swLat); - var T = Math.min(this._neLat, cM._neLat); - return new bN(new cd(cO, cN), new cd(cL, T)) - }, - containsPoint : function(T) { - if (!(T instanceof cd) || this.isEmpty()) { - return false - } - return (T.lng >= this._swLng && T.lng <= this._neLng - && T.lat >= this._swLat && T.lat <= this._neLat) - }, - extend : function(T) { - if (!(T instanceof cd)) { - return - } - var cL = T.lng, cM = T.lat; - if (!this._sw) { - this._sw = new cd(0, 0) - } - if (!this._ne) { - this._ne = new cd(0, 0) - } - if (!this._swLng || this._swLng > cL) { - this._sw.lng = this._swLng = cL - } - if (!this._neLng || this._neLng < cL) { - this._ne.lng = this._neLng = cL - } - if (!this._swLat || this._swLat > cM) { - this._sw.lat = this._swLat = cM - } - if (!this._neLat || this._neLat < cM) { - this._ne.lat = this._neLat = cM - } - }, - toSpan : function() { - if (this.isEmpty()) { - return new cd(0, 0) - } - return new cd(Math.abs(this._neLng - this._swLng), Math - .abs(this._neLat - this._swLat)) - } - }); - function cd(T, cL) { - if (isNaN(T)) { - T = bV(T); - T = isNaN(T) ? 0 : T - } - if (b3(T)) { - T = parseFloat(T) - } - if (isNaN(cL)) { - cL = bV(cL); - cL = isNaN(cL) ? 0 : cL - } - if (b3(cL)) { - cL = parseFloat(cL) - } - this.lng = T; - this.lat = cL - } - cd.isInRange = function(T) { - return T && T.lng <= 180 && T.lng >= -180 && T.lat <= 74 - && T.lat >= -74 - }; - cd.prototype.equals = function(T) { - return T && this.lat == T.lat && this.lng == T.lng - }; - function bd() { - } - bd.prototype.lngLatToPoint = function() { - throw "lngLatToPoint\u65b9\u6cd5\u672a\u5b9e\u73b0" - }; - bd.prototype.pointToLngLat = function() { - throw "pointToLngLat\u65b9\u6cd5\u672a\u5b9e\u73b0" - }; - function b6() { - } - a8 - .extend( - b6, - { - num : { - bj : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 6) - }, - gz : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - }, - sz : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - }, - sh : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - } - }, - correct_pts : { - bj : [ { - j : 116.305687, - w : 39.990912, - utm_x : 12947230.73, - utm_y : 4836903.65, - x : 630412, - y : 547340 - }, { - j : 116.381837, - w : 40.000198, - utm_x : 12955707.8, - utm_y : 4838247.62, - x : 667412, - y : 561832 - }, { - j : 116.430651, - w : 39.995216, - utm_x : 12961141.81, - utm_y : 4837526.55, - x : 686556, - y : 573372 - }, { - j : 116.474111, - w : 39.976323, - utm_x : 12965979.81, - utm_y : 4834792.55, - x : 697152, - y : 586816 - }, { - j : 116.280328, - w : 39.953159, - utm_x : 12944407.75, - utm_y : 4831441.53, - x : 603272, - y : 549976 - }, { - j : 116.316117, - w : 39.952496, - utm_x : 12948391.8, - utm_y : 4831345.64, - x : 618504, - y : 557872 - }, { - j : 116.350477, - w : 39.938107, - utm_x : 12952216.78, - utm_y : 4829264.65, - x : 627044, - y : 568220 - }, { - j : 116.432025, - w : 39.947158, - utm_x : 12961294.76, - utm_y : 4830573.59, - x : 666280, - y : 584016 - }, { - j : 116.46873, - w : 39.949516, - utm_x : 12965380.79, - utm_y : 4830914.63, - x : 683328, - y : 591444 - }, { - j : 116.280077, - w : 39.913823, - utm_x : 12944379.8, - utm_y : 4825753.62, - x : 586150, - y : 558552 - }, { - j : 116.308625, - w : 39.91374, - utm_x : 12947557.79, - utm_y : 4825741.62, - x : 598648, - y : 564732 - }, { - j : 116.369853, - w : 39.912979, - utm_x : 12954373.73, - utm_y : 4825631.62, - x : 624561, - y : 578039 - }, { - j : 116.433552, - w : 39.914694, - utm_x : 12961464.75, - utm_y : 4825879.53, - x : 652972, - y : 591348 - }, { - j : 116.457034, - w : 39.914273, - utm_x : 12964078.78, - utm_y : 4825818.67, - x : 663028, - y : 596444 - }, { - j : 116.490927, - w : 39.914127, - utm_x : 12967851.77, - utm_y : 4825797.57, - x : 677968, - y : 604188 - }, { - j : 116.483839, - w : 39.877198, - utm_x : 12967062.73, - utm_y : 4820460.67, - x : 658596, - y : 610312 - }, { - j : 116.405777, - w : 39.864461, - utm_x : 12958372.82, - utm_y : 4818620.62, - x : 619256, - y : 596088 - }, { - j : 116.35345, - w : 39.859774, - utm_x : 12952547.74, - utm_y : 4817943.6, - x : 594633, - y : 585851 - }, { - j : 116.403818, - w : 39.9141, - utm_x : 12958154.74, - utm_y : 4825793.66, - x : 639699, - y : 585226 - }, { - j : 116.318111, - w : 39.891101, - utm_x : 12948613.78, - utm_y : 4822469.56, - x : 592856, - y : 571480 - }, { - j : 116.413047, - w : 39.907238, - utm_x : 12959182.12, - utm_y : 4824801.76, - x : 640680, - y : 588704 - }, { - j : 116.390843, - w : 39.906113, - utm_x : 12956710.35, - utm_y : 4824639.16, - x : 630620, - y : 584108 - }, { - j : 116.446527, - w : 39.899438, - utm_x : 12962909.14, - utm_y : 4823674.4, - x : 651752, - y : 597416 - }, { - j : 116.388665, - w : 39.95527, - utm_x : 12956467.9, - utm_y : 4831746.87, - x : 650656, - y : 572800 - }, { - j : 116.398343, - w : 39.939704, - utm_x : 12957545.26, - utm_y : 4829495.6, - x : 648036, - y : 578452 - }, { - j : 116.355101, - w : 39.973581, - utm_x : 12952731.53, - utm_y : 4834395.82, - x : 643268, - y : 560944 - }, { - j : 116.380727, - w : 39.88464, - utm_x : 12955584.23, - utm_y : 4821535.94, - x : 616920, - y : 586496 - }, { - j : 116.360843, - w : 39.946452, - utm_x : 12953370.73, - utm_y : 4830471.48, - x : 635293, - y : 568765 - }, { - j : 116.340955, - w : 39.973421, - utm_x : 12951156.79, - utm_y : 4834372.67, - x : 638420, - y : 558632 - }, { - j : 116.322585, - w : 40.023941, - utm_x : 12949111.83, - utm_y : 4841684.79, - x : 652135, - y : 543802 - }, { - j : 116.356486, - w : 39.883341, - utm_x : 12952885.71, - utm_y : 4821348.24, - x : 606050, - y : 581443 - }, { - j : 116.339592, - w : 39.992259, - utm_x : 12951005.06, - utm_y : 4837098.59, - x : 645664, - y : 554400 - }, { - j : 116.3778, - w : 39.86392, - utm_x : 12955258.4, - utm_y : 4818542.48, - x : 606848, - y : 590328 - }, { - j : 116.377354, - w : 39.964124, - utm_x : 12955208.75, - utm_y : 4833027.64, - x : 649911, - y : 568581 - }, { - j : 116.361837, - w : 39.963897, - utm_x : 12953481.39, - utm_y : 4832994.8, - x : 643286, - y : 565175 - }, { - j : 116.441397, - w : 39.939403, - utm_x : 12962338.06, - utm_y : 4829452.07, - x : 666772, - y : 587728 - }, { - j : 116.359176, - w : 40.006631, - utm_x : 12953185.16, - utm_y : 4839178.78, - x : 660440, - y : 555411 - } ], - sz : [ { - w : 22.498861, - utm_x : 12677279.029193671, - utm_y : 2555027.9501714734, - j : 113.880696, - y : 1104472, - x : 947240 - }, { - w : 22.500706, - utm_x : 12683920.978881944, - utm_y : 2555248.973138607, - j : 113.940361, - y : 1122320, - x : 974864 - }, { - w : 22.576848, - utm_x : 12675897.984563945, - utm_y : 2564373.058056766, - j : 113.86829, - y : 1074048, - x : 979136 - }, { - w : 22.55689, - utm_x : 12680064.05051775, - utm_y : 2561981.0013635466, - j : 113.905714, - y : 1092484, - x : 986240 - }, { - w : 22.58066, - utm_x : 12678671.98513852, - utm_y : 2564829.983373251, - j : 113.893209, - y : 1080528, - x : 992088 - }, { - w : 22.595751, - utm_x : 12678298.949465925, - utm_y : 2566638.9913895614, - j : 113.889858, - y : 1074484, - x : 997960 - }, { - w : 22.557499, - utm_x : 12684523.001238672, - utm_y : 2562053.9875916084, - j : 113.945769, - y : 1104696, - x : 1004564 - }, { - w : 22.648419, - utm_x : 12676422.97299485, - utm_y : 2572954.0513219936, - j : 113.873006, - y : 1051384, - x : 1015916 - }, { - w : 22.562664, - utm_x : 12690460.958807131, - utm_y : 2562673.0054078405, - j : 113.99911, - y : 1119860, - x : 1030228 - }, { - w : 22.646618, - utm_x : 12683008.037804369, - utm_y : 2572738.0652955617, - j : 113.93216, - y : 1070324, - x : 1041496 - }, { - w : 22.571091, - utm_x : 12695789.992135335, - utm_y : 2563683.019582462, - j : 114.046981, - y : 1131924, - x : 1055628 - }, { - w : 22.704467, - utm_x : 12682276.994753957, - utm_y : 2579677.075645295, - j : 113.925593, - y : 1048536, - x : 1066348 - }, { - w : 22.547152, - utm_x : 12702917.96800879, - utm_y : 2560813.9850610085, - j : 114.111012, - y : 1160352, - x : 1072596 - }, { - w : 22.546192, - utm_x : 12704502.952164687, - utm_y : 2560698.9417545213, - j : 114.12525, - y : 1165256, - x : 1078452 - }, { - w : 22.5714, - utm_x : 12702350.00978689, - utm_y : 2563720.0558210905, - j : 114.10591, - y : 1150556, - x : 1081960 - }, { - w : 22.555004, - utm_x : 12704883.001041513, - utm_y : 2561754.9738317807, - j : 114.128664, - y : 1163304, - x : 1084172 - }, { - w : 22.551925, - utm_x : 12706255.028694374, - utm_y : 2561385.978019464, - j : 114.140989, - y : 1168216, - x : 1088116 - }, { - w : 22.693756, - utm_x : 12690318.02302569, - utm_y : 2578392.0635360866, - j : 113.997826, - y : 1075100, - x : 1092860 - }, { - w : 22.573769, - utm_x : 12705731.042149788, - utm_y : 2564004.003107545, - j : 114.136282, - y : 1159404, - x : 1096572 - }, { - w : 22.583238, - utm_x : 12706369.021093281, - utm_y : 2565139.002548978, - j : 114.142013, - y : 1157896, - x : 1103632 - }, { - w : 22.605844, - utm_x : 12704694.980375737, - utm_y : 2567848.984570506, - j : 114.126975, - y : 1145540, - x : 1107972 - }, { - w : 22.637228, - utm_x : 12702545.043656897, - utm_y : 2571612.010208761, - j : 114.107662, - y : 1128764, - x : 1114460 - }, { - w : 22.62496, - utm_x : 12707132.013185183, - utm_y : 2570140.9407190788, - j : 114.148867, - y : 1145732, - x : 1127028 - }, { - w : 22.644524, - utm_x : 12707016.01701364, - utm_y : 2572486.9446672536, - j : 114.147825, - y : 1138800, - x : 1135876 - }, { - w : 22.640188, - utm_x : 12711515.0431873, - utm_y : 2571966.966986786, - j : 114.18824, - y : 1152692, - x : 1151836 - }, { - w : 22.59807, - utm_x : 12720011.039168343, - utm_y : 2566916.995355996, - j : 114.26456, - y : 1191212, - x : 1165180 - }, { - w : 22.668221, - utm_x : 12714081.987256048, - utm_y : 2575329.007304823, - j : 114.211299, - y : 1150576, - x : 1175404 - }, { - w : 22.702591, - utm_x : 12717292.031020584, - utm_y : 2579452.0022288463, - j : 114.240135, - y : 1148204, - x : 1204600 - }, { - w : 22.731786, - utm_x : 12717795.9798388, - utm_y : 2582955.0308636553, - j : 114.244662, - y : 1139532, - x : 1220540 - }, { - w : 22.727494, - utm_x : 12720675.957721734, - utm_y : 2582439.9980541077, - j : 114.270533, - y : 1148992, - x : 1230084 - }, { - w : 22.716335, - utm_x : 12725500.040345404, - utm_y : 2581101.0132384477, - j : 114.313868, - y : 1166316, - x : 1244102 - } ], - gz : [ { - j : 113.335098, - w : 23.147289, - utm_x : 12616542.68, - utm_y : 2632892.7, - x : 1129109, - y : 1073920 - }, { - j : 113.320932, - w : 23.146956, - utm_x : 12614965.71, - utm_y : 2632852.62, - x : 1125620, - y : 1071640 - }, { - j : 113.321435, - w : 23.140119, - utm_x : 12615021.7, - utm_y : 2632029.65, - x : 1124032, - y : 1072882 - }, { - j : 113.321471, - w : 23.119165, - utm_x : 12615025.71, - utm_y : 2629507.68, - x : 1118932, - y : 1076530 - }, { - j : 113.340201, - w : 23.118616, - utm_x : 12617110.75, - utm_y : 2629441.61, - x : 1123238, - y : 1079667 - }, { - j : 113.358068, - w : 23.116323, - utm_x : 12619099.71, - utm_y : 2629165.66, - x : 1126968, - y : 1083116 - }, { - j : 113.357529, - w : 23.131271, - utm_x : 12619039.71, - utm_y : 2630964.68, - x : 1130508, - y : 1080440 - }, { - j : 113.365811, - w : 23.150595, - utm_x : 12619961.67, - utm_y : 2633290.66, - x : 1137205, - y : 1078567 - }, { - j : 113.294145, - w : 23.118467, - utm_x : 12611983.76, - utm_y : 2629423.68, - x : 1112245, - y : 1072043 - }, { - j : 113.28615, - w : 23.121525, - utm_x : 12611093.75, - utm_y : 2629791.7, - x : 1110993, - y : 1070197 - }, { - j : 113.307152, - w : 23.055497, - utm_x : 12613431.71, - utm_y : 2621847.21, - x : 1100144, - y : 1085123 - }, { - j : 113.333445, - w : 23.052687, - utm_x : 12616358.66, - utm_y : 2621509.2, - x : 1105784, - y : 1089948 - }, { - j : 113.347476, - w : 23.048755, - utm_x : 12617920.6, - utm_y : 2621036.24, - x : 1108099, - y : 1093064 - }, { - j : 113.385774, - w : 23.036574, - utm_x : 12622183.96, - utm_y : 2619571.12, - x : 1113850, - y : 1101834 - }, { - j : 113.364185, - w : 22.89798, - utm_x : 12619780.66, - utm_y : 2602910.64, - x : 1073186, - y : 1123374 - }, { - j : 113.404577, - w : 22.906481, - utm_x : 12624277.13, - utm_y : 2603932.06, - x : 1084888, - y : 1128692 - }, { - j : 113.430856, - w : 22.913156, - utm_x : 12627202.52, - utm_y : 2604734.12, - x : 1092892, - y : 1131761 - }, { - j : 113.384554, - w : 22.933021, - utm_x : 12622048.15, - utm_y : 2607121.32, - x : 1086975, - y : 1120403 - }, { - j : 113.263566, - w : 23.146333, - utm_x : 12608579.68, - utm_y : 2632777.63, - x : 1111742, - y : 1062098 - }, { - j : 113.239213, - w : 23.152996, - utm_x : 12605868.69, - utm_y : 2633579.69, - x : 1107616, - y : 1056740 - }, { - j : 113.253865, - w : 23.131628, - utm_x : 12607499.76, - utm_y : 2631007.65, - x : 1105912, - y : 1062966 - }, { - j : 113.240767, - w : 23.088434, - utm_x : 12606041.68, - utm_y : 2625809.7, - x : 1092270, - y : 1068184 - }, { - j : 113.279628, - w : 23.088284, - utm_x : 12610367.72, - utm_y : 2625791.65, - x : 1101412, - y : 1074883 - }, { - j : 113.462271, - w : 23.107058, - utm_x : 12630699.66, - utm_y : 2628050.7, - x : 1148752, - y : 1101736 - }, { - j : 113.401618, - w : 23.052957, - utm_x : 12623947.73, - utm_y : 2621541.68, - x : 1121925, - y : 1101535 - }, { - j : 113.422504, - w : 23.05905, - utm_x : 12626272.77, - utm_y : 2622274.61, - x : 1128470, - y : 1104049 - }, { - j : 113.362506, - w : 23.107149, - utm_x : 12619593.75, - utm_y : 2628061.65, - x : 1125835, - y : 1085505 - }, { - j : 113.419629, - w : 23.143176, - utm_x : 12625952.73, - utm_y : 2632397.61, - x : 1148133, - y : 1089052 - }, { - j : 113.23315, - w : 23.062251, - utm_x : 12605193.75, - utm_y : 2622659.67, - x : 1084184, - y : 1071368 - }, { - j : 113.314525, - w : 23.101412, - utm_x : 12614252.48, - utm_y : 2627371.29, - x : 1113011, - y : 1078426 - }, { - j : 113.307947, - w : 23.131369, - utm_x : 12613520.21, - utm_y : 2630976.47, - x : 1118622, - y : 1072198 - } ], - sh : [ { - j : 121.524411, - w : 31.245875, - utm_x : 13528182.75, - utm_y : 3642354.51, - x : 1086581, - y : 1065728 - }, { - j : 121.419229, - w : 31.244887, - utm_x : 13516473.81, - utm_y : 3642226.51, - x : 1032616, - y : 1029148 - }, { - j : 121.405637, - w : 31.237871, - utm_x : 13514960.74, - utm_y : 3641317.54, - x : 1022724, - y : 1027244 - }, { - j : 121.415348, - w : 31.222879, - utm_x : 13516041.78, - utm_y : 3639375.47, - x : 1018548, - y : 1036980 - }, { - j : 121.422561, - w : 31.224261, - utm_x : 13516844.73, - utm_y : 3639554.48, - x : 1022976, - y : 1038908 - }, { - j : 121.412581, - w : 31.204148, - utm_x : 13515733.75, - utm_y : 3636949.48, - x : 1006568, - y : 1043696 - }, { - j : 121.443025, - w : 31.206202, - utm_x : 13519122.8, - utm_y : 3637215.49, - x : 1022656, - y : 1053704 - }, { - j : 121.524061, - w : 31.246917, - utm_x : 13528143.79, - utm_y : 3642489.52, - x : 1082052, - y : 1064124 - }, { - j : 121.529343, - w : 31.217769, - utm_x : 13528731.78, - utm_y : 3638713.59, - x : 1072696, - y : 1079064 - }, { - j : 121.530268, - w : 31.210341, - utm_x : 13528834.75, - utm_y : 3637751.53, - x : 1068748, - y : 1082416 - }, { - j : 121.511601, - w : 31.227303, - utm_x : 13526756.73, - utm_y : 3639948.53, - x : 1069276, - y : 1068716 - }, { - j : 121.4966, - w : 31.243614, - utm_x : 13525086.81, - utm_y : 3642061.58, - x : 1071220, - y : 1056805 - }, { - j : 121.485021, - w : 31.26138, - utm_x : 13523797.82, - utm_y : 3644363.54, - x : 1075708, - y : 1045540 - }, { - j : 121.465114, - w : 31.278803, - utm_x : 13521581.76, - utm_y : 3646621.48, - x : 1073740, - y : 1031268 - }, { - j : 121.454784, - w : 31.266566, - utm_x : 13520431.82, - utm_y : 3645035.58, - x : 1063591, - y : 1033191 - }, { - j : 121.46851, - w : 31.24951, - utm_x : 13521959.81, - utm_y : 3642825.48, - x : 1060200, - y : 1044520 - }, { - j : 121.446384, - w : 31.248422, - utm_x : 13519496.73, - utm_y : 3642684.51, - x : 1048784, - y : 1037750 - }, { - j : 121.509499, - w : 31.246469, - utm_x : 13526522.73, - utm_y : 3642431.47, - x : 1079309, - y : 1060105 - }, { - j : 121.481643, - w : 31.283943, - utm_x : 13523421.78, - utm_y : 3647287.68, - x : 1087096, - y : 1035304 - }, { - j : 121.508054, - w : 31.280609, - utm_x : 13526361.87, - utm_y : 3646855.56, - x : 1098432, - y : 1045648 - }, { - j : 121.493854, - w : 31.19121, - utm_x : 13524781.12, - utm_y : 3635274.07, - x : 1039624, - y : 1077288 - }, { - j : 121.500079, - w : 31.185541, - utm_x : 13525474.09, - utm_y : 3634540.04, - x : 1039960, - y : 1081640 - }, { - j : 121.484482, - w : 31.202846, - utm_x : 13523737.82, - utm_y : 3636780.87, - x : 1041388, - y : 1069232 - }, { - j : 121.480877, - w : 31.189587, - utm_x : 13523336.51, - utm_y : 3635063.92, - x : 1032484, - y : 1073640 - }, { - j : 121.502652, - w : 31.195209, - utm_x : 13525760.52, - utm_y : 3635791.9, - x : 1046384, - y : 1078728 - } ] - }, - getLnglatIndex : function(cN, cR, cQ) { - var cM = 0; - var cL = 0; - var cS = 10000000, cP = 1000000000; - for ( var cO = 0; cO < this.correct_pts[cN].length; cO++) { - var T = this.getDis(this.correct_pts[cN][cO].x, - this.correct_pts[cN][cO].y, cR, cQ); - if (T < cP) { - if (T < cS) { - cP = cS; - cS = T; - cL = cM; - cM = cO - } else { - sedMinDis = T; - cL = cO - } - } - } - return { - lt : cM, - rb : cL - } - }, - getOMapIndex_mm : function(cN, cS, cR) { - var cM = 0; - var cL = 0; - var cQ = 1294723000, cP = 1294723000; - for ( var cO = 0; cO < this.correct_pts[cN].length; cO++) { - var T = this.getDis( - this.correct_pts[cN][cO].utm_x, - this.correct_pts[cN][cO].utm_y, cS, cR); - if (T < cP) { - if (T < cQ) { - cP = cQ; - cQ = T; - cL = cM; - cM = cO - } else { - sedMinDis = T; - cL = cO - } - } - } - return { - lt : cM, - rb : cL - } - }, - getDis : function(T, cN, cL, cM) { - return Math.abs(T - cL) + Math.abs(cN - cM) - }, - toMap : function(cN, T, cO) { - var cL = (T - cO) * this.num[cN].num; - var cM = (T + cO) * this.num[cN].num - * this.num[cN].num2; - return { - x : cL, - y : cM - } - }, - fromMap : function(cN, T, cO) { - cO = cO / this.num[cN].num2; - var cL = (T + cO) / (this.num[cN].num * 2); - var cM = (cO - T) / (this.num[cN].num * 2); - return { - x : cL, - y : cM - } - }, - getDgPix_mm : function(cO, cT, cP) { - var cS = this.fromMap(cO, - this.correct_pts[cO][cT].x, - this.correct_pts[cO][cT].y); - var cQ = this.fromMap(cO, - this.correct_pts[cO][cP].x, - this.correct_pts[cO][cP].y); - var cY = cS.x, cL = cS.y; - var cX = cQ.x, T = cQ.y; - var cV = this.correct_pts[cO][cT].utm_x, cN = this.correct_pts[cO][cT].utm_y; - var cR = this.correct_pts[cO][cP].utm_x, cM = this.correct_pts[cO][cP].utm_y; - var cW = Math.abs((cR - cV) * 100000 / (cX - cY)); - var cU = Math.abs((cM - cN) * 100000 / (T - cL)); - return { - j : cW, - w : cU, - x : 100000 / cW, - y : 100000 / cU - } - }, - getPx_mm : function(c1, cX, cW, cO, cN) { - var cM = this.correct_pts[c1][cO]; - var T = this.correct_pts[c1][cO]; - var cU = this.getDgPix_mm(c1, cO, cN); - var cQ = this.fromMap(c1, cM.x, cM.y); - var cP = T.utm_x, c3 = T.utm_y; - var c2 = cX, cV = cW; - var c0 = cQ.x; - var cL = cQ.y; - var cS = c2 - cP, cZ = cV - c3; - var cT = cS * cU.x + c0; - var cR = -cZ * cU.y + cL; - var cY = this.toMap(c1, cT, cR); - return cY - }, - getJw_mm : function(cZ, cU, cT, cP, cO) { - var cS = this.correct_pts[cZ][cP]; - var cL = this.correct_pts[cZ][cP]; - var cV = this.getDgPix_mm(cZ, cP, cO); - var cX = this.fromMap(cZ, cU, cT); - var cN = this.fromMap(cZ, cS.x, cS.y); - var cQ = cL.utm_x, c0 = cL.utm_y; - var cY = cN.x; - var cM = cN.y; - var c1 = cX.x - cY, cW = cM - cX.y; - var cR = c1 / cV.x + cQ; - var T = cW / cV.y + c0; - return { - lng : cR, - lat : T - } - }, - getOMap_pts : function(cL, T) { - return this.getOMap_index(cL, T.lng, T.lat, T.lt, - T.rb) - }, - getMapJw_pts : function(cL, T) { - return this.getMapJw_index(cL, T.lng, - 9998336 - T.lat, T.lt, T.rb) - }, - getOMap_index : function(cQ, cP, cO, T, cN) { - if (!T || !cN) { - var cL = this.getOMapIndex_mm(cQ, cP, cO) - } else { - var cL = { - lt : T, - rb : cN - } - } - var cM = this.getPx_mm(cQ, cP, cO, cL.lt, cL.rb); - return { - x : Math.floor(cM.x), - y : 9998336 - Math.floor(cM.y), - lt : cL.lt, - rb : cL.rb - } - }, - getMapJw_index : function(cP, cM, cQ, cL, cO) { - if (!cL || !cO) { - var cN = this.getLnglatIndex(cP, cM, cQ) - } else { - var cN = { - lt : cL, - rb : cO - } - } - var T = this.getJw_mm(cP, cM, cQ, cN.lt, cN.rb); - return { - lng : T.lng, - lat : T.lat, - lt : cN.lt, - rb : cN.rb - } - } - }); - function ba() { - } - ba.prototype = new bd(); - a8.extend(ba, - { - EARTHRADIUS : 6370996.81, - MCBAND : [ 12890594.86, 8362377.87, 5591021, 3481989.83, - 1678043.12, 0 ], - LLBAND : [ 75, 60, 45, 30, 15, 0 ], - MC2LL : [ - [ 1.410526172116255e-8, 0.00000898305509648872, - -1.9939833816331, 200.9824383106796, - -187.2403703815547, 91.6087516669843, - -23.38765649603339, 2.57121317296198, - -0.03801003308653, 17337981.2 ], - [ -7.435856389565537e-9, 0.000008983055097726239, - -0.78625201886289, 96.32687599759846, - -1.85204757529826, -59.36935905485877, - 47.40033549296737, -16.50741931063887, - 2.28786674699375, 10260144.86 ], - [ -3.030883460898826e-8, 0.00000898305509983578, - 0.30071316287616, 59.74293618442277, - 7.357984074871, -25.38371002664745, - 13.45380521110908, -3.29883767235584, - 0.32710905363475, 6856817.37 ], - [ -1.981981304930552e-8, 0.000008983055099779535, - 0.03278182852591, 40.31678527705744, - 0.65659298677277, -4.44255534477492, - 0.85341911805263, 0.12923347998204, - -0.04625736007561, 4482777.06 ], - [ 3.09191371068437e-9, 0.000008983055096812155, - 0.00006995724062, 23.10934304144901, - -0.00023663490511, -0.6321817810242, - -0.00663494467273, 0.03430082397953, - -0.00466043876332, 2555164.4 ], - [ 2.890871144776878e-9, 0.000008983055095805407, - -3.068298e-8, 7.47137025468032, - -0.00000353937994, -0.02145144861037, - -0.00001234426596, 0.00010322952773, - -0.00000323890364, 826088.5 ] ], - LL2MC : [ - [ -0.0015702102444, 111320.7020616939, - 1704480524535203, -10338987376042340, - 26112667856603880, -35149669176653700, - 26595700718403920, -10725012454188240, - 1800819912950474, 82.5 ], - [ 0.0008277824516172526, 111320.7020463578, - 647795574.6671607, -4082003173.641316, - 10774905663.51142, -15171875531.51559, - 12053065338.62167, -5124939663.577472, - 913311935.9512032, 67.5 ], - [ 0.00337398766765, 111320.7020202162, - 4481351.045890365, -23393751.19931662, - 79682215.47186455, -115964993.2797253, - 97236711.15602145, -43661946.33752821, - 8477230.501135234, 52.5 ], - [ 0.00220636496208, 111320.7020209128, - 51751.86112841131, 3796837.749470245, - 992013.7397791013, -1221952.21711287, - 1340652.697009075, -620943.6990984312, - 144416.9293806241, 37.5 ], - [ -0.0003441963504368392, 111320.7020576856, - 278.2353980772752, 2485758.690035394, - 6070.750963243378, 54821.18345352118, - 9540.606633304236, -2710.55326746645, - 1405.483844121726, 22.5 ], - [ -0.0003218135878613132, 111320.7020701615, - 0.00369383431289, 823725.6402795718, - 0.46104986909093, 2351.343141331292, - 1.58060784298199, 8.77738589078284, - 0.37238884252424, 7.45 ] ], - getDistanceByMC : function(cP, cN) { - if (!cP || !cN) { - return 0 - } - var cL, cO, T, cM; - cP = this.convertMC2LL(cP); - if (!cP) { - return 0 - } - cL = this.toRadians(cP.lng); - cO = this.toRadians(cP.lat); - cN = this.convertMC2LL(cN); - if (!cN) { - return 0 - } - T = this.toRadians(cN.lng); - cM = this.toRadians(cN.lat); - return this.getDistance(cL, T, cO, cM) - }, - getDistanceByLL : function(cP, cN) { - if (!cP || !cN) { - return 0 - } - cP.lng = this.getLoop(cP.lng, -180, 180); - cP.lat = this.getRange(cP.lat, -74, 74); - cN.lng = this.getLoop(cN.lng, -180, 180); - cN.lat = this.getRange(cN.lat, -74, 74); - var cL, T, cO, cM; - cL = this.toRadians(cP.lng); - cO = this.toRadians(cP.lat); - T = this.toRadians(cN.lng); - cM = this.toRadians(cN.lat); - return this.getDistance(cL, T, cO, cM) - }, - convertMC2LL : function(cL) { - var cM, cO; - cM = new cd(Math.abs(cL.lng), Math.abs(cL.lat)); - for ( var cN = 0; cN < this.MCBAND.length; cN++) { - if (cM.lat >= this.MCBAND[cN]) { - cO = this.MC2LL[cN]; - break - } - } - var T = this.convertor(cL, cO); - var cL = new cd(T.lng.toFixed(6), T.lat.toFixed(6)); - return cL - }, - convertLL2MC : function(T) { - var cL, cN; - T.lng = this.getLoop(T.lng, -180, 180); - T.lat = this.getRange(T.lat, -74, 74); - cL = new cd(T.lng, T.lat); - for ( var cM = 0; cM < this.LLBAND.length; cM++) { - if (cL.lat >= this.LLBAND[cM]) { - cN = this.LL2MC[cM]; - break - } - } - if (!cN) { - for ( var cM = this.LLBAND.length - 1; cM >= 0; cM--) { - if (cL.lat <= -this.LLBAND[cM]) { - cN = this.LL2MC[cM]; - break - } - } - } - var cO = this.convertor(T, cN); - var T = new cd(cO.lng.toFixed(2), cO.lat.toFixed(2)); - return T - }, - convertor : function(cM, cN) { - if (!cM || !cN) { - return - } - var T = cN[0] + cN[1] * Math.abs(cM.lng); - var cL = Math.abs(cM.lat) / cN[9]; - var cO = cN[2] + cN[3] * cL + cN[4] * cL * cL + cN[5] * cL - * cL * cL + cN[6] * cL * cL * cL * cL + cN[7] * cL - * cL * cL * cL * cL + cN[8] * cL * cL * cL * cL - * cL * cL; - T *= (cM.lng < 0 ? -1 : 1); - cO *= (cM.lat < 0 ? -1 : 1); - return new cd(T, cO) - }, - getDistance : function(cL, T, cN, cM) { - return this.EARTHRADIUS - * Math.acos((Math.sin(cN) * Math.sin(cM) + Math - .cos(cN) - * Math.cos(cM) * Math.cos(T - cL))) - }, - toRadians : function(T) { - return Math.PI * T / 180 - }, - toDegrees : function(T) { - return (180 * T) / Math.PI - }, - getRange : function(cM, cL, T) { - if (cL != null) { - cM = Math.max(cM, cL) - } - if (T != null) { - cM = Math.min(cM, T) - } - return cM - }, - getLoop : function(cM, cL, T) { - while (cM > T) { - cM -= T - cL - } - while (cM < cL) { - cM += T - cL - } - return cM - } - }); - a8.extend(ba.prototype, { - lngLatToMercator : function(T) { - return ba.convertLL2MC(T) - }, - lngLatToPoint : function(T) { - var cL = ba.convertLL2MC(T); - return new bu(cL.lng, cL.lat) - }, - mercatorToLngLat : function(T) { - return ba.convertMC2LL(T) - }, - pointToLngLat : function(T) { - var cL = new cd(T.x, T.y); - return ba.convertMC2LL(cL) - }, - pointToPixel : function(cL, cP, cO, cN, cQ) { - if (!cL) { - return - } - cL = this.lngLatToMercator(cL, cQ); - var cM = this.getZoomUnits(cP); - var T = Math.round((cL.lng - cO.lng) / cM + cN.width / 2); - var cR = Math.round((cO.lat - cL.lat) / cM + cN.height / 2); - return new bu(T, cR) - }, - pixelToPoint : function(T, cS, cO, cM, cL) { - if (!T) { - return - } - var cR = this.getZoomUnits(cS); - var cP = cO.lng + cR * (T.x - cM.width / 2); - var cN = cO.lat - cR * (T.y - cM.height / 2); - var cQ = new cd(cP, cN); - return this.mercatorToLngLat(cQ, cL) - }, - getZoomUnits : function(T) { - return Math.pow(2, (18 - T)) - } - }); - function cE() { - } - cE.prototype = new ba(); - a8.extend(cE.prototype, { - lngLatToMercator : function(cL, T) { - return this._convert2DTo3D(T, ba.convertLL2MC(cL)) - }, - mercatorToLngLat : function(cL, T) { - return ba.convertMC2LL(this._convert3DTo2D(T, cL)) - }, - lngLatToPoint : function(cM, T) { - var cL = this._convert2DTo3D(T, ba.convertLL2MC(cM)); - return new bu(cL.lng, cL.lat) - }, - pointToLngLat : function(cL, T) { - var cM = new cd(cL.x, cL.y); - return ba.convertMC2LL(this._convert3DTo2D(T, cM)) - }, - _convert2DTo3D : function(cM, T) { - var cL = b6.getOMap_pts(cM || "bj", T); - return new cd(cL.x, cL.y) - }, - _convert3DTo2D : function(cM, T) { - var cL = b6.getMapJw_pts(cM || "bj", T); - return new cd(cL.lng, cL.lat) - }, - getZoomUnits : function(T) { - return Math.pow(2, (20 - T)) - } - }); - function bG() { - this._type = "overlay" - } - a8.lang.inherits(bG, a8.lang.Class, "Overlay"); - bG.getZIndex = function(T) { - T = T * 1; - if (!T) { - return 0 - } - return (T * -100000) << 1 - }; - a8.extend(bG.prototype, { - _i : function(T) { - if (!this.domElement && I(this.initialize)) { - this.domElement = this.initialize(T); - if (this.domElement) { - this.domElement.style.WebkitUserSelect = "none" - } - } - this.draw() - }, - initialize : function(T) { - throw "initialize\u65b9\u6cd5\u672a\u5b9e\u73b0" - }, - draw : function() { - throw "draw\u65b9\u6cd5\u672a\u5b9e\u73b0" - }, - remove : function() { - if (this.domElement && this.domElement.parentNode) { - this.domElement.parentNode.removeChild(this.domElement) - } - this.domElement = null; - this.dispatchEvent(new bg("onremove")) - }, - hide : function() { - if (this.domElement) { - a8.dom.hide(this.domElement) - } - }, - show : function() { - if (this.domElement) { - a8.dom.show(this.domElement) - } - }, - isVisible : function() { - if (!this.domElement) { - return false - } - if (this.domElement.style.display == "none" - || this.domElement.style.visibility == "hidden") { - return false - } - return true - } - }); - BMap.register(function(cM) { - var T = cM.temp; - T.overlayDiv = cM.overlayDiv = cL(cM.platform, 200); - cM._panes.floatPane = cL(T.overlayDiv, 800); - cM._panes.markerMouseTarget = cL(T.overlayDiv, 700); - cM._panes.floatShadow = cL(T.overlayDiv, 600); - cM._panes.labelPane = cL(T.overlayDiv, 500); - cM._panes.markerPane = cL(T.overlayDiv, 400); - cM._panes.markerShadow = cL(T.overlayDiv, 300); - cM._panes.mapPane = cL(T.overlayDiv, 200); - function cL(cN, cQ) { - var cP = aa("div"), cO = cP.style; - cO.position = "absolute"; - cO.top = cO.left = cO.width = cO.height = "0"; - cO.zIndex = cQ; - cN.appendChild(cP); - return cP - } - }); - function Y() { - a8.lang.Class.call(this); - bG.call(this); - this.map = null; - this._visible = true; - this.infoWindow = null; - this._dblclickTime = 0 - } - a8.lang.inherits(Y, bG, "OverlayInternal"); - a8.extend(Y.prototype, { - initialize : function(T) { - this.map = T; - a8.lang.Class.call(this, this.guid); - return null - }, - getMap : function() { - return this.map - }, - draw : function() { - }, - remove : function() { - this.map = null; - a8.lang.decontrol(this.guid); - bG.prototype.remove.call(this) - }, - hide : function() { - if (this._visible == false) { - return - } - this._visible = false - }, - show : function() { - if (this._visible == true) { - return - } - this._visible = true - }, - isVisible : function() { - if (!this.domElement) { - return false - } - return !!this._visible - }, - getContainer : function() { - return this.domElement - }, - setConfig : function(cL) { - cL = cL || {}; - for ( var T in cL) { - this._config[T] = cL[T] - } - }, - setZIndex : function(T) { - this.zIndex = T - }, - enableMassClear : function() { - this._config.enableMassClear = true - }, - disableMassClear : function() { - this._config.enableMassClear = false - }, - addContextMenu : function(T) { - this._menu = T - }, - removeContextMenu : function(T) { - this._menu = null - } - }); - function cs() { - this.map = null; - this._overlays = {}; - this._customOverlays = [] - } - BMap - .register(function(cL) { - var T = new cs(); - T.map = cL; - cL._overlays = T._overlays; - cL._customOverlays = T._customOverlays; - cL.addEventListener("load", function(cM) { - T.draw(cM) - }); - cL.addEventListener("moveend", function(cM) { - T.draw(cM) - }); - if (a8.browser.ie && a8.browser.ie < 8 - || document.compatMode == "BackCompat") { - cL.addEventListener("zoomend", function(cM) { - setTimeout(function() { - T.draw(cM) - }, 20) - }) - } else { - cL.addEventListener("zoomend", function(cM) { - T.draw(cM) - }) - } - cL.addEventListener("maptypechange", function(cM) { - T.draw(cM) - }); - cL - .addEventListener( - "addoverlay", - function(cQ) { - var cN = cQ.target; - if (cN instanceof Y) { - if (!T._overlays[cN.guid]) { - T._overlays[cN.guid] = cN - } - } else { - var cP = false; - for ( var cO = 0, cM = T._customOverlays.length; cO < cM; cO++) { - if (T._customOverlays[cO] === cN) { - cP = true; - break - } - } - if (!cP) { - T._customOverlays.push(cN) - } - } - }); - cL - .addEventListener( - "removeoverlay", - function(cP) { - var cN = cP.target; - if (cN instanceof Y) { - delete T._overlays[cN.guid] - } else { - for ( var cO = 0, cM = T._customOverlays.length; cO < cM; cO++) { - if (T._customOverlays[cO] === cN) { - T._customOverlays.splice(cO, 1); - break - } - } - } - }); - cL - .addEventListener( - "clearoverlays", - function(cP) { - this.closeInfoWindow(); - for ( var cO in T._overlays) { - if (T._overlays[cO]._config.enableMassClear) { - T._overlays[cO].remove(); - delete T._overlays[cO] - } - } - for ( var cN = 0, cM = T._customOverlays.length; cN < cM; cN++) { - if (T._customOverlays[cN].enableMassClear != false) { - T._customOverlays[cN].remove(); - T._customOverlays[cN] = null; - T._customOverlays.splice(cN, 1); - cN--; - cM-- - } - } - }); - cL.addEventListener("infowindowopen", function(cN) { - var cM = this.infoWindow; - if (cM) { - a8.dom.hide(cM.popDom); - a8.dom.hide(cM.shadowDom) - } - }); - cL.addEventListener("movestart", function() { - if (this.getInfoWindow()) { - this.getInfoWindow()._setOverflow() - } - }); - cL.addEventListener("moveend", function() { - if (this.getInfoWindow()) { - this.getInfoWindow()._resetOverflow() - } - }) - }); - cs.prototype.draw = function(cM) { - for ( var cL in this._overlays) { - this._overlays[cL].draw() - } - a8.array.each(this._customOverlays, function(cN) { - cN.draw() - }); - if (this.map.temp.infoWin) { - this.map.temp.infoWin.setPosition() - } - if (BMap.DrawerSelector) { - var T = BMap.DrawerSelector.getDrawer(this.map); - T.setPalette() - } - }; - function cF(T) { - Y.call(this); - this._config = { - strokeColor : "#3a6bdb", - strokeWeight : 5, - strokeOpacity : 0.65, - strokeStyle : "solid", - enableMassClear : true, - getParseTolerance : null, - getParseCacheIndex : null, - enableEditing : false, - mouseOverTolerance : 15, - use3DCoords : false, - clickable : true - }; - T = T || {}; - this.setConfig(T); - if (this._config.strokeWeight <= 0) { - this._config.strokeWeight = 5 - } - if (this._config.strokeOpacity < 0 || this._config.strokeOpacity > 1) { - this._config.strokeOpacity = 0.65 - } - if (this._config.fillOpacity < 0 || this._config.fillOpacity > 1) { - this._config.fillOpacity = 0.65 - } - if (this._config.strokeStyle != "solid" - && this._config.strokeStyle != "dashed") { - this._config.strokeStyle = "solid" - } - if (ch(T.enableClicking)) { - this._config.clickable = T.enableClicking - } - this.domElement = null; - this._bounds = new BMap.Bounds(0, 0, 0, 0); - this._parseCache = []; - this.vertexMarkers = []; - this._temp = {} - } - a8.lang.inherits(cF, Y, "Graph"); - cF.getGraphPoints = function(cL) { - var T = []; - if (!cL) { - return T - } - if (b3(cL)) { - var cM = cL.split(";"); - a8.array.each(cM, function(cO) { - var cN = cO.split(","); - T.push(new cd(cN[0], cN[1])) - }) - } - if (cL.constructor == Array && cL.length > 0) { - T = cL - } - return T - }; - cF.parseTolerance = [ 0.09, 0.005, 0.0001, 0.00001 ]; - a8.extend(cF.prototype, { - initialize : function(T) { - this.map = T; - return null - }, - draw : function() { - return; - if (!this.domElement) { - return - } - if (this._drawer) { - this._drawer.setPath(this.domElement, this - ._getDisplayPixels(this.points)) - } - }, - setPath : function(T) { - this._parseCache.length = 0; - this.points = cF.getGraphPoints(T).slice(0); - this._calcBounds() - }, - _calcBounds : function() { - if (!this.points) { - return - } - var T = this; - T._bounds = new bN(); - a8.array.each(this.points, function(cL) { - T._bounds.extend(cL) - }) - }, - getPath : function() { - return this.points - }, - setPositionAt : function(cL, T) { - if (!T || !this.points[cL]) { - return - } - this._parseCache.length = 0; - this.points[cL] = new cd(T.lng, T.lat); - this._calcBounds() - }, - setStrokeColor : function(T) { - this._config.strokeColor = T - }, - getStrokeColor : function() { - return this._config.strokeColor - }, - setStrokeWeight : function(T) { - if (T > 0) { - this._config.strokeWeight = T - } - }, - getStrokeWeight : function() { - return this._config.strokeWeight - }, - setStrokeOpacity : function(T) { - if (!T || T > 1 || T < 0) { - return - } - this._config.strokeOpacity = T - }, - getStrokeOpacity : function() { - return this._config.strokeOpacity - }, - setFillOpacity : function(T) { - if (T > 1 || T < 0) { - return - } - this._config.fillOpacity = T - }, - getFillOpacity : function() { - return this._config.fillOpacity - }, - setStrokeStyle : function(T) { - if (T != "solid" && T != "dashed") { - return - } - this._config.strokeStyle = T - }, - getStrokeStyle : function() { - return this._config.strokeStyle - }, - setFillColor : function(T) { - this._config.fillColor = T || "" - }, - getFillColor : function() { - return this._config.fillColor - }, - getBounds : function() { - return this._bounds - }, - remove : function() { - if (this.map) { - this.map.removeEventListener("onmousemove", - this._graphMouseEvent) - } - Y.prototype.remove.call(this); - this._parseCache.length = 0 - }, - enableEditing : function() { - this._config.enableEditing = true - }, - disableEditing : function() { - this._config.enableEditing = false - } - }); - function n(T) { - Y.call(this); - this.map = null; - this.domElement = null; - this._config = { - width : 0, - height : 0, - offset : new aH(0, 0), - opacity : 1, - background : "transparent", - lineStroke : 1, - lineColor : "#000", - lineStyle : "solid", - point : null - }; - this.setConfig(T); - this.point = this._config.point - } - a8.lang.inherits(n, Y, "Division"); - a8 - .extend( - n.prototype, - { - _addDom : function() { - var T = this._config; - var cM = this.content; - var cL = [ '
    '); - cL.push(cM); - cL.push("
    "); - this.domElement = at( - this.map.getPanes().markerMouseTarget, cL - .join("")) - }, - initialize : function(T) { - this.map = T; - this._addDom(); - if (this.domElement) { - a8.on(this.domElement, "mousedown", - function(cL) { - aP(cL) - }) - } - return this.domElement - }, - draw : function() { - var T = this.map - .pointToOverlayPixel(this._config.point); - this._config.offset = new aH( - -Math.round(this._config.width / 2) - - Math - .round(this._config.lineStroke), - -Math.round(this._config.height / 2) - - Math - .round(this._config.lineStroke)); - this.domElement.style.left = T.x - + this._config.offset.width + "px"; - this.domElement.style.top = T.y - + this._config.offset.height + "px" - }, - getPosition : function() { - return this._config.point - }, - _getPixel : function(T) { - return this.map.pointToPixel(this.getPosition()) - }, - setPosition : function(T) { - this._config.point = T; - this.draw() - }, - setDimension : function(T, cL) { - this._config.width = Math.round(T); - this._config.height = Math.round(cL); - if (this.domElement) { - this.domElement.style.width = this._config.width - + "px"; - this.domElement.style.height = this._config.height - + "px"; - this.draw() - } - } - }); - function M(cL, cM, cN) { - if (!cL || !cM) { - return - } - this.imageUrl = cL; - this.size = cM; - var T = new aH(Math.floor(cM.width / 2), Math.floor(cM.height / 2)); - var cO = { - anchor : T, - imageOffset : new aH(0, 0) - }; - cN = cN || {}; - a8.extend(cO, cN); - this.anchor = cO.anchor; - this.imageOffset = cO.imageOffset; - this.infoWindowAnchor = cN.infoWindowAnchor || this.anchor; - this.printImageUrl = cN.printImageUrl || "" - } - var bD = M.prototype; - bD.setImageUrl = function(T) { - if (!T) { - return - } - this.imageUrl = T - }; - bD.setPrintImageUrl = function(T) { - if (!T) { - return - } - this.printImageUrl = T - }; - bD.setSize = function(T) { - if (!T) { - return - } - this.size = new aH(T.width, T.height) - }; - bD.setAnchor = function(T) { - if (!T) { - return - } - this.anchor = new aH(T.width, T.height) - }; - bD.setImageOffset = function(T) { - if (!T) { - return - } - this.imageOffset = new aH(T.width, T.height) - }; - bD.setInfoWindowAnchor = function(T) { - if (!T) { - return - } - this.infoWindowAnchor = new aH(T.width, T.height) - }; - bD.toString = function() { - return "Icon" - }; - function bP(cM, cL) { - a8.lang.Class.call(this); - this.content = cM; - this.map = null; - this._config = { - width : 0, - height : 0, - maxWidth : 600, - offset : new aH(0, 0), - title : "", - maxContent : "", - enableMaximize : false, - enableAutoPan : true, - enableCloseOnClick : true, - margin : [ 10, 10, 40, 10 ], - collisions : [ [ 10, 10 ], [ 10, 10 ], [ 10, 10 ], [ 10, 10 ] ], - ifMaxScene : false, - onClosing : function() { - return true - } - }; - a8.extend(this._config, cL || {}); - if (this._config.width != 0) { - if (this._config.width < 220) { - this._config.width = 220 - } - if (this._config.width > 730) { - this._config.width = 730 - } - } - if (this._config.height != 0) { - if (this._config.height < 60) { - this._config.height = 60 - } - if (this._config.height > 650) { - this._config.height = 650 - } - } - if (this._config.maxWidth != 0) { - if (this._config.maxWidth < 220) { - this._config.maxWidth = 220 - } - if (this._config.maxWidth > 730) { - this._config.maxWidth = 730 - } - } - this.isWinMax = false; - this.IMG_PATH = cc.imgPath; - this.overlay = null; - var T = this; - cA.load("infowindow", function() { - T._draw() - }) - } - a8.lang.inherits(bP, a8.lang.Class, "InfoWindow"); - a8.extend(bP.prototype, { - setWidth : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 220) { - T = 220 - } - if (T > 730) { - T = 730 - } - } - this._config.width = T - }, - setHeight : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 60) { - T = 60 - } - if (T > 650) { - T = 650 - } - } - this._config.height = T - }, - setMaxWidth : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 220) { - T = 220 - } - if (T > 730) { - T = 730 - } - } - this._config.maxWidth = T - }, - setTitle : function(T) { - this._config.title = T - }, - getTitle : function() { - return this._config.title - }, - setContent : function(T) { - this.content = T - }, - getContent : function() { - return this.content - }, - setMaxContent : function(T) { - this._config.maxContent = T + "" - }, - redraw : function() { - }, - enableAutoPan : function() { - this._config.enableAutoPan = true - }, - disableAutoPan : function() { - this._config.enableAutoPan = false - }, - enableCloseOnClick : function() { - this._config.enableCloseOnClick = true - }, - disableCloseOnClick : function() { - this._config.enableCloseOnClick = false - }, - enableMaximize : function() { - this._config.enableMaximize = true - }, - disableMaximize : function() { - this._config.enableMaximize = false - }, - show : function() { - this._visible = true - }, - hide : function() { - this._visible = false - }, - close : function() { - this.hide() - }, - maximize : function() { - this.isWinMax = true - }, - restore : function() { - this.isWinMax = false - }, - isVisible : function() { - return this.isOpen() - }, - isOpen : function() { - return false - }, - getPosition : function() { - if (this.overlay && this.overlay.getPosition) { - return this.overlay.getPosition() - } - }, - getOffset : function() { - return this._config.offset - } - }); - bz.prototype.openInfoWindow = function(cN, T) { - if (!(cN instanceof bP) || !(T instanceof cd)) { - return - } - var cL = this.temp; - if (!cL.marker) { - var cM = new M(cc.imgPath + "blank.gif", { - width : 1, - height : 1 - }); - cL.marker = new ad(T, { - icon : cM, - width : 1, - height : 1, - offset : new aH(0, 0), - infoWindowOffset : new aH(0, 0), - clickable : false - }); - cL.marker._fromMap = 1 - } else { - cL.marker.setPosition(T) - } - this.addOverlay(cL.marker); - cL.marker.openInfoWindow(cN) - }; - bz.prototype.closeInfoWindow = function() { - var T = this.temp.infoWin || this.temp._infoWin; - if (T && T.overlay) { - T.overlay.closeInfoWindow() - } - }; - Y.prototype.openInfoWindow = function(T) { - if (this.map) { - this.map.closeInfoWindow(); - T._visible = true; - this.map.temp._infoWin = T; - T.overlay = this; - a8.lang.Class.call(T, T.guid) - } - }; - Y.prototype.closeInfoWindow = function() { - if (this.map && this.map.temp._infoWin) { - this.map.temp._infoWin._visible = false; - a8.lang.decontrol(this.map.temp._infoWin.guid); - this.map.temp._infoWin = null - } - }; - function ag(cM, cL) { - Y.call(this); - this.content = cM; - this.map = null; - this.domElement = null; - this._config = { - width : 0, - offset : new aH(0, 0), - styles : { - backgroundColor : "#fff", - border : "1px solid #f00", - padding : "1px", - whiteSpace : "nowrap", - font : "12px " + cc.fontFamily, - zIndex : "80", - MozUserSelect : "none" - }, - position : null, - enableMassClear : true, - clickable : true - }; - cL = cL || {}; - this.setConfig(cL); - if (this._config.width < 0) { - this._config.width = 0 - } - if (ch(cL.enableClicking)) { - this._config.clickable = cL.enableClicking - } - this.point = this._config.position; - var T = this; - cA.load("marker", function() { - T._draw() - }) - } - a8.lang.inherits(ag, Y, "Label"); - a8.extend(ag.prototype, { - getPosition : function() { - if (this._marker) { - return this._marker.getPosition() - } - return this.point - }, - setPosition : function(T) { - if (T instanceof cd && !this.getMarker()) { - this.point = this._config.position = new cd(T.lng, T.lat) - } - }, - setContent : function(T) { - this.content = T - }, - setOpacity : function(T) { - if (T >= 0 && T <= 1) { - this._config.opacity = T - } - }, - setOffset : function(T) { - if (!(T instanceof aH)) { - return - } - this._config.offset = new aH(T.width, T.height) - }, - getOffset : function() { - return this._config.offset - }, - setStyle : function(T) { - T = T || {}; - this._config.styles = a8.extend(this._config.styles, T) - }, - setStyles : function(T) { - return this.setStyle(T) - }, - setTitle : function(T) { - this._config.title = T || "" - }, - getTitle : function() { - return this._config.title - }, - setMarker : function(T) { - this._marker = T; - if (T) { - this.point = this._config.position = T.getPosition() - } else { - this.point = this._config.position = null - } - }, - getMarker : function() { - return this._marker || null - } - }); - window.BMAP_ANIMATION_DROP = 1; - window.BMAP_ANIMATION_BOUNCE = 2; - var au = new M(cc.imgPath + "marker_red_sprite.png", new aH(19, 25), { - anchor : new aH(10, 25), - infoWindowAnchor : new aH(10, 0) - }); - var ar = new M(cc.imgPath + "marker_red_sprite.png", new aH(20, 11), { - anchor : new aH(6, 11), - imageOffset : new aH(-19, -13) - }); - function ad(T, cM) { - Y.call(this); - cM = cM || {}; - this.point = T; - this.map = null; - this._animation = null; - this._config = { - offset : new aH(0, 0), - icon : au, - shadow : ar, - title : "", - label : null, - baseZIndex : 0, - clickable : true, - zIndexFixed : false, - isTop : false, - enableMassClear : true, - enableDragging : false, - raiseOnDrag : false, - restrictDraggingArea : false, - draggingCursor : cc.draggingCursor - }; - this.setConfig(cM); - if (cM.icon && !cM.shadow) { - this._config.shadow = null - } - if (ch(cM.enableClicking)) { - this._config.clickable = cM.enableClicking - } - var cL = this; - cA.load("marker", function() { - cL._draw() - }) - } - ad.TOP_ZINDEX = bG.getZIndex(-90) + 1000000; - ad.DRAG_ZINDEX = ad.TOP_ZINDEX + 1000000; - a8.lang.inherits(ad, Y, "Marker"); - a8.extend(ad.prototype, { - setIcon : function(T) { - if (T instanceof M) { - this._config.icon = T - } - }, - getIcon : function() { - return this._config.icon - }, - setShadow : function(T) { - if (T instanceof M) { - this._config.shadow = T - } - }, - getShadow : function() { - return this._config.shadow - }, - setLabel : function(T) { - this._config.label = T || null - }, - getLabel : function() { - return this._config.label - }, - enableDragging : function() { - this._config.enableDragging = true - }, - disableDragging : function() { - this._config.enableDragging = false - }, - getPosition : function() { - return this.point - }, - setPosition : function(T) { - if (T instanceof cd) { - this.point = new cd(T.lng, T.lat) - } - }, - setTop : function(cL, T) { - this._config.isTop = !!cL; - if (cL) { - this._addi = T || 0 - } - }, - setTitle : function(T) { - this._config.title = T + "" - }, - getTitle : function() { - return this._config.title - }, - setOffset : function(T) { - if (T instanceof aH) { - this._config.offset = T - } - }, - getOffset : function() { - return this._config.offset - }, - setAnimation : function(T) { - this._animation = T - } - }); - function cn(T, cM) { - cF.call(this, cM); - cM = cM || {}; - this._config.fillOpacity = cM.fillOpacity ? cM.fillOpacity : 0.65; - if (cM.fillColor == "") { - this._config.fillColor = "" - } else { - this._config.fillColor = cM.fillColor ? cM.fillColor : "#fff" - } - this.setPath(T); - var cL = this; - cA.load("poly", function() { - cL._draw() - }) - } - a8.lang.inherits(cn, cF, "Polygon"); - a8.extend(cn.prototype, { - setPath : function(cL, T) { - this._userPoints = cF.getGraphPoints(cL).slice(0); - var cM = cF.getGraphPoints(cL).slice(0); - if (cM.length > 1 && !cM[0].equals(cM[cM.length - 1])) { - cM.push(new cd(cM[0].lng, cM[0].lat)) - } - cF.prototype.setPath.call(this, cM, T) - }, - setPositionAt : function(cL, T) { - if (!this._userPoints[cL]) { - return - } - this._userPoints[cL] = new cd(T.lng, T.lat); - this.points[cL] = new cd(T.lng, T.lat); - if (cL == 0 - && !this.points[0] - .equals(this.points[this.points.length - 1])) { - this.points[this.points.length - 1] = new cd(T.lng, T.lat) - } - this._calcBounds() - }, - getPath : function() { - var T = this._userPoints; - if (T.length == 0) { - T = this.points - } - return T - } - }); - function f(T, cM) { - cF.call(this, cM); - this.setPath(T); - var cL = this; - cA.load("poly", function() { - cL._draw() - }) - } - a8.lang.inherits(f, cF, "Polyline"); - function a(cL, T, cM) { - this.point = cL; - this.radius = Math.abs(T); - cn.call(this, [], cM) - } - a.parseTolerance = [ 0.01, 0.0001, 0.00001, 0.000004 ]; - a8.lang.inherits(a, cn, "Circle"); - a8 - .extend( - a.prototype, - { - initialize : function(T) { - this.map = T; - this.points = this._getPerimeterPoints(this.point, - this.radius); - this._calcBounds(); - return null - }, - getCenter : function() { - return this.point - }, - setCenter : function(T, cL) { - if (!T) { - return - } - this.point = T - }, - getRadius : function() { - return this.radius - }, - setRadius : function(T) { - this.radius = Math.abs(T) - }, - _getPerimeterPoints : function(T, cS) { - if (!T || !cS || !this.map) { - return [] - } - var cL = this.map; - var cP = T.lng, cN = T.lat; - var cZ = []; - var cU = cS / 6378800, cR = (Math.PI / 180) * cN, cX = (Math.PI / 180) - * cP; - for ( var cQ = 0; cQ < 360; cQ += 9) { - var cO = (Math.PI / 180) * cQ, cV = Math - .asin(Math.sin(cR) * Math.cos(cU) - + Math.cos(cR) * Math.sin(cU) - * Math.cos(cO)), cT = Math - .atan2(Math.sin(cO) * Math.sin(cU) - * Math.cos(cR), Math.cos(cU) - - Math.sin(cR) * Math.sin(cV)), cW = ((cX - - cT + Math.PI) % (2 * Math.PI)) - - Math.PI, cY = new cd(cW - * (180 / Math.PI), cV * (180 / Math.PI)); - cZ.push(cY) - } - var cM = cZ[0]; - cZ.push(new cd(cM.lng, cM.lat)); - return cZ - } - }); - function bR(T) { - this.map = T; - this.mapTypeLayers = []; - this.tileLayers = []; - this.bufferNumber = 300; - this.realBufferNumber = 0; - this.mapTiles = {}; - this.bufferTiles = {}; - this.numLoading = 0; - this._mapTypeLayerContainer = this._createDiv(1); - this._normalLayerContainer = this._createDiv(2); - T.platform.appendChild(this._mapTypeLayerContainer); - T.platform.appendChild(this._normalLayerContainer) - } - BMap.register(function(cL) { - var T = new bR(cL); - T.initialize() - }); - a8.extend(bR.prototype, { - initialize : function() { - var T = this, cL = T.map; - cL.addEventListener("loadcode", function() { - T.loadTiles() - }); - cL.addEventListener("addtilelayer", function(cM) { - T.addTileLayer(cM) - }); - cL.addEventListener("removetilelayer", function(cM) { - T.removeTileLayer(cM) - }); - cL.addEventListener("setmaptype", function(cM) { - T.setMapType(cM) - }); - cL.addEventListener("zoomstartcode", function(cM) { - T._zoom(cM) - }) - }, - loadTiles : function() { - var T = this; - if (a8.browser.ie) { - try { - document.execCommand("BackgroundImageCache", false, true) - } catch (cL) { - } - } - if (!this.loaded) { - T.initMapTypeTiles() - } - T.moveGridTiles(); - if (!this.loaded) { - this.loaded = true; - cA.load("tile", function() { - T._asyncLoadTiles() - }) - } - }, - initMapTypeTiles : function() { - var cL = this.map.getMapType(); - var cM = cL.getTileLayers(); - for ( var T = 0; T < cM.length; T++) { - var cN = new p(); - a8.extend(cN, cM[T]); - this.mapTypeLayers.push(cN); - cN.initialize(this.map, this._mapTypeLayerContainer) - } - }, - _createDiv : function(cL) { - var T = aa("div"); - T.style.position = "absolute"; - T.style.left = T.style.top = "0"; - T.style.zIndex = cL; - return T - }, - showTile : function(cP, cO, cS) { - var cV = this; - cV.centerPos = cO; - var cR = this.map.getMapType(); - var cM = cV.getTileName(cP, cS); - var cZ = cR.getTileSize(); - var cN = (cP[0] * cZ) + cO[0]; - var cY = 0; - if (cR === BMAP_PERSPECTIVE_MAP && cV.map.getZoom() == 15) { - cY = 0.5 - } - var cL = (cY - 1 - cP[1]) * cZ + cO[1]; - var cT = [ cN, cL ]; - var cU = this.mapTiles[cM]; - if (cU && cU.img) { - bI(cU.img, cT); - if (cU.loaded) { - this._checkTilesLoaded() - } else { - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }) - } - return - } - cU = this.bufferTiles[cM]; - if (cU && cU.img) { - cS.tilesDiv.insertBefore(cU.img, cS.tilesDiv.lastChild); - this.mapTiles[cM] = cU; - bI(cU.img, cT); - if (cU.loaded) { - this._checkTilesLoaded() - } else { - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }) - } - return - } - var cX = 256 * Math.pow(2, (cR.getMaxZoom() - cP[2])); - var cW = new cd(cP[0] * cX, cP[1] * cX); - var cQ = new bu(cP[0], cP[1]); - var T = cS.getTilesUrl(cQ, cP[2]); - cU = new bU(this, T, cT, cP, cS); - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }); - cU._load(); - this.mapTiles[cM] = cU - }, - _checkTilesLoaded : function() { - this.numLoading--; - var T = this; - if (this.numLoading == 0) { - if (this._checkLoadedTimer) { - clearTimeout(this._checkLoadedTimer); - this._checkLoadedTimer = null - } - this._checkLoadedTimer = setTimeout(function() { - if (T.numLoading == 0) { - T.map.dispatchEvent(new bg("ontilesloaded")) - } - T._checkLoadedTimer = null - }, 80) - } - }, - getTileName : function(T, cL) { - if (this.map.getMapType() === BMAP_PERSPECTIVE_MAP) { - return "TILE-" + cL.guid + "-" + this.map.cityCode + "-" + T[0] - + "-" + T[1] + "-" + T[2] - } else { - return "TILE-" + cL.guid + "-" + T[0] + "-" + T[1] + "-" + T[2] - } - }, - hideTile : function(cL) { - var T = cL.img; - if (T) { - J(T); - if (y(T)) { - T.parentNode.removeChild(T) - } - } - delete this.mapTiles[cL.name]; - if (!cL.loaded) { - J(T); - T = null; - cL._callCbks(); - cL.img = null; - cL.mgr = null - } - }, - moveGridTiles : function() { - var da = this.mapTypeLayers; - var cW = da.concat(this.tileLayers); - var c2 = cW.length; - for ( var c4 = 0; c4 < c2; c4++) { - var cP = cW[c4]; - if (cP.baseLayer) { - this.tilesDiv = cP.tilesDiv - } - var dg = this.map; - var dc = dg.getMapType(); - var dh = dc.getProjection(); - var c3 = dg.zoomLevel; - var c6 = dg.mercatorCenter; - this.mapCenterPoint = c6; - var cU = dc.getZoomUnits(c3); - var cX = dc.getZoomFactor(c3); - var cV = Math.ceil(c6.lng / cX); - var cQ = Math.ceil(c6.lat / cX); - var c1 = dc.getTileSize(); - var cO = [ cV, cQ, (c6.lng - cV * cX) / cX * c1, - (c6.lat - cQ * cX) / cX * c1 ]; - var db = cO[0] - Math.ceil((dg.width / 2 - cO[2]) / c1); - var cN = cO[1] - Math.ceil((dg.height / 2 - cO[3]) / c1); - var c7 = cO[0] + Math.ceil((dg.width / 2 + cO[2]) / c1); - var cZ = 0; - if (dc === BMAP_PERSPECTIVE_MAP && dg.getZoom() == 15) { - cZ = 1 - } - var cY = cO[1] + Math.ceil((dg.height / 2 + cO[3]) / c1) + cZ; - this.areaCenter = new cd(c6.lng, c6.lat); - var cM = this.mapTiles; - var cT = -this.areaCenter.lng / cU; - var cS = this.areaCenter.lat / cU; - var de = [ Math.round(cT), Math.round(cS) ]; - var cL = dg.getZoom(); - for ( var df in cM) { - var di = cM[df]; - var dd = di.info; - if (dd[2] != cL - || (dd[2] == cL && (db > dd[0] || c7 <= dd[0] - || cN > dd[1] || cY <= dd[1]))) { - this.hideTile(di) - } - } - var cR = -dg.offsetX + dg.width / 2; - var c0 = -dg.offsetY + dg.height / 2; - cP.tilesDiv.style.left = Math.round(cT + cR) - de[0] + "px"; - cP.tilesDiv.style.top = Math.round(cS + c0) - de[1] + "px"; - var T = []; - for ( var c9 = db; c9 < c7; c9++) { - for ( var c8 = cN; c8 < cY; c8++) { - T.push( [ c9, c8 ]) - } - } - T.sort((function(dj) { - return function(dk, dl) { - return ((0.4 * Math.abs(dk[0] - dj[0]) + 0.6 * Math - .abs(dk[1] - dj[1])) - (0.4 * Math.abs(dl[0] - - dj[0]) + 0.6 * Math.abs(dl[1] - dj[1]))) - } - })( [ cO[0] - 1, cO[1] - 1 ])); - this.numLoading += T.length; - for ( var c9 = 0, c5 = T.length; c9 < c5; c9++) { - this.showTile( [ T[c9][0], T[c9][1], cL ], de, cP) - } - } - return - }, - addTileLayer : function(cN) { - var cM = this; - var T = cN.target; - for ( var cL = 0; cL < cM.tileLayers.length; cL++) { - if (cM.tileLayers[cL] == T) { - return - } - } - T.initialize(this.map, this._normalLayerContainer); - cM.tileLayers.push(T) - }, - removeTileLayer : function(cO) { - var cN = this; - var cL = cO.target; - for ( var cM = 0, T = cN.tileLayers.length; cM < T; cM++) { - if (cL == cN.tileLayers[cM]) { - cN.tileLayers.splice(cM, 1) - } - } - cL.remove() - }, - setMapType : function() { - var cM = this; - var cN = this.mapTypeLayers; - for ( var cL = 0, T = cN.length; cL < T; cL++) { - cN[cL].remove() - } - delete this.tilesDiv; - this.mapTypeLayers = []; - this.bufferTiles = this.mapTiles = {}; - this.initMapTypeTiles(); - this.moveGridTiles() - }, - _zoom : function() { - var T = this; - if (T.zoomsDiv) { - a8.dom.hide(T.zoomsDiv) - } - setTimeout(function() { - T.moveGridTiles(); - T.map.dispatchEvent(new bg("onzoomend")) - }, 10) - } - }); - function bU(cR, T, cO, cL, cN) { - this.mgr = cR; - this.position = cO; - this._cbks = []; - this.name = cR.getTileName(cL, cN); - this.info = cL; - this._transparentPng = cN.isTransparentPng(); - var cS = aa("img"); - cw(cS); - cS.galleryImg = false; - var cQ = cS.style; - var cM = cR.map.getMapType(); - cQ.position = "absolute"; - cQ.border = "none"; - cQ.width = cM.getTileSize() + "px"; - cQ.height = cM.getTileSize() + "px"; - cQ.left = cO[0] + "px"; - cQ.top = cO[1] + "px"; - this.img = cS; - this.src = T; - if (E) { - this.img.style.opacity = 0 - } - var cP = this; - this.img.onload = function(cY) { - cP.loaded = true; - if (!cP.mgr) { - return - } - var cU = cP.mgr; - var cT = cU.bufferTiles; - if (!cT[cP.name]) { - cU.realBufferNumber++; - cT[cP.name] = cP - } - if (cP.img && !y(cP.img)) { - if (cN.tilesDiv) { - cN.tilesDiv.appendChild(cP.img); - if (a8.browser.ie <= 6 && a8.browser.ie > 0 - && cP._transparentPng) { - cP.img.style.cssText += ';filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + cP.src + '",sizingMethod=scale);' - } - } - } - var cW = cU.realBufferNumber - cU.bufferNumber; - for ( var cX in cT) { - if (cW <= 0) { - break - } - if (!cU.mapTiles[cX]) { - cT[cX].mgr = null; - var cV = cT[cX].img; - if (cV && cV.parentNode) { - cV.parentNode.removeChild(cV); - J(cV) - } - cV = null; - cT[cX].img = null; - delete cT[cX]; - cU.realBufferNumber--; - cW-- - } - } - if (E) { - new g( { - fps : 20, - duration : 200, - render : function(cZ) { - if (cP.img && cP.img.style) { - cP.img.style.opacity = cZ * 1 - } - }, - finish : function() { - if (cP.img && cP.img.style) { - delete cP.img.style.opacity - } - } - }) - } - cP._callCbks() - }; - this.img.onerror = function() { - var cU = cP.img, cV = cP.img.getAttribute("isError") || 0; - if (m && cV < 5) { - cV++; - cU.setAttribute("isError", cV); - cU.src = T + "&t=" + new Date().getTime() - } else { - cP._callCbks(); - if (!cP.mgr) { - return - } - var cT = cP.mgr; - var cW = cT.map.getMapType(); - if (cW.getErrorImageUrl()) { - cP.error = true; - cP.img.src = cW.getErrorImageUrl(); - if (cP.img && !y(cP.img)) { - cN.tilesDiv.appendChild(cP.img) - } - } - } - }; - cS = null - } - bU.prototype._addLoadCbk = function(T) { - this._cbks.push(T) - }; - bU.prototype._load = function() { - if (a8.browser.ie > 0 && a8.browser.ie <= 6 && this._transparentPng) { - this.img.src = cc.imgPath + "blank.gif" - } else { - this.img.src = this.src - } - }; - bU.prototype._callCbks = function() { - var cL = this; - for ( var T = 0; T < cL._cbks.length; T++) { - cL._cbks[T]() - } - cL._cbks.length = 0 - }; - function J(cN) { - if (!cN) { - return - } - cN.onload = cN.onerror = null; - var cL = cN.attributes, cM, T, cO; - if (cL) { - T = cL.length; - for (cM = 0; cM < T; cM += 1) { - cO = cL[cM].name; - if (I(cN[cO])) { - cN[cO] = null - } - } - } - cL = cN.children; - if (cL) { - T = cL.length; - for (cM = 0; cM < T; cM += 1) { - J(cN.children[cM]) - } - } - } - var E = (!a8.browser.ie || a8.browser.ie > 8); - function p(T) { - this.opts = T || {}; - this.copyright = this.opts.copyright || null; - this.transparentPng = this.opts.transparentPng || false; - this.baseLayer = this.opts.baseLayer || false; - this.zIndex = this.opts.zIndex || 0; - this.guid = p._guid++ - } - p._guid = 0; - a8.lang.inherits(p, a8.lang.Class, "TileLayer"); - a8.extend(p.prototype, { - initialize : function(cM, T) { - if (this.baseLayer) { - this.zIndex = -100 - } - this.map = cM; - if (!this.tilesDiv) { - var cN = aa("div"); - var cL = cN.style; - if (!a8.platform.isAndroid) { - T.style.WebkitBackfaceVisibility = "hidden" - } - cL.position = "absolute"; - cL.zIndex = this.zIndex; - cL.left = Math.ceil(-cM.offsetX + cM.width / 2) + "px"; - cL.top = Math.ceil(-cM.offsetY + cM.height / 2) + "px"; - T.appendChild(cN); - this.tilesDiv = cN - } - }, - remove : function() { - if (this.tilesDiv && this.tilesDiv.parentNode) { - this.tilesDiv.innerHTML = ""; - this.tilesDiv.parentNode.removeChild(this.tilesDiv) - } - delete this.tilesDiv - }, - isTransparentPng : function() { - return this.transparentPng - }, - getTilesUrl : function(cL, cM) { - var T = ""; - if (this.opts.tileUrlTemplate) { - T = this.opts.tileUrlTemplate.replace(/\{X\}/, cL.x); - T = T.replace(/\{Y\}/, cL.y); - T = T.replace(/\{Z\}/, cM) - } - return T - }, - getCopyright : function() { - return this.copyright - }, - getMapType : function() { - return this.mapType || BMAP_NORMAL_MAP - } - }); - function aC(T) { - p.call(this, T); - this._opts = {}; - T = T || {}; - this._opts = a8.object.extend(this._opts, T); - if (this._opts.predictDate) { - if (this._opts.predictDate.weekday < 1 - || this._opts.predictDate.weekday > 7) { - this._opts.predictDate = 1 - } - if (this._opts.predictDate.hour < 0 - || this._opts.predictDate.hour > 23) { - this._opts.predictDate.hour = 0 - } - } - this._tileUrl = "http://its.map.baidu.com:8002/traffic/" - } - aC.prototype = new p(); - aC.prototype.initialize = function(cL, T) { - p.prototype.initialize.call(this, cL, T); - this._map = cL - }; - aC.prototype.isTransparentPng = function() { - return true - }; - aC.prototype.getTilesUrl = function(cQ, cL) { - var cR = ""; - if (this._opts.predictDate) { - cR = "HistoryService?day=" + (this._opts.predictDate.weekday - 1) - + "&hour=" + this._opts.predictDate.hour + "&t=" - + new Date().getTime() + "&" - } else { - cR = "TrafficTileService?time=" + new Date().getTime() + "&" - } - var cM = this._map, cS = cQ.x, cN = cQ.y, cP = Math.floor(cS / 200), cO = Math - .floor(cN / 200), T = this._tileUrl + cR + "level=" + cL - + "&x=" + cS + "&y=" + cN; - return T.replace(/-(\d+)/gi, "M$1") - }; - function cu(T, cL, cM) { - this._name = T; - this._layers = cL instanceof p ? [ cL ] : cL.slice(0); - this._opts = { - tips : "", - labelText : "", - minZoom : 1, - maxZoom : 19, - tileSize : 256, - textColor : "black", - errorImageUrl : "", - projection : new ba() - }; - if (this._layers.length == 1) { - this._layers[0].baseLayer = true - } - a8.extend(this._opts, cM || {}) - } - a8.extend(cu.prototype, { - getName : function() { - return this._name - }, - getTips : function() { - return this._opts.tips - }, - getLabelText : function() { - return this._opts.labelText - }, - getTileLayer : function() { - return this._layers[0] - }, - getTileLayers : function() { - return this._layers - }, - getTileSize : function() { - return this._opts.tileSize - }, - getMinZoom : function() { - return this._opts.minZoom - }, - getMaxZoom : function() { - return this._opts.maxZoom - }, - getTextColor : function() { - return this._opts.textColor - }, - getProjection : function() { - return this._opts.projection - }, - getErrorImageUrl : function() { - return this._opts.errorImageUrl - }, - getZoomUnits : function(T) { - return Math.pow(2, (18 - T)) - }, - getZoomFactor : function(T) { - return this.getZoomUnits(T) * 256 - } - }); - var b7 = [ "http://shangetu0.map.bdimg.com/it/", - "http://shangetu1.map.bdimg.com/it/", - "http://shangetu2.map.bdimg.com/it/", - "http://shangetu3.map.bdimg.com/it/", - "http://shangetu4.map.bdimg.com/it/" ]; - var j = [ "http://online0.map.bdimg.com/tile/", - "http://online1.map.bdimg.com/tile/", - "http://online2.map.bdimg.com/tile/", - "http://online3.map.bdimg.com/tile/", - "http://online4.map.bdimg.com/tile/" ]; - if (m) { - b7 = [ x + "it/" ] - } - var aT = new p(); - aT.getTilesUrl = function(cM, cP) { - var cQ = cM.x; - var cN = cM.y; -// var T = "20130712"; -// var cO = "pl"; -// if (this.map.highResolutionEnabled()) { -// cO = "ph" -// } -// var cL = j[Math.abs(cQ + cN) % j.length] + "?qt=tile&x=" -// + (cQ + "").replace(/-/gi, "M") + "&y=" -// + (cN + "").replace(/-/gi, "M") + "&z=" + cP + "&styles=" + cO -// + (a8.browser.ie == 6 ? "&color_dep=32&colors=50" : "") -// + "&udt=" + T; -// if (m) { -// cL = b7[Math.abs(cQ + cN) % b7.length] + "u=x=" + cQ + ";y=" + cN -// + ";z=" + cP + ";v=017;type=web&fm=44" -// } - cL = "static/BMap/maptile/" + cP + "/" + cQ + "/" + cN + ".jpg"; - return cL.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_NORMAL_MAP = new cu("\u5730\u56fe", aT, { - tips : "\u663e\u793a\u666e\u901a\u5730\u56fe" - }); - var bs = new p(); - bs.tileUrls = [ "http://d0.map.baidu.com/resource/mappic/", - "http://d1.map.baidu.com/resource/mappic/", - "http://d2.map.baidu.com/resource/mappic/", - "http://d3.map.baidu.com/resource/mappic/" ]; - bs.getTilesUrl = function(T, cM) { - var cO = T.x; - var cL = T.y; - var cN = Math.pow(2, (20 - cM)) * 256; - cL = Math.round((9998336 - cN * (cL)) / cN) - 1; - url = this.tileUrls[Math.abs(cO + cL) % this.tileUrls.length] - + this.map.currentCity + "/" + this.map.cityCode + "/3/lv" - + (21 - cM) + "/" + cO + "," + cL + ".jpg"; - return url - }; - window.BMAP_PERSPECTIVE_MAP = new cu("\u4e09\u7ef4", bs, { - tips : "\u663e\u793a\u4e09\u7ef4\u5730\u56fe", - minZoom : 15, - maxZoom : 20, - textColor : "white", - projection : new cE() - }); - BMAP_PERSPECTIVE_MAP.getZoomUnits = function(T) { - return Math.pow(2, (20 - T)) - }; - BMAP_PERSPECTIVE_MAP.getCityName = function(T) { - if (!T) { - return "" - } - var cL = cc.cityNames; - for ( var cM in cL) { - if (T.search(cM) > -1) { - return cL[cM] - } - } - return "" - }; - BMAP_PERSPECTIVE_MAP.getCityCode = function(T) { - return ( { - bj : 2, - gz : 1, - sz : 14, - sh : 4 - })[T] - }; - var bQ = new p( { - baseLayer : true - }); - bQ.getTilesUrl = function(cL, cN) { - var cO = cL.x; - var cM = cL.y; - var T = b7[Math.abs(cO + cM) % b7.length] + "u=x=" + cO + ";y=" + cM - + ";z=" + cN + ";v=009;type=sate&fm=46"; - return T.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_SATELLITE_MAP = new cu("\u536b\u661f", bQ, { - tips : "\u663e\u793a\u536b\u661f\u5f71\u50cf", - minZoom : 1, - maxZoom : 19, - textColor : "white" - }); - var o = new p( { - transparentPng : true - }); - o.getTilesUrl = function(cM, cO) { - var cP = cM.x; - var cN = cM.y; - var T = "20130617"; - var cL = j[Math.abs(cP + cN) % j.length] + "?qt=tile&x=" - + (cP + "").replace(/-/gi, "M") + "&y=" - + (cN + "").replace(/-/gi, "M") + "&z=" + cO + "&styles=sl" - + (a8.browser.ie == 6 ? "&color_dep=32&colors=50" : "") - + "&udt=" + T; - return cL.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_HYBRID_MAP = new cu( - "\u6df7\u5408", - [ bQ, o ], - { - tips : "\u663e\u793a\u5e26\u6709\u8857\u9053\u7684\u536b\u661f\u5f71\u50cf", - labelText : "\u8def\u7f51", - minZoom : 1, - maxZoom : 19, - textColor : "white" - }); - window.BMAP_POI_TYPE_NORMAL = 0; - window.BMAP_POI_TYPE_BUSSTOP = 1; - window.BMAP_POI_TYPE_BUSLINE = 2; - window.BMAP_POI_TYPE_SUBSTOP = 3; - window.BMAP_POI_TYPE_SUBLINE = 4; - var H = 0; - var bh = 1; - var an = {}; - function w(cL, T) { - a8.lang.Class.call(this); - this._loc = {}; - this.setLocation(cL); - this._opts = { - renderOptions : { - panel : null, - map : null, - autoViewport : true - }, - onSearchComplete : function() { - }, - onMarkersSet : function() { - }, - onInfoHtmlSet : function() { - }, - onResultsHtmlSet : function() { - }, - onGetBusListComplete : function() { - }, - onGetBusLineComplete : function() { - }, - onBusListHtmlSet : function() { - }, - onBusLineHtmlSet : function() { - }, - onPolylinesSet : function() { - }, - reqFrom : "" - }; - a8.extend(this._opts, T); - if (typeof T != "undefined" && typeof T.renderOptions != "undefined" - && typeof T.renderOptions.autoViewport != "undefined") { - this._opts.renderOptions.autoViewport = T.renderOptions.autoViewport - } else { - this._opts.renderOptions.autoViewport = true - } - this._opts.renderOptions.panel = a8.G(this._opts.renderOptions.panel) - } - a8.inherits(w, a8.lang.Class); - a8.extend(w.prototype, { - getResults : function() { - if (!this._isMultiKey) { - return this._results - } else { - return this._arrResults - } - }, - enableAutoViewport : function() { - this._opts.renderOptions.autoViewport = true - }, - disableAutoViewport : function() { - this._opts.renderOptions.autoViewport = false - }, - setLocation : function(T) { - if (!T) { - return - } - this._loc.src = T - }, - setSearchCompleteCallback : function(T) { - this._opts.onSearchComplete = T || function() { - } - }, - setMarkersSetCallback : function(T) { - this._opts.onMarkersSet = T || function() { - } - }, - setPolylinesSetCallback : function(T) { - this._opts.onPolylinesSet = T || function() { - } - }, - setInfoHtmlSetCallback : function(T) { - this._opts.onInfoHtmlSet = T || function() { - } - }, - setResultsHtmlSetCallback : function(T) { - this._opts.onResultsHtmlSet = T || function() { - } - }, - getStatus : function() { - return this._status - } - }); - var bb = { - REQ_BASE_URL : x, - request : function(cQ, cN, cL, cS, cM) { - return; - var cO = (Math.random() * 100000).toFixed(0); - BMap._rd["_cbk" + cO] = function(cT) { - cL = cL || {}; - cQ && cQ(cT, cL); - delete BMap._rd["_cbk" + cO] - }; - cS = cS || ""; - var cR; - if (cL && cL.useEncodeURI) { - cR = O(cN, encodeURI) - } else { - cR = O(cN, encodeURIComponent) - } - var cP = this, T = cP.REQ_BASE_URL + cS + "?" + cR - + "&ie=utf-8&oue=1&fromproduct=jsapi"; - if (!cM) { - T += "&res=api" - } - T += "&callback=BMap._rd._cbk" + cO; - cx.request(T) - } - }; - BMap._rd = {}; - var S = {}; - S.removeHtml = function(T) { - return T.replace(/<\/?b>/g, "") - }; - S.parseGeoExtReg1 = function(T) { - return T - .replace( - /([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g, - "$1,$2;") - }; - S.parseGeoExtReg2 = function(cL, T) { - var cM = new RegExp( - "(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){" - + T + "}", "ig"); - return cL.replace(cM, "$1") - }; - window.BMAP_STATUS_SUCCESS = 0; - window.BMAP_STATUS_CITY_LIST = 1; - window.BMAP_STATUS_UNKNOWN_LOCATION = 2; - window.BMAP_STATUS_UNKNOWN_ROUTE = 3; - window.BMAP_STATUS_INVALID_KEY = 4; - window.BMAP_STATUS_INVALID_REQUEST = 5; - window.BMAP_STATUS_PERMISSION_DENIED = 6; - window.BMAP_STATUS_SERVICE_UNAVAILABLE = 7; - window.BMAP_STATUS_TIMEOUT = 8; - window.BMAP_ROUTE_TYPE_WALKING = 2; - window.BMAP_ROUTE_TYPE_DRIVING = 3; - var cv = "cur"; - var c = "cen"; - var cj = "s"; - var Q = "con"; - var al = "bd"; - var cb = "nb"; - var F = "bt"; - var bM = "nav"; - var bv = "walk"; - var bA = "gc"; - var d = "rgc"; - var U = "dec"; - var aQ = "bse"; - var e = "nse"; - var G = "bl"; - var bf = "bsl"; - var aG = "bda"; - var ai = "sa"; - var a1 = "nba"; - var ci = "drag"; - var b4 = "ext"; - var s = 2; - var a5 = 4; - var bt = 7; - var X = 11; - var aN = 12; - var bi = 14; - var a2 = 15; - var cy = 18; - var u = 20; - var R = 21; - var ap = 26; - var bE = 28; - var z = 31; - var bq = 35; - var bC = 44; - var ax = 45; - var ae = 46; - var bS = 47; - var a0 = -1; - var ab = 0; - var cq = 1; - var a6 = 2; - var B = 3; - var cI = "http://map.baidu.com/"; - BMap.I = window.Instance = a8.lang.instance; - var a4 = function(cM, cL) { - w.call(this, cM, cL); - cL = cL || {}; - cL.renderOptions = cL.renderOptions || {}; - this.setPageCapacity(cL.pageCapacity); - if (typeof cL.renderOptions.selectFirstResult != "undefined" - && !cL.renderOptions.selectFirstResult) { - this.disableFirstResultSelection() - } else { - this.enableFirstResultSelection() - } - this._overlays = []; - this._arrPois = []; - this._curIndex = -1; - this._queryList = []; - var T = this; - cA.load("local", function() { - T._check() - }) - }; - a8.inherits(a4, w, "LocalSearch"); - a4.DEFAULT_PAGE_CAPACITY = 10; - a4.MIN_PAGE_CAPACITY = 1; - a4.MAX_PAGE_CAPACITY = 100; - a4.DEFAULT_RADIUS = 2000; - a4.MAX_RADIUS = 100000; - a8.extend(a4.prototype, { - search : function(T) { - this._queryList.push( { - method : "search", - arguments : [ T ] - }) - }, - searchInBounds : function(T, cL) { - this._queryList.push( { - method : "searchInBounds", - arguments : [ T, cL ] - }) - }, - searchNearby : function(cM, cL, T) { - this._queryList.push( { - method : "searchNearby", - arguments : [ cM, cL, T ] - }) - }, - clearResults : function() { - delete this._json; - delete this._status; - delete this._results; - delete this._ud; - this._curIndex = -1; - this._setStatus(); - if (this._opts.renderOptions.panel) { - this._opts.renderOptions.panel.innerHTML = "" - } - }, - gotoPage : function() { - }, - enableFirstResultSelection : function() { - this._opts.renderOptions.selectFirstResult = true - }, - disableFirstResultSelection : function() { - this._opts.renderOptions.selectFirstResult = false - }, - setPageCapacity : function(T) { - if (typeof T == "number" && !isNaN(T)) { - this._opts.pageCapacity = T < 1 ? a4.DEFAULT_PAGE_CAPACITY - : (T > a4.MAX_PAGE_CAPACITY ? a4.DEFAULT_PAGE_CAPACITY - : T) - } else { - this._opts.pageCapacity = a4.DEFAULT_PAGE_CAPACITY - } - }, - getPageCapacity : function() { - return this._opts.pageCapacity - }, - toString : function() { - return "LocalSearch" - } - }); - var b5 = function(cL, T) { - w.call(this, cL, T) - }; - a8.inherits(b5, w, "BaseRoute"); - a8.extend(b5.prototype, { - clearResults : function() { - } - }); - window.BMAP_TRANSIT_POLICY_LEAST_TIME = 0; - window.BMAP_TRANSIT_POLICY_LEAST_TRANSFER = 2; - window.BMAP_TRANSIT_POLICY_LEAST_WALKING = 3; - window.BMAP_TRANSIT_POLICY_AVOID_SUBWAYS = 4; - window.BMAP_LINE_TYPE_BUS = 0; - window.BMAP_LINE_TYPE_SUBWAY = 1; - window.BMAP_LINE_TYPE_FERRY = 2; - function aU(cM, cL) { - b5.call(this, cM, cL); - cL = cL || {}; - this.setPolicy(cL.policy); - this.setPageCapacity(cL.pageCapacity); - this.QUERY_TYPE = F; - this.RETURN_TYPE = bi; - this.ROUTE_TYPE = bh; - this._overlays = []; - this._curIndex = -1; - this._queryList = []; - var T = this; - cA.load("route", function() { - T._asyncSearch() - }) - } - aU.MAX_PAGE_CAPACITY = 100; - aU.LINE_TYPE_MAPPING = [ 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 1 ]; - a8.inherits(aU, b5, "TransitRoute"); - a8.extend(aU.prototype, { - setPolicy : function(T) { - if (T >= BMAP_TRANSIT_POLICY_LEAST_TIME - && T <= BMAP_TRANSIT_POLICY_AVOID_SUBWAYS) { - this._opts.policy = T - } else { - this._opts.policy = BMAP_TRANSIT_POLICY_LEAST_TIME - } - }, - _internalSearch : function(cL, T) { - this._queryList.push( { - method : "_internalSearch", - arguments : [ cL, T ] - }) - }, - search : function(cL, T) { - this._queryList.push( { - method : "search", - arguments : [ cL, T ] - }) - }, - setPageCapacity : function(T) { - if (typeof T == "string") { - T = parseInt(T); - if (isNaN(T)) { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY; - return - } - } - if (typeof T != "number") { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY; - return - } - if (T >= 1 && T <= aU.MAX_PAGE_CAPACITY) { - this._opts.pageCapacity = Math.round(T) - } else { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY - } - }, - toString : function() { - return "TransitRoute" - }, - _shortTitle : function(T) { - return T.replace(/\(.*\)/, "") - } - }); - window.BMAP_HIGHLIGHT_STEP = 1; - window.BMAP_HIGHLIGHT_ROUTE = 2; - var bl = function(T, cN) { - b5.call(this, T, cN); - this._overlays = []; - this._curIndex = -1; - this._queryList = []; - var cM = this; - var cL = this._opts.renderOptions; - if (cL.highlightMode != BMAP_HIGHLIGHT_STEP - && cL.highlightMode != BMAP_HIGHLIGHT_ROUTE) { - cL.highlightMode = BMAP_HIGHLIGHT_STEP - } - this._enableDragging = this._opts.renderOptions.enableDragging ? true - : false; - cA.load("route", function() { - cM._asyncSearch() - }) - }; - bl.ROAD_TYPE = [ "", "\u73af\u5c9b", "\u65e0\u5c5e\u6027\u9053\u8def", - "\u4e3b\u8def", "\u9ad8\u901f\u8fde\u63a5\u8def", - "\u4ea4\u53c9\u70b9\u5185\u8def\u6bb5", "\u8fde\u63a5\u9053\u8def", - "\u505c\u8f66\u573a\u5185\u90e8\u9053\u8def", - "\u670d\u52a1\u533a\u5185\u90e8\u9053\u8def", "\u6865", - "\u6b65\u884c\u8857", "\u8f85\u8def", "\u531d\u9053", - "\u5168\u5c01\u95ed\u9053\u8def", - "\u672a\u5b9a\u4e49\u4ea4\u901a\u533a\u57df", - "POI\u8fde\u63a5\u8def", "\u96a7\u9053", "\u6b65\u884c\u9053", - "\u516c\u4ea4\u4e13\u7528\u9053", "\u63d0\u524d\u53f3\u8f6c\u9053" ]; - a8.inherits(bl, b5, "DWRoute"); - a8.extend(bl.prototype, { - search : function(cL, T) { - this._queryList.push( { - method : "search", - arguments : [ cL, T ] - }) - } - }); - window.BMAP_DRIVING_POLICY_LEAST_TIME = 0; - window.BMAP_DRIVING_POLICY_LEAST_DISTANCE = 1; - window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS = 2; - function q(T, cL) { - bl.call(this, T, cL); - cL = cL || {}; - this.setPolicy(cL.policy); - this.QUERY_TYPE = bM; - this.RETURN_TYPE = u; - this.ROUTE_TYPE = BMAP_ROUTE_TYPE_DRIVING - } - a8.inherits(q, bl, "DrivingRoute"); - a8.extend(q.prototype, { - setPolicy : function(T) { - if (T >= BMAP_DRIVING_POLICY_LEAST_TIME - && T <= BMAP_DRIVING_POLICY_AVOID_HIGHWAYS) { - this._opts.policy = T - } else { - this._opts.policy = BMAP_DRIVING_POLICY_LEAST_TIME - } - } - }); - function cD(T, cL) { - bl.call(this, T, cL); - this.QUERY_TYPE = bv; - this.RETURN_TYPE = z; - this.ROUTE_TYPE = BMAP_ROUTE_TYPE_WALKING; - this._enableDragging = false - } - a8.inherits(cD, bl, "WalkingRoute"); - function aX(cL) { - this._opts = {}; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(aX, a8.lang.Class, "Geocoder"); - a8.extend(aX.prototype, { - getPoint : function(T, cM, cL) { - this._queryList.push( { - method : "getPoint", - arguments : [ T, cM, cL ] - }) - }, - getLocation : function(T, cM, cL) { - this._queryList.push( { - method : "getLocation", - arguments : [ T, cM, cL ] - }) - }, - toString : function() { - return "Geocoder" - } - }); - function ak(cL) { - this._opts = {}; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.extend(ak.prototype, { - getCurrentPosition : function(cL, T) { - this._queryList.push( { - method : "getCurrentPosition", - arguments : [ cL, T ] - }) - }, - getStatus : function() { - return this._status - } - }); - function b9(cL) { - this._opts = { - renderOptions : { - map : null - } - }; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(b9, a8.lang.Class, "LocalCity"); - a8.extend(b9.prototype, { - get : function(T) { - this._queryList.push( { - method : "get", - arguments : [ T ] - }) - }, - toString : function() { - return "LocalCity" - } - }); - function V() { - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(V, a8.lang.Class, "Boundary"); - a8.extend(V.prototype, { - get : function(cL, T) { - this._queryList.push( { - method : "get", - arguments : [ cL, T ] - }) - }, - toString : function() { - return "Boundary" - } - }); - function bm(cM, cL) { - w.call(this, cM, cL); - this.QUERY_TYPE_BUSLIST = G; - this.RETURN_TYPE_BUSLIST = a2; - this.QUERY_TYPE_BUSLINE = bf; - this.RETURN_TYPE_BUSLINE = cy; - this._queryList = []; - var T = this; - cA.load("buslinesearch", function() { - T._asyncSearch() - }) - } - bm._iconOpen = cc.imgPath + "iw_plus.gif"; - bm._iconClose = cc.imgPath + "iw_minus.gif"; - bm._stopUrl = cc.imgPath + "stop_icon.png"; - a8.inherits(bm, w); - a8.extend(bm.prototype, { - getBusList : function(T) { - this._queryList.push( { - method : "getBusList", - arguments : [ T ] - }) - }, - getBusLine : function(T) { - this._queryList.push( { - method : "getBusLine", - arguments : [ T ] - }) - }, - setGetBusListCompleteCallback : function(T) { - this._opts.onGetBusListComplete = T || function() { - } - }, - setGetBusLineCompleteCallback : function(T) { - this._opts.onGetBusLineComplete = T || function() { - } - }, - setBusListHtmlSetCallback : function(T) { - this._opts.onBusListHtmlSet = T || function() { - } - }, - setBusLineHtmlSetCallback : function(T) { - this._opts.onBusLineHtmlSet = T || function() { - } - }, - setPolylinesSetCallback : function(T) { - this._opts.onPolylinesSet = T || function() { - } - } - }); - function by(cL) { - w.call(this, cL); - cL = cL || {}; - this._options = { - input : null, - types : [], - onSearchComplete : function() { - } - }; - a8.extend(this._options, cL); - this._loc.src = cL.location || "\u5168\u56fd"; - this._word = ""; - this._show = false; - this._suggestion = null; - this._inputValue = ""; - this._initialize(); - _addStat(5011); - var T = this; - cA.load("autocomplete", function() { - T._asyncSearch() - }) - } - a8.inherits(by, w, "Autocomplete"); - a8.extend(by.prototype, { - _initialize : function() { - }, - show : function() { - this._show = true - }, - hide : function() { - this._show = false - }, - setTypes : function(T) { - this._options.types = T - }, - setLocation : function(T) { - this._loc.src = T - }, - search : function(T) { - this._word = T - }, - setInputValue : function(T) { - this._inputValue = T - } - }); - function aj(T, cL) { - window.BMap[T] = cL - } - aj("Map", bz); - aj("Hotspot", cm); - aj("MapType", cu); - aj("Point", cd); - aj("Pixel", bu); - aj("Size", aH); - aj("Bounds", bN); - aj("TileLayer", p); - aj("Projection", bd); - aj("MercatorProjection", ba); - aj("PerspectiveProjection", cE); - aj("Copyright", av); - aj("Overlay", bG); - aj("Label", ag); - aj("Marker", ad); - aj("Icon", M); - aj("Polyline", f); - aj("Polygon", cn); - aj("InfoWindow", bP); - aj("Circle", a); - aj("Control", cp); - aj("NavigationControl", L); - aj("OverviewMapControl", cK); - aj("CopyrightControl", am); - aj("ScaleControl", bK); - aj("MapTypeControl", aL); - aj("TrafficLayer", aC); - aj("ContextMenu", cz); - aj("MenuItem", be); - aj("LocalSearch", a4); - aj("TransitRoute", aU); - aj("DrivingRoute", q); - aj("WalkingRoute", cD); - aj("Autocomplete", by); - aj("Geocoder", aX); - aj("LocalCity", b9); - aj("Geolocation", ak); - aj("BusLineSearch", bm); - aj("Boundary", V); - window.BMap.apiLoad(); -})(); diff --git a/static/BMap/js/bmap_offline_api_v3.0_min.js b/static/BMap/js/bmap_offline_api_v3.0_min.js deleted file mode 100644 index 878b4e9..0000000 --- a/static/BMap/js/bmap_offline_api_v3.0_min.js +++ /dev/null @@ -1,9809 +0,0 @@ -window.TILE_VERSION = { - "ditu": { - "normal": { - "version": "088", - "updateDate": "20180829" - }, - "satellite": { - "version": "009", - "updateDate": "20180829" - }, - "normalTraffic": { - "version": "081", - "updateDate": "20180829" - }, - "satelliteTraffic": { - "version": "083", - "updateDate": "20180829" - }, - "mapJS": { - "version": "104", - "updateDate": "20180829" - }, - "satelliteStreet": { - "version": "083", - "updateDate": "20180829" - }, - "panoClick": { - "version": "1033", - "updateDate": "20180816" - }, - "panoUdt": { - "version": "20180816", - "updateDate": "20180816" - }, - "panoSwfAPI": { - "version": "20150123", - "updateDate": "20150123" - }, - "panoSwfPlace": { - "version": "20141112", - "updateDate": "20141112" - }, - "earthVector": { - "version": "001", - "updateDate": "20180829" - } - }, - "webapp": { - "high_normal": { - "version": "001", - "updateDate": "20180829" - }, - "lower_normal": { - "version": "002", - "updateDate": "20180829" - } - }, - "api_for_mobile": { - "vector": { - "version": "002", - "updateDate": "20180829" - }, - "vectorIcon": { - "version": "002", - "updateDate": "20180829" - } - } -}; -window.BMAP_AUTHENTIC_KEY = ""; -var bmapcfg = { - 'imgext' : '.jpg', //瓦片图的后缀 ------ 根据需要修改,一般是 .png .jpg - 'tiles_dir' : 'static/BMap/maptile/', //普通瓦片图的地址,为空默认在 offlinemap/tiles/ 目录 - 'tiles_hybrid': '', //卫星瓦片图的地址,为空默认在 offlinemap/tiles_hybrid/ 目录 - 'tiles_self' : '', //自定义图层的地址,为空默认在 offlinemap/tiles_self/ 目录 - 'home':'static/BMap/' -}; -(function() { - function aa(a) { - throw a; - } - var l = void 0 - , q = !0 - , s = null - , t = !1; - function u() { - return function() {} - } - function ba(a) { - return function(b) { - this[a] = b - } - } - function w(a) { - return function() { - return this[a] - } - } - function ca(a) { - return function() { - return a - } - } - var da, ea = []; - function ga(a) { - return function() { - return ea[a].apply(this, arguments) - } - } - function ha(a, b) { - return ea[a] = b - } - var ia, z = ia = z || { - version: "1.3.4" - }; - z.aa = "$BAIDU$"; - window[z.aa] = window[z.aa] || {}; - z.object = z.object || {}; - z.extend = z.object.extend = function(a, b) { - for (var c in b) - b.hasOwnProperty(c) && (a[c] = b[c]); - return a - } - ; - z.D = z.D || {}; - z.D.$ = function(a) { - return "string" == typeof a || a instanceof String ? document.getElementById(a) : a && a.nodeName && (1 == a.nodeType || 9 == a.nodeType) ? a : s - } - ; - z.$ = z.Fc = z.D.$; - z.D.U = function(a) { - a = z.D.$(a); - if (a === s) - return a; - a.style.display = "none"; - return a - } - ; - z.U = z.D.U; - z.lang = z.lang || {}; - z.lang.wg = function(a) { - return "[object String]" == Object.prototype.toString.call(a) - } - ; - z.wg = z.lang.wg; - z.D.Oj = function(a) { - return z.lang.wg(a) ? document.getElementById(a) : a - } - ; - z.Oj = z.D.Oj; - z.D.getElementsByClassName = function(a, b) { - var c; - if (a.getElementsByClassName) - c = a.getElementsByClassName(b); - else { - var e = a; - e == s && (e = document); - c = []; - var e = e.getElementsByTagName("*"), f = e.length, g = RegExp("(^|\\s)" + b + "(\\s|$)"), i, k; - for (k = i = 0; i < f; i++) - g.test(e[i].className) && (c[k] = e[i], - k++) - } - return c - } - ; - z.getElementsByClassName = z.D.getElementsByClassName; - z.D.contains = function(a, b) { - var c = z.D.Oj - , a = c(a) - , b = c(b); - return a.contains ? a != b && a.contains(b) : !!(a.compareDocumentPosition(b) & 16) - } - ; - z.ca = z.ca || {}; - /msie (\d+\.\d)/i.test(navigator.userAgent) && (z.ca.ia = z.ia = document.documentMode || +RegExp.$1); - var ja = { - cellpadding: "cellPadding", - cellspacing: "cellSpacing", - colspan: "colSpan", - rowspan: "rowSpan", - valign: "vAlign", - usemap: "useMap", - frameborder: "frameBorder" - }; - 8 > z.ca.ia ? (ja["for"] = "htmlFor", - ja["class"] = "className") : (ja.htmlFor = "for", - ja.className = "class"); - z.D.RG = ja; - z.D.BF = function(a, b, c) { - a = z.D.$(a); - if (a === s) - return a; - if ("style" == b) - a.style.cssText = c; - else { - b = z.D.RG[b] || b; - a.setAttribute(b, c) - } - return a - } - ; - z.BF = z.D.BF; - z.D.CF = function(a, b) { - a = z.D.$(a); - if (a === s) - return a; - for (var c in b) - z.D.BF(a, c, b[c]); - return a - } - ; - z.CF = z.D.CF; - z.Wk = z.Wk || {}; - (function() { - var a = RegExp("(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+$)", "g"); - z.Wk.trim = function(b) { - return ("" + b).replace(a, "") - } - } - )(); - z.trim = z.Wk.trim; - z.Wk.Wo = function(a, b) { - var a = "" + a - , c = Array.prototype.slice.call(arguments, 1) - , e = Object.prototype.toString; - if (c.length) { - c = c.length == 1 ? b !== s && /\[object Array\]|\[object Object\]/.test(e.call(b)) ? b : c : c; - return a.replace(/#\{(.+?)\}/g, function(a, b) { - var i = c[b]; - "[object Function]" == e.call(i) && (i = i(b)); - return "undefined" == typeof i ? "" : i - }) - } - return a - } - ; - z.Wo = z.Wk.Wo; - z.D.Pb = function(a, b) { - a = z.D.$(a); - if (a === s) - return a; - for (var c = a.className.split(/\s+/), e = b.split(/\s+/), f, g = e.length, i, k = 0; k < g; ++k) { - i = 0; - for (f = c.length; i < f; ++i) - if (c[i] == e[k]) { - c.splice(i, 1); - break - } - } - a.className = c.join(" "); - return a - } - ; - z.Pb = z.D.Pb; - z.D.Vx = function(a, b, c) { - a = z.D.$(a); - if (a === s) - return a; - var e; - if (a.insertAdjacentHTML) - a.insertAdjacentHTML(b, c); - else { - e = a.ownerDocument.createRange(); - b = b.toUpperCase(); - if (b == "AFTERBEGIN" || b == "BEFOREEND") { - e.selectNodeContents(a); - e.collapse(b == "AFTERBEGIN") - } else { - b = b == "BEFOREBEGIN"; - e[b ? "setStartBefore" : "setEndAfter"](a); - e.collapse(b) - } - e.insertNode(e.createContextualFragment(c)) - } - return a - } - ; - z.Vx = z.D.Vx; - z.D.show = function(a) { - a = z.D.$(a); - if (a === s) - return a; - a.style.display = ""; - return a - } - ; - z.show = z.D.show; - z.D.QD = function(a) { - a = z.D.$(a); - return a === s ? a : a.nodeType == 9 ? a : a.ownerDocument || a.document - } - ; - z.D.Ua = function(a, b) { - a = z.D.$(a); - if (a === s) - return a; - for (var c = b.split(/\s+/), e = a.className, f = " " + e + " ", g = 0, i = c.length; g < i; g++) - f.indexOf(" " + c[g] + " ") < 0 && (e = e + (" " + c[g])); - a.className = e; - return a - } - ; - z.Ua = z.D.Ua; - z.D.PB = z.D.PB || {}; - z.D.Ol = z.D.Ol || []; - z.D.Ol.filter = function(a, b, c) { - for (var e = 0, f = z.D.Ol, g; g = f[e]; e++) - if (g = g[c]) - b = g(a, b); - return b - } - ; - z.Wk.RO = function(a) { - return a.indexOf("-") < 0 && a.indexOf("_") < 0 ? a : a.replace(/[-_][^-_]/g, function(a) { - return a.charAt(1).toUpperCase() - }) - } - ; - z.D.m0 = function(a) { - z.D.it(a, "expand") ? z.D.Pb(a, "expand") : z.D.Ua(a, "expand") - } - ; - z.D.it = function(a) { - if (arguments.length <= 0 || typeof a === "function") - return this; - if (this.size() <= 0) - return t; - var a = a.replace(/^\s+/g, "").replace(/\s+$/g, "").replace(/\s+/g, " "), b = a.split(" "), c; - z.forEach(this, function(a) { - for (var a = a.className, f = 0; f < b.length; f++) - if (!~(" " + a + " ").indexOf(" " + b[f] + " ")) { - c = t; - return - } - c !== t && (c = q) - }); - return c - } - ; - z.D.oj = function(a, b) { - var c = z.D - , a = c.$(a); - if (a === s) - return a; - var b = z.Wk.RO(b) - , e = a.style[b]; - if (!e) - var f = c.PB[b] - , e = a.currentStyle || (z.ca.ia ? a.style : getComputedStyle(a, s)) - , e = f && f.get ? f.get(a, e) : e[f || b]; - if (f = c.Ol) - e = f.filter(b, e, "get"); - return e - } - ; - z.oj = z.D.oj; - /opera\/(\d+\.\d)/i.test(navigator.userAgent) && (z.ca.opera = +RegExp.$1); - z.ca.HM = /webkit/i.test(navigator.userAgent); - z.ca.VY = /gecko/i.test(navigator.userAgent) && !/like gecko/i.test(navigator.userAgent); - z.ca.DE = "CSS1Compat" == document.compatMode; - z.D.ga = function(a) { - a = z.D.$(a); - if (a === s) - return a; - var b = z.D.QD(a) - , c = z.ca - , e = z.D.oj; - c.VY > 0 && b.getBoxObjectFor && e(a, "position"); - var f = { - left: 0, - top: 0 - }, g; - if (a == (c.ia && !c.DE ? b.body : b.documentElement)) - return f; - if (a.getBoundingClientRect) { - a = a.getBoundingClientRect(); - f.left = Math.floor(a.left) + Math.max(b.documentElement.scrollLeft, b.body.scrollLeft); - f.top = Math.floor(a.top) + Math.max(b.documentElement.scrollTop, b.body.scrollTop); - f.left = f.left - b.documentElement.clientLeft; - f.top = f.top - b.documentElement.clientTop; - a = b.body; - b = parseInt(e(a, "borderLeftWidth")); - e = parseInt(e(a, "borderTopWidth")); - if (c.ia && !c.DE) { - f.left = f.left - (isNaN(b) ? 2 : b); - f.top = f.top - (isNaN(e) ? 2 : e) - } - } else { - g = a; - do { - f.left = f.left + g.offsetLeft; - f.top = f.top + g.offsetTop; - if (c.HM > 0 && e(g, "position") == "fixed") { - f.left = f.left + b.body.scrollLeft; - f.top = f.top + b.body.scrollTop; - break - } - g = g.offsetParent - } while (g && g != a);if (c.opera > 0 || c.HM > 0 && e(a, "position") == "absolute") - f.top = f.top - b.body.offsetTop; - for (g = a.offsetParent; g && g != b.body; ) { - f.left = f.left - g.scrollLeft; - if (!c.opera || g.tagName != "TR") - f.top = f.top - g.scrollTop; - g = g.offsetParent - } - } - return f - } - ; - /firefox\/(\d+\.\d)/i.test(navigator.userAgent) && (z.ca.Te = +RegExp.$1); - /BIDUBrowser/i.test(navigator.userAgent) && (z.ca.n2 = q); - var ka = navigator.userAgent; - /(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(ka) && !/chrome/i.test(ka) && (z.ca.Iy = +(RegExp.$1 || RegExp.$2)); - /chrome\/(\d+\.\d)/i.test(navigator.userAgent) && (z.ca.Qw = +RegExp.$1); - z.mc = z.mc || {}; - z.mc.Fb = function(a, b) { - var c, e, f = a.length; - if ("function" == typeof b) - for (e = 0; e < f; e++) { - c = a[e]; - c = b.call(a, c, e); - if (c === t) - break - } - return a - } - ; - z.Fb = z.mc.Fb; - z.lang.aa = function() { - return "TANGRAM__" + (window[z.aa]._counter++).toString(36) - } - ; - window[z.aa]._counter = window[z.aa]._counter || 1; - window[z.aa]._instances = window[z.aa]._instances || {}; - z.lang.wt = function(a) { - return "[object Function]" == Object.prototype.toString.call(a) - } - ; - z.lang.Ca = function(a) { - this.aa = a || z.lang.aa(); - window[z.aa]._instances[this.aa] = this - } - ; - window[z.aa]._instances = window[z.aa]._instances || {}; - z.lang.Ca.prototype.ci = ga(0); - z.lang.Ca.prototype.toString = function() { - return "[object " + (this.UQ || "Object") + "]" - } - ; - z.lang.Ju = function(a, b) { - this.type = a; - this.returnValue = q; - this.target = b || s; - this.currentTarget = s - } - ; - z.lang.Ca.prototype.addEventListener = function(a, b, c) { - if (z.lang.wt(b)) { - !b.fl && (b.fl = {}); - !this.Ci && (this.Ci = {}); - var e = this.Ci, f; - if (typeof c == "string" && c) { - /[^\w\-]/.test(c) && aa("nonstandard key:" + c); - f = b.Nx = c - } - a.indexOf("on") != 0 && (a = "on" + a); - typeof e[a] != "object" && (e[a] = {}); - typeof b.fl[a] != "object" && (b.fl[a] = {}); - f = f || z.lang.aa(); - b.fl[a].Nx = f; - e[a][f] = b - } - } - ; - z.lang.Ca.prototype.removeEventListener = function(a, b) { - a.indexOf("on") != 0 && (a = "on" + a); - if (z.lang.wt(b)) { - if (!b.fl || !b.fl[a]) - return; - b = b.fl[a].Nx - } else if (!z.lang.wg(b)) - return; - !this.Ci && (this.Ci = {}); - var c = this.Ci; - c[a] && c[a][b] && delete c[a][b] - } - ; - z.lang.Ca.prototype.dispatchEvent = function(a, b) { - z.lang.wg(a) && (a = new z.lang.Ju(a)); - !this.Ci && (this.Ci = {}); - var b = b || {}, c; - for (c in b) - a[c] = b[c]; - var e = this.Ci - , f = a.type; - a.target = a.target || this; - a.currentTarget = this; - f.indexOf("on") != 0 && (f = "on" + f); - z.lang.wt(this[f]) && this[f].apply(this, arguments); - if (typeof e[f] == "object") - for (c in e[f]) - e[f][c].apply(this, arguments); - return a.returnValue - } - ; - z.lang.ta = function(a, b, c) { - var e, f, g = a.prototype; - f = new Function; - f.prototype = b.prototype; - f = a.prototype = new f; - for (e in g) - f[e] = g[e]; - a.prototype.constructor = a; - a.b0 = b.prototype; - if ("string" == typeof c) - f.UQ = c - } - ; - z.ta = z.lang.ta; - z.lang.Nc = function(a) { - return window[z.aa]._instances[a] || s - } - ; - z.platform = z.platform || {}; - z.platform.AM = /macintosh/i.test(navigator.userAgent); - z.platform.h4 = /MicroMessenger/i.test(navigator.userAgent); - z.platform.IM = /windows/i.test(navigator.userAgent); - z.platform.cZ = /x11/i.test(navigator.userAgent); - z.platform.Jm = /android/i.test(navigator.userAgent); - /android (\d+\.\d)/i.test(navigator.userAgent) && (z.platform.dK = z.dK = RegExp.$1); - z.platform.XY = /ipad/i.test(navigator.userAgent); - z.platform.zE = /iphone/i.test(navigator.userAgent); - function la(a, b) { - a.domEvent = b = window.event || b; - a.clientX = b.clientX || b.pageX; - a.clientY = b.clientY || b.pageY; - a.offsetX = b.offsetX || b.layerX; - a.offsetY = b.offsetY || b.layerY; - a.screenX = b.screenX; - a.screenY = b.screenY; - a.ctrlKey = b.ctrlKey || b.metaKey; - a.shiftKey = b.shiftKey; - a.altKey = b.altKey; - if (b.touches) { - a.touches = []; - for (var c = 0; c < b.touches.length; c++) - a.touches.push({ - clientX: b.touches[c].clientX, - clientY: b.touches[c].clientY, - screenX: b.touches[c].screenX, - screenY: b.touches[c].screenY, - pageX: b.touches[c].pageX, - pageY: b.touches[c].pageY, - target: b.touches[c].target, - identifier: b.touches[c].identifier - }) - } - if (b.changedTouches) { - a.changedTouches = []; - for (c = 0; c < b.changedTouches.length; c++) - a.changedTouches.push({ - clientX: b.changedTouches[c].clientX, - clientY: b.changedTouches[c].clientY, - screenX: b.changedTouches[c].screenX, - screenY: b.changedTouches[c].screenY, - pageX: b.changedTouches[c].pageX, - pageY: b.changedTouches[c].pageY, - target: b.changedTouches[c].target, - identifier: b.changedTouches[c].identifier - }) - } - if (b.targetTouches) { - a.targetTouches = []; - for (c = 0; c < b.targetTouches.length; c++) - a.targetTouches.push({ - clientX: b.targetTouches[c].clientX, - clientY: b.targetTouches[c].clientY, - screenX: b.targetTouches[c].screenX, - screenY: b.targetTouches[c].screenY, - pageX: b.targetTouches[c].pageX, - pageY: b.targetTouches[c].pageY, - target: b.targetTouches[c].target, - identifier: b.targetTouches[c].identifier - }) - } - a.rotation = b.rotation; - a.scale = b.scale; - return a - } - z.lang.hx = function(a) { - var b = window[z.aa]; - b.eT && delete b.eT[a] - } - ; - z.event = {}; - z.M = z.event.M = function(a, b, c) { - if (!(a = z.$(a))) - return a; - b = b.replace(/^on/, ""); - a.addEventListener ? a.addEventListener(b, c, t) : a.attachEvent && a.attachEvent("on" + b, c); - return a - } - ; - z.ed = z.event.ed = function(a, b, c) { - if (!(a = z.$(a))) - return a; - b = b.replace(/^on/, ""); - a.removeEventListener ? a.removeEventListener(b, c, t) : a.detachEvent && a.detachEvent("on" + b, c); - return a - } - ; - z.D.it = function(a, b) { - if (!a || !a.className || typeof a.className != "string") - return t; - var c = -1; - try { - c = a.className == b || a.className.search(RegExp("(\\s|^)" + b + "(\\s|$)")) - } catch (e) { - return t - } - return c > -1 - } - ; - z.iL = function() { - function a(a) { - document.addEventListener && (this.element = a, - this.lL = this.Dk ? "touchstart" : "mousedown", - this.xD = this.Dk ? "touchmove" : "mousemove", - this.wD = this.Dk ? "touchend" : "mouseup", - this.oh = t, - this.mu = this.lu = 0, - this.element.addEventListener(this.lL, this, t), - ia.M(this.element, "mousedown", u()), - this.handleEvent(s)) - } - a.prototype = { - Dk: "ontouchstart"in window || "createTouch"in document, - start: function(a) { - ma(a); - this.oh = t; - this.lu = this.Dk ? a.touches[0].clientX : a.clientX; - this.mu = this.Dk ? a.touches[0].clientY : a.clientY; - this.element.addEventListener(this.xD, this, t); - this.element.addEventListener(this.wD, this, t) - }, - move: function(a) { - na(a); - var c = this.Dk ? a.touches[0].clientY : a.clientY; - if (10 < Math.abs((this.Dk ? a.touches[0].clientX : a.clientX) - this.lu) || 10 < Math.abs(c - this.mu)) - this.oh = q - }, - end: function(a) { - na(a); - this.oh || (a = document.createEvent("Event"), - a.initEvent("tap", t, q), - this.element.dispatchEvent(a)); - this.element.removeEventListener(this.xD, this, t); - this.element.removeEventListener(this.wD, this, t) - }, - handleEvent: function(a) { - if (a) - switch (a.type) { - case this.lL: - this.start(a); - break; - case this.xD: - this.move(a); - break; - case this.wD: - this.end(a) - } - } - }; - return function(b) { - return new a(b) - } - }(); - var B = window.BMap || {}; - B.version = "3.0"; - B.gV = 0.34 > Math.random(); - 0 <= B.version.indexOf("#") && (B.version = "3.0"); - B.Fr = []; - B.Ye = function(a) { - this.Fr.push(a) - } - ; - B.ur = []; - B.Tm = function(a) { - this.ur.push(a) - } - ; - B.vV = B.apiLoad || u(); - B.Q0 = B.verify || function() { - B.version && B.version >= 1.5 && oa(B.Wc + "?qt=verify&ak=" + qa, function(a) { - if (a && a.error !== 0) { - if (typeof map !== "undefined") { - map.La().innerHTML = ""; - map.Ci = {} - } - B = s; - var b = "\u767e\u5ea6\u672a\u6388\u6743\u4f7f\u7528\u5730\u56feAPI\uff0c\u53ef\u80fd\u662f\u56e0\u4e3a\u60a8\u63d0\u4f9b\u7684\u5bc6\u94a5\u4e0d\u662f\u6709\u6548\u7684\u767e\u5ea6LBS\u5f00\u653e\u5e73\u53f0\u5bc6\u94a5\uff0c\u6216\u6b64\u5bc6\u94a5\u672a\u5bf9\u672c\u5e94\u7528\u7684\u767e\u5ea6\u5730\u56feJavaScriptAPI\u6388\u6743\u3002\u60a8\u53ef\u4ee5\u8bbf\u95ee\u5982\u4e0b\u7f51\u5740\u4e86\u89e3\u5982\u4f55\u83b7\u53d6\u6709\u6548\u7684\u5bc6\u94a5\uff1ahttp://lbsyun.baidu.com/apiconsole/key#\u3002"; - switch (a.error) { - case 101: - b = "\u5f00\u53d1\u8005\u7981\u7528\u4e86\u8be5ak\u7684jsapi\u670d\u52a1\u6743\u9650\u3002\u60a8\u53ef\u4ee5\u8bbf\u95ee\u5982\u4e0b\u7f51\u5740\u4e86\u89e3\u5982\u4f55\u83b7\u53d6\u6709\u6548\u7684\u5bc6\u94a5\uff1ahttp://lbsyun.baidu.com/apiconsole/key#\u3002"; - break; - case 102: - b = "\u5f00\u53d1\u8005Referer\u4e0d\u6b63\u786e\u3002\u60a8\u53ef\u4ee5\u8bbf\u95ee\u5982\u4e0b\u7f51\u5740\u4e86\u89e3\u5982\u4f55\u83b7\u53d6\u6709\u6548\u7684\u5bc6\u94a5\uff1ahttp://lbsyun.baidu.com/apiconsole/key#\u3002" - } - alert(b) - } - }) - } - ; - var qa = window.BMAP_AUTHENTIC_KEY; - window.BMAP_AUTHENTIC_KEY = s; - var ra = window.BMap_loadScriptTime - , sa = (new Date).getTime() - , ta = s - , ua = q - , va = 5042 - , xa = 5002 - , ya = 5003 - , za = "load_mapclick" - , Aa = 5038 - , Ba = 5041 - , Ca = 5047 - , Da = 5036 - , Ea = 5039 - , Fa = 5037 - , Ga = 5040 - , Ha = 5011 - , Ia = 7E3; - var Ja = 0; - function Ka(a, b) { - if (a = z.$(a)) { - var c = this; - z.lang.Ca.call(c); - b = b || {}; - c.K = { - tC: 200, - Wb: q, - px: t, - nD: q, - To: q, - Uo: b.enableWheelZoom || t, - gL: q, - pD: q, - Ns: q, - nx: q, - tD: q, - Ro: b.enable3DBuilding || t, - Ic: 25, - b1: 240, - iV: 450, - Vb: G.Vb, - Hd: G.Hd, - Yx: !!b.Yx, - gc: Math.round(b.minZoom) || 1, - Yb: Math.round(b.maxZoom) || 19, - Hb: b.mapType || La, - e5: t, - cL: b.drawer || Ja, - ox: q, - lx: 500, - aX: b.enableHighResolution !== t, - fj: b.enableMapClick !== t, - devicePixelRatio: b.devicePixelRatio || window.devicePixelRatio || 1, - fG: 99, - ye: b.mapStyle || s, - jZ: b.logoControl === t ? t : q, - DV: [], - Kw: b.beforeClickIcon || s, - Ms: t, - qN: q - }; - c.K.ye && (this.LY(c.K.ye.controls), - this.sM(c.K.ye.geotableId)); - c.K.ye && c.K.ye.styleId && c.O3(c.K.ye.styleId); - c.K.fm = { - dark: { - backColor: "#2D2D2D", - textColor: "#bfbfbf", - iconUrl: "dicons" - }, - normal: { - backColor: "#F3F1EC", - textColor: "#c61b1b", - iconUrl: "icons" - }, - light: { - backColor: "#EBF8FC", - textColor: "#017fb4", - iconUrl: "licons" - } - }; - b.enableAutoResize && (c.K.nx = b.enableAutoResize); - b.enableStreetEntrance === t && (c.K.tD = b.enableStreetEntrance); - b.enableDeepZoom === t && (c.K.gL = b.enableDeepZoom); - var e = c.K.DV; - if (H()) - for (var f = 0, g = e.length; f < g; f++) - if (z.ca[e[f]]) { - c.K.devicePixelRatio = 1; - break - } - e = -1 < navigator.userAgent.toLowerCase().indexOf("android"); - f = -1 < navigator.userAgent.toLowerCase().indexOf("mqqbrowser"); - if (-1 < navigator.userAgent.toLowerCase().indexOf("UCBrowser") || e && f) - c.K.fG = 99; - c.Wa = a; - c.IB(a); - a.unselectable = "on"; - a.innerHTML = ""; - a.appendChild(c.va()); - b.size && this.Ce(b.size); - e = c.cb(); - c.width = e.width; - c.height = e.height; - c.offsetX = 0; - c.offsetY = 0; - c.platform = a.firstChild; - c.ze = c.platform.firstChild; - c.ze.style.width = c.width + "px"; - c.ze.style.height = c.height + "px"; - c.Yd = {}; - c.re = new J(0,0); - c.fc = new J(0,0); - c.Oa = 3; - c.Oc = 0; - c.LC = s; - c.KC = s; - c.Ub = ""; - c.Rw = ""; - c.Jh = {}; - c.Jh.custom = {}; - c.Sa = 0; - b.useWebGL === t && Na(t); - c.P = new Oa(a,{ - of: "api", - jT: q - }); - c.P.U(); - c.P.GF(c); - b = b || {}; - e = c.Hb = c.K.Hb; - c.cd = e.wm(); - e === Qa && Ra(xa); - e === Sa && Ra(ya); - e = c.K; - e.hP = Math.round(b.minZoom); - e.gP = Math.round(b.maxZoom); - c.bv(); - c.R = { - Jc: t, - nc: 0, - Bt: 0, - MM: 0, - l4: 0, - lC: t, - pF: -1, - Qe: [] - }; - c.platform.style.cursor = c.K.Vb; - for (f = 0; f < B.Fr.length; f++) - B.Fr[f](c); - c.R.pF = f; - c.ba(); - K.load("map", function() { - c.ib() - }); - c.K.fj && (setTimeout(function() { - Ra(za) - }, 1E3), - K.load("mapclick", function() { - window.MPC_Mgr = window.MPC_Mgr || {}; - window.MPC_Mgr[c.aa] = new Ta(c) - }, q)); - Ua() && K.load("oppc", function() { - c.Dz() - }); - H() && K.load("opmb", function() { - c.Dz() - }); - a = s; - c.WB = [] - } - } - z.lang.ta(Ka, z.lang.Ca, "Map"); - z.extend(Ka.prototype, { - va: function() { - var a = L("div") - , b = a.style; - b.overflow = "visible"; - b.position = "absolute"; - b.zIndex = "0"; - b.top = b.left = "0px"; - var b = L("div", { - "class": "BMap_mask" - }) - , c = b.style; - c.position = "absolute"; - c.top = c.left = "0px"; - c.zIndex = "9"; - c.overflow = "hidden"; - c.WebkitUserSelect = "none"; - a.appendChild(b); - return a - }, - IB: function(a) { - var b = a.style; - b.overflow = "hidden"; - "absolute" !== Va(a).position && (b.position = "relative", - b.zIndex = 0); - b.backgroundColor = "#F3F1EC"; - b.color = "#000"; - b.textAlign = "left" - }, - ba: function() { - var a = this; - a.as = function() { - var b = a.cb(); - if (a.width !== b.width || a.height !== b.height) { - var c = new O(a.width,a.height) - , e = new P("onbeforeresize"); - e.size = c; - a.dispatchEvent(e); - a.ik((b.width - a.width) / 2, (b.height - a.height) / 2); - a.ze.style.width = (a.width = b.width) + "px"; - a.ze.style.height = (a.height = b.height) + "px"; - c = new P("onresize"); - c.size = b; - a.dispatchEvent(c) - } - } - ; - a.K.nx && (a.R.es = setInterval(a.as, 80)) - }, - ik: function(a, b, c, e) { - var f = this.oa().dc(this.fa()) - , g = this.cd - , i = q; - c && J.yM(c) && (this.re = new J(c.lng,c.lat), - i = t); - if (c = c && e ? g.vj(c, this.Ub) : this.fc) - if (this.fc = new J(c.lng + a * f,c.lat - b * f), - (a = g.nh(this.fc, this.Ub)) && i) - this.re = a - }, - Gg: function(a, b) { - if (Wa(a) && (this.bv(), - this.dispatchEvent(new P("onzoomstart")), - a = this.Yn(a).zoom, - a !== this.Oa)) { - this.Oc = this.Oa; - this.Oa = a; - var c; - b ? c = b : this.hh() && (c = this.hh().ga()); - c && (c = this.$b(c, this.Oc), - this.ik(this.width / 2 - c.x, this.height / 2 - c.y, this.xb(c, this.Oc), q)); - this.dispatchEvent(new P("onzoomstartcode")) - } - }, - Qc: function(a) { - this.Gg(a) - }, - kG: function(a) { - this.Gg(this.Oa + 1, a) - }, - lG: function(a) { - this.Gg(this.Oa - 1, a) - }, - qi: function(a) { - a instanceof J && (this.fc = this.cd.vj(a, this.Ub), - this.re = J.yM(a) ? new J(a.lng,a.lat) : this.cd.nh(this.fc, this.Ub)) - }, - Ag: function(a, b) { - a = Math.round(a) || 0; - b = Math.round(b) || 0; - this.ik(-a, -b) - }, - Aw: function(a) { - a && Xa(a.He) && (a.He(this), - this.dispatchEvent(new P("onaddcontrol",a))) - }, - VN: function(a) { - a && Xa(a.remove) && (a.remove(), - this.dispatchEvent(new P("onremovecontrol",a))) - }, - yo: function(a) { - a && Xa(a.na) && (a.na(this), - this.dispatchEvent(new P("onaddcontextmenu",a))) - }, - Cp: function(a) { - a && Xa(a.remove) && (this.dispatchEvent(new P("onremovecontextmenu",a)), - a.remove()) - }, - Ga: function(a) { - a && Xa(a.He) && (a.He(this), - this.dispatchEvent(new P("onaddoverlay",a))) - }, - Qb: function(a) { - a && Xa(a.remove) && (a.remove(), - this.dispatchEvent(new P("onremoveoverlay",a))) - }, - yK: function() { - this.dispatchEvent(new P("onclearoverlays")) - }, - Oe: function(a) { - a && this.dispatchEvent(new P("onaddtilelayer",a)) - }, - Yf: function(a) { - a && this.dispatchEvent(new P("onremovetilelayer",a)) - }, - Dg: function(a) { - if (this.Hb !== a) { - var b = new P("onsetmaptype"); - b.V4 = this.Hb; - this.Hb = this.K.Hb = a; - this.cd = this.Hb.wm(); - this.ik(0, 0, this.Ka(), q); - this.bv(); - var c = this.Yn(this.fa()).zoom; - this.Gg(c); - this.dispatchEvent(b); - b = new P("onmaptypechange"); - b.Oa = c; - b.Hb = a; - this.dispatchEvent(b); - (a === Ya || a === Sa) && Ra(ya) - } - }, - Zf: function(a) { - var b = this; - if (a instanceof J) - b.qi(a, { - noAnimation: q - }); - else if ($a(a)) - if (b.Hb === Qa) { - var c = G.pC[a]; - c && (pt = c.k, - b.Zf(pt)) - } else { - var e = this.WH(); - e.JF(function(c) { - 0 === e.xm() && 2 === e.Ia.result.type && (b.Zf(c.Ak(0).point), - Qa.wk(a) && b.DF(a)) - }); - e.search(a, { - log: "center" - }) - } - }, - Fd: function(a, b) { - "[object Undefined]" !== Object.prototype.toString.call(b) && (b = parseInt(b)); - B.Fn("cus.fire", "time", { - z_loadscripttime: sa - ra - }); - var c = this; - if ($a(a)) - if (c.Hb === Qa) { - var e = G.pC[a]; - e && (pt = e.k, - c.Fd(pt, b)) - } else { - var f = c.WH(); - f.JF(function(e) { - if (0 === f.xm() && (2 === f.Ia.result.type || 11 === f.Ia.result.type)) { - var e = e.Ak(0).point - , g = b || ab.tx(f.Ia.content.level, c); - c.Fd(e, g); - Qa.wk(a) && c.DF(a) - } - }); - f.search(a, { - log: "center" - }) - } - else if (a instanceof J && b) { - b = c.Yn(b).zoom; - c.Oc = c.Oa || b; - c.Oa = b; - e = c.re; - c.re = new J(a.lng,a.lat); - c.fc = c.cd.vj(c.re, c.Ub); - c.LC = c.LC || c.Oa; - c.KC = c.KC || c.re; - var g = new P("onload") - , i = new P("onloadcode"); - g.point = new J(a.lng,a.lat); - g.pixel = c.$b(c.re, c.Oa); - g.zoom = b; - c.loaded || (c.loaded = q, - c.dispatchEvent(g), - ta || (ta = bb())); - c.dispatchEvent(i); - g = new P("onmoveend"); - g.mv = "centerAndZoom"; - e.pb(c.re) || c.dispatchEvent(g); - c.dispatchEvent(new P("onmoveend")); - c.Oc !== c.Oa && (e = new P("onzoomend"), - e.mv = "centerAndZoom", - c.dispatchEvent(e)); - c.K.Ro && c.Ro() - } - }, - WH: function() { - this.R.YM || (this.R.YM = new cb(1)); - return this.R.YM - }, - reset: function() { - this.Fd(this.KC, this.LC, q) - }, - enableDragging: function() { - this.K.Wb = q - }, - disableDragging: function() { - this.K.Wb = t - }, - enableInertialDragging: function() { - this.K.ox = q - }, - disableInertialDragging: function() { - this.K.ox = t - }, - enableScrollWheelZoom: function() { - this.K.Uo = q - }, - disableScrollWheelZoom: function() { - this.K.Uo = t - }, - enableContinuousZoom: function() { - this.K.To = q - }, - disableContinuousZoom: function() { - this.K.To = t - }, - enableDoubleClickZoom: function() { - this.K.nD = q - }, - disableDoubleClickZoom: function() { - this.K.nD = t - }, - enableKeyboard: function() { - this.K.px = q - }, - disableKeyboard: function() { - this.K.px = t - }, - enablePinchToZoom: function() { - this.K.Ns = q - }, - disablePinchToZoom: function() { - this.K.Ns = t - }, - enableAutoResize: function() { - this.K.nx = q; - this.as(); - this.R.es || (this.R.es = setInterval(this.as, 80)) - }, - disableAutoResize: function() { - this.K.nx = t; - this.R.es && (clearInterval(this.R.es), - this.R.es = s) - }, - Ro: function() { - this.K.Ro = q; - this.Nn || (this.Nn = new db({ - pL: q - }), - this.Oe(this.Nn)) - }, - KW: function() { - this.K.Ro = t; - this.Nn && (this.Yf(this.Nn), - this.Nn = s, - delete this.Nn) - }, - cb: function() { - return this.xs && this.xs instanceof O ? new O(this.xs.width,this.xs.height) : new O(this.Wa.clientWidth,this.Wa.clientHeight) - }, - Ce: function(a) { - a && a instanceof O ? (this.xs = a, - this.Wa.style.width = a.width + "px", - this.Wa.style.height = a.height + "px") : this.xs = s - }, - Ka: w("re"), - fa: w("Oa"), - ZV: function() { - this.as() - }, - Yn: function(a) { - var b = this.K.gc - , c = this.K.Yb - , e = t - , a = Math.round(a); - a < b && (e = q, - a = b); - a > c && (e = q, - a = c); - return { - zoom: a, - yD: e - } - }, - La: w("Wa"), - $b: function(a, b) { - b = b || this.fa(); - return this.cd.$b(a, b, this.fc, this.cb(), this.Ub) - }, - xb: function(a, b) { - b = b || this.fa(); - return this.cd.xb(a, b, this.fc, this.cb(), this.Ub) - }, - Xe: function(a, b) { - if (a) { - var c = this.$b(new J(a.lng,a.lat), b); - c.x -= this.offsetX; - c.y -= this.offsetY; - return c - } - }, - JN: function(a, b) { - if (a) { - var c = new Q(a.x,a.y); - c.x += this.offsetX; - c.y += this.offsetY; - return this.xb(c, b) - } - }, - pointToPixelFor3D: function(a, b) { - var c = map.Ub; - this.Hb === Qa && c && eb.EK(a, this, b) - }, - P4: function(a, b) { - var c = map.Ub; - this.Hb === Qa && c && eb.DK(a, this, b) - }, - Q4: function(a, b) { - var c = this - , e = map.Ub; - c.Hb === Qa && e && eb.EK(a, c, function(a) { - a.x -= c.offsetX; - a.y -= c.offsetY; - b && b(a) - }) - }, - L4: function(a, b) { - var c = map.Ub; - this.Hb === Qa && c && (a.x += this.offsetX, - a.y += this.offsetY, - eb.DK(a, this, b)) - }, - ve: function(a) { - if (!this.Xx()) - return new fb; - var b = a || {} - , a = b.margins || [0, 0, 0, 0] - , c = b.zoom || s - , b = this.xb({ - x: a[3], - y: this.height - a[2] - }, c) - , a = this.xb({ - x: this.width - a[1], - y: a[0] - }, c); - return new fb(b,a) - }, - Xx: function() { - return !!this.loaded - }, - nS: function(a, b) { - for (var c = this.oa(), e = b.margins || [10, 10, 10, 10], f = b.zoomFactor || 0, g = e[1] + e[3], e = e[0] + e[2], i = c.bp(), k = c = c.sm(); k >= i; k--) { - var m = this.oa().dc(k); - if (a.YF().lng / m < this.width - g && a.YF().lat / m < this.height - e) - break - } - k += f; - k < i && (k = i); - k > c && (k = c); - return k - }, - ht: function(a, b) { - var c = { - center: this.Ka(), - zoom: this.fa() - }; - if (!a || !a instanceof fb && 0 === a.length || a instanceof fb && a.tj()) - return c; - var e = []; - a instanceof fb ? (e.push(a.Rf()), - e.push(a.Ve())) : e = a.slice(0); - for (var b = b || {}, f = [], g = 0, i = e.length; g < i; g++) - f.push(this.cd.vj(e[g], this.Ub)); - e = new fb; - for (g = f.length - 1; 0 <= g; g--) - e.extend(f[g]); - if (e.tj()) - return c; - c = e.Ka(); - f = this.nS(e, b); - b.margins && (e = b.margins, - g = (e[1] - e[3]) / 2, - e = (e[0] - e[2]) / 2, - i = this.oa().dc(f), - b.offset && (g = b.offset.width, - e = b.offset.height), - c.lng += i * g, - c.lat += i * e); - c = this.cd.nh(c, this.Ub); - return { - center: c, - zoom: f - } - }, - yh: function(a, b) { - var c; - c = a && a.center ? a : this.ht(a, b); - var b = b || {} - , e = b.delay || 200; - if (c.zoom === this.Oa && b.enableAnimation !== t) { - var f = this; - setTimeout(function() { - f.qi(c.center, { - duration: 210 - }) - }, e) - } else - this.Fd(c.center, c.zoom) - }, - Tf: w("Yd"), - hh: function() { - return this.R.qb && this.R.qb.Xa() ? this.R.qb : s - }, - getDistance: function(a, b) { - if (a && b) { - if (a.pb(b)) - return 0; - var c = 0 - , c = S.$o(a, b); - if (c === s || c === l) - c = 0; - return c - } - }, - Hx: function() { - var a = [] - , b = this.ya - , c = this.Ee; - if (b) - for (var e in b) - b[e]instanceof gb && a.push(b[e]); - if (c) { - e = 0; - for (b = c.length; e < b; e++) - a.push(c[e]) - } - return a - }, - oa: w("Hb"), - Dz: function() { - for (var a = this.R.pF; a < B.Fr.length; a++) - B.Fr[a](this); - this.R.pF = a - }, - DF: function(a) { - //修改 setCurrentCity - //i_setCurrentCity(this, a); - this.Ub = Qa.wk(a); - this.Rw = Qa.BL(this.Ub); - this.Hb === Qa && this.cd instanceof hb && (this.cd.$i = this.Ub) - }, - setDefaultCursor: function(a) { - this.K.Vb = a; - this.platform && (this.platform.style.cursor = this.K.Vb) - }, - getDefaultCursor: function() { - return this.K.Vb - }, - setDraggingCursor: function(a) { - this.K.Hd = a - }, - getDraggingCursor: function() { - return this.K.Hd - }, - Sx: function() { - return this.K.aX && 1.5 <= this.K.devicePixelRatio - }, - Cw: function(a, b) { - b ? this.Jh[b] || (this.Jh[b] = {}) : b = "custom"; - a.tag = b; - a instanceof ib && (this.Jh[b][a.aa] = a, - a.na(this)); - var c = this; - K.load("hotspot", function() { - c.Dz() - }, q) - }, - VZ: function(a, b) { - b || (b = "custom"); - this.Jh[b][a.aa] && delete this.Jh[b][a.aa] - }, - dm: function(a) { - a || (a = "custom"); - this.Jh[a] = {} - }, - bv: function() { - var a = this.Hb.bp() - , b = this.Hb.sm() - , c = this.K; - c.gc = c.hP || a; - c.Yb = c.gP || b; - c.gc < a && (c.gc = a); - c.Yb > b && (c.Yb = b) - }, - setMinZoom: function(a) { - a = Math.round(a); - a > this.K.Yb && (a = this.K.Yb); - this.K.hP = a; - this.HJ() - }, - setMaxZoom: function(a) { - a = Math.round(a); - a < this.K.gc && (a = this.K.gc); - this.K.gP = a; - this.HJ() - }, - HJ: function() { - this.bv(); - var a = this.K; - this.Oa < a.gc ? this.Qc(a.gc) : this.Oa > a.Yb && this.Qc(a.Yb); - var b = new P("onzoomspanchange"); - b.gc = a.gc; - b.Yb = a.Yb; - this.dispatchEvent(b) - }, - Q3: w("WB"), - getKey: function() { - return qa - }, - Zt: function(a) { - var b = this; - window.MPC_Mgr && window.MPC_Mgr[b.aa] && window.MPC_Mgr[b.aa].close(); - b.K.fj = t; - B.Fn("cus.fire", "count", "z_setmapstylecount"); - if (a) { - b = this; - a.styleJson && (a.styleStr = b.Z_(a.styleJson)); - H() && z.ca.Iy ? setTimeout(function() { - b.K.ye = a; - b.dispatchEvent(new P("onsetcustomstyles",a)) - }, 50) : (this.K.ye = a, - this.dispatchEvent(new P("onsetcustomstyles",a)), - this.sM(b.K.ye.geotableId)); - var c = { - style: a.style - }; - a.features && 0 < a.features.length && (c.features = q); - a.styleJson && 0 < a.styleJson.length && (c.styleJson = q); - Ra(5050, c); - a.style && (c = b.K.fm[a.style] ? b.K.fm[a.style].backColor : b.K.fm.normal.backColor) && (this.La().style.backgroundColor = c) - } - }, - LY: function(a) { - this.controls || (this.controls = { - navigationControl: new jb, - scaleControl: new kb, - overviewMapControl: new lb, - mapTypeControl: new mb - }); - var b = this, c; - for (c in this.controls) - b.VN(b.controls[c]); - a = a || []; - z.mc.Fb(a, function(a) { - b.Aw(b.controls[a]) - }) - }, - sM: function(a) { - a ? this.vs && this.vs.Cf === a || (this.Yf(this.vs), - this.vs = new nb({ - geotableId: a - }), - this.Oe(this.vs)) : this.Yf(this.vs) - }, - Sb: function() { - var a = this.fa() >= this.K.fG && this.oa() === La && 18 >= this.fa() - , b = t; - try { - document.createElement("canvas").getContext("2d"), - b = q - } catch (c) { - b = t - } - return a && b - }, - getCurrentCity: function() { - return { - name: this.$g, - code: this.fs - } - }, - tm: function() { - this.P.co(); - return this.P - }, - PY: function(a) { - B.alog("cus.fire", "count", "z_loadindoormapcount"); - La.setMaxZoom(a.maxZoom || 19); - var b = new P("oninitindoorlayer"); - b.vf = a; - this.dispatchEvent(b); - this.K.Ms = t - }, - D_: function(a) { - this.K.qN = a; - this.Va.Jb.parentElement.style.display = a ? "block" : "none" - }, - setPanorama: function(a) { - this.P = a; - this.P.GF(this) - }, - Z_: function(a) { - for (var b = { - featureType: "t", - elementType: "e", - visibility: "v", - color: "c", - lightness: "l", - saturation: "s", - weight: "w", - zoom: "z", - hue: "h" - }, c = { - all: "all", - geometry: "g", - "geometry.fill": "g.f", - "geometry.stroke": "g.s", - labels: "l", - "labels.text.fill": "l.t.f", - "labels.text.stroke": "l.t.s", - "lables.text": "l.t", - "labels.icon": "l.i" - }, e = [], f = 0, g; g = a[f]; f++) { - var i = g.stylers; - delete g.stylers; - z.extend(g, i); - var i = [], k; - for (k in b) - if (g[k]) - if ("elementType" === k) - i.push(b[k] + ":" + c[g[k]]); - else { - switch (g[k]) { - case "poilabel": - g[k] = "poi"; - break; - case "districtlabel": - g[k] = "label" - } - i.push(b[k] + ":" + g[k]) - } - 2 < i.length && e.push(i.join("|")) - } - return e.join(",") - } - }); - function Ra(a, b) { - if (a) { - var b = b || {}, c = "", e; - for (e in b) - c = c + "&" + e + "=" + encodeURIComponent(b[e]); - var f = function(a) { - a && (ob = q, - setTimeout(function() { - pb.src = B.Wc + "images/blank.gif?" + a.src - }, 50)) - } - , g = function() { - var a = qb.shift(); - a && f(a) - }; - e = (1E8 * Math.random()).toFixed(0); - ob ? qb.push({ - src: "product=jsapi&sub_product=jsapi&v=" + B.version + "&sub_product_v=" + B.version + "&t=" + e + "&code=" + a + "&da_src=" + a + c - }) : f({ - src: "product=jsapi&sub_product=jsapi&v=" + B.version + "&sub_product_v=" + B.version + "&t=" + e + "&code=" + a + "&da_src=" + a + c - }); - rb || (z.M(pb, "load", function() { - ob = t; - g() - }), - z.M(pb, "error", function() { - ob = t; - g() - }), - rb = q) - } - } - var ob, rb, qb = [], pb = new Image; - Ra(5E3, { - device_pixel_ratio: window.devicePixelRatio, - platform: navigator.platform - }); - B.mM = { - TILE_BASE_URLS: ["gss0.bdstatic.com/5bwHcj7lABFU8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFV8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFS8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFT8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFY8t_jkk_Z1zRvfdw6buu"], - TILE_ONLINE_URLS: ["gss0.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlRMgBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlRcgBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlRsgBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlQ1gBo1vgoIiO_jowehsv"], - TIlE_PERSPECT_URLS: ["gss0.bdstatic.com/-OR1cTe9KgQFm2e88IuM_a", "gss0.bdstatic.com/-ON1cTe9KgQFm2e88IuM_a", "gss0.bdstatic.com/-OZ1cTe9KgQFm2e88IuM_a", "gss0.bdstatic.com/-OV1cTe9KgQFm2e88IuM_a"], - geolocControl: "gsp0.baidu.com/8LkJsjOpB1gCo2Kml5_Y_D3", - TILES_YUN_HOST: ["gsp0.baidu.com/-eR1bSahKgkFkRGko9WTAnF6hhy", "gsp0.baidu.com/-eN1bSahKgkFkRGko9WTAnF6hhy", "gsp0.baidu.com/-eZ1bSahKgkFkRGko9WTAnF6hhy", "gsp0.baidu.com/-eV1bSahKgkFkRGko9WTAnF6hhy"], - traffic: "gsp0.baidu.com/7_AZsjOpB1gCo2Kml5_Y_DAcsMJiwa", - iw_pano: "gss0.bdstatic.com/5LUZemba_QUU8t7mm9GUKT-xh_", - message: "gsp0.baidu.com/7vo0bSba2gU2pMbgoY3K", - baidumap: "gsp0.baidu.com/80MWsjip0QIZ8tyhnq", - wuxian: "gsp0.baidu.com/6a1OdTeaKgQFm2e88IuM_a", - pano: ["gss0.bdstatic.com/5LUZemba_QUU8t7mm9GUKT-xh_", "gss0.bdstatic.com/5LUZemfa_QUU8t7mm9GUKT-xh_", "gss0.bdstatic.com/5LUZemja_QUU8t7mm9GUKT-xh_"], - main_domain_nocdn: { - baidu: "gsp0.baidu.com/9_Q4sjOpB1gCo2Kml5_Y_D3", - other: "api.map.baidu.com" - }, - main_domain_cdn: { - baidu: ["gss0.bdstatic.com/9_Q4vHSd2RZ3otebn9fN2DJv", "gss0.baidu.com/9_Q4vXSd2RZ3otebn9fN2DJv", "gss0.bdstatic.com/9_Q4vnSd2RZ3otebn9fN2DJv"], - other: ["api.map.baidu.com"], - webmap: ["gss0.baidu.com/6b1IcTe9R1gBo1vgoIiO_jowehsv"] - }, - map_click: "gsp0.baidu.com/80MWbzKh2wt3n2qy8IqW0jdnxx1xbK", - vector_traffic: "gss0.bdstatic.com/8aZ1cTe9KgQIm2_p8IuM_a" - }; - B.DY = { - TILE_BASE_URLS: ["shangetu0.map.bdimg.com", "shangetu1.map.bdimg.com", "shangetu2.map.bdimg.com", "shangetu3.map.bdimg.com", "shangetu4.map.bdimg.com"], - TILE_ONLINE_URLS: ["online0.map.bdimg.com", "online1.map.bdimg.com", "online2.map.bdimg.com", "online3.map.bdimg.com", "online4.map.bdimg.com"], - TIlE_PERSPECT_URLS: ["d0.map.baidu.com", "d1.map.baidu.com", "d2.map.baidu.com", "d3.map.baidu.com"], - geolocControl: "loc.map.baidu.com", - TILES_YUN_HOST: ["g0.api.map.baidu.com", "g1.api.map.baidu.com", "g2.api.map.baidu.com", "g3.api.map.baidu.com"], - traffic: "its.map.baidu.com:8002", - iw_pano: "pcsv0.map.bdimg.com", - message: "j.map.baidu.com", - baidumap: "map.baidu.com", - wuxian: "wuxian.baidu.com", - pano: ["pcsv0.map.bdimg.com", "pcsv1.map.bdimg.com", "pcsv2.map.bdimg.com"], - main_domain_nocdn: { - baidu: "api.map.baidu.com" - }, - main_domain_cdn: { - baidu: ["api0.map.bdimg.com", "api1.map.bdimg.com", "api2.map.bdimg.com"], - webmap: ["webmap0.map.bdimg.com"] - }, - map_click: "mapclick.map.baidu.com", - vector_traffic: "or.map.bdimg.com" - }; - B.F0 = { - "0": { - proto: "http://", - domain: B.DY - }, - 1: { - proto: "https://", - domain: B.mM - }, - 2: { - proto: "https://", - domain: B.mM - } - }; - window.BMAP_PROTOCOL && "https" === window.BMAP_PROTOCOL && (window.HOST_TYPE = 2); - B.xu = window.HOST_TYPE || "0"; - B.url = B.F0[B.xu]; - B.vp = B.url.proto + B.url.domain.baidumap + "/"; - //B.vp =bmapcfg.home; //修改,本地工具资源引用(离线路径) - B.Wc = B.url.proto + ("2" == B.xu ? B.url.domain.main_domain_nocdn.other : B.url.domain.main_domain_nocdn.baidu) + "/"; - //B.Wc =bmapcfg.home; //修改,本地工具资源引用(离线路径) - //B.ka=B.url.proto+("2"==B.xu?B.url.domain.main_domain_cdn.other[0]:B.url.domain.main_domain_cdn.baidu[0])+"/"; - B.ka = bmapcfg.home; //修改,本地工具资源引用(离线路径) - B.Yi = B.url.proto + B.url.domain.main_domain_cdn.webmap[0] + "/"; - //B.Yi =bmapcfg.home; //修改,本地工具资源引用(离线路径) - B.vg = function(a, b) { - var c, e, b = b || ""; - switch (a) { - case "main_domain_nocdn": - c = B.Wc + b; - break; - case "main_domain_cdn": - c = B.ka + b; - break; - default: - e = B.url.domain[a], - "[object Array]" == Object.prototype.toString.call(e) ? (c = [], - z.mc.Fb(e, function(a, e) { - c[e] = B.url.proto + a + "/" + b - })) : c = B.url.proto + B.url.domain[a] + "/" + b - } - return c - } - ; - function tb(a) { - var b = { - duration: 1E3, - Ic: 30, - No: 0, - kc: ub.UM, - Kt: u() - }; - this.dg = []; - if (a) - for (var c in a) - b[c] = a[c]; - this.j = b; - if (Wa(b.No)) { - var e = this; - setTimeout(function() { - e.start() - }, b.No) - } else - b.No != vb && this.start() - } - var vb = "INFINITE"; - tb.prototype.start = function() { - this.Uu = bb(); - this.gA = this.Uu + this.j.duration; - wb(this) - } - ; - tb.prototype.add = function(a) { - this.dg.push(a) - } - ; - function wb(a) { - var b = bb(); - b >= a.gA ? (Xa(a.j.va) && a.j.va(a.j.kc(1)), - Xa(a.j.finish) && a.j.finish(), - 0 < a.dg.length && (b = a.dg[0], - b.dg = [].concat(a.dg.slice(1)), - b.start())) : (a.Jy = a.j.kc((b - a.Uu) / a.j.duration), - Xa(a.j.va) && a.j.va(a.Jy), - a.TF || (a.Yr = setTimeout(function() { - wb(a) - }, 1E3 / a.j.Ic))) - } - tb.prototype.stop = function(a) { - this.TF = q; - for (var b = 0; b < this.dg.length; b++) - this.dg[b].stop(), - this.dg[b] = s; - this.dg.length = 0; - this.Yr && (clearTimeout(this.Yr), - this.Yr = s); - this.j.Kt(this.Jy); - a && (this.gA = this.Uu, - wb(this)) - } - ; - tb.prototype.cancel = ga(1); - var ub = { - UM: function(a) { - return a - }, - reverse: function(a) { - return 1 - a - }, - iD: function(a) { - return a * a - }, - hD: function(a) { - return Math.pow(a, 3) - }, - Ks: function(a) { - return -(a * (a - 2)) - }, - eL: function(a) { - return Math.pow(a - 1, 3) + 1 - }, - dL: function(a) { - return 0.5 > a ? 2 * a * a : -2 * (a - 2) * a - 1 - }, - R2: function(a) { - return 0.5 > a ? 4 * Math.pow(a, 3) : 4 * Math.pow(a - 1, 3) + 1 - }, - S2: function(a) { - return (1 - Math.cos(Math.PI * a)) / 2 - } - }; - ub["ease-in"] = ub.iD; - ub["ease-out"] = ub.Ks; - var G = { - oG: 34, - pG: 21, - qG: new O(21,32), - wP: new O(10,32), - vP: new O(24,36), - uP: new O(12,36), - mG: new O(13,1), - qa: B.ka + "images/", - a4: "http://api0.map.bdimg.com/images/", - nG: B.ka + "images/markers_new.png", - sP: 24, - tP: 73, - pC: { - "\u5317\u4eac": { - yy: "bj", - k: new J(116.403874,39.914889) - }, - "\u4e0a\u6d77": { - yy: "sh", - k: new J(121.487899,31.249162) - }, - "\u6df1\u5733": { - yy: "sz", - k: new J(114.025974,22.546054) - }, - "\u5e7f\u5dde": { - yy: "gz", - k: new J(113.30765,23.120049) - } - }, - fontFamily: "arial,sans-serif" - }; - z.ca.Te ? (z.extend(G, { - TK: "url(" + G.qa + "ruler.cur),crosshair", - Vb: "-moz-grab", - Hd: "-moz-grabbing" - }), - z.platform.IM && (G.fontFamily = "arial,simsun,sans-serif")) : z.ca.Qw || z.ca.Iy ? z.extend(G, { - TK: "url(" + G.qa + "ruler.cur) 2 6,crosshair", - Vb: "url(" + G.qa + "openhand.cur) 8 8,default", - Hd: "url(" + G.qa + "closedhand.cur) 8 8,move" - }) : z.extend(G, { - TK: "url(" + G.qa + "ruler.cur),crosshair", - Vb: "url(" + G.qa + "openhand.cur),default", - Hd: "url(" + G.qa + "closedhand.cur),move" - }); - function xb(a, b) { - var c = a.style; - c.left = b[0] + "px"; - c.top = b[1] + "px" - } - function yb(a) { - 0 < z.ca.ia ? a.unselectable = "on" : a.style.MozUserSelect = "none" - } - function zb(a) { - return a && a.parentNode && 11 !== a.parentNode.nodeType - } - function Ab(a, b) { - z.D.Vx(a, "beforeEnd", b); - return a.lastChild - } - function Bb(a) { - for (var b = { - left: 0, - top: 0 - }; a && a.offsetParent; ) - b.left += a.offsetLeft, - b.top += a.offsetTop, - a = a.offsetParent; - return b - } - function ma(a) { - a = window.event || a; - a.stopPropagation ? a.stopPropagation() : a.cancelBubble = q - } - function Cb(a) { - a = window.event || a; - a.preventDefault ? a.preventDefault() : a.returnValue = t; - return t - } - function na(a) { - ma(a); - return Cb(a) - } - function Eb() { - var a = document.documentElement - , b = document.body; - return a && (a.scrollTop || a.scrollLeft) ? [a.scrollTop, a.scrollLeft] : b ? [b.scrollTop, b.scrollLeft] : [0, 0] - } - function Fb(a, b) { - if (a && b) - return Math.round(Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2))) - } - function Gb(a, b) { - var c = [], b = b || function(a) { - return a - } - , e; - for (e in a) - c.push(e + "=" + b(a[e])); - return c.join("&") - } - function L(a, b, c) { - var e = document.createElement(a); - c && (e = document.createElementNS(c, a)); - return z.D.CF(e, b || {}) - } - function Va(a) { - if (a.currentStyle) - return a.currentStyle; - if (a.ownerDocument && a.ownerDocument.defaultView) - return a.ownerDocument.defaultView.getComputedStyle(a, s) - } - function Xa(a) { - return "function" === typeof a - } - function Wa(a) { - return "number" === typeof a - } - function $a(a) { - return "string" == typeof a - } - function Hb(a) { - return "undefined" != typeof a - } - function Ib(a) { - return "object" == typeof a - } - var Jb = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - function Kb(a) { - for (var b = "", c = 0; c < a.length; c++) { - var e = a.charCodeAt(c) << 1 - , f = e = e.toString(2); - 8 > e.length && (f = "00000000" + e, - f = f.substr(e.length, 8)); - b += f - } - a = 5 - b.length % 5; - e = []; - for (c = 0; c < a; c++) - e[c] = "0"; - b = e.join("") + b; - f = []; - for (c = 0; c < b.length / 5; c++) - e = b.substr(5 * c, 5), - f.push(String.fromCharCode(parseInt(e, 2) + 50)); - return f.join("") + a.toString() - } - function Lb(a) { - var b = "", c, e, f = "", g, i = "", k = 0; - g = /[^A-Za-z0-9\+\/\=]/g; - if (!a || g.exec(a)) - return a; - a = a.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - do - c = Jb.indexOf(a.charAt(k++)), - e = Jb.indexOf(a.charAt(k++)), - g = Jb.indexOf(a.charAt(k++)), - i = Jb.indexOf(a.charAt(k++)), - c = c << 2 | e >> 4, - e = (e & 15) << 4 | g >> 2, - f = (g & 3) << 6 | i, - b += String.fromCharCode(c), - 64 != g && (b += String.fromCharCode(e)), - 64 != i && (b += String.fromCharCode(f)); - while (k < a.length);return b - } - var P = z.lang.Ju; - function H() { - return !(!z.platform.zE && !z.platform.XY && !z.platform.Jm) - } - function Ua() { - return !(!z.platform.IM && !z.platform.AM && !z.platform.cZ) - } - function bb() { - return (new Date).getTime() - } - function Mb() { - var a = document.body.appendChild(L("div")); - a.innerHTML = ''; - var b = a.firstChild; - if (!b.style) - return t; - b.style.behavior = "url(#default#VML)"; - b = b ? "object" === typeof b.adj : q; - a.parentNode.removeChild(a); - return b - } - function Nb() { - return !!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Shape", "1.1") - } - function Ob() { - return !!L("canvas").getContext - } - function Pb(a) { - return a * Math.PI / 180 - } - B.iZ = function() { - var a = q - , b = q - , c = q - , e = q - , f = 0 - , g = 0 - , i = 0 - , k = 0; - return { - eR: function() { - f += 1; - a && (a = t, - setTimeout(function() { - Ra(5054, { - pic: f - }); - a = q; - f = 0 - }, 1E4)) - }, - v1: function() { - g += 1; - b && (b = t, - setTimeout(function() { - Ra(5055, { - move: g - }); - b = q; - g = 0 - }, 1E4)) - }, - x1: function() { - i += 1; - c && (c = t, - setTimeout(function() { - Ra(5056, { - zoom: i - }); - c = q; - i = 0 - }, 1E4)) - }, - w1: function(a) { - k += a; - e && (e = t, - setTimeout(function() { - Ra(5057, { - tile: k - }); - e = q; - k = 0 - }, 5E3)) - } - } - }(); - B.iq = { - DG: "#83a1ff", - kq: "#808080" - }; - function Qb(a, b, c) { - b.Om || (b.Om = [], - b.handle = {}); - b.Om.push({ - filter: c, - nm: a - }); - b.addEventListener || (b.addEventListener = function(a, c) { - b.attachEvent("on" + a, c) - } - ); - b.handle.click || (b.addEventListener("click", function(a) { - for (var c = a.target || a.srcElement; c != b; ) { - Rb(b.Om, function(b, i) { - RegExp(i.filter).test(c.getAttribute("filter")) && i.nm.call(c, a, c.getAttribute("filter")) - }); - c = c.parentNode - } - }, t), - b.handle.click = q) - } - function Rb(a, b) { - for (var c = 0, e = a.length; c < e; c++) - b(c, a[c]) - } - void function(a, b, c) { - void function(a, b, c) { - function i(a) { - if (!a.Mo) { - for (var c = q, e = [], g = a.ZZ, k = 0; g && k < g.length; k++) { - var m = g[k] - , n = pa[m] = pa[m] || {}; - if (n.Mo || n == a) - e.push(n.Nc); - else { - c = t; - if (!n.DW && (m = (Ma.get("alias") || {})[m] || m + ".js", - !R[m])) { - R[m] = q; - var o = b.createElement("script") - , p = b.getElementsByTagName("script")[0]; - o.async = q; - o.src = m; - p.parentNode.insertBefore(o, p) - } - n.bz = n.bz || {}; - n.bz[a.name] = a - } - } - if (c) { - a.Mo = q; - a.KK && (a.Nc = a.KK.apply(a, e)); - for (var v in a.bz) - i(a.bz[v]) - } - } - } - function k(a) { - return (a || new Date) - F - } - function m(a, b, c) { - if (a) { - "string" == typeof a && (c = b, - b = a, - a = M); - try { - a == M ? (N[b] = N[b] || [], - N[b].unshift(c)) : a.addEventListener ? a.addEventListener(b, c, t) : a.attachEvent && a.attachEvent("on" + b, c) - } catch (e) {} - } - } - function n(a, b, c) { - if (a) { - "string" == typeof a && (c = b, - b = a, - a = M); - try { - if (a == M) { - var e = N[b]; - if (e) - for (var f = e.length; f--; ) - e[f] === c && e.splice(f, 1) - } else - a.removeEventListener ? a.removeEventListener(b, c, t) : a.detachEvent && a.detachEvent("on" + b, c) - } catch (g) {} - } - } - function o(a) { - var b = N[a] - , c = 0; - if (b) { - for (var e = [], f = arguments, g = 1; g < f.length; g++) - e.push(f[g]); - for (g = b.length; g--; ) - b[g].apply(this, e) && c++; - return c - } - } - function p(a, b) { - if (a && b) { - var c = new Image(1,1), e = [], f = "img_" + +new Date, g; - for (g in b) - b[g] && e.push(g + "=" + encodeURIComponent(b[g])); - M[f] = c; - c.onload = c.onerror = function() { - M[f] = c = c.onload = c.onerror = s; - delete M[f] - } - ; - c.src = a + "?" + e.join("&") - } - } - function v() { - var a = arguments - , b = a[0]; - if (this.JK || /^(on|un|set|get|create)$/.test(b)) { - for (var b = y.prototype[b], c = [], e = 1, f = a.length; e < f; e++) - c.push(a[e]); - "function" == typeof b && b.apply(this, c) - } else - this.iK.push(a) - } - function x(a, b) { - var c = {}, e; - for (e in a) - a.hasOwnProperty(e) && (c[e] = a[e]); - for (e in b) - b.hasOwnProperty(e) && (c[e] = b[e]); - return c - } - function y(a) { - this.name = a; - this.Ps = { - protocolParameter: { - postUrl: s, - protocolParameter: s - } - }; - this.iK = []; - this.alog = M - } - function A(a) { - a = a || "default"; - if ("*" == a) { - var a = [], b; - for (b in fa) - a.push(fa[b]); - return a - } - (b = fa[a]) || (b = fa[a] = new y(a)); - return b - } - var E = c.alog; - if (!E || !E.Mo) { - var C = b.all && a.attachEvent - , F = E && E.IE || +new Date - , D = a.o4 || (+new Date).toString(36) + Math.random().toString(36).substr(2, 3) - , I = 0 - , R = {} - , M = function(a) { - var b = arguments, c, e, f, g; - if ("define" == a || "require" == a) { - for (e = 1; e < b.length; e++) - switch (typeof b[e]) { - case "string": - c = b[e]; - break; - case "object": - f = b[e]; - break; - case "function": - g = b[e] - } - "require" == a && (c && !f && (f = [c]), - c = s); - c = !c ? "#" + I++ : c; - e = pa[c] = pa[c] || {}; - e.Mo || (e.name = c, - e.ZZ = f, - e.KK = g, - "define" == a && (e.DW = q), - i(e)) - } else - "function" == typeof a ? a(M) : ("" + a).replace(/^(?:([\w$_]+)\.)?(\w+)$/, function(a, c, e) { - b[0] = e; - v.apply(M.bG(c), b) - }) - } - , N = {} - , fa = {} - , pa = { - i2: { - name: "alog", - Mo: q, - Nc: M - } - }; - y.prototype.start = y.prototype.create = function(a) { - if (!this.JK) { - "object" == typeof a && this.set(a); - this.JK = new Date; - for (this.Qs("create", this); a = this.iK.shift(); ) - v.apply(this, a) - } - } - ; - y.prototype.send = function(a, b) { - var c = x({ - ts: k().toString(36), - t: a, - sid: D - }, this.Ps); - if ("object" == typeof b) - c = x(c, b); - else { - var e = arguments; - switch (a) { - case "pageview": - e[1] && (c.page = e[1]); - e[2] && (c.title = e[2]); - break; - case "event": - e[1] && (c.eventCategory = e[1]); - e[2] && (c.eventAction = e[2]); - e[3] && (c.eventLabel = e[3]); - e[4] && (c.eventValue = e[4]); - break; - case "timing": - e[1] && (c.timingCategory = e[1]); - e[2] && (c.timingVar = e[2]); - e[3] && (c.timingValue = e[3]); - e[4] && (c.timingLabel = e[4]); - break; - case "exception": - e[1] && (c.exDescription = e[1]); - e[2] && (c.exFatal = e[2]); - break; - default: - return - } - } - this.Qs("send", c); - var f; - if (e = this.Ps.protocolParameter) { - var g = {}; - for (f in c) - e[f] !== s && (g[e[f] || f] = c[f]); - f = g - } else - f = c; - p(this.Ps.postUrl, f) - } - ; - y.prototype.set = function(a, b) { - if ("string" == typeof a) - "protocolParameter" == a && (b = x({ - postUrl: s, - protocolParameter: s - }, b)), - this.Ps[a] = b; - else if ("object" == typeof a) - for (var c in a) - this.set(c, a[c]) - } - ; - y.prototype.get = function(a, b) { - var c = this.Ps[a]; - "function" == typeof b && b(c); - return c - } - ; - y.prototype.Qs = function(a, b) { - return M.Qs(this.name + "." + a, b) - } - ; - y.prototype.M = function(a, b) { - M.M(this.name + "." + a, b) - } - ; - y.prototype.ed = function(a, b) { - M.ed(this.name + "." + a, b) - } - ; - M.name = "alog"; - M.BO = D; - M.Mo = q; - M.timestamp = k; - M.ed = n; - M.M = m; - M.Qs = o; - M.bG = A; - M("init"); - var wa = y.prototype; - T(wa, { - start: wa.start, - create: wa.create, - send: wa.send, - set: wa.set, - get: wa.get, - on: wa.M, - un: wa.ed, - fire: wa.Qs - }); - var Ma = A(); - Ma.set("protocolParameter", { - h2: s - }); - if (E) { - wa = [].concat(E.wb || [], E.Wm || []); - E.wb = E.Wm = s; - for (var sb in M) - M.hasOwnProperty(sb) && (E[sb] = M[sb]); - M.wb = M.Wm = { - push: function(a) { - M.apply(M, a) - } - }; - for (E = 0; E < wa.length; E++) - M.apply(M, wa[E]) - } - c.alog = M; - C && m(b, "mouseup", function(a) { - a = a.target || a.srcElement; - 1 == a.nodeType && /^ajavascript:/i.test(a.tagName + a.href) - }); - var Za = t; - a.onerror = function(a, b, e, f) { - var i = q; - !b && /^script error/i.test(a) && (Za ? i = t : Za = q); - i && c.alog("exception.send", "exception", { - Ht: a, - HE: b, - Dt: e, - hs: f - }); - return t - } - ; - c.alog("exception.on", "catch", function(a) { - c.alog("exception.send", "exception", { - Ht: a.Ht, - HE: a.path, - Dt: a.Dt, - method: a.method, - rL: "catch" - }) - }) - } - }(a, b, c); - void function(a, b, c) { - var i = "18_3"; - H() && (i = "18_4"); - var k = "http://static.tieba.baidu.com"; - "https:" === a.location.protocol && (k = "https://gsp0.baidu.com/5aAHeD3nKhI2p27j8IqW0jdnxx1xbK"); - var m = Math.random - , k = k + "/tb/pms/img/st.gif" - , n = { - wh: "0.1" - } - , o = { - wh: "0.1" - } - , p = { - wh: "0.1" - } - , v = { - wh: "0" - }; - if (n && n.wh && m() < n.wh) { - var x = c.alog.bG("monkey"), y, n = a.screen, A = b.referrer; - x.set("ver", 5); - x.set("pid", 241); - n && x.set("px", n.width + "*" + n.height); - x.set("ref", A); - c.alog("monkey.on", "create", function() { - y = c.alog.timestamp; - x.set("protocolParameter", { - reports: s - }) - }); - c.alog("monkey.on", "send", function(a) { - "pageview" == a.t && (a.cmd = "open"); - a.now && (a.ts = y(a.now).toString(36), - a.now = "") - }); - c.alog("monkey.create", { - page: i, - pid: "241", - p: "18", - dv: 6, - postUrl: k, - reports: { - refer: 1 - } - }); - c.alog("monkey.send", "pageview", { - now: +new Date - }) - } - if (o && o.wh && m() < o.wh) { - var E = t; - a.onerror = function(a, b, e, f) { - var i = q; - !b && /^script error/i.test(a) && (E ? i = t : E = q); - i && c.alog("exception.send", "exception", { - Ht: a, - HE: b, - Dt: e, - hs: f - }); - return t - } - ; - c.alog("exception.on", "catch", function(a) { - c.alog("exception.send", "exception", { - Ht: a.Ht, - HE: a.path, - Dt: a.Dt, - method: a.method, - rL: "catch" - }) - }); - c.alog("exception.create", { - postUrl: k, - dv: 7, - page: i, - pid: "170", - p: "18" - }) - } - p && (p.wh && m() < p.wh) && (c.alog("cus.on", "time", function(a) { - var b = {}, e = t, f; - if ("[object Object]" === a.toString()) { - for (var i in a) - "page" == i ? b.page = a[i] : (f = parseInt(a[i]), - 0 < f && /^z_/.test(i) && (e = q, - b[i] = f)); - e && c.alog("cus.send", "time", b) - } - }), - c.alog("cus.on", "count", function(a) { - var b = {} - , e = t; - "string" === typeof a && (a = [a]); - if (a instanceof Array) - for (var f = 0; f < a.length; f++) - /^z_/.test(a[f]) ? (e = q, - b[a[f]] = 1) : /^page:/.test(a[f]) && (b.page = a[f].substring(5)); - e && c.alog("cus.send", "count", b) - }), - c.alog("cus.create", { - dv: 3, - postUrl: k, - page: i, - p: "18" - })); - if (v && v.wh && m() < v.wh) { - var C = ["Moz", "O", "ms", "Webkit"] - , F = ["-webkit-", "-moz-", "-o-", "-ms-"] - , D = function() { - return typeof b.createElement !== "function" ? b.createElement(arguments[0]) : b.createElement.apply(b, arguments) - } - , I = D("dpFeatureTest").style - , R = function(a) { - return M(a, l, l) - } - , M = function(a, b, c) { - var e = a.charAt(0).toUpperCase() + a.slice(1) - , f = (a + " " + C.join(e + " ") + e).split(" "); - if (typeof b === "string" || typeof b === "undefined") - return N(f, b); - f = (a + " " + C.join(e + " ") + e).split(" "); - a: { - var a = f, g; - for (g in a) - if (a[g]in b) { - if (c === t) { - b = a[g]; - break a - } - g = b[a[g]]; - b = typeof g === "function" ? fnBind(g, c || b) : g; - break a - } - b = t - } - return b - } - , N = function(a, b) { - var c, e, f; - e = a.length; - for (c = 0; c < e; c++) { - f = a[c]; - ~("" + f).indexOf("-") && (f = fa(f)); - if (I[f] !== l) - return b == "pfx" ? f : q - } - return t - } - , fa = function(a) { - return a.replace(/([a-z])-([a-z])/g, function(a, b, c) { - return b + c.toUpperCase() - }).replace(/^-/, "") - } - , pa = function(a, b, c) { - if (a.indexOf("@") === 0) - return atRule(a); - a.indexOf("-") != -1 && (a = fa(a)); - return !b ? M(a, "pfx") : M(a, b, c) - } - , wa = function() { - var a = D("canvas"); - return !(!a.getContext || !a.getContext("2d")) - } - , Ma = function() { - var a = D("div"); - return "draggable"in a || "ondragstart"in a && "ondrop"in a - } - , sb = function() { - try { - localStorage.setItem("localStorage", "localStorage"); - localStorage.removeItem("localStorage"); - return q - } catch (a) { - return t - } - } - , Za = function() { - return "content"in b.createElement("template") - } - , Pa = function() { - return "createShadowRoot"in b.createElement("a") - } - , oi = function() { - return "registerElement"in b - } - , pi = function() { - return "import"in b.createElement("link") - } - , qi = function() { - return "getItems"in b - } - , ri = function() { - return "EventSource"in window - } - , re = function(a, b) { - var c = new Image; - c.onload = function() { - b(a, c.width > 0 && c.height > 0) - } - ; - c.onerror = function() { - b(a, t) - } - ; - c.src = "data:image/webp;base64," + { - r4: "UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA", - q4: "UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==", - alpha: "UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==", - kk: "UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA" - }[a] - } - , se = function(a, b) { - return Tb.ei["WebP-" + a] = b - } - , si = function() { - return "openDatabase"in a - } - , ti = function() { - return "performance"in a && "timing"in a.performance - } - , ui = function() { - return "performance"in a && "mark"in a.performance - } - , vi = function() { - return !(!Array.prototype || !Array.prototype.every || !Array.prototype.filter || !Array.prototype.forEach || !Array.prototype.indexOf || !Array.prototype.lastIndexOf || !Array.prototype.map || !Array.prototype.some || !Array.prototype.reduce || !Array.prototype.reduceRight || !Array.isArray) - } - , wi = function() { - return "Promise"in a && "cast"in a.lq && "resolve"in a.lq && "reject"in a.lq && "all"in a.lq && "race"in a.lq && function() { - var b; - new a.lq(function(a) { - b = a - } - ); - return typeof b === "function" - }() - } - , xi = function() { - var b = !!a.i1 - , c = a.XMLHttpRequest && "withCredentials"in new XMLHttpRequest; - return !!a.l1 && b && c - } - , yi = function() { - return "geolocation"in navigator - } - , zi = function() { - var b = D("canvas") - , c = "probablySupportsContext"in b ? "probablySupportsContext" : "supportsContext"; - return c in b ? b[c]("webgl") || b[c]("experimental-webgl") : "WebGLRenderingContext"in a - } - , Ai = function() { - return !!b.createElementNS && !!b.createElementNS("http://www.w3.org/2000/svg", "svg").A2 - } - , Bi = function() { - return !!a.s1 - } - , Ci = function() { - return "WebSocket"in a && a.p1.f1 === 2 - } - , Di = function() { - return !!b.createElement("video").canPlayType - } - , Ei = function() { - return !!b.createElement("audio").canPlayType - } - , Fi = function() { - return !!(a.history && "pushState"in a.history) - } - , Gi = function() { - return !(!a.g1 || !a.h1) - } - , Hi = function() { - return "postMessage"in window - } - , Ii = function() { - return !!a.webkitNotifications || "Notification"in a && "permission"in a.PP && "requestPermission"in a.PP - } - , Ji = function() { - for (var b = ["webkit", "moz", "o", "ms"], c = a.requestAnimationFrame, f = 0; f < b.length && !c; ++f) - c = a[b[f] + "RequestAnimationFrame"]; - return !!c - } - , Ki = function() { - return "JSON"in a && "parse"in JSON && "stringify"in JSON - } - , Li = function() { - return !(!pa("exitFullscreen", b, t) && !pa("cancelFullScreen", b, t)) - } - , Mi = function() { - return !!pa("Intl", a) - } - , Ni = function() { - return R("flexBasis") - } - , Oi = function() { - return !!R("perspective") - } - , Pi = function() { - return R("shapeOutside") - } - , Qi = function() { - var a = D("div"); - a.style.cssText = F.join("filter:blur(2px); "); - return !!a.style.length && (b.documentMode === l || b.documentMode > 9) - } - , Ri = function() { - return "XMLHttpRequest"in a && "withCredentials"in new XMLHttpRequest - } - , Si = function() { - return D("progress").max !== l - } - , Ti = function() { - return D("meter").max !== l - } - , Ui = function() { - return "sendBeacon"in navigator - } - , Vi = function() { - return R("borderRadius") - } - , Wi = function() { - return R("boxShadow") - } - , Xi = function() { - var a = D("div").style; - a.cssText = F.join("opacity:.55;"); - return /^0.55$/.test(a.opacity) - } - , Yi = function() { - return N(["textShadow"], l) - } - , Zi = function() { - return R("animationName") - } - , $i = function() { - return R("transition") - } - , aj = function() { - return navigator.userAgent.indexOf("Android 2.") === -1 && R("transform") - } - , Tb = { - ei: {}, - pa: function(a, b, c) { - this.ei[a] = b.apply(this, [].slice.call(arguments, 2)) - }, - Ed: function(a, b) { - a.apply(this, [].slice.call(arguments, 1)) - }, - f_: function() { - this.pa("bdrs", Vi); - this.pa("bxsd", Wi); - this.pa("opat", Xi); - this.pa("txsd", Yi); - this.pa("anim", Zi); - this.pa("trsi", $i); - this.pa("trfm", aj); - this.pa("flex", Ni); - this.pa("3dtr", Oi); - this.pa("shpe", Pi); - this.pa("fltr", Qi); - this.pa("cavs", wa); - this.pa("dgdp", Ma); - this.pa("locs", sb); - this.pa("wctem", Za); - this.pa("wcsdd", Pa); - this.pa("wccse", oi); - this.pa("wchti", pi); - this.Ed(re, "lossy", se); - this.Ed(re, "lossless", se); - this.Ed(re, "alpha", se); - this.Ed(re, "animation", se); - this.pa("wsql", si); - this.pa("natm", ti); - this.pa("ustm", ui); - this.pa("arra", vi); - this.pa("prms", wi); - this.pa("xhr2", xi); - this.pa("wbgl", zi); - this.pa("geol", yi); - this.pa("svg", Ai); - this.pa("work", Bi); - this.pa("wbsk", Ci); - this.pa("vido", Di); - this.pa("audo", Ei); - this.pa("hsty", Fi); - this.pa("file", Gi); - this.pa("psmg", Hi); - this.pa("wknf", Ii); - this.pa("rqaf", Ji); - this.pa("json", Ki); - this.pa("flsc", Li); - this.pa("i18n", Mi); - this.pa("cors", Ri); - this.pa("prog", Si); - this.pa("metr", Ti); - this.pa("becn", Ui); - this.pa("mcrd", qi); - this.pa("esrc", ri) - } - } - , x = c.alog.bG("feature"); - x.M("commit", function() { - Tb.f_(); - var a = setInterval(function() { - if ("WebP-lossy"in Tb.ei && "WebP-lossless"in Tb.ei && "WebP-alpha"in Tb.ei && "WebP-animation"in Tb.ei) { - for (var b in Tb.ei) - Tb.ei[b] = Tb.ei[b] ? "y" : "n"; - x.send("feature", Tb.ei); - clearInterval(a) - } - }, 500) - }); - c.alog("feature.create", { - P2: 4, - R4: k, - page: i, - wb: "18" - }); - c.alog("feature.fire", "commit") - } - }(a, b, c) - }(window, document, B); - B.Fn = B.alog || u(); - B.alog("cus.fire", "count", "z_loadscriptcount"); - "https:" === location.protocol && B.alog("cus.fire", "count", "z_httpscount"); - function Sb(a) { - var b = window.TILE_VERSION - , c = "20170927"; - b && b.ditu && (b = b.ditu, - b[a] && b[a].updateDate && (c = b[a].updateDate)); - return c - } - ;function oa(a, b) { - if (/^http/.test(a)) return;//修改 屏蔽ak验证,若调用外部资源直接返回 - - if (b) { - var c = (1E5 * Math.random()).toFixed(0); - B._rd["_cbk" + c] = function(a) { - b && b(a); - delete B._rd["_cbk" + c] - } - ; - a += "&callback=BMap._rd._cbk" + c - } - var e = L("script", { - type: "text/javascript" - }); - e.charset = "utf-8"; - e.src = a; - e.addEventListener ? e.addEventListener("load", function(a) { - a = a.target; - a.parentNode.removeChild(a) - }, t) : e.attachEvent && e.attachEvent("onreadystatechange", function() { - var a = window.event.srcElement; - a && ("loaded" == a.readyState || "complete" == a.readyState) && a.parentNode.removeChild(a) - }); - setTimeout(function() { - document.getElementsByTagName("head")[0].appendChild(e); - e = s - }, 1) - } - ;var Ub = { //修改,这里是所有的模块,用到时自动加载(在线),离线的话要先下载下来放到本地,如http://api0.map.bdimg.com/getmodules?v=3.0&mod=模块1,模块2 - //模块命名格式是map_dbwcej,直接拼接起来 - map: "dbwcej", - common: "wkrfcz", - style: "fkofpc", - tile: "ok3b3m", - vectordrawlib: "4pdipq", - newvectordrawlib: "wbnuee", - groundoverlay: "ekozhc", - pointcollection: "feabuc", - marker: "00uyqy", - symbol: "cq3a5n", - canvablepath: "dia5aw", - vmlcontext: "phwtog", - markeranimation: "rfnmxu", - poly: "r52vuo", - draw: "jb4osz", - drawbysvg: "vxyn51", - drawbyvml: "whxmqq", - drawbycanvas: "ufwkvb", - infowindow: "wtflsn", - oppc: "10riq5", - opmb: "2c1ejz", - menu: "152mop", - control: "hlzh1t", - navictrl: "h32mnb", - geoctrl: "xprajs", - copyrightctrl: "gmc2ps", - citylistcontrol: "ms3ahy", - scommon: "oadc3d", - local: "k0pcpi", - route: "v4yyam", - othersearch: "pwg4ey", - mapclick: "e40viw", - buslinesearch: "vxmb31", - hotspot: "vuwxs4", - autocomplete: "punr3o", - coordtrans: "lmf5kv", - coordtransutils: "d33qf1", - convertor: "d0ze2w", - clayer: "0hwrfx", - pservice: "j5tlrp", - pcommon: "yqek4k", - panorama: "jbqj24", - panoramaflash: "dm4xq2", - vector: "2hrruc" - }; - z.Wy = function() { - function a(a) { - return e && !!c[b + a + "_" + Ub[a]] - } - var b = "BMap_" - , c = window.localStorage - , e = "localStorage"in window && c !== s && c !== l; - return { - ZY: e, - set: function(a, g) { - if (e) { - for (var i = b + a + "_", k = c.length, m; k--; ) - m = c.key(k), - -1 < m.indexOf(i) && c.removeItem(m); - try { - c.setItem(b + a + "_" + Ub[a], g) - } catch (n) { - c.clear() - } - } - }, - get: function(f) { - return e && a(f) ? c.getItem(b + f + "_" + Ub[f]) : t - }, - uK: a - } - }(); - function K() {} - z.object.extend(K, { - Cj: { - EG: -1, - cQ: 0, - cq: 1 - }, - GL: function() { - var a = "canvablepath" - , b = B.gV ? "newvectordrawlib" : "vectordrawlib"; - if (!H() || !Ob()) - Nb() || (Mb() ? a = "vmlcontext" : Ob()); - return { - tile: [b, "style"], - control: [], - marker: ["symbol"], - symbol: ["canvablepath", "common"], - canvablepath: "canvablepath" === a ? [] : [a], - vmlcontext: [], - style: [], - poly: ["marker", "drawbycanvas", "drawbysvg", "drawbyvml"], - drawbysvg: ["draw"], - drawbyvml: ["draw"], - drawbycanvas: ["draw"], - infowindow: ["common", "marker"], - menu: [], - oppc: [], - opmb: [], - scommon: [], - local: ["scommon"], - route: ["scommon"], - othersearch: ["scommon"], - autocomplete: ["scommon"], - citylistcontrol: ["autocomplete"], - mapclick: ["scommon"], - buslinesearch: ["route"], - hotspot: [], - coordtransutils: ["coordtrans"], - convertor: [], - clayer: ["tile"], - pservice: [], - pcommon: ["style", "pservice"], - panorama: ["pcommon"], - panoramaflash: ["pcommon"] - } - }, - U4: {}, - wG: { - tQ: B.ka + "getmodules?v=3.0", - WU: 5E3 - }, - MC: t, - Rd: { - xl: {}, - Hn: [], - cw: [] - }, - load: function(a, b, c) { - var e = this.kb(a); - if (e.Me == this.Cj.cq) - c && b(); - else { - if (e.Me == this.Cj.EG) { - this.AK(a); - this.SN(a); - var f = this; - f.MC == t && (f.MC = q, - setTimeout(function() { - for (var a = [], b = 0, c = f.Rd.Hn.length; b < c; b++) { - var e = f.Rd.Hn[b] - , n = ""; - ia.Wy.uK(e) ? n = ia.Wy.get(e) : (n = "", - a.push(e + "_" + Ub[e])); - f.Rd.cw.push({ - jN: e, - ZE: n - }) - } - f.MC = t; - f.Rd.Hn.length = 0; - //0 == a.length ? f.kL() : oa(f.wG.tQ + "&mod=" + a.join(",")) - // 修改 加载本地模块文件,在 modules 目录下 - console.log(a); //打印所需模块 - if( a.length > 0 ){ - for(i=0; i"); - this.Qa == t && z.D.U(this.C); - return this.C - }, - Nr: function() { - this.uc(this.j.anchor) - }, - uc: function(a) { - if (this.j2 || !Wa(a) || isNaN(a) || a < Wb || 3 < a) - a = this.defaultAnchor; - this.j = this.j || { - Cg: t - }; - this.j.za = this.j.za || this.defaultOffset; - var b = this.j.anchor; - this.j.anchor = a; - if (this.C) { - var c = this.C - , e = this.j.za.width - , f = this.j.za.height; - c.style.left = c.style.top = c.style.right = c.style.bottom = "auto"; - switch (a) { - case Wb: - c.style.top = f + "px"; - c.style.left = e + "px"; - break; - case Xb: - c.style.top = f + "px"; - c.style.right = e + "px"; - break; - case Yb: - c.style.bottom = f + "px"; - c.style.left = e + "px"; - break; - case 3: - c.style.bottom = f + "px", - c.style.right = e + "px" - } - c = ["TL", "TR", "BL", "BR"]; - z.D.Pb(this.C, "anchor" + c[b]); - z.D.Ua(this.C, "anchor" + c[a]) - } - }, - HD: function() { - return this.j.anchor - }, - getContainer: w("C"), - Ze: function(a) { - a instanceof O && (this.j = this.j || { - Cg: t - }, - this.j.za = new O(a.width,a.height), - this.C && this.uc(this.j.anchor)) - }, - Sf: function() { - return this.j.za - }, - Jd: w("C"), - show: function() { - this.Qa != q && (this.Qa = q, - this.C && z.D.show(this.C)) - }, - U: function() { - this.Qa != t && (this.Qa = t, - this.C && z.D.U(this.C)) - }, - isPrintable: function() { - return !!this.j.Cg - }, - jh: function() { - return !this.C && !this.B ? t : !!this.Qa - } - }); - var Wb = 0 - , Xb = 1 - , Yb = 2; - function jb(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - OF: a.showZoomInfo || q, - anchor: a.anchor, - za: a.offset, - type: a.type, - $W: a.enableGeolocation || t - }; - this.defaultAnchor = H() ? 3 : Wb; - this.defaultOffset = new O(10,10); - this.uc(a.anchor); - this.hn(a.type); - this.De() - } - z.lang.ta(jb, Vb, "NavigationControl"); - z.extend(jb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - hn: function(a) { - this.j.type = Wa(a) && 0 <= a && 3 >= a ? a : 0 - }, - ip: function() { - return this.j.type - }, - De: function() { - var a = this; - K.load("navictrl", function() { - a.zf() - }) - } - }); - function Zb(a) { - Vb.call(this); - a = a || {}; - this.j = { - anchor: a.anchor || Yb, - za: a.offset || new O(10,30), - O_: a.showAddressBar !== t, - U2: a.enableAutoLocation || t, - bN: a.locationIcon || s - }; - var b = this; - this.Hz = 1200; - b.I0 = []; - this.pe = []; - K.load("geoctrl", function() { - (function e() { - if (0 !== b.pe.length) { - var a = b.pe.shift(); - b[a.method].apply(b, a.arguments); - e() - } - } - )(); - b.sQ() - }); - Ra(Ia) - } - z.lang.ta(Zb, Vb, "GeolocationControl"); - z.extend(Zb.prototype, { - location: function() { - this.pe.push({ - method: "location", - arguments: arguments - }) - }, - getAddressComponent: ca(s) - }); - function $b(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - anchor: a.anchor, - za: a.offset - }; - this.cc = []; - this.defaultAnchor = Yb; - this.defaultOffset = new O(5,2); - this.uc(a.anchor); - this.nK = t; - this.De() - } - z.lang.ta($b, Vb, "CopyrightControl"); - z.object.extend($b.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - Bw: function(a) { - if (a && Wa(a.id) && !isNaN(a.id)) { - var b = { - bounds: s, - content: "" - }, c; - for (c in a) - b[c] = a[c]; - if (a = this.pm(a.id)) - for (var e in b) - a[e] = b[e]; - else - this.cc.push(b) - } - }, - pm: function(a) { - for (var b = 0, c = this.cc.length; b < c; b++) - if (this.cc[b].id == a) - return this.cc[b] - }, - PD: w("cc"), - qF: function(a) { - for (var b = 0, c = this.cc.length; b < c; b++) - this.cc[b].id == a && (r = this.cc.splice(b, 1), - b--, - c = this.cc.length) - }, - De: function() { - var a = this; - K.load("copyrightctrl", function() { - a.zf() - }) - } - }); - function lb(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - size: a.size || new O(150,150), - padding: 5, - Xa: a.isOpen === q ? q : t, - $0: 4, - za: a.offset, - anchor: a.anchor - }; - this.defaultAnchor = 3; - this.defaultOffset = new O(0,0); - this.Bq = this.Cq = 13; - this.uc(a.anchor); - this.Ce(this.j.size); - this.De() - } - z.lang.ta(lb, Vb, "OverviewMapControl"); - z.extend(lb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - uc: function(a) { - Vb.prototype.uc.call(this, a) - }, - se: function() { - this.se.mo = q; - this.j.Xa = !this.j.Xa; - this.C || (this.se.mo = t) - }, - Ce: function(a) { - a instanceof O || (a = new O(150,150)); - a.width = 0 < a.width ? a.width : 150; - a.height = 0 < a.height ? a.height : 150; - this.j.size = a - }, - cb: function() { - return this.j.size - }, - Xa: function() { - return this.j.Xa - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }) - } - }); - function ac(a) { - Vb.call(this); - a = a || {}; - this.defaultAnchor = Wb; - this.TV = a.canCheckSize === t ? t : q; - this.$i = ""; - this.defaultOffset = new O(10,10); - this.onChangeBefore = []; - this.onChangeAfter = []; - this.onChangeSuccess = []; - this.j = { - Cg: t, - za: a.offset || this.defaultOffset, - anchor: a.anchor || this.defaultAnchor, - expand: !!a.expand - }; - a.onChangeBefore && Xa(a.onChangeBefore) && this.onChangeBefore.push(a.onChangeBefore); - a.onChangeAfter && Xa(a.onChangeAfter) && this.onChangeAfter.push(a.onChangeAfter); - a.onChangeSuccess && Xa(a.onChangeSuccess) && this.onChangeSuccess.push(a.onChangeSuccess); - this.uc(a.anchor); - this.De() - } - z.lang.ta(ac, Vb, "CityListControl"); - z.object.extend(ac.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - De: function() { - var a = this; - K.load("citylistcontrol", function() { - a.zf() - }, q) - } - }); - function kb(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - color: "black", - fd: "metric", - za: a.offset - }; - this.defaultAnchor = Yb; - this.defaultOffset = new O(81,18); - this.uc(a.anchor); - this.Uh = { - metric: { - name: "metric", - CK: 1, - rM: 1E3, - bP: "\u7c73", - cP: "\u516c\u91cc" - }, - us: { - name: "us", - CK: 3.2808, - rM: 5280, - bP: "\u82f1\u5c3a", - cP: "\u82f1\u91cc" - } - }; - this.Uh[this.j.fd] || (this.j.fd = "metric"); - this.gJ = s; - this.GI = {}; - this.De() - } - z.lang.ta(kb, Vb, "ScaleControl"); - z.object.extend(kb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - Pk: function(a) { - this.j.color = a + "" - }, - n3: function() { - return this.j.color - }, - LF: function(a) { - this.j.fd = this.Uh[a] && this.Uh[a].name || this.j.fd - }, - sY: function() { - return this.j.fd - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }) - } - }); - var bc = 0; - function mb(a) { - Vb.call(this); - a = a || {}; - this.defaultAnchor = Xb; - this.defaultOffset = new O(10,10); - this.j = { - Cg: t, - mh: [La, Ya, Sa, Qa], - BW: ["B_DIMENSIONAL_MAP", "B_SATELLITE_MAP", "B_NORMAL_MAP"], - type: a.type || bc, - za: a.offset || this.defaultOffset, - dX: q - }; - this.uc(a.anchor); - "[object Array]" == Object.prototype.toString.call(a.mapTypes) && (this.j.mh = a.mapTypes.slice(0)); - this.De() - } - z.lang.ta(mb, Vb, "MapTypeControl"); - z.object.extend(mb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - Xy: function(a) { - this.B.ao = a - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }, q) - } - }); - function cc(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - za: a.offset, - anchor: a.anchor - }; - this.Ni = t; - this.hw = s; - this.QI = new dc({ - of: "api" - }); - this.RI = new ec(s,{ - of: "api" - }); - this.defaultAnchor = Xb; - this.defaultOffset = new O(10,10); - this.uc(a.anchor); - this.De(); - Ra(va) - } - z.lang.ta(cc, Vb, "PanoramaControl"); - z.extend(cc.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }) - } - }); - function fc(a) { - z.lang.Ca.call(this); - this.j = { - Wa: s, - cursor: "default" - }; - this.j = z.extend(this.j, a); - this.Mb = "contextmenu"; - this.B = s; - this.xa = []; - this.Kf = []; - this.Fe = []; - this.fx = this.qs = s; - this.Kh = t; - var b = this; - K.load("menu", function() { - b.ib() - }) - } - z.lang.ta(fc, z.lang.Ca, "ContextMenu"); - z.object.extend(fc.prototype, { - na: function(a, b) { - this.B = a; - this.Cl = b || s - }, - remove: function() { - this.B = this.Cl = s - }, - Dw: function(a) { - if (a && !("menuitem" != a.Mb || "" == a.Wg || 0 >= a.Vi)) { - for (var b = 0, c = this.xa.length; b < c; b++) - if (this.xa[b] === a) - return; - this.xa.push(a); - this.Kf.push(a) - } - }, - removeItem: function(a) { - if (a && "menuitem" == a.Mb) { - for (var b = 0, c = this.xa.length; b < c; b++) - this.xa[b] === a && (this.xa[b].remove(), - this.xa.splice(b, 1), - c--); - b = 0; - for (c = this.Kf.length; b < c; b++) - this.Kf[b] === a && (this.Kf[b].remove(), - this.Kf.splice(b, 1), - c--) - } - }, - bC: function() { - this.xa.push({ - Mb: "divider", - Lj: this.Fe.length - }); - this.Fe.push({ - D: s - }) - }, - sF: function(a) { - if (this.Fe[a]) { - for (var b = 0, c = this.xa.length; b < c; b++) - this.xa[b] && ("divider" == this.xa[b].Mb && this.xa[b].Lj == a) && (this.xa.splice(b, 1), - c--), - this.xa[b] && ("divider" == this.xa[b].Mb && this.xa[b].Lj > a) && this.xa[b].Lj--; - this.Fe.splice(a, 1) - } - }, - Jd: w("C"), - show: function() { - this.Kh != q && (this.Kh = q) - }, - U: function() { - this.Kh != t && (this.Kh = t) - }, - t_: function(a) { - a && (this.j.cursor = a) - }, - getItem: function(a) { - return this.Kf[a] - } - }); - var gc = G.qa + "menu_zoom_in.png" - , hc = G.qa + "menu_zoom_out.png"; - function ic(a, b, c) { - if (a && Xa(b)) { - z.lang.Ca.call(this); - this.j = { - width: 100, - id: "", - Dm: "" - }; - c = c || {}; - this.j.width = 1 * c.width ? c.width : 100; - this.j.id = c.id ? c.id : ""; - this.j.Dm = c.iconUrl ? c.iconUrl : ""; - this.Wg = a + ""; - this.Kz = b; - this.B = s; - this.Mb = "menuitem"; - this.Ur = this.yv = this.C = this.Eh = s; - this.Ih = q; - var e = this; - K.load("menu", function() { - e.ib() - }) - } - } - z.lang.ta(ic, z.lang.Ca, "MenuItem"); - z.object.extend(ic.prototype, { - na: function(a, b) { - this.B = a; - this.Eh = b - }, - remove: function() { - this.B = this.Eh = s - }, - cu: function(a) { - a && (this.Wg = a + "") - }, - Rb: function(a) { - a && (this.j.Dm = a) - }, - Jd: w("C"), - enable: function() { - this.Ih = q - }, - disable: function() { - this.Ih = t - } - }); - function fb(a, b) { - a && !b && (b = a); - this.Ie = this.Xd = this.Ne = this.Zd = this.Pl = this.Al = s; - a && (this.Pl = new J(a.lng,a.lat), - this.Al = new J(b.lng,b.lat), - this.Ne = a.lng, - this.Zd = a.lat, - this.Ie = b.lng, - this.Xd = b.lat) - } - z.object.extend(fb.prototype, { - tj: function() { - return !this.Pl || !this.Al - }, - pb: function(a) { - return !(a instanceof fb) || this.tj() ? t : this.Ve().pb(a.Ve()) && this.Rf().pb(a.Rf()) - }, - Ve: w("Pl"), - Rf: w("Al"), - kW: function(a) { - return !(a instanceof fb) || this.tj() || a.tj() ? t : a.Ne > this.Ne && a.Ie < this.Ie && a.Zd > this.Zd && a.Xd < this.Xd - }, - Ka: function() { - return this.tj() ? s : new J((this.Ne + this.Ie) / 2,(this.Zd + this.Xd) / 2) - }, - ot: function(a) { - if (!(a instanceof fb) || Math.max(a.Ne, a.Ie) < Math.min(this.Ne, this.Ie) || Math.min(a.Ne, a.Ie) > Math.max(this.Ne, this.Ie) || Math.max(a.Zd, a.Xd) < Math.min(this.Zd, this.Xd) || Math.min(a.Zd, a.Xd) > Math.max(this.Zd, this.Xd)) - return s; - var b = Math.max(this.Ne, a.Ne) - , c = Math.min(this.Ie, a.Ie) - , e = Math.max(this.Zd, a.Zd) - , a = Math.min(this.Xd, a.Xd); - return new fb(new J(b,e),new J(c,a)) - }, - js: function(a) { - return !(a instanceof J) || this.tj() ? t : a.lng >= this.Ne && a.lng <= this.Ie && a.lat >= this.Zd && a.lat <= this.Xd - }, - extend: function(a) { - if (a instanceof J) { - var b = a.lng - , a = a.lat; - this.Pl || (this.Pl = new J(0,0)); - this.Al || (this.Al = new J(0,0)); - if (!this.Ne || this.Ne > b) - this.Pl.lng = this.Ne = b; - if (!this.Ie || this.Ie < b) - this.Al.lng = this.Ie = b; - if (!this.Zd || this.Zd > a) - this.Pl.lat = this.Zd = a; - if (!this.Xd || this.Xd < a) - this.Al.lat = this.Xd = a - } - }, - YF: function() { - return this.tj() ? new J(0,0) : new J(Math.abs(this.Ie - this.Ne),Math.abs(this.Xd - this.Zd)) - } - }); - function J(a, b) { - isNaN(a) && (a = Lb(a), - a = isNaN(a) ? 0 : a); - $a(a) && (a = parseFloat(a)); - isNaN(b) && (b = Lb(b), - b = isNaN(b) ? 0 : b); - $a(b) && (b = parseFloat(b)); - this.lng = a; - this.lat = b - } - J.yM = function(a) { - return a && 180 >= a.lng && -180 <= a.lng && 74 >= a.lat && -74 <= a.lat - } - ; - J.prototype.pb = function(a) { - return a && this.lat == a.lat && this.lng == a.lng - } - ; - function jc() {} - jc.prototype.kh = function() { - aa("lngLatToPoint\u65b9\u6cd5\u672a\u5b9e\u73b0") - } - ; - jc.prototype.xj = function() { - aa("pointToLngLat\u65b9\u6cd5\u672a\u5b9e\u73b0") - } - ; - function kc() {} - ;var eb = { - EK: function(a, b, c) { - K.load("coordtransutils", function() { - eb.AV(a, b, c) - }, q) - }, - DK: function(a, b, c) { - K.load("coordtransutils", function() { - eb.zV(a, b, c) - }, q) - } - }; - function lc() { - this.Pa = []; - var a = this; - K.load("convertor", function() { - a.qQ() - }) - } - z.ta(lc, z.lang.Ca, "Convertor"); - z.extend(lc.prototype, { - translate: function(a, b, c, e) { - this.Pa.push({ - method: "translate", - arguments: [a, b, c, e] - }) - } - }); - T(lc.prototype, { - translate: lc.prototype.translate - }); - function S() {} - S.prototype = new jc; - z.extend(S, { - GP: 6370996.81, - IG: [1.289059486E7, 8362377.87, 5591021, 3481989.83, 1678043.12, 0], - Nu: [75, 60, 45, 30, 15, 0], - MP: [[1.410526172116255E-8, 8.98305509648872E-6, -1.9939833816331, 200.9824383106796, -187.2403703815547, 91.6087516669843, -23.38765649603339, 2.57121317296198, -0.03801003308653, 1.73379812E7], [-7.435856389565537E-9, 8.983055097726239E-6, -0.78625201886289, 96.32687599759846, -1.85204757529826, -59.36935905485877, 47.40033549296737, -16.50741931063887, 2.28786674699375, 1.026014486E7], [-3.030883460898826E-8, 8.98305509983578E-6, 0.30071316287616, 59.74293618442277, 7.357984074871, -25.38371002664745, 13.45380521110908, -3.29883767235584, 0.32710905363475, 6856817.37], [-1.981981304930552E-8, 8.983055099779535E-6, 0.03278182852591, 40.31678527705744, 0.65659298677277, -4.44255534477492, 0.85341911805263, 0.12923347998204, -0.04625736007561, 4482777.06], [3.09191371068437E-9, 8.983055096812155E-6, 6.995724062E-5, 23.10934304144901, -2.3663490511E-4, -0.6321817810242, -0.00663494467273, 0.03430082397953, -0.00466043876332, 2555164.4], [2.890871144776878E-9, 8.983055095805407E-6, -3.068298E-8, 7.47137025468032, -3.53937994E-6, -0.02145144861037, -1.234426596E-5, 1.0322952773E-4, -3.23890364E-6, 826088.5]], - FG: [[-0.0015702102444, 111320.7020616939, 1704480524535203, -10338987376042340, 26112667856603880, -35149669176653700, 26595700718403920, -10725012454188240, 1800819912950474, 82.5], [8.277824516172526E-4, 111320.7020463578, 6.477955746671607E8, -4.082003173641316E9, 1.077490566351142E10, -1.517187553151559E10, 1.205306533862167E10, -5.124939663577472E9, 9.133119359512032E8, 67.5], [0.00337398766765, 111320.7020202162, 4481351.045890365, -2.339375119931662E7, 7.968221547186455E7, -1.159649932797253E8, 9.723671115602145E7, -4.366194633752821E7, 8477230.501135234, 52.5], [0.00220636496208, 111320.7020209128, 51751.86112841131, 3796837.749470245, 992013.7397791013, -1221952.21711287, 1340652.697009075, -620943.6990984312, 144416.9293806241, 37.5], [-3.441963504368392E-4, 111320.7020576856, 278.2353980772752, 2485758.690035394, 6070.750963243378, 54821.18345352118, 9540.606633304236, -2710.55326746645, 1405.483844121726, 22.5], [-3.218135878613132E-4, 111320.7020701615, 0.00369383431289, 823725.6402795718, 0.46104986909093, 2351.343141331292, 1.58060784298199, 8.77738589078284, 0.37238884252424, 7.45]], - t3: function(a, b) { - if (!a || !b) - return 0; - var c, e, a = this.Tb(a); - if (!a) - return 0; - c = this.Xk(a.lng); - e = this.Xk(a.lat); - b = this.Tb(b); - return !b ? 0 : this.pf(c, this.Xk(b.lng), e, this.Xk(b.lat)) - }, - $o: function(a, b) { - if (!a || !b) - return 0; - a.lng = this.WD(a.lng, -180, 180); - a.lat = this.aE(a.lat, -74, 74); - b.lng = this.WD(b.lng, -180, 180); - b.lat = this.aE(b.lat, -74, 74); - return this.pf(this.Xk(a.lng), this.Xk(b.lng), this.Xk(a.lat), this.Xk(b.lat)) - }, - Tb: function(a) { - if (a === s || a === l) - return new J(0,0); - var b, c; - b = new J(Math.abs(a.lng),Math.abs(a.lat)); - for (var e = 0; e < this.IG.length; e++) - if (b.lat >= this.IG[e]) { - c = this.MP[e]; - break - } - a = this.FK(a, c); - return a = new J(a.lng.toFixed(6),a.lat.toFixed(6)) - }, - Eb: function(a) { - if (a === s || a === l || 180 < a.lng || -180 > a.lng || 90 < a.lat || -90 > a.lat) - return new J(0,0); - var b, c; - a.lng = this.WD(a.lng, -180, 180); - a.lat = this.aE(a.lat, -74, 74); - b = new J(a.lng,a.lat); - for (var e = 0; e < this.Nu.length; e++) - if (b.lat >= this.Nu[e]) { - c = this.FG[e]; - break - } - if (!c) - for (e = 0; e < this.Nu.length; e++) - if (b.lat <= -this.Nu[e]) { - c = this.FG[e]; - break - } - a = this.FK(a, c); - return a = new J(a.lng.toFixed(2),a.lat.toFixed(2)) - }, - FK: function(a, b) { - if (a && b) { - var c = b[0] + b[1] * Math.abs(a.lng) - , e = Math.abs(a.lat) / b[9] - , e = b[2] + b[3] * e + b[4] * e * e + b[5] * e * e * e + b[6] * e * e * e * e + b[7] * e * e * e * e * e + b[8] * e * e * e * e * e * e - , c = c * (0 > a.lng ? -1 : 1) - , e = e * (0 > a.lat ? -1 : 1); - return new J(c,e) - } - }, - pf: function(a, b, c, e) { - return this.GP * Math.acos(Math.sin(c) * Math.sin(e) + Math.cos(c) * Math.cos(e) * Math.cos(b - a)) - }, - Xk: function(a) { - return Math.PI * a / 180 - }, - B5: function(a) { - return 180 * a / Math.PI - }, - aE: function(a, b, c) { - b != s && (a = Math.max(a, b)); - c != s && (a = Math.min(a, c)); - return a - }, - WD: function(a, b, c) { - for (; a > c; ) - a -= c - b; - for (; a < b; ) - a += c - b; - return a - } - }); - z.extend(S.prototype, { - vj: function(a) { - return S.Eb(a) - }, - kh: function(a) { - a = S.Eb(a); - return new Q(a.lng,a.lat) - }, - nh: function(a) { - return S.Tb(a) - }, - xj: function(a) { - a = new J(a.x,a.y); - return S.Tb(a) - }, - $b: function(a, b, c, e, f) { - if (a) - return a = this.vj(a, f), - b = this.dc(b), - new Q(Math.round((a.lng - c.lng) / b + e.width / 2),Math.round((c.lat - a.lat) / b + e.height / 2)) - }, - xb: function(a, b, c, e, f) { - if (a) - return b = this.dc(b), - this.nh(new J(c.lng + b * (a.x - e.width / 2),c.lat - b * (a.y - e.height / 2)), f) - }, - dc: function(a) { - return Math.pow(2, 18 - a) - } - }); - function hb() { - this.$i = "bj" - } - hb.prototype = new S; - z.extend(hb.prototype, { - vj: function(a, b) { - return this.bR(b, S.Eb(a)) - }, - nh: function(a, b) { - return S.Tb(this.cR(b, a)) - }, - lngLatToPointFor3D: function(a, b) { - var c = this - , e = S.Eb(a); - K.load("coordtrans", function() { - var a = kc.ZD(c.$i || "bj", e) - , a = new Q(a.x,a.y); - b && b(a) - }, q) - }, - pointToLngLatFor3D: function(a, b) { - var c = this - , e = new J(a.x,a.y); - K.load("coordtrans", function() { - var a = kc.XD(c.$i || "bj", e) - , a = new J(a.lng,a.lat) - , a = S.Tb(a); - b && b(a) - }, q) - }, - bR: function(a, b) { - if (K.kb("coordtrans").Me == K.Cj.cq) { - var c = kc.ZD(a || "bj", b); - return new J(c.x,c.y) - } - K.load("coordtrans", u()); - return new J(0,0) - }, - cR: function(a, b) { - if (K.kb("coordtrans").Me == K.Cj.cq) { - var c = kc.XD(a || "bj", b); - return new J(c.lng,c.lat) - } - K.load("coordtrans", u()); - return new J(0,0) - }, - dc: function(a) { - return Math.pow(2, 20 - a) - } - }); - function mc() { - this.Mb = "overlay" - } - z.lang.ta(mc, z.lang.Ca, "Overlay"); - mc.Ck = function(a) { - a *= 1; - return !a ? 0 : -1E5 * a << 1 - } - ; - z.extend(mc.prototype, { - He: function(a) { - if (!this.V && Xa(this.initialize) && (this.V = this.initialize(a))) - this.V.style.WebkitUserSelect = "none"; - this.draw() - }, - initialize: function() { - aa("initialize\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - draw: function() { - aa("draw\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - remove: function() { - this.V && this.V.parentNode && this.V.parentNode.removeChild(this.V); - this.V = s; - this.dispatchEvent(new P("onremove")) - }, - U: function() { - this.V && z.D.U(this.V) - }, - show: function() { - this.V && z.D.show(this.V) - }, - jh: function() { - return !this.V || "none" == this.V.style.display || "hidden" == this.V.style.visibility ? t : q - } - }); - B.Ye(function(a) { - function b(a, b) { - var c = L("div") - , i = c.style; - i.position = "absolute"; - i.top = i.left = i.width = i.height = "0"; - i.zIndex = b; - a.appendChild(c); - return c - } - var c = a.R; - c.rd = a.rd = b(a.platform, 200); - a.Yd.BD = b(c.rd, 800); - a.Yd.RE = b(c.rd, 700); - a.Yd.sL = b(c.rd, 600); - a.Yd.KE = b(c.rd, 500); - a.Yd.fN = b(c.rd, 400); - a.Yd.gN = b(c.rd, 300); - a.Yd.nP = b(c.rd, 201); - a.Yd.Et = b(c.rd, 200) - }); - function gb() { - z.lang.Ca.call(this); - mc.call(this); - this.map = s; - this.Qa = q; - this.zb = s; - this.vH = 0 - } - z.lang.ta(gb, mc, "OverlayInternal"); - z.extend(gb.prototype, { - initialize: function(a) { - this.map = a; - z.lang.Ca.call(this, this.aa); - return s - }, - Dx: w("map"), - draw: u(), - Ej: u(), - remove: function() { - this.map = s; - z.lang.hx(this.aa); - mc.prototype.remove.call(this) - }, - U: function() { - this.Qa !== t && (this.Qa = t) - }, - show: function() { - this.Qa !== q && (this.Qa = q) - }, - jh: function() { - return !this.V ? t : !!this.Qa - }, - La: w("V"), - lO: function(a) { - var a = a || {}, b; - for (b in a) - this.z[b] = a[b] - }, - Sp: ba("zIndex"), - gj: function() { - this.z.gj = q - }, - MW: function() { - this.z.gj = t - }, - yo: ba("lg"), - Cp: function() { - this.lg = s - } - }); - function nc() { - this.map = s; - this.ya = {}; - this.Ee = [] - } - B.Ye(function(a) { - var b = new nc; - b.map = a; - a.ya = b.ya; - a.Ee = b.Ee; - a.addEventListener("load", function(a) { - b.draw(a) - }); - a.addEventListener("moveend", function(a) { - b.draw(a) - }); - z.ca.ia && 8 > z.ca.ia || "BackCompat" === document.compatMode ? a.addEventListener("zoomend", function(a) { - setTimeout(function() { - b.draw(a) - }, 20) - }) : a.addEventListener("zoomend", function(a) { - b.draw(a) - }); - a.addEventListener("maptypechange", function(a) { - b.draw(a) - }); - a.addEventListener("addoverlay", function(a) { - a = a.target; - if (a instanceof gb) - b.ya[a.aa] || (b.ya[a.aa] = a); - else { - for (var e = t, f = 0, g = b.Ee.length; f < g; f++) - if (b.Ee[f] === a) { - e = q; - break - } - e || b.Ee.push(a) - } - }); - a.addEventListener("removeoverlay", function(a) { - a = a.target; - if (a instanceof gb) - delete b.ya[a.aa]; - else - for (var e = 0, f = b.Ee.length; e < f; e++) - if (b.Ee[e] === a) { - b.Ee.splice(e, 1); - break - } - }); - a.addEventListener("clearoverlays", function() { - this.Yc(); - for (var a in b.ya) - b.ya[a].z.gj && (b.ya[a].remove(), - delete b.ya[a]); - a = 0; - for (var e = b.Ee.length; a < e; a++) - b.Ee[a].enableMassClear !== t && (b.Ee[a].remove(), - b.Ee[a] = s, - b.Ee.splice(a, 1), - a--, - e--) - }); - a.addEventListener("infowindowopen", function() { - var a = this.zb; - a && (z.D.U(a.Ac), - z.D.U(a.ac)) - }); - a.addEventListener("movestart", function() { - this.hh() && this.hh().mJ() - }); - a.addEventListener("moveend", function() { - this.hh() && this.hh().cJ() - }) - }); - nc.prototype.draw = function(a) { - if (B.hq) { - var b = B.hq.Ws(this.map); - "canvas" === b.Mb && b.canvas && b.XQ(b.canvas.getContext("2d")) - } - for (var c in this.ya) - this.ya[c].draw(a); - z.mc.Fb(this.Ee, function(a) { - a.draw() - }); - this.map.R.qb && this.map.R.qb.sa(); - B.hq && b.IF() - } - ; - function oc(a) { - gb.call(this); - a = a || {}; - this.z = { - strokeColor: a.strokeColor || "#3a6bdb", - rc: a.strokeWeight || 5, - td: a.strokeOpacity || 0.65, - strokeStyle: a.strokeStyle || "solid", - gj: a.enableMassClear === t ? t : q, - zk: s, - um: s, - mf: a.enableEditing === q ? q : t, - kN: 5, - G0: t, - jf: a.enableClicking === t ? t : q, - ji: a.icons && 0 < a.icons.length ? a.icons : s - }; - 0 >= this.z.rc && (this.z.rc = 5); - if (0 > this.z.td || 1 < this.z.td) - this.z.td = 0.65; - if (0 > this.z.tg || 1 < this.z.tg) - this.z.tg = 0.65; - "solid" != this.z.strokeStyle && "dashed" != this.z.strokeStyle && (this.z.strokeStyle = "solid"); - this.V = s; - this.Vu = new fb(0,0); - this.gf = []; - this.tc = []; - this.Ra = {} - } - z.lang.ta(oc, gb, "Graph"); - oc.yx = function(a) { - var b = []; - if (!a) - return b; - $a(a) && z.mc.Fb(a.split(";"), function(a) { - a = a.split(","); - b.push(new J(a[0],a[1])) - }); - "[object Array]" == Object.prototype.toString.apply(a) && 0 < a.length && (b = a); - return b - } - ; - oc.eF = [0.09, 0.0050, 1.0E-4, 1.0E-5]; - z.extend(oc.prototype, { - initialize: function(a) { - this.map = a; - return s - }, - draw: u(), - Mr: function(a) { - this.gf.length = 0; - this.ja = oc.yx(a).slice(0); - this.Bh() - }, - ke: function(a) { - this.Mr(a) - }, - Bh: function() { - if (this.ja) { - var a = this; - a.Vu = new fb; - z.mc.Fb(this.ja, function(b) { - a.Vu.extend(b) - }) - } - }, - Ue: w("ja"), - gn: function(a, b) { - b && this.ja[a] && (this.gf.length = 0, - this.ja[a] = new J(b.lng,b.lat), - this.Bh()) - }, - setStrokeColor: function(a) { - this.z.strokeColor = a - }, - jY: function() { - return this.z.strokeColor - }, - Rp: function(a) { - 0 < a && (this.z.rc = a) - }, - WL: function() { - return this.z.rc - }, - Pp: function(a) { - a == l || (1 < a || 0 > a) || (this.z.td = a) - }, - kY: function() { - return this.z.td - }, - Xt: function(a) { - 1 < a || 0 > a || (this.z.tg = a) - }, - HX: function() { - return this.z.tg - }, - Qp: function(a) { - "solid" != a && "dashed" != a || (this.z.strokeStyle = a) - }, - VL: function() { - return this.z.strokeStyle - }, - setFillColor: function(a) { - this.z.fillColor = a || "" - }, - GX: function() { - return this.z.fillColor - }, - ve: w("Vu"), - remove: function() { - this.map && this.map.removeEventListener("onmousemove", this.vv); - gb.prototype.remove.call(this); - this.gf.length = 0 - }, - mf: function() { - if (!(2 > this.ja.length)) { - this.z.mf = q; - var a = this; - K.load("poly", function() { - a.Ul() - }, q) - } - }, - LW: function() { - this.z.mf = t; - var a = this; - K.load("poly", function() { - a.nk() - }, q) - }, - DX: function() { - return this.z.mf - } - }); - function pc(a) { - gb.call(this); - this.V = this.map = s; - this.z = { - width: 0, - height: 0, - za: new O(0,0), - opacity: 1, - background: "transparent", - ey: 1, - SM: "#000", - hZ: "solid", - point: s - }; - this.lO(a); - this.point = this.z.point - } - z.lang.ta(pc, gb, "Division"); - z.extend(pc.prototype, { - Ej: function() { - var a = this.z - , b = this.content - , c = ['
    '); - c.push(b); - c.push("
    "); - this.V = Ab(this.map.Tf().RE, c.join("")) - }, - initialize: function(a) { - this.map = a; - this.Ej(); - this.V && z.M(this.V, H() ? "touchstart" : "mousedown", function(a) { - ma(a) - }); - return this.V - }, - draw: function() { - var a = this.map.Xe(this.z.point); - this.z.za = new O(-Math.round(this.z.width / 2) - Math.round(this.z.ey),-Math.round(this.z.height / 2) - Math.round(this.z.ey)); - this.V.style.left = a.x + this.z.za.width + "px"; - this.V.style.top = a.y + this.z.za.height + "px" - }, - ga: function() { - return this.z.point - }, - L1: function() { - return this.map.$b(this.ga()) - }, - sa: function(a) { - this.z.point = a; - this.draw() - }, - u_: function(a, b) { - this.z.width = Math.round(a); - this.z.height = Math.round(b); - this.V && (this.V.style.width = this.z.width + "px", - this.V.style.height = this.z.height + "px", - this.draw()) - } - }); - function qc(a, b, c) { - a && b && (this.imageUrl = a, - this.size = b, - a = new O(Math.floor(b.width / 2),Math.floor(b.height / 2)), - c = c || {}, - a = c.anchor || a, - b = c.imageOffset || new O(0,0), - this.imageSize = c.imageSize, - this.anchor = a, - this.imageOffset = b, - this.infoWindowAnchor = c.infoWindowAnchor || this.anchor, - this.printImageUrl = c.printImageUrl || "") - } - z.extend(qc.prototype, { - mO: function(a) { - a && (this.imageUrl = a) - }, - K_: function(a) { - a && (this.printImageUrl = a) - }, - Ce: function(a) { - a && (this.size = new O(a.width,a.height)) - }, - uc: function(a) { - a && (this.anchor = new O(a.width,a.height)) - }, - Yt: function(a) { - a && (this.imageOffset = new O(a.width,a.height)) - }, - z_: function(a) { - a && (this.infoWindowAnchor = new O(a.width,a.height)) - }, - w_: function(a) { - a && (this.imageSize = new O(a.width,a.height)) - }, - toString: ca("Icon") - }); - function rc(a, b) { - if (a) { - b = b || {}; - this.style = { - anchor: b.anchor || new O(0,0), - fillColor: b.fillColor || "#000", - tg: b.fillOpacity || 0, - scale: b.scale || 1, - rotation: b.rotation || 0, - strokeColor: b.strokeColor || "#000", - td: b.strokeOpacity || 1, - rc: b.strokeWeight - }; - this.Mb = "number" === typeof a ? a : "UserDefined"; - this.Di = this.style.anchor; - this.rr = new O(0,0); - this.anchor = s; - this.vB = a; - var c = this; - K.load("symbol", function() { - c.Mn() - }, q) - } - } - z.extend(rc.prototype, { - setPath: ba("vB"), - setAnchor: function(a) { - this.Di = this.style.anchor = a - }, - setRotation: function(a) { - this.style.rotation = a - }, - setScale: function(a) { - this.style.scale = a - }, - setStrokeWeight: function(a) { - this.style.rc = a - }, - setStrokeColor: function(a) { - a = z.is.AC(a, this.style.td); - this.style.strokeColor = a - }, - setStrokeOpacity: function(a) { - this.style.td = a - }, - setFillOpacity: function(a) { - this.style.tg = a - }, - setFillColor: function(a) { - this.style.fillColor = a - } - }); - function sc(a, b, c, e) { - a && (this.Ov = {}, - this.qL = e ? !!e : t, - this.Vc = [], - this.c0 = a instanceof rc ? a : s, - this.WI = b === l ? q : !!(b.indexOf("%") + 1), - this.Zj = isNaN(parseFloat(b)) ? 1 : this.WI ? parseFloat(b) / 100 : parseFloat(b), - this.XI = !!(c.indexOf("%") + 1), - this.repeat = c != l ? this.XI ? parseFloat(c) / 100 : parseFloat(c) : 0) - } - ;function tc(a, b) { - z.lang.Ca.call(this); - this.content = a; - this.map = s; - b = b || {}; - this.z = { - width: b.width || 0, - height: b.height || 0, - maxWidth: b.maxWidth || 730, - za: b.offset || new O(0,0), - title: b.title || "", - SE: b.maxContent || "", - dh: b.enableMaximize || t, - Ls: b.enableAutoPan === t ? t : q, - lD: b.enableCloseOnClick === t ? t : q, - margin: b.margin || [10, 10, 40, 10], - vC: b.collisions || [[10, 10], [10, 10], [10, 10], [10, 10]], - GY: t, - AZ: b.onClosing || ca(q), - hL: t, - qD: b.enableParano === q ? q : t, - message: b.message, - sD: b.enableSearchTool === q ? q : t, - Ox: b.headerContent || "", - mD: b.enableContentScroll || t - }; - if (0 != this.z.width && (220 > this.z.width && (this.z.width = 220), - 730 < this.z.width)) - this.z.width = 730; - if (0 != this.z.height && (60 > this.z.height && (this.z.height = 60), - 650 < this.z.height)) - this.z.height = 650; - if (0 != this.z.maxWidth && (220 > this.z.maxWidth && (this.z.maxWidth = 220), - 730 < this.z.maxWidth)) - this.z.maxWidth = 730; - this.de = t; - this.yi = G.qa; - this.fb = s; - var c = this; - K.load("infowindow", function() { - c.ib() - }) - } - z.lang.ta(tc, z.lang.Ca, "InfoWindow"); - z.extend(tc.prototype, { - setWidth: function(a) { - !a && 0 != a || (isNaN(a) || 0 > a) || (0 != a && (220 > a && (a = 220), - 730 < a && (a = 730)), - this.z.width = a) - }, - setHeight: function(a) { - !a && 0 != a || (isNaN(a) || 0 > a) || (0 != a && (60 > a && (a = 60), - 650 < a && (a = 650)), - this.z.height = a) - }, - qO: function(a) { - !a && 0 != a || (isNaN(a) || 0 > a) || (0 != a && (220 > a && (a = 220), - 730 < a && (a = 730)), - this.z.maxWidth = a) - }, - Ec: function(a) { - this.z.title = a - }, - getTitle: function() { - return this.z.title - }, - dd: ba("content"), - xk: w("content"), - $t: function(a) { - this.z.SE = a + "" - }, - je: u(), - Ls: function() { - this.z.Ls = q - }, - disableAutoPan: function() { - this.z.Ls = t - }, - enableCloseOnClick: function() { - this.z.lD = q - }, - disableCloseOnClick: function() { - this.z.lD = t - }, - dh: function() { - this.z.dh = q - }, - kx: function() { - this.z.dh = t - }, - show: function() { - this.Qa = q - }, - U: function() { - this.Qa = t - }, - close: function() { - this.U() - }, - hy: function() { - this.de = q - }, - restore: function() { - this.de = t - }, - jh: function() { - return this.Xa() - }, - Xa: ca(t), - ga: function() { - if (this.fb && this.fb.ga) - return this.fb.ga() - }, - Sf: function() { - return this.z.za - } - }); - Ka.prototype.pc = function(a, b) { - if (a instanceof tc && b instanceof J) { - var c = this.R; - c.Nm ? c.Nm.sa(b) : (c.Nm = new U(b,{ - icon: new qc(G.qa + "blank.gif",{ - width: 1, - height: 1 - }), - offset: new O(0,0), - clickable: t - }), - c.Nm.bS = 1); - this.Ga(c.Nm); - c.Nm.pc(a) - } - } - ; - Ka.prototype.Yc = function() { - var a = this.R.qb || this.R.rl; - a && a.fb && a.fb.Yc() - } - ; - gb.prototype.pc = function(a) { - this.map && (this.map.Yc(), - a.Qa = q, - this.map.R.rl = a, - a.fb = this, - z.lang.Ca.call(a, a.aa)) - } - ; - gb.prototype.Yc = function() { - this.map && this.map.R.rl && (this.map.R.rl.Qa = t, - z.lang.hx(this.map.R.rl.aa), - this.map.R.rl = s) - } - ; - function uc(a, b) { - gb.call(this); - this.content = a; - this.V = this.map = s; - b = b || {}; - this.z = { - width: 0, - za: b.offset || new O(0,0), - Wp: { - backgroundColor: "#fff", - border: "1px solid #f00", - padding: "1px", - whiteSpace: "nowrap", - font: "12px " + G.fontFamily, - zIndex: "80", - MozUserSelect: "none" - }, - position: b.position || s, - gj: b.enableMassClear === t ? t : q, - jf: q - }; - 0 > this.z.width && (this.z.width = 0); - Hb(b.enableClicking) && (this.z.jf = b.enableClicking); - this.point = this.z.position; - var c = this; - K.load("marker", function() { - c.ib() - }) - } - z.lang.ta(uc, gb, "Label"); - z.extend(uc.prototype, { - ga: function() { - return this.Dv ? this.Dv.ga() : this.point - }, - sa: function(a) { - a instanceof J && !this.Ex() && (this.point = this.z.position = new J(a.lng,a.lat)) - }, - dd: ba("content"), - HF: function(a) { - 0 <= a && 1 >= a && (this.z.opacity = a) - }, - Ze: function(a) { - a instanceof O && (this.z.za = new O(a.width,a.height)) - }, - Sf: function() { - return this.z.za - }, - Md: function(a) { - a = a || {}; - this.z.Wp = z.extend(this.z.Wp, a) - }, - ti: function(a) { - return this.Md(a) - }, - Ec: function(a) { - this.z.title = a || "" - }, - getTitle: function() { - return this.z.title - }, - pO: function(a) { - this.point = (this.Dv = a) ? this.z.position = a.ga() : this.z.position = s - }, - Ex: function() { - return this.Dv || s - }, - xk: w("content") - }); - function vc(a, b) { - if (0 !== arguments.length) { - gb.apply(this, arguments); - b = b || {}; - this.z = { - bb: a, - opacity: b.opacity || 1, - Gm: b.Gm || "", - Bs: b.displayOnMinLevel || 1, - gj: b.enableMassClear === t ? t : q, - As: b.displayOnMaxLevel || 19, - X_: b.stretch || t - }; - var c = this; - K.load("groundoverlay", function() { - c.ib() - }) - } - } - z.lang.ta(vc, gb, "GroundOverlay"); - z.extend(vc.prototype, { - setBounds: function(a) { - this.z.bb = a - }, - getBounds: function() { - return this.z.bb - }, - setOpacity: function(a) { - this.z.opacity = a - }, - getOpacity: function() { - return this.z.opacity - }, - setImageURL: function(a) { - this.z.Gm = a - }, - getImageURL: function() { - return this.z.Gm - }, - setDisplayOnMinLevel: function(a) { - this.z.Bs = a - }, - getDisplayOnMinLevel: function() { - return this.z.Bs - }, - setDisplayOnMaxLevel: function(a) { - this.z.As = a - }, - getDisplayOnMaxLevel: function() { - return this.z.As - } - }); - var wc = 3 - , xc = 4; - function yc() { - var a = document.createElement("canvas"); - return !(!a.getContext || !a.getContext("2d")) - } - function zc(a, b) { - var c = this; - yc() && (a === l && aa(Error("\u6ca1\u6709\u4f20\u5165points\u6570\u636e")), - "[object Array]" !== Object.prototype.toString.call(a) && aa(Error("points\u6570\u636e\u4e0d\u662f\u6570\u7ec4")), - b = b || {}, - gb.apply(c, arguments), - c.ea = { - ja: a - }, - c.z = { - shape: b.shape || wc, - size: b.size || xc, - color: b.color || "#fa937e", - gj: q - }, - this.sB = [], - this.pe = [], - K.load("pointcollection", function() { - for (var a = 0, b; b = c.sB[a]; a++) - c[b.method].apply(c, b.arguments); - for (a = 0; b = c.pe[a]; a++) - c[b.method].apply(c, b.arguments) - })) - } - z.lang.ta(zc, gb, "PointCollection"); - z.extend(zc.prototype, { - initialize: function(a) { - this.sB && this.sB.push({ - method: "initialize", - arguments: arguments - }) - }, - setPoints: function(a) { - this.pe && this.pe.push({ - method: "setPoints", - arguments: arguments - }) - }, - setStyles: function(a) { - this.pe && this.pe.push({ - method: "setStyles", - arguments: arguments - }) - }, - clear: function() { - this.pe && this.pe.push({ - method: "clear", - arguments: arguments - }) - }, - remove: function() { - this.pe && this.pe.push({ - method: "remove", - arguments: arguments - }) - } - }); - var Ac = new qc(G.qa + "marker_red_sprite.png",new O(19,25),{ - anchor: new O(10,25), - infoWindowAnchor: new O(10,0) - }) - , Bc = new qc(G.qa + "marker_red_sprite.png",new O(20,11),{ - anchor: new O(6,11), - imageOffset: new O(-19,-13) - }); - function U(a, b) { - gb.call(this); - b = b || {}; - this.point = a; - this.yq = this.map = s; - this.z = { - za: b.offset || new O(0,0), - rj: b.icon || Ac, - Sk: Bc, - title: b.title || "", - label: s, - lK: b.baseZIndex || 0, - jf: q, - X5: t, - EE: t, - gj: b.enableMassClear === t ? t : q, - Wb: t, - UN: b.raiseOnDrag === q ? q : t, - aO: t, - Hd: b.draggingCursor || G.Hd, - rotation: b.rotation || 0 - }; - b.icon && !b.shadow && (this.z.Sk = s); - b.enableDragging && (this.z.Wb = b.enableDragging); - Hb(b.enableClicking) && (this.z.jf = b.enableClicking); - var c = this; - K.load("marker", function() { - c.ib() - }) - } - U.Qu = mc.Ck(-90) + 1E6; - U.AG = U.Qu + 1E6; - z.lang.ta(U, gb, "Marker"); - z.extend(U.prototype, { - Rb: function(a) { - if (a instanceof qc || a instanceof rc) - this.z.rj = a - }, - ap: function() { - return this.z.rj - }, - Oy: function(a) { - a instanceof qc && (this.z.Sk = a) - }, - getShadow: function() { - return this.z.Sk - }, - dn: function(a) { - this.z.label = a || s - }, - VD: function() { - return this.z.label - }, - Wb: function() { - this.z.Wb = q - }, - TC: function() { - this.z.Wb = t - }, - ga: w("point"), - sa: function(a) { - a instanceof J && (this.point = new J(a.lng,a.lat)) - }, - ui: function(a, b) { - this.z.EE = !!a; - a && (this.XG = b || 0) - }, - Ec: function(a) { - this.z.title = a + "" - }, - getTitle: function() { - return this.z.title - }, - Ze: function(a) { - a instanceof O && (this.z.za = a) - }, - Sf: function() { - return this.z.za - }, - bn: ba("yq"), - Op: function(a) { - this.z.rotation = a - }, - TL: function() { - return this.z.rotation - } - }); - function Cc(a) { - this.options = a || {}; - this.GZ = this.options.paneName || "labelPane"; - this.zIndex = this.options.zIndex || 0 - } - z.lang.ta(Cc, gb, "CanvasLayer"); - Cc.prototype.initialize = function(a) { - this.B = a; - var b = this.canvas = document.createElement("canvas") - , c = this.canvas.getContext("2d"); - b.style.cssText = "position:absolute;left:0;top:0;z-index:" + this.zIndex + ";"; - Dc(this); - Ec(c); - a.getPanes()[this.GZ].appendChild(b); - var e = this; - a.addEventListener("resize", function() { - Dc(e); - e.ib() - }); - return this.canvas - } - ; - function Dc(a) { - var b = a.B.cb() - , a = a.canvas; - a.width = b.width; - a.height = b.height; - a.style.width = a.width + "px"; - a.style.height = a.height + "px" - } - function Ec(a) { - var b = (window.devicePixelRatio || 1) / (a.CV || a.T5 || a.x4 || a.y4 || a.B4 || a.CV || 1) - , c = a.canvas.width - , e = a.canvas.height; - a.canvas.width = c * b; - a.canvas.height = e * b; - a.canvas.style.width = c + "px"; - a.canvas.style.height = e + "px"; - a.scale(b, b) - } - Cc.prototype.draw = function() { - var a = this - , b = arguments; - clearTimeout(a.j0); - a.j0 = setTimeout(function() { - a.ib.apply(a, b) - }, 15) - } - ; - da = Cc.prototype; - da.ib = function() { - var a = this.B; - this.canvas.style.left = -a.offsetX + "px"; - this.canvas.style.top = -a.offsetY + "px"; - this.dispatchEvent("draw"); - this.options.update && this.options.update.apply(this, arguments) - } - ; - da.La = w("canvas"); - da.show = function() { - this.canvas || this.B.Ga(this); - this.canvas.style.display = "block" - } - ; - da.U = function() { - this.canvas.style.display = "none" - } - ; - da.Sp = function(a) { - this.canvas.style.zIndex = a - } - ; - da.Ck = w("zIndex"); - function Fc(a, b) { - oc.call(this, b); - b = b || {}; - this.z.tg = b.fillOpacity ? b.fillOpacity : 0.65; - this.z.fillColor = "" == b.fillColor ? "" : b.fillColor ? b.fillColor : "#fff"; - this.ke(a); - var c = this; - K.load("poly", function() { - c.ib() - }) - } - z.lang.ta(Fc, oc, "Polygon"); - z.extend(Fc.prototype, { - ke: function(a, b) { - this.vo = oc.yx(a).slice(0); - var c = oc.yx(a).slice(0); - 1 < c.length && c.push(new J(c[0].lng,c[0].lat)); - oc.prototype.ke.call(this, c, b) - }, - gn: function(a, b) { - this.vo[a] && (this.vo[a] = new J(b.lng,b.lat), - this.ja[a] = new J(b.lng,b.lat), - 0 == a && !this.ja[0].pb(this.ja[this.ja.length - 1]) && (this.ja[this.ja.length - 1] = new J(b.lng,b.lat)), - this.Bh()) - }, - Ue: function() { - var a = this.vo; - 0 == a.length && (a = this.ja); - return a - } - }); - function Gc(a, b) { - oc.call(this, b); - this.Mr(a); - var c = this; - K.load("poly", function() { - c.ib() - }) - } - z.lang.ta(Gc, oc, "Polyline"); - function Hc(a, b, c) { - this.point = a; - this.wa = Math.abs(b); - Fc.call(this, [], c) - } - Hc.eF = [0.01, 1.0E-4, 1.0E-5, 4.0E-6]; - z.lang.ta(Hc, Fc, "Circle"); - z.extend(Hc.prototype, { - initialize: function(a) { - this.map = a; - this.ja = this.qv(this.point, this.wa); - this.Bh(); - return s - }, - Ka: w("point"), - Zf: function(a) { - a && (this.point = a) - }, - RL: w("wa"), - xf: function(a) { - this.wa = Math.abs(a) - }, - qv: function(a, b) { - if (!a || !b || !this.map) - return []; - for (var c = [], e = b / 6378800, f = Math.PI / 180 * a.lat, g = Math.PI / 180 * a.lng, i = 0; 360 > i; i += 9) { - var k = Math.PI / 180 * i - , m = Math.asin(Math.sin(f) * Math.cos(e) + Math.cos(f) * Math.sin(e) * Math.cos(k)) - , k = new J(((g - Math.atan2(Math.sin(k) * Math.sin(e) * Math.cos(f), Math.cos(e) - Math.sin(f) * Math.sin(m)) + Math.PI) % (2 * Math.PI) - Math.PI) * (180 / Math.PI),m * (180 / Math.PI)); - c.push(k) - } - e = c[0]; - c.push(new J(e.lng,e.lat)); - return c - } - }); - var Ic = {}; - function Jc(a) { - this.map = a; - this.Mm = []; - this.$f = []; - this.Fg = []; - this.OV = 300; - this.oF = 0; - this.yg = {}; - this.Zi = {}; - this.ph = 0; - this.yE = q; - this.MK = {}; - this.eo = this.Kj(1); - this.od = this.Kj(2); - this.Bl = this.Kj(3); - this.Ki = this.Kj(4); - a.platform.appendChild(this.eo); - a.platform.appendChild(this.od); - a.platform.appendChild(this.Bl); - a.platform.appendChild(this.Ki); - var b = 256 * Math.pow(2, 15) - , c = 3 * b - , a = S.Eb(new J(180,0)).lng - , c = c - a - , b = -3 * b - , e = S.Eb(new J(-180,0)).lng; - this.yI = a; - this.zI = e; - this.ZA = c + (e - b); - this.AI = a - e - } - B.Ye(function(a) { - var b = new Jc(a); - b.na(); - a.Va = b - }); - z.extend(Jc.prototype, { - na: function() { - var a = this - , b = a.map; - b.addEventListener("loadcode", function() { - a.up() - }); - b.addEventListener("addtilelayer", function(b) { - a.Oe(b) - }); - b.addEventListener("removetilelayer", function(b) { - a.Yf(b) - }); - b.addEventListener("setmaptype", function(b) { - a.Dg(b) - }); - b.addEventListener("zoomstartcode", function(b) { - a.Mc(b) - }); - b.addEventListener("setcustomstyles", function(b) { - a.Zt(b.target); - a.Wf(q) - }); - b.addEventListener("initindoorlayer", function(b) { - a.tE(b) - }) - }, - up: function() { - var a = this; - if (z.ca.ia) - try { - document.execCommand("BackgroundImageCache", t, q) - } catch (b) {} - this.loaded || a.Ux(); - a.Wf(); - this.loaded || (this.loaded = q, - K.load("tile", function() { - a.rQ() - })) - }, - tE: function(a) { - this.zu = new Kc(this); - this.zu.Oe(new Lc(this.map,this.zu,a.vf)) - }, - Ux: function() { - for (var a = this.map.oa().ff, b = 0; b < a.length; b++) { - var c = new Mc; - z.extend(c, a[b]); - this.Mm.push(c); - c.na(this.map, this.eo) - } - this.Zt() - }, - Kj: function(a) { - var b = L("div"); - b.style.position = "absolute"; - b.style.overflow = "visible"; - b.style.left = b.style.top = "0"; - b.style.zIndex = a; - return b - }, - Af: function() { - this.ph--; - var a = this; - this.yE && (this.map.dispatchEvent(new P("onfirsttileloaded")), - this.yE = t); - 0 == this.ph && (this.Hi && (clearTimeout(this.Hi), - this.Hi = s), - this.Hi = setTimeout(function() { - if (a.ph == 0) { - a.map.dispatchEvent(new P("ontilesloaded")); - a.yE = q - } - a.Hi = s - }, 80)) - }, - fE: function(a, b) { - return "TILE-" + b.aa + "-" + a[0] + "-" + a[1] + "-" + a[2] - }, - Rx: function(a) { - var b = a.Gb; - b && zb(b) && b.parentNode.removeChild(b); - delete this.yg[a.name]; - a.loaded || (Nc(a), - a.Gb = s, - a.Pm = s) - }, - pj: function(a, b, c) { - var e = this.map - , f = e.oa() - , g = e.Oa - , i = e.fc - , k = f.dc(g) - , m = this.DL() - , n = m[0] - , o = m[1] - , p = m[2] - , v = m[3] - , x = m[4] - , c = "undefined" != typeof c ? c : 0 - , f = f.$c() - , m = e.aa.replace(/^TANGRAM_/, ""); - for (this.hc ? this.hc.length = 0 : this.hc = []; n < p; n++) - for (var y = o; y < v; y++) { - var A = n - , E = y; - this.hc.push([A, E]); - A = m + "_" + b + "_" + A + "_" + E + "_" + g; - this.MK[A] = A - } - this.hc.sort(function(a) { - return function(b, c) { - return 0.4 * Math.abs(b[0] - a[0]) + 0.6 * Math.abs(b[1] - a[1]) - (0.4 * Math.abs(c[0] - a[0]) + 0.6 * Math.abs(c[1] - a[1])) - } - }([x[0] - 1, x[1] - 1])); - i = [Math.round(-i.lng / k), Math.round(i.lat / k)]; - n = -e.offsetY + e.height / 2; - a.style.left = -e.offsetX + e.width / 2 + "px"; - a.style.top = n + "px"; - this.Cc ? this.Cc.length = 0 : this.Cc = []; - n = 0; - for (e = a.childNodes.length; n < e; n++) - y = a.childNodes[n], - y.Sj = t, - this.Cc.push(y); - if (n = this.qh) - for (var C in n) - delete n[C]; - else - this.qh = {}; - this.Dc ? this.Dc.length = 0 : this.Dc = []; - n = 0; - for (e = this.hc.length; n < e; n++) { - C = this.hc[n][0]; - k = this.hc[n][1]; - y = 0; - for (o = this.Cc.length; y < o; y++) - if (p = this.Cc[y], - p.id == m + "_" + b + "_" + C + "_" + k + "_" + g) { - p.Sj = q; - this.qh[p.id] = p; - break - } - } - n = 0; - for (e = this.Cc.length; n < e; n++) - p = this.Cc[n], - p.Sj || this.Dc.push(p); - this.nn = []; - y = (f + c) * this.map.K.devicePixelRatio; - n = 0; - for (e = this.hc.length; n < e; n++) - C = this.hc[n][0], - k = this.hc[n][1], - v = C * f + i[0] - c / 2, - x = (-1 - k) * f + i[1] - c / 2, - A = m + "_" + b + "_" + C + "_" + k + "_" + g, - o = this.qh[A], - p = s, - o ? (p = o.style, - p.left = v + "px", - p.top = x + "px", - o.yd || this.nn.push([C, k, o])) : (0 < this.Dc.length ? (o = this.Dc.shift(), - o.getContext("2d").clearRect(-c / 2, -c / 2, y, y), - p = o.style) : (o = document.createElement("canvas"), - p = o.style, - p.position = "absolute", - p.width = f + c + "px", - p.height = f + c + "px", - this.Zx() && (p.WebkitTransform = "scale(1.001)"), - o.setAttribute("width", y), - o.setAttribute("height", y), - a.appendChild(o)), - o.id = A, - p.left = v + "px", - p.top = x + "px", - -1 < A.indexOf("bg") && (v = "#F3F1EC", - this.map.K.Eo && (v = this.map.K.Eo), - p.background = v ? v : ""), - this.nn.push([C, k, o])), - o.style.visibility = ""; - n = 0; - for (e = this.Dc.length; n < e; n++) - this.Dc[n].style.visibility = "hidden"; - return this.nn - }, - Zx: function() { - return /M040/i.test(navigator.userAgent) - }, - DL: function() { - var a = this.map - , b = a.oa() - , c = b.mE(a.Oa) - , e = a.fc - , f = Math.ceil(e.lng / c) - , g = Math.ceil(e.lat / c) - , b = b.$c() - , c = [f, g, (e.lng - f * c) / c * b, (e.lat - g * c) / c * b]; - return [c[0] - Math.ceil((a.width / 2 - c[2]) / b), c[1] - Math.ceil((a.height / 2 - c[3]) / b), c[0] + Math.ceil((a.width / 2 + c[2]) / b), c[1] + Math.ceil((a.height / 2 + c[3]) / b), c] - }, - R_: function(a, b, c, e) { - var f = this; - f.u2 = b; - var g = this.map.oa() - , i = f.fE(a, c) - , k = g.$c() - , b = [a[0] * k + b[0], (-1 - a[1]) * k + b[1]] - , m = this.yg[i]; - if (this.map.oa() !== Ya && this.map.oa() !== Sa) { - var n = this.Lw(a[0], a[2]).offsetX; - b[0] += n; - b.Q1 = n - } - m && m.Gb ? (xb(m.Gb, b), - e && (e = new Q(a[0],a[1]), - g = this.map.K.ye ? this.map.K.ye.style : "normal", - e = c.getTilesUrl(e, a[2], g), - m.loaded = t, - Oc(m, e)), - m.loaded ? this.Af() : Pc(m, function() { - f.Af() - })) : (m = this.Zi[i]) && m.Gb ? (c.Jb.insertBefore(m.Gb, c.Jb.lastChild), - this.yg[i] = m, - xb(m.Gb, b), - e && (e = new Q(a[0],a[1]), - g = this.map.K.ye ? this.map.K.ye.style : "normal", - e = c.getTilesUrl(e, a[2], g), - m.loaded = t, - Oc(m, e)), - m.loaded ? this.Af() : Pc(m, function() { - f.Af() - })) : (m = k * Math.pow(2, g.sm() - a[2]), - new J(a[0] * m,a[1] * m), - e = new Q(a[0],a[1]), - g = this.map.K.ye ? this.map.K.ye.style : "normal", - e = c.getTilesUrl(e, a[2], g), - m = new Qc(this,e,b,a,c), - Pc(m, function() { - f.Af() - }), - m.co(), - this.yg[i] = m) - }, - Af: function() { - this.ph--; - var a = this; - 0 == this.ph && (this.Hi && (clearTimeout(this.Hi), - this.Hi = s), - this.Hi = setTimeout(function() { - if (a.ph == 0) { - a.map.dispatchEvent(new P("ontilesloaded")); - if (ua) { - if (ra && sa && ta) { - var b = bb() - , c = a.map.cb(); - setTimeout(function() { - Ra(5030, { - load_script_time: sa - ra, - load_tiles_time: b - ta, - map_width: c.width, - map_height: c.height, - map_size: c.width * c.height - }) - }, 1E4); - B.Fn("cus.fire", "time", { - z_imgfirstloaded: b - ta - }) - } - ua = t - } - } - a.Hi = s - }, 80)) - }, - fE: function(a, b) { - return this.map.oa() === Qa ? "TILE-" + b.aa + "-" + this.map.Rw + "-" + a[0] + "-" + a[1] + "-" + a[2] : "TILE-" + b.aa + "-" + a[0] + "-" + a[1] + "-" + a[2] - }, - Rx: function(a) { - var b = a.Gb; - b && (Rc(b), - zb(b) && b.parentNode.removeChild(b)); - delete this.yg[a.name]; - a.loaded || (Rc(b), - Nc(a), - a.Gb = s, - a.Pm = s) - }, - Lw: function(a, b) { - for (var c = 0, e = 6 * Math.pow(2, b - 3), f = e / 2 - 1, g = -e / 2; a > f; ) - a -= e, - c -= this.ZA; - for (; a < g; ) - a += e, - c += this.ZA; - c = Math.round(c / Math.pow(2, 18 - b)); - return { - offsetX: c, - hs: a - } - }, - QV: function(a) { - for (var b = a.lng; b > this.yI; ) - b -= this.AI; - for (; b < this.zI; ) - b += this.AI; - a.lng = b; - return a - }, - RV: function(a, b) { - for (var c = 256 * Math.pow(2, 18 - b), e = Math.floor(this.yI / c), f = Math.floor(this.zI / c), c = Math.floor(this.ZA / c), g = [], i = 0; i < a.length; i++) { - var k = a[i] - , m = k[0] - , k = k[1]; - if (m >= e) { - var m = m + c - , n = "id_" + m + "_" + k + "_" + b; - a[n] || (a[n] = q, - g.push([m, k])) - } else - m <= f && (m -= c, - n = "id_" + m + "_" + k + "_" + b, - a[n] || (a[n] = q, - g.push([m, k]))) - } - for (i = 0; i < g.length; i++) - a.push(g[i]); - return a - }, - Wf: function(a) { - var b = this; - if (b.map.oa() == Qa) - K.load("coordtrans", function() { - b.map.Ub || (b.map.Ub = Qa.wk(b.map.$g), - b.map.Rw = Qa.BL(b.map.Ub)); - b.CI() - }, q); - else { - if (a && a) - for (var c in this.Zi) - delete this.Zi[c]; - b.CI(a) - } - }, - CI: function(a) { - var b = this.Mm.concat(this.$f) - , c = b.length - , e = this.map - , f = e.oa() - , g = e.fc; - this.map.oa() !== Ya && this.map.oa() !== Sa && (g = this.QV(g)); - for (var i = 0; i < c; i++) { - var k = b[i]; - if (k.gc && e.Oa < k.gc) - break; - if (k.Jw) { - var m = this.Jb = k.Jb; - if (a) { - var n = m; - if (n && n.childNodes) - for (var o = n.childNodes.length, p = o - 1; 0 <= p; p--) - o = n.childNodes[p], - n.removeChild(o), - o = s - } - if (this.map.Sb()) { - this.od.style.display = "block"; - m.style.display = "none"; - this.map.dispatchEvent(new P("vectorchanged"), { - isvector: q - }); - continue - } else - m.style.display = "block", - this.od.style.display = "none", - this.map.dispatchEvent(new P("vectorchanged"), { - isvector: t - }) - } - if (!k.pI && !(k.pp && !this.map.Sb() || k.GM && this.map.Sb())) { - e = this.map; - f = e.oa(); - m = f.wm(); - o = e.Oa; - g = e.fc; - f == Qa && g.pb(new J(0,0)) && (g = e.fc = m.vj(e.re, e.Ub)); - var v = f.dc(o) - , m = f.mE(o) - , n = Math.ceil(g.lng / m) - , x = Math.ceil(g.lat / m) - , y = f.$c() - , m = [n, x, (g.lng - n * m) / m * y, (g.lat - x * m) / m * y] - , p = m[0] - Math.ceil((e.width / 2 - m[2]) / y) - , n = m[1] - Math.ceil((e.height / 2 - m[3]) / y) - , x = m[0] + Math.ceil((e.width / 2 + m[2]) / y) - , A = 0; - f === Qa && 15 == e.fa() && (A = 1); - f = m[1] + Math.ceil((e.height / 2 + m[3]) / y) + A; - this.gK = new J(g.lng,g.lat); - var E = this.yg, y = -this.gK.lng / v, A = this.gK.lat / v, v = [Math.ceil(y), Math.ceil(A)], g = e.fa(), C; - for (C in E) { - var F = E[C] - , D = F.info; - (D[2] != g || D[2] == g && (p > D[0] || x <= D[0] || n > D[1] || f <= D[1])) && this.Rx(F) - } - E = -e.offsetX + e.width / 2; - F = -e.offsetY + e.height / 2; - k.Jb && (k.Jb.style.left = Math.ceil(y + E) - v[0] + "px", - k.Jb.style.top = Math.ceil(A + F) - v[1] + "px", - k.Jb.style.WebkitTransform = "translate3d(0,0,0)"); - y = []; - for (e.WB = []; p < x; p++) - for (A = n; A < f; A++) - y.push([p, A]), - e.WB.push({ - x: p, - y: A - }); - this.map.oa() !== Ya && this.map.oa() !== Sa && (y = this.RV(y, o)); - y.sort(function(a) { - return function(b, c) { - return 0.4 * Math.abs(b[0] - a[0]) + 0.6 * Math.abs(b[1] - a[1]) - (0.4 * Math.abs(c[0] - a[0]) + 0.6 * Math.abs(c[1] - a[1])) - } - }([m[0] - 1, m[1] - 1])); - o = y.length; - this.ph += o; - for (p = 0; p < o; p++) - this.R_([y[p][0], y[p][1], g], v, k, a) - } - } - }, - Oe: function(a) { - var b = this - , c = a.target - , a = b.map.Sb(); - if (c instanceof db) - a && !c.Im && (c.na(this.map, this.od), - c.Im = q); - else if (c.ag && this.map.Oe(c.ag), - c.pp) { - for (a = 0; a < b.Fg.length; a++) - if (b.Fg[a] == c) - return; - K.load("vector", function() { - c.na(b.map, b.od); - b.Fg.push(c) - }, q) - } else { - for (a = 0; a < b.$f.length; a++) - if (b.$f[a] == c) - return; - c.na(this.map, this.Bl); - b.$f.push(c) - } - }, - Yf: function(a) { - var a = a.target - , b = this.map.Sb(); - if (a instanceof db) - b && a.Im && (a.remove(), - a.Im = t); - else { - a.ag && this.map.Yf(a.ag); - if (a.pp) - for (var b = 0, c = this.Fg.length; b < c; b++) - a == this.Fg[b] && this.Fg.splice(b, 1); - else { - b = 0; - for (c = this.$f.length; b < c; b++) - a == this.$f[b] && this.$f.splice(b, 1) - } - a.remove() - } - }, - Dg: function() { - for (var a = this.Mm, b = 0, c = a.length; b < c; b++) - a[b].remove(); - delete this.Jb; - this.Mm = []; - this.Zi = this.yg = {}; - this.Ux(); - this.Wf() - }, - Mc: function() { - var a = this; - a.vd && z.D.U(a.vd); - setTimeout(function() { - a.Wf(); - a.map.dispatchEvent(new P("onzoomend")) - }, 10) - }, - L5: u(), - Zt: function(a) { - var b = this.map.oa(); - if (!this.map.Sb() && (a ? this.map.K.$_ = a : a = this.map.K.$_, - a)) - for (var c = s, c = "2" == B.xu ? [B.url.proto + B.url.domain.main_domain_cdn.other[0] + "/"] : [B.url.proto + B.url.domain.main_domain_cdn.baidu[0] + "/", B.url.proto + B.url.domain.main_domain_cdn.baidu[1] + "/", B.url.proto + B.url.domain.main_domain_cdn.baidu[2] + "/"], e = 0, f; f = this.Mm[e]; e++) - if (f.M_ == q) { - b.j.Yb = 18; - f.getTilesUrl = function(b, e) { - var f = b.x - , f = this.map.Va.Lw(f, e).hs - , m = b.y - , n = Sb("normal") - , o = 1; - this.map.Sx() && (o = 2); - n = "customimage/tile?&x=" + f + "&y=" + m + "&z=" + e + "&udt=" + n + "&scale=" + o + "&ak=" + qa; - n = a.styleStr ? n + ("&styles=" + encodeURIComponent(a.styleStr)) : n + ("&customid=" + a.style); - return c[Math.abs(f + m) % c.length] + n - } - ; - break - } - } - }); - function Qc(a, b, c, e, f) { - this.Pm = a; - this.position = c; - this.$u = []; - this.name = a.fE(e, f); - this.info = e; - this.GJ = f.zt(); - e = L("img"); - yb(e); - e.uL = t; - var g = e.style - , a = a.map.oa(); - g.position = "absolute"; - g.border = "none"; - g.width = a.$c() + "px"; - g.height = a.$c() + "px"; - g.left = c[0] + "px"; - g.top = c[1] + "px"; - g.maxWidth = "none"; - this.Gb = e; - this.src = b; - Sc && (this.Gb.style.opacity = 0); - var i = this; - this.Gb.onload = function() { - B.iZ.eR(); - i.loaded = q; - if (i.Pm) { - var a = i.Pm - , b = a.Zi; - if (!b[i.name]) { - a.oF++; - b[i.name] = i - } - if (i.Gb && !zb(i.Gb) && f.Jb) { - f.Jb.appendChild(i.Gb); - if (z.ca.ia <= 6 && z.ca.ia > 0 && i.GJ) - i.Gb.style.cssText = i.Gb.style.cssText + (';filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + i.src + '",sizingMethod=scale);') - } - var c = a.oF - a.OV, e; - for (e in b) { - if (c <= 0) - break; - if (!a.yg[e]) { - b[e].Pm = s; - var g = b[e].Gb; - if (g && g.parentNode) { - g.parentNode.removeChild(g); - Rc(g) - } - g = s; - b[e].Gb = s; - delete b[e]; - a.oF--; - c-- - } - } - Sc && new tb({ - Ic: 20, - duration: 200, - va: function(a) { - if (i.Gb && i.Gb.style) - i.Gb.style.opacity = a * 1 - }, - finish: function() { - i.Gb && i.Gb.style && delete i.Gb.style.opacity - } - }); - Nc(i) - } - } - ; - this.Gb.onerror = function() { - Nc(i); - if (i.Pm) { - var a = i.Pm.map.oa(); - if (a.j.vD) { - i.error = q; - i.Gb.src = a.j.vD; - i.Gb && !zb(i.Gb) && f.Jb.appendChild(i.Gb) - } - } - } - ; - e = s - } - function Pc(a, b) { - a.$u.push(b) - } - Qc.prototype.co = function() { - this.Gb.src = 0 < z.ca.ia && 6 >= z.ca.ia && this.GJ ? G.qa + "blank.gif" : "" !== this.src && this.Gb.src == this.src ? this.src + "&t = " + Date.now() : this.src - } - ; - function Nc(a) { - for (var b = 0; b < a.$u.length; b++) - a.$u[b](); - a.$u.length = 0 - } - function Rc(a) { - if (a) { - a.onload = a.onerror = s; - var b = a.attributes, c, e, f; - if (b) { - e = b.length; - for (c = 0; c < e; c += 1) - f = b[c].name, - Xa(a[f]) && (a[f] = s) - } - if (b = a.children) { - e = b.length; - for (c = 0; c < e; c += 1) - Rc(a.children[c]) - } - } - } - function Oc(a, b) { - a.src = b; - a.co() - } - var Sc = !z.ca.ia || 8 < z.ca.ia; - function Mc(a) { - this.vf = a || {}; - this.mW = this.vf.copyright || s; - this.B0 = this.vf.transparentPng || t; - this.Jw = this.vf.baseLayer || t; - this.zIndex = this.vf.zIndex || 0; - this.aa = Mc.SS++ - } - Mc.SS = 0; - z.lang.ta(Mc, z.lang.Ca, "TileLayer"); - z.extend(Mc.prototype, { - na: function(a, b) { - this.Jw && (this.zIndex = -100); - this.map = a; - if (!this.Jb) { - var c = L("div") - , e = c.style; - e.position = "absolute"; - e.overflow = "visible"; - e.zIndex = this.zIndex; - e.left = Math.ceil(-a.offsetX + a.width / 2) + "px"; - e.top = Math.ceil(-a.offsetY + a.height / 2) + "px"; - b.appendChild(c); - this.Jb = c - } - }, - remove: function() { - this.Jb && this.Jb.parentNode && (this.Jb.innerHTML = "", - this.Jb.parentNode.removeChild(this.Jb)); - delete this.Jb - }, - zt: w("B0"), - getTilesUrl: function(a, b) { - if (this.map.oa() !== Ya && this.map.oa() !== Sa) - var c = this.map.Va.Lw(a.x, b).hs; - var e = ""; - this.vf.tileUrlTemplate && (e = this.vf.tileUrlTemplate.replace(/\{X\}/, c), - e = e.replace(/\{Y\}/, a.y), - e = e.replace(/\{Z\}/, b)); - return e - }, - pm: w("mW"), - oa: function() { - return this.Hb || La - } - }); - function Tc(a, b) { - Ib(a) ? b = a || {} : (b = b || {}, - b.databoxId = a); - this.j = { - OK: b.databoxId, - eh: b.geotableId, - Wm: b.q || "", - pu: b.tags || "", - filter: b.filter || "", - Vy: b.sortby || "", - Y_: b.styleId || "", - Vl: b.ak || qa, - Gw: b.age || 36E5, - zIndex: 11, - fZ: "VectorCloudLayer", - Fk: b.hotspotName || "vector_md_" + (1E5 * Math.random()).toFixed(0), - uV: "LBS\u4e91\u9ebb\u70b9\u5c42" - }; - this.pp = q; - Mc.call(this, this.j); - this.GW = B.Wc + "geosearch/detail/"; - this.HW = B.Wc + "geosearch/v2/detail/"; - this.lp = {} - } - z.ta(Tc, Mc, "VectorCloudLayer"); - function Uc(a) { - a = a || {}; - this.j = z.extend(a, { - zIndex: 1, - fZ: "VectorTrafficLayer", - uV: "\u77e2\u91cf\u8def\u51b5\u5c42" - }); - this.pp = q; - Mc.call(this, this.j); - this.x0 = B.url.proto + B.url.domain.vector_traffic + "/gvd/?qt=lgvd&styles=pl&layers=tf"; - this.Db = { - "0": [2, 1354709503, 2, 2, 0, [], 0, 0], - 1: [2, 1354709503, 3, 2, 0, [], 0, 0], - 10: [2, -231722753, 2, 2, 0, [], 0, 0], - 11: [2, -231722753, 3, 2, 0, [], 0, 0], - 12: [2, -231722753, 4, 2, 0, [], 0, 0], - 13: [2, -231722753, 5, 2, 0, [], 0, 0], - 14: [2, -231722753, 6, 2, 0, [], 0, 0], - 15: [2, -1, 4, 0, 0, [], 0, 0], - 16: [2, -1, 5.5, 0, 0, [], 0, 0], - 17: [2, -1, 7, 0, 0, [], 0, 0], - 18: [2, -1, 8.5, 0, 0, [], 0, 0], - 19: [2, -1, 10, 0, 0, [], 0, 0], - 2: [2, 1354709503, 4, 2, 0, [], 0, 0], - 3: [2, 1354709503, 5, 2, 0, [], 0, 0], - 4: [2, 1354709503, 6, 2, 0, [], 0, 0], - 5: [2, -6350337, 2, 2, 0, [], 0, 0], - 6: [2, -6350337, 3, 2, 0, [], 0, 0], - 7: [2, -6350337, 4, 2, 0, [], 0, 0], - 8: [2, -6350337, 5, 2, 0, [], 0, 0], - 9: [2, -6350337, 6, 2, 0, [], 0, 0] - } - } - z.ta(Uc, Mc, "VectorTrafficLayer"); - function db(a) { - this.PV = [B.url.proto + B.url.domain.TILE_ONLINE_URLS[1] + "/gvd/?", B.url.proto + B.url.domain.TILE_ONLINE_URLS[2] + "/gvd/?", B.url.proto + B.url.domain.TILE_ONLINE_URLS[3] + "/gvd/?", B.url.proto + B.url.domain.TILE_ONLINE_URLS[4] + "/gvd/?"]; - this.j = { - pL: t - }; - for (var b in a) - this.j[b] = a[b]; - this.Th = this.Fh = this.Ya = this.C = this.B = s; - this.LM = 0; - var c = this; - K.load("vector", function() { - c.De() - }) - } - z.extend(db.prototype, { - na: function(a, b) { - this.B = a; - this.C = b - }, - remove: function() { - this.C = this.B = s - } - }); - function Vc(a) { - Mc.call(this, a); - this.j = a || {}; - this.GM = q; - this.ag = new Uc; - this.ag.$y = this; - if (this.j.predictDate) { - if (1 > this.j.predictDate.weekday || 7 < this.j.predictDate.weekday) - this.j.predictDate = 1; - if (0 > this.j.predictDate.hour || 23 < this.j.predictDate.hour) - this.j.predictDate.hour = 0 - } - this.VU = B.url.proto + B.url.domain.traffic + "/traffic/" - } - Vc.prototype = new Mc; - Vc.prototype.na = function(a, b) { - Mc.prototype.na.call(this, a, b); - this.B = a - } - ; - Vc.prototype.zt = ca(q); - Vc.prototype.getTilesUrl = function(a, b) { - var c = ""; - this.j.predictDate ? c = "HistoryService?day=" + (this.j.predictDate.weekday - 1) + "&hour=" + this.j.predictDate.hour + "&t=" + (new Date).getTime() + "&" : (c = "TrafficTileService?time=" + (new Date).getTime() + "&", - c += "label=web2D&v=016&"); - var c = this.VU + c + "level=" + b + "&x=" + a.x + "&y=" + a.y - , e = 1; - this.B.Sx() && (e = 2); - return (c + "&scaler=" + e).replace(/-(\d+)/gi, "M$1") - } - ; - var Wc = [B.url.proto + B.url.domain.TILES_YUN_HOST[0] + "/georender/gss", B.url.proto + B.url.domain.TILES_YUN_HOST[1] + "/georender/gss", B.url.proto + B.url.domain.TILES_YUN_HOST[2] + "/georender/gss", B.url.proto + B.url.domain.TILES_YUN_HOST[3] + "/georender/gss"] - , Xc = B.url.proto + B.url.domain.main_domain_nocdn.baidu + "/style/poi/rangestyle" - , Yc = 100; - function nb(a, b) { - Mc.call(this); - var c = this; - this.GM = q; - var e = t; - try { - document.createElement("canvas").getContext("2d"), - e = q - } catch (f) { - e = t - } - e && (this.ag = new Tc(a,b), - this.ag.$y = this); - Ib(a) ? b = a || {} : (c.Rn = a, - b = b || {}); - b.geotableId && (c.Cf = b.geotableId); - b.databoxId && (c.Rn = b.databoxId); - e = B.Wc + "geosearch"; - c.ub = { - ON: b.pointDensity || Yc, - BY: e + "/detail/", - CY: e + "/v2/detail/", - Gw: b.age || 36E5, - Wm: b.q || "", - i0: "png", - X3: [5, 5, 5, 5], - eZ: { - backgroundColor: "#FFFFD5", - borderColor: "#808080" - }, - Vl: b.ak || qa, - pu: b.tags || "", - filter: b.filter || "", - Vy: b.sortby || "", - Fk: b.hotspotName || "tile_md_" + (1E5 * Math.random()).toFixed(0), - dG: q - }; - K.load("clayer", function() { - c.Sd() - }) - } - nb.prototype = new Mc; - nb.prototype.na = function(a, b) { - Mc.prototype.na.call(this, a, b); - this.B = a - } - ; - nb.prototype.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y - , f = this.ub - , c = Wc[Math.abs(c + e) % Wc.length] + "/image?grids=" + c + "_" + e + "_" + b + "&q=" + f.Wm + "&tags=" + f.pu + "&filter=" + f.filter + "&sortby=" + f.Vy + "&ak=" + this.ub.Vl + "&age=" + f.Gw + "&page_size=" + f.ON + "&format=" + f.i0; - f.dG || (f = (1E5 * Math.random()).toFixed(0), - c += "&timeStamp=" + f); - this.Cf ? c += "&geotable_id=" + this.Cf : this.Rn && (c += "&databox_id=" + this.Rn); - return c - } - ; - nb.prototype.enableUseCache = function() { - this.ub.dG = q - } - ; - nb.prototype.disableUseCache = function() { - this.ub.dG = t - } - ; - nb.tU = /^point\(|\)$/ig; - nb.uU = /\s+/; - nb.wU = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; - var Zc = {}; - function $c(a, b) { - this.kd = a; - this.uQ = 18; - this.j = { - le: 256, - cd: new S - }; - z.extend(this.j, b || {}) - } - var ad = [0, 0, 0, 8, 7, 7, 6, 6, 5, 5, 4, 3, 3, 3, 2, 2, 1, 1, 0, 0, 0, 0] - , bd = [512, 2048, 4096, 32768, 65536, 262144, 1048576, 4194304, 8388608] - , cd = [0, 0, 0, 3, 5, 5, 7, 7, 9, 9, 10, 12, 12, 12, 15, 15, 17, 17, 19, 19, 19, 19] - , dd = [0, 0, 0, 256, 256, 512, 256, 512, 256, 512, 256, 256, 512, 1024, 256, 512, 512, 1024, 512, 1024, 2048, 4096]; - $c.prototype = { - getName: w("kd"), - $c: function(a) { - return "na" === this.kd ? dd[a] : this.j.le - }, - FL: function(a) { - return "na" === this.kd ? cd[a] : a - }, - wm: function() { - return this.j.cd - }, - dc: function(a) { - return Math.pow(2, this.uQ - a) - }, - RX: function(a) { - return "na" === this.kd ? bd[ad[a]] : this.dc(a) * this.$c(a) - } - }; - P = z.lang.Ju; - function Lc(a, b, c) { - this.B = a; - this.cV = b; - this.Cd = b.qc; - this.ub = { - h0: "na", - zIndex: 0, - OO: c.tileUrls, - AO: q - }; - this.UB = ""; - this.qT = {}; - var c = c.urlOpts || {}, e; - for (e in c) - c.hasOwnProperty(e) && (this.UB = this.UB + "&" + e + "=" + c[e]); - this.GC = []; - this.JE = 0; - this.zM = t; - a = this.ub.h0; - Zc[a] ? a = Zc[a] : (b = new $c(a,l), - a = Zc[a] = b); - this.Wr = a - } - window.VectorIndoorTileLayer = "VectorIndoorTileLayer"; - da = Lc.prototype; - da.na = function() { - var a = this.B - , b = a.Va; - if (!this.Vh) { - var c = b.Kj(this.ub.zIndex); - c.style.WebkitTransform = "translate3d(0px, 0px, 0)"; - this.Vh = c - } - b.Ki.appendChild(this.Vh); - b.b4 = c; - if (this.ub.AO) { - ed(this); - var e = this; - a.addEventListener("checkvectorclick", function(a) { - var b; - a: { - b = a.offsetX; - var c = a.offsetY - , k = e.GC.N4; - if (k) - for (var m = 0; m < k.length; m++) - for (var n = k[m], o = 0; o < n.length; o++) - if (a = n[o], - !a.f4 && a.EY && b > a.WE && b < a.TE && c > a.XE && c < a.UE) { - b = a.EY; - b = { - type: 9, - name: a.name, - uid: a.uid, - point: { - x: b.H2 + b.width / 2, - y: b.I2 + 6 - } - }; - break a - } - b = s - } - b && (a = new P("onvectorclick"), - a.Y3 = b, - a.of = "base", - this.dispatchEvent(a)) - }) - } - } - ; - function ed(a) { - var b = a.B - , c = b.Va - , e = a.Cd - , f = b.cb() - , g = f.width - , f = f.height - , i = L("canvas"); - i.style.cssText = "position: absolute;left:0;top:0;width:" + g + "px;height:" + f + "px;z-index:2;"; - i.width = g * e; - i.height = f * e; - a.by = i; - a.At = i.getContext("2d"); - a.At.scale(e, e); - a.At.textBaseline = "top"; - c.Ki.appendChild(i); - b.ZS = i - } - da.update = function(a, b) { - b = b || {}; - if (this.ub.AO && (b.Tw && this.Tw(), - b.S_)) { - var c = this.Cd - , e = this.B.cb() - , f = e.width - , e = e.height - , g = this.by - , i = g.style; - i.width = f + "px"; - i.height = e + "px"; - g.width = f * c; - g.height = e * c; - this.At.scale(c, c); - this.At.textBaseline = "top" - } - if (b.M5) { - c = this.Vh; - f = 0; - for (e = c.childNodes.length; f < e; f++) - c.childNodes[f].yd = t - } - this.NK = a; - this.up(a) - } - ; - da.up = function(a) { - this.GC = []; - var b = this.B - , c = b.fa() - , e = b.cd.vj(b.re) - , f = this.Wr.dc(c) - , e = [Math.round(-e.lng / f), Math.round(e.lat / f)] - , f = this.Wr.$c(c) - , g = b.aa.replace(/^TANGRAM_/, "") - , i = this.Wr.FL(c) - , b = this.B - , k = -b.offsetY + b.height / 2 - , m = this.Vh; - m.style.left = -b.offsetX + b.width / 2 + "px"; - m.style.top = k + "px"; - this.Cc ? this.Cc.length = 0 : this.Cc = []; - b = 0; - for (k = m.childNodes.length; b < k; b++) { - var n = m.childNodes[b]; - n.Sj = t; - this.Cc.push(n) - } - if (b = this.qh) - for (var o in b) - delete b[o]; - else - this.qh = {}; - this.Dc ? this.Dc.length = 0 : this.Dc = []; - b = 0; - for (k = a.length; b < k; b++) { - var n = a[b][0] - , p = a[b][1]; - o = 0; - for (var v = this.Cc.length; o < v; o++) { - var x = this.Cc[o]; - if (x.id === g + "_" + n + "_" + p + "_" + i + "_" + c) { - x.Sj = q; - this.qh[x.id] = x; - break - } - } - } - b = 0; - for (k = this.Cc.length; b < k; b++) - x = this.Cc[b], - x.Sj || (x.Lc = s, - delete x.Lc, - x.yd = t, - this.Dc.push(x)); - o = []; - v = f * this.Cd; - b = 0; - for (k = a.length; b < k; b++) { - var n = a[b][0] - , p = a[b][1] - , x = n * f + e[0] - , y = (-1 - p) * f + e[1] - , A = g + "_" + n + "_" + p + "_" + i + "_" + c - , E = this.qh[A] - , C = s; - if (E) - C = E.style, - C.left = x + "px", - C.top = y + "px", - C.width = f + "px", - C.height = f + "px", - E.yd ? E.MO && E.MO && this.GC.push(E.MO) : (E.NR = q, - E.Lc = s, - delete E.Lc, - o.push([n, p, E])); - else { - if (0 < this.Dc.length) { - var E = this.Dc.shift() - , F = E.getContext("2d"); - E.getAttribute("width") !== v && (E._scale = t); - E.setAttribute("width", v); - E.setAttribute("height", v); - C = E.style; - C.width = f + "px"; - C.height = f + "px"; - F.clearRect(0, 0, v, v) - } else - E = document.createElement("canvas"), - C = E.style, - C.position = "absolute", - this.ub.backgroundColor && (C.background = this.ub.backgroundColor), - C.width = f + "px", - C.height = f + "px", - E.setAttribute("width", v), - E.setAttribute("height", v), - m.appendChild(E); - E.id = A; - C.left = x + "px"; - C.top = y + "px"; - o.push([n, p, E]) - } - E.style.visibility = "" - } - b = 0; - for (k = this.Dc.length; b < k; b++) - this.Dc[b].style.visibility = "hidden"; - if (0 === o.length) - fd(this); - else { - this.JE = o.length; - this.zM = t; - c = this.Wr.FL(this.B.fa()); - for (e = 0; e < a.length; e++) - a[e][3] = c; - for (e = 0; e < o.length; e++) - a = o[e][2], - f = o[e][0], - g = o[e][1], - o[e][3] = c, - a.yd = t, - a.NR = t, - gd(this, f, g, c, a) - } - } - ; - function gd(a, b, c, e, f) { - var g = b + "_" + c + "_" + e - , i = a.qT; - if (i[g]) { - if ("loading" === i[g].status) - return - } else - i[g] = { - status: "init", - bO: 0 - }; - var k = a - , m = k.B - , n = [] - , n = "0" === B.xu ? k.ub.OO.http : k.ub.OO.https - , o = Math.abs(b + c) % n.length - , p = "x=" + b + "&y=" + c + "&z=" + e - , v = hd(a.cV) - , x = v.O0 - , v = v.C0 - , y = "_" + (0 > b ? "_" : "") + (0 > c ? "$" : "") + parseInt(Math.abs(b) + "" + Math.abs(c) + "" + e, 10).toString(36) - , p = p + a.UB + "v=" + x + "&udt=" + v + "&fn=window." + y - , x = n[o] + "&" + p - , x = n[o] + "¶m=" + window.encodeURIComponent(Kb(p)); - window[y] = function(a) { - clearTimeout(i[g].Od); - i[g] = s; - if (a) { - m.fa(); - var n; - a: { - for (n = 0; n < k.NK.length; n++) { - var o = k.NK[n]; - if (o[0] === b && o[1] === c && o[3] === e) { - n = q; - break a - } - } - n = t - } - n !== t && (n = new P("updateindoor"), - n.IndoorCanvas = [], - n.IndoorCanvas.push({ - canvasDom: f, - data: a, - canvasID: f.id, - ratio: k.Cd - }), - m.dispatchEvent(n), - k.JE--, - (0 === k.JE || k.zM === q) && fd(k), - delete window[y]) - } - } - ; - oa(x); - i[g].status = "loading"; - k = a; - i[g].Od = setTimeout(function() { - 3 > i[g].bO ? (i[g].bO++, - i[g].status = "init", - gd(k, b, c, e, f)) : i[g] = s - }, 4E3) - } - function fd(a) { - if (a.by) { - var b = a.B; - a.by.style.left = -b.offsetX + "px"; - a.by.style.top = -b.offsetY + "px"; - a = new P("updateindoorlabel"); - a.labelCanvasDom = b.ZS; - b.dispatchEvent(a) - } - } - da.Tw = function() { - var a = this.B.cb() - , b = this.Cd; - this.At.clearRect(0, 0, a.width * b, a.height * b) - } - ; - da.remove = function() { - var a = this.B.Va; - this.Vh && a.Ki.removeChild(this.Vh) - } - ; - function Kc(a) { - this.B = a.map; - this.ff = []; - this.Xr = {}; - this.qc = this.B.K.devicePixelRatio; - this.na() - } - window.VectorIndoorTileMgr = "VectorIndoorTileMgr"; - da = Kc.prototype; - da.na = function() { - var a = this - , b = this.B; - b.addEventListener("addtilelayer", function(b) { - a.Oe(b.target) - }); - b.addEventListener("removetilelayer", function(b) { - a.Yf(b.target) - }); - setTimeout(function() { - b.addEventListener("onmoveend", function(b) { - "centerAndZoom" !== b.mv && a.update() - }); - b.addEventListener("onzoomend", function(b) { - "centerAndZoom" !== b.mv && a.update({ - Tw: q - }) - }); - b.addEventListener("centerandzoom", function() { - a.update({ - Tw: q - }) - }) - }, 1); - b.addEventListener("indoor_data_refresh", u()); - b.addEventListener("onresize", function() { - a.update({ - S_: q - }) - }); - a.update() - } - ; - da.Oe = function(a) { - if (a instanceof Lc) { - for (var b = 0; b < this.ff.length; b++) - if (this.ff[b] === a) - return; - this.ff.push(a); - a.na(); - this.B.loaded && this.update() - } - } - ; - da.Yf = function(a) { - if (a instanceof Lc) { - for (var b = 0; b < this.ff.length; b++) - if (this.ff[b] === a) { - this.ff.splice(b, 1); - break - } - a.remove() - } - } - ; - da.pj = function(a) { - var b = a.getName(); - if (this.Xr[b]) - return this.Xr[b]; - var c = this.B - , e = c.fa() - , f = c.fc - , g = a.RX(e); - c.aa.replace(/^TANGRAM_/, ""); - var i = Math.ceil(f.lng / g) - , k = Math.ceil(f.lat / g) - , a = a.$c(e) - , m = [i, k, (f.lng / g - i) * a, (f.lat / g - k) * a] - , e = m[0] - Math.ceil((c.width / 2 - m[2]) / a) - , f = m[1] - Math.ceil((c.height / 2 - m[3]) / a) - , g = m[0] + Math.ceil((c.width / 2 + m[2]) / a) - , c = m[1] + Math.ceil((c.height / 2 + m[3]) / a); - this.hc ? this.hc.length = 0 : this.hc = []; - for (a = e; a < g; a++) - for (e = f; e < c; e++) - this.hc.push([a, e]); - this.hc.sort(function(a) { - return function(b, c) { - return 0.4 * Math.abs(b[0] - a[0]) + 0.6 * Math.abs(b[1] - a[1]) - (0.4 * Math.abs(c[0] - a[0]) + 0.6 * Math.abs(c[1] - a[1])) - } - }([i, k])); - this.Xr[b] = this.hc.slice(0); - return this.Xr[b] - } - ; - function hd(a) { - if (a.gG) - return a.gG; - var b = "undefined" !== typeof TVC ? TVC.K2.z4 : {}; - a.gG = { - O0: b.version ? b.version : "001", - C0: b.wn ? b.wn : "20171110" - }; - return a.gG - } - da.update = function(a) { - this.Xr = {}; - for (var b = 0; b < this.ff.length; b++) { - var c = this.ff[b] - , e = this.pj(c.Wr); - c.update(e, a) - } - } - ; - function id(a, b, c) { - this.kd = a; - this.ff = b instanceof Mc ? [b] : b.slice(0); - c = c || {}; - this.j = { - k0: c.tips || "", - LE: "", - gc: c.minZoom || 3, - Yb: c.maxZoom || 18, - W3: c.minZoom || 3, - V3: c.maxZoom || 18, - le: 256, - UF: c.textColor || "black", - vD: c.errorImageUrl || "", - bb: new fb(new J(-21364736,-16023552),new J(23855104,19431424)), - cd: c.projection || new S - }; - 1 <= this.ff.length && (this.ff[0].Jw = q); - z.extend(this.j, c) - } - z.extend(id.prototype, { - getName: w("kd"), - gt: function() { - return this.j.k0 - }, - B3: function() { - return this.j.LE - }, - oY: function() { - return this.ff[0] - }, - P3: w("ff"), - $c: function() { - return this.j.le - }, - bp: function() { - return this.j.gc - }, - sm: function() { - return this.j.Yb - }, - setMaxZoom: function(a) { - this.j.Yb = a - }, - zm: function() { - return this.j.UF - }, - wm: function() { - return this.j.cd - }, - u3: function() { - return this.j.vD - }, - $c: function() { - return this.j.le - }, - dc: function(a) { - return Math.pow(2, 18 - a) - }, - mE: function(a) { - return this.dc(a) * this.$c() - } - }); - var jd = [B.url.proto + B.url.domain.TILE_BASE_URLS[0] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[1] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[2] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[3] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[4] + "/it/"] - , kd = [B.url.proto + B.url.domain.TILE_ONLINE_URLS[0] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[1] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[2] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[3] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[4] + "/tile/"] - , ld = { - dark: "dl", - light: "ll", - normal: "pl" - } - , md = new Mc; - md.M_ = q; - md.getTilesUrl = function(a, b, c) { - var e = a.x - , a = a.y - , f = Sb("normal") - , g = 1 - , c = ld[c]; - //this.map.Sx() && (g = 2); //修改 - //e = this.map.Va.Lw(e, b).hs; - //return (kd[Math.abs(e + a) % kd.length] + "?qt=tile&x=" + (e + "").replace(/-/gi, "M") + "&y=" + (a + "").replace(/-/gi, "M") + "&z=" + b + "&styles=" + c + "&scaler=" + g + (6 == z.ca.ia ? "&color_dep=32&colors=50" : "") + "&udt=" + f).replace(/-(\d+)/gi, "M$1") - - var tdir = bmapcfg.tiles_dir.length>0?bmapcfg.tiles_dir:bmapcfg.home + "tiles"; - return tdir + "/" + b + "/" + e + "/" + a + bmapcfg.imgext; // 使用本地的瓦片 - } - ; - var La = new id("\u5730\u56fe",md,{ - tips: "\u663e\u793a\u666e\u901a\u5730\u56fe", - maxZoom: 19 - }) - , nd = new Mc; - nd.NO = [B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[0] + "/resource/mappic/", B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[1] + "/resource/mappic/", B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[2] + "/resource/mappic/", B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[3] + "/resource/mappic/"]; - nd.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y - , f = 256 * Math.pow(2, 20 - b) - , e = Math.round((9998336 - f * e) / f) - 1; - /*var tdir = bmapcfg.tiles_hybrid.length > 0 ? bmapcfg.tiles_hybrid : bmapcfg.home + "tiles_hybrid";//修改 使用本地卫星的瓦片 - tdir = tdir + "/" + b + "/" + c + "/" + e + bmapcfg.imgext; //修改 使用本地卫星的瓦片 - return tdir;*/ - return url = this.NO[Math.abs(c + e) % this.NO.length] + this.map.Ub + "/" + this.map.Rw + "/3/lv" + (21 - b) + "/" + c + "," + e + ".jpg" - } - ; - var Qa = new id("\u4e09\u7ef4",nd,{ - tips: "\u663e\u793a\u4e09\u7ef4\u5730\u56fe", - minZoom: 15, - maxZoom: 20, - textColor: "white", - projection: new hb - }); - Qa.dc = function(a) { - return Math.pow(2, 20 - a) - } - ; - Qa.wk = function(a) { - if (!a) - return ""; - var b = G.pC, c; - for (c in b) - if (-1 < a.search(c)) - return b[c].yy; - return "" - } - ; - Qa.BL = function(a) { - return { - bj: 2, - gz: 1, - sz: 14, - sh: 4 - }[a] - } - ; - var od = new Mc({ - Jw: q - }); - od.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y; - return (jd[Math.abs(c + e) % jd.length] + "u=x=" + c + ";y=" + e + ";z=" + b + ";v=009;type=sate&fm=46&udt=" + Sb("satellite")).replace(/-(\d+)/gi, "M$1") - } - ; - var Ya = new id("\u536b\u661f",od,{ - tips: "\u663e\u793a\u536b\u661f\u5f71\u50cf", - minZoom: 1, - maxZoom: 19, - textColor: "white" - }) - , pd = new Mc({ - transparentPng: q - }); - pd.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y - , f = Sb("satelliteStreet"); - return (kd[Math.abs(c + e) % kd.length] + "?qt=vtile&x=" + (c + "").replace(/-/gi, "M") + "&y=" + (e + "").replace(/-/gi, "M") + "&z=" + b + "&styles=sl" + (6 == z.ca.ia ? "&color_dep=32&colors=50" : "") + "&udt=" + f).replace(/-(\d+)/gi, "M$1") - } - ; - var Sa = new id("\u6df7\u5408",[od, pd],{ - tips: "\u663e\u793a\u5e26\u6709\u8857\u9053\u7684\u536b\u661f\u5f71\u50cf", - labelText: "\u8def\u7f51", - minZoom: 1, - maxZoom: 19, - textColor: "white" - }); - var qd = 1 - , V = {}; - window.c1 = V; - function W(a, b) { - z.lang.Ca.call(this); - this.Ad = {}; - this.fn(a); - b = b || {}; - b.la = b.renderOptions || {}; - this.j = { - la: { - Ma: b.la.panel || s, - map: b.la.map || s, - Zg: b.la.autoViewport || q, - Ut: b.la.selectFirstResult, - kt: b.la.highlightMode, - Wb: b.la.enableDragging || t - }, - py: b.onSearchComplete || u(), - BN: b.onMarkersSet || u(), - AN: b.onInfoHtmlSet || u(), - DN: b.onResultsHtmlSet || u(), - zN: b.onGetBusListComplete || u(), - yN: b.onGetBusLineComplete || u(), - wN: b.onBusListHtmlSet || u(), - vN: b.onBusLineHtmlSet || u(), - bF: b.onPolylinesSet || u(), - Dp: b.reqFrom || "" - }; - this.j.la.Zg = "undefined" != typeof b && "undefined" != typeof b.renderOptions && "undefined" != typeof b.renderOptions.autoViewport ? b.renderOptions.autoViewport : q; - this.j.la.Ma = z.Fc(this.j.la.Ma) - } - z.ta(W, z.lang.Ca); - z.extend(W.prototype, { - getResults: function() { - return this.Hc ? this.Ei : this.ha - }, - enableAutoViewport: function() { - this.j.la.Zg = q - }, - disableAutoViewport: function() { - this.j.la.Zg = t - }, - fn: function(a) { - a && (this.Ad.src = a) - }, - JF: function(a) { - this.j.py = a || u() - }, - setMarkersSetCallback: function(a) { - this.j.BN = a || u() - }, - setPolylinesSetCallback: function(a) { - this.j.bF = a || u() - }, - setInfoHtmlSetCallback: function(a) { - this.j.AN = a || u() - }, - setResultsHtmlSetCallback: function(a) { - this.j.DN = a || u() - }, - xm: w("Me") - }); - var rd = { - KG: B.Wc, - ab: function(a, b, c, e, f) { - this.SZ(b); - var g = (1E5 * Math.random()).toFixed(0); - B._rd["_cbk" + g] = function(b) { - b.result && b.result.error && 202 === b.result.error ? alert("\u8be5AK\u56e0\u4e3a\u6076\u610f\u884c\u4e3a\u5df2\u7ecf\u88ab\u7ba1\u7406\u5458\u5c01\u7981\uff01") : (c = c || {}, - a && a(b, c), - delete B._rd["_cbk" + g]) - } - ; - e = e || ""; - b = c && c.H0 ? Gb(b, encodeURI) : Gb(b, encodeURIComponent); - this.KG = c && c.jL ? c.$N ? c.$N : B.vp : B.Wc; - e = this.KG + e + "?" + b + "&ie=utf-8&oue=1&fromproduct=jsapi"; - f || (e += "&res=api"); - e = e + ("&callback=BMap._rd._cbk" + g) + ("&ak=" + qa); - oa(e) - }, - SZ: function(a) { - if (a.qt) { - var b = ""; - switch (a.qt) { - case "bt": - b = "z_qt|bt"; - break; - case "nav": - b = "z_qt|nav"; - break; - case "walk": - b = "z_qt|walk"; - break; - case "bse": - b = "z_qt|bse"; - break; - case "nse": - b = "z_qt|nse"; - break; - case "drag": - b = "z_qt|drag" - } - "" !== b && B.alog("cus.fire", "count", b) - } - } - }; - window.o1 = rd; - B._rd = {}; - var ab = {}; - window.n1 = ab; - ab.WN = function(a) { - a = a.replace(/<\/?[^>]*>/g, ""); - return a = a.replace(/[ | ]* /g, " ") - } - ; - ab.JZ = function(a) { - return a.replace(/([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g, "$1,$2;") - } - ; - ab.KZ = function(a, b) { - return a.replace(RegExp("(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){" + b + "}", "ig"), "$1") - } - ; - var sd = 2 - , td = 6 - , ud = 8 - , vd = 2 - , wd = 3 - , xd = 6 - , yd = 0 - , zd = "bt" - , Ad = "nav" - , Bd = "walk" - , Cd = "bl" - , Dd = "bsl" - , Ed = "ride" - , Fd = 15 - , Gd = 18; - B.I = window.Instance = z.lang.Nc; - function Hd(a, b, c) { - z.lang.Ca.call(this); - if (a) { - this.Wa = "object" == typeof a ? a : z.Fc(a); - this.page = 1; - this.Kd = 100; - this.hK = "pg"; - this.Xf = 4; - this.qK = b; - this.update = q; - a = { - page: 1, - $e: 100, - Kd: 100, - Xf: 4, - hK: "pg", - update: q - }; - c || (c = a); - for (var e in c) - "undefined" != typeof c[e] && (this[e] = c[e]); - this.va() - } - } - z.extend(Hd.prototype, { - va: function() { - this.na() - }, - na: function() { - this.YV(); - this.Wa.innerHTML = this.uW() - }, - YV: function() { - isNaN(parseInt(this.page)) && (this.page = 1); - isNaN(parseInt(this.Kd)) && (this.Kd = 1); - 1 > this.page && (this.page = 1); - 1 > this.Kd && (this.Kd = 1); - this.page > this.Kd && (this.page = this.Kd); - this.page = parseInt(this.page); - this.Kd = parseInt(this.Kd) - }, - G3: function() { - location.search.match(RegExp("[?&]?" + this.hK + "=([^&]*)[&$]?", "gi")); - this.page = RegExp.$1 - }, - uW: function() { - var a = [] - , b = this.page - 1 - , c = this.page + 1; - a.push('

    '); - if (!(1 > b)) { - if (this.page >= this.Xf) { - var e; - a.push('\u9996\u9875'.replace("{temp1}", "BMap.I('" + this.aa + "').toPage(1);")) - } - a.push('\u4e0a\u4e00\u9875'.replace("{temp2}", "BMap.I('" + this.aa + "').toPage(" + b + ");")) - } - if (this.page < this.Xf) - e = 0 == this.page % this.Xf ? this.page - this.Xf - 1 : this.page - this.page % this.Xf + 1, - b = e + this.Xf - 1; - else { - e = Math.floor(this.Xf / 2); - var f = this.Xf % 2 - 1 - , b = this.Kd > this.page + e ? this.page + e : this.Kd; - e = this.page - e - f - } - this.page > this.Kd - this.Xf && this.page >= this.Xf && (e = this.Kd - this.Xf + 1, - b = this.Kd); - for (f = e; f <= b; f++) - 0 < f && (f == this.page ? a.push('' + f + "") : 1 <= f && f <= this.Kd && (e = '[' + f + "]", - a.push(e.replace("{temp3}", "BMap.I('" + this.aa + "').toPage(" + f + ");")))); - c > this.Kd || a.push('\u4e0b\u4e00\u9875'.replace("{temp4}", "BMap.I('" + this.aa + "').toPage(" + c + ");")); - a.push("

    "); - return a.join("") - }, - toPage: function(a) { - a = a ? a : 1; - "function" == typeof this.qK && (this.qK(a), - this.page = a); - this.update && this.va() - } - }); - function cb(a, b) { - W.call(this, a, b); - b = b || {}; - b.renderOptions = b.renderOptions || {}; - this.Np(b.pageCapacity); - "undefined" != typeof b.renderOptions.selectFirstResult && !b.renderOptions.selectFirstResult ? this.UC() : this.oD(); - this.ya = []; - this.yf = []; - this.mb = -1; - this.Pa = []; - var c = this; - K.load("local", function() { - c.Nz() - }, q) - } - z.ta(cb, W, "LocalSearch"); - cb.fq = 10; - cb.k1 = 1; - cb.En = 100; - cb.zG = 2E3; - cb.HG = 1E5; - z.extend(cb.prototype, { - search: function(a, b) { - this.Pa.push({ - method: "search", - arguments: [a, b] - }) - }, - an: function(a, b, c) { - this.Pa.push({ - method: "searchInBounds", - arguments: [a, b, c] - }) - }, - Jp: function(a, b, c, e) { - this.Pa.push({ - method: "searchNearby", - arguments: [a, b, c, e] - }) - }, - Pe: function() { - delete this.Ia; - delete this.Me; - delete this.ha; - delete this.ua; - this.mb = -1; - this.Ta(); - this.j.la.Ma && (this.j.la.Ma.innerHTML = "") - }, - Am: u(), - oD: function() { - this.j.la.Ut = q - }, - UC: function() { - this.j.la.Ut = t - }, - Np: function(a) { - this.j.Jk = "number" == typeof a && !isNaN(a) ? 1 > a ? cb.fq : a > cb.En ? cb.fq : a : cb.fq - }, - qf: function() { - return this.j.Jk - }, - toString: ca("LocalSearch") - }); - var Id = cb.prototype; - T(Id, { - clearResults: Id.Pe, - setPageCapacity: Id.Np, - getPageCapacity: Id.qf, - gotoPage: Id.Am, - searchNearby: Id.Jp, - searchInBounds: Id.an, - search: Id.search, - enableFirstResultSelection: Id.oD, - disableFirstResultSelection: Id.UC - }); - function Jd(a, b) { - W.call(this, a, b) - } - z.ta(Jd, W, "BaseRoute"); - z.extend(Jd.prototype, { - Pe: u() - }); - function Kd(a, b) { - W.call(this, a, b); - b = b || {}; - this.bu(b.policy); - this.oO(b.intercityPolicy); - this.xO(b.transitTypePolicy); - this.Np(b.pageCapacity); - this.Ab = zd; - this.mq = qd; - this.ya = []; - this.mb = -1; - this.j.Vn = b.enableTraffic || t; - this.Pa = []; - var c = this; - K.load("route", function() { - c.Sd() - }) - } - Kd.En = 100; - Kd.HP = [0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 1]; - Kd.IP = [0, 3, 4, 0, 0, 0, 5]; - z.ta(Kd, Jd, "TransitRoute"); - z.extend(Kd.prototype, { - bu: function(a) { - this.j.ie = 0 <= a && 5 >= a ? a : 0 - }, - oO: function(a) { - this.j.Hm = 0 <= a && 2 >= a ? a : 0 - }, - xO: function(a) { - this.j.tn = 0 <= a && 2 >= a ? a : 0 - }, - NA: function(a, b) { - this.Pa.push({ - method: "_internalSearch", - arguments: [a, b] - }) - }, - search: function(a, b) { - this.Pa.push({ - method: "search", - arguments: [a, b] - }) - }, - Np: function(a) { - if ("string" === typeof a && (a = parseInt(a, 10), - isNaN(a))) { - this.j.Jk = Kd.En; - return - } - this.j.Jk = "number" !== typeof a ? Kd.En : 1 <= a && a <= Kd.En ? Math.round(a) : Kd.En - }, - toString: ca("TransitRoute"), - Z1: function(a) { - return a.replace(/\(.*\)/, "") - } - }); - var Ld = Kd.prototype; - T(Ld, { - _internalSearch: Ld.NA - }); - function Md(a, b) { - W.call(this, a, b); - this.ya = []; - this.mb = -1; - this.Pa = []; - var c = this - , e = this.j.la; - 1 !== e.kt && 2 !== e.kt && (e.kt = 1); - this.kv = this.j.la.Wb ? q : t; - K.load("route", function() { - c.Sd() - }); - this.vE && this.vE() - } - Md.WP = " \u73af\u5c9b \u65e0\u5c5e\u6027\u9053\u8def \u4e3b\u8def \u9ad8\u901f\u8fde\u63a5\u8def \u4ea4\u53c9\u70b9\u5185\u8def\u6bb5 \u8fde\u63a5\u9053\u8def \u505c\u8f66\u573a\u5185\u90e8\u9053\u8def \u670d\u52a1\u533a\u5185\u90e8\u9053\u8def \u6865 \u6b65\u884c\u8857 \u8f85\u8def \u531d\u9053 \u5168\u5c01\u95ed\u9053\u8def \u672a\u5b9a\u4e49\u4ea4\u901a\u533a\u57df POI\u8fde\u63a5\u8def \u96a7\u9053 \u6b65\u884c\u9053 \u516c\u4ea4\u4e13\u7528\u9053 \u63d0\u524d\u53f3\u8f6c\u9053".split(" "); - z.ta(Md, Jd, "DWRoute"); - z.extend(Md.prototype, { - search: function(a, b, c) { - this.Pa.push({ - method: "search", - arguments: [a, b, c] - }) - } - }); - function Nd(a, b) { - Md.call(this, a, b); - b = b || {}; - this.j.Vn = b.enableTraffic || t; - this.bu(b.policy); - this.Ab = Ad; - this.mq = wd - } - z.ta(Nd, Md, "DrivingRoute"); - Nd.prototype.bu = function(a) { - this.j.ie = 0 <= a && 5 >= a ? a : 0 - } - ; - function Od(a, b) { - Md.call(this, a, b); - this.Ab = Bd; - this.mq = vd; - this.kv = t - } - z.ta(Od, Md, "WalkingRoute"); - function Pd(a, b) { - Md.call(this, a, b); - this.Ab = Ed; - this.mq = xd; - this.kv = t - } - z.ta(Pd, Md, "RidingRoute"); - function Qd(a, b) { - z.lang.Ca.call(this); - this.Vf = []; - this.Kk = []; - this.j = b; - this.uj = a; - this.map = this.j.la.map || s; - this.hO = this.j.hO; - this.zb = s; - this.pk = 0; - this.SF = ""; - this.nf = 1; - this.uD = ""; - this.Ep = [0, 0, 0, 0, 0, 0, 0]; - this.XM = []; - this.os = [1, 1, 1, 1, 1, 1, 1]; - this.VO = [1, 1, 1, 1, 1, 1, 1]; - this.Fp = [0, 0, 0, 0, 0, 0, 0]; - this.Zm = [0, 0, 0, 0, 0, 0, 0]; - this.Ib = [{ - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }]; - this.bi = -1; - this.ru = []; - this.aG = []; - K.load("route", u()) - } - z.lang.ta(Qd, z.lang.Ca, "RouteAddr"); - var Rd = navigator.userAgent; - /ipad|iphone|ipod|iph/i.test(Rd); - var Sd = /android/i.test(Rd); - function Td(a) { - this.vf = a || {} - } - z.extend(Td.prototype, { - gO: function(a, b, c) { - var e = this; - K.load("route", function() { - e.Sd(a, b, c) - }) - } - }); - function Ud(a) { - this.j = {}; - z.extend(this.j, a); - this.Pa = []; - var b = this; - K.load("othersearch", function() { - b.Sd() - }) - } - z.ta(Ud, z.lang.Ca, "Geocoder"); - z.extend(Ud.prototype, { - vm: function(a, b, c) { - this.Pa.push({ - method: "getPoint", - arguments: [a, b, c] - }) - }, - rm: function(a, b, c) { - this.Pa.push({ - method: "getLocation", - arguments: [a, b, c] - }) - }, - toString: ca("Geocoder") - }); - var Vd = Ud.prototype; - T(Vd, { - getPoint: Vd.vm, - getLocation: Vd.rm - }); - function Geolocation(a) { - a = a || {}; - this.K = { - timeout: a.timeout || 1E4, - maximumAge: a.maximumAge || 6E5, - enableHighAccuracy: a.enableHighAccuracy || t, - zi: a.SDKLocation || t - }; - this.pe = []; - var b = this; - K.load("othersearch", function() { - for (var a = 0, e; e = b.pe[a]; a++) - b[e.method].apply(b, e.arguments) - }) - } - z.extend(Geolocation.prototype, { - getCurrentPosition: function(a, b) { - this.pe.push({ - method: "getCurrentPosition", - arguments: arguments - }) - }, - getStatus: function() { - return sd - }, - enableSDKLocation: function() { - H() && (this.K.zi = q) - }, - disableSDKLocation: function() { - this.K.zi = t - } - }); - function Wd(a) { - a = a || {}; - a.la = a.renderOptions || {}; - this.j = { - la: { - map: a.la.map || s - } - }; - this.Pa = []; - var b = this; - K.load("othersearch", function() { - b.Sd() - }) - } - z.ta(Wd, z.lang.Ca, "LocalCity"); - z.extend(Wd.prototype, { - get: function(a) { - this.Pa.push({ - method: "get", - arguments: [a] - }) - }, - toString: ca("LocalCity") - }); - function Xd() { - this.Pa = []; - var a = this; - K.load("othersearch", function() { - a.Sd() - }) - } - z.ta(Xd, z.lang.Ca, "Boundary"); - z.extend(Xd.prototype, { - get: function(a, b) { - this.Pa.push({ - method: "get", - arguments: [a, b] - }) - }, - toString: ca("Boundary") - }); - function Yd(a, b) { - W.call(this, a, b); - this.TP = Cd; - this.VP = Fd; - this.SP = Dd; - this.UP = Gd; - this.Pa = []; - var c = this; - K.load("buslinesearch", function() { - c.Sd() - }) - } - Yd.zv = G.qa + "iw_plus.gif"; - Yd.YS = G.qa + "iw_minus.gif"; - Yd.RU = G.qa + "stop_icon.png"; - z.ta(Yd, W); - z.extend(Yd.prototype, { - getBusList: function(a) { - this.Pa.push({ - method: "getBusList", - arguments: [a] - }) - }, - getBusLine: function(a) { - this.Pa.push({ - method: "getBusLine", - arguments: [a] - }) - }, - setGetBusListCompleteCallback: function(a) { - this.j.zN = a || u() - }, - setGetBusLineCompleteCallback: function(a) { - this.j.yN = a || u() - }, - setBusListHtmlSetCallback: function(a) { - this.j.wN = a || u() - }, - setBusLineHtmlSetCallback: function(a) { - this.j.vN = a || u() - }, - setPolylinesSetCallback: function(a) { - this.j.bF = a || u() - } - }); - function Zd(a) { - W.call(this, a); - a = a || {}; - this.ub = { - input: a.input || s, - gC: a.baseDom || s, - types: a.types || [], - py: a.onSearchComplete || u() - }; - this.Ad.src = a.location || "\u5168\u56fd"; - this.Wi = ""; - this.pg = s; - this.lI = ""; - this.Mi(); - Ra(Ha); - var b = this; - K.load("autocomplete", function() { - b.Sd() - }) - } - z.ta(Zd, W, "Autocomplete"); - z.extend(Zd.prototype, { - Mi: u(), - show: u(), - U: u(), - KF: function(a) { - this.ub.types = a - }, - fn: function(a) { - this.Ad.src = a - }, - search: ba("Wi"), - Ly: ba("lI") - }); - var Ta; - function Oa(a, b) { - function c() { - f.j.visible ? ("inter" === f.Ke && f.j.haveBreakId && f.j.indoorExitControl === q ? z.D.show(f.GA) : z.D.U(f.GA), - this.j.closeControl && this.Bf && this.B && this.B.La() === this.C ? z.D.show(f.Bf) : z.D.U(f.Bf), - this.j.forceCloseControl && z.D.show(f.Bf)) : (z.D.U(f.Bf), - z.D.U(f.GA)) - } - this.C = "string" == typeof a ? z.$(a) : a; - this.aa = $d++; - this.j = { - enableScrollWheelZoom: q, - panoramaRenderer: "flash", - swfSrc: B.vg("main_domain_nocdn", "res/swf/") + "APILoader.swf", - visible: q, - indoorExitControl: q, - indoorFloorControl: t, - linksControl: q, - clickOnRoad: q, - navigationControl: q, - closeControl: q, - indoorSceneSwitchControl: q, - albumsControl: t, - albumsControlOptions: {}, - copyrightControlOptions: {}, - forceCloseControl: t, - haveBreakId: t - }; - var b = b || {}, e; - for (e in b) - this.j[e] = b[e]; - b.closeControl === q && (this.j.forceCloseControl = q); - b.useWebGL === t && Na(t); - this.Da = { - heading: 0, - pitch: 0 - }; - this.bo = []; - this.Lb = this.Za = s; - this.dk = this.er(); - this.ya = []; - this.Mc = 1; - this.Ke = this.xT = this.jl = ""; - this.Je = {}; - this.Of = s; - this.Sg = []; - this.xr = []; - "cvsRender" == this.dk || Na() ? (this.Vj = 90, - this.Xj = -90) : "cssRender" == this.dk && (this.Vj = 45, - this.Xj = -45); - this.Br = t; - var f = this; - this.co = function() { - this.dk === "flashRender" ? K.load("panoramaflash", function() { - f.Mi() - }, q) : K.load("panorama", function() { - f.ib() - }, q); - b.of == "api" ? Ra(Da) : Ra(Ea); - this.co = u() - } - ; - this.j.jT !== q && (this.co(), - B.Fn("cus.fire", "count", "z_loadpanoramacount")); - this.aU(this.C); - this.addEventListener("id_changed", function() { - Ra(Ca, { - from: b.of - }) - }); - this.mQ(); - this.addEventListener("indoorexit_options_changed", c); - this.addEventListener("scene_type_changed", c); - this.addEventListener("onclose_options_changed", c); - this.addEventListener("onvisible_changed", c) - } - var ae = 4 - , be = 1 - , $d = 0; - z.lang.ta(Oa, z.lang.Ca, "Panorama"); - z.extend(Oa.prototype, { - mQ: function() { - var a = this - , b = this.Bf = L("div"); - b.className = "pano_close"; - b.style.cssText = "z-index: 1201;display: none"; - b.title = "\u9000\u51fa\u5168\u666f"; - b.onclick = function() { - a.U() - } - ; - this.C.appendChild(b); - var c = this.GA = L("a"); - c.className = "pano_pc_indoor_exit"; - c.style.cssText = "z-index: 1201;display: none"; - c.innerHTML = '\u51fa\u53e3'; - c.title = "\u9000\u51fa\u5ba4\u5185\u666f"; - c.onclick = function() { - a.Vo() - } - ; - this.C.appendChild(c); - window.ActiveXObject && !document.addEventListener && (b.style.backgroundColor = "rgb(37,37,37)", - c.style.backgroundColor = "rgb(37,37,37)") - }, - Vo: u(), - aU: function(a) { - var b, c; - b = a.style; - c = Va(a).position; - "absolute" != c && "relative" != c && (b.position = "relative", - b.zIndex = 0); - if ("absolute" === c || "relative" === c) - if (a = Va(a).zIndex, - !a || "auto" === a) - b.zIndex = 0 - }, - OX: w("bo"), - Xb: w("Za"), - pY: w("jw"), - wO: w("jw"), - ga: w("Lb"), - Ea: w("Da"), - fa: w("Mc"), - jj: w("jl"), - I3: function() { - return this.U1 || [] - }, - D3: w("xT"), - ft: w("Ke"), - Ny: function(a) { - a !== this.Ke && (this.Ke = a, - this.dispatchEvent(new P("onscene_type_changed"))) - }, - vc: function(a, b, c) { - "object" === typeof b && (c = b, - b = l); - a != this.Za && (this.ul = this.Za, - this.vl = this.Lb, - this.Za = a, - this.Ke = b || "street", - this.Lb = s, - c && c.pov && this.Pc(c.pov)) - }, - sa: function(a) { - a.pb(this.Lb) || (this.ul = this.Za, - this.vl = this.Lb, - this.Lb = a, - this.Za = s) - }, - Pc: function(a) { - a && (this.Da = a, - a = this.Da.pitch, - a > this.Vj ? a = this.Vj : a < this.Xj && (a = this.Xj), - this.Br = q, - this.Da.pitch = a) - }, - H_: function(a, b) { - this.Xj = 0 <= a ? 0 : a; - this.Vj = 0 >= b ? 0 : b - }, - Qc: function(a) { - a != this.Mc && (a > ae && (a = ae), - a < be && (a = be), - a != this.Mc && (this.Mc = a), - "cssRender" === this.dk && this.Pc(this.Da)) - }, - GB: function() { - if (this.B) - for (var a = this.B.Hx(), b = 0; b < a.length; b++) - (a[b]instanceof U || a[b]instanceof uc) && a[b].point && this.ya.push(a[b]) - }, - GF: ba("B"), - au: function(a) { - this.Of = a || "none" - }, - Qk: function(a) { - for (var b in a) { - if ("object" == typeof a[b]) - for (var c in a[b]) - this.j[b][c] = a[b][c]; - else - this.j[b] = a[b]; - a.closeControl === q && (this.j.forceCloseControl = q); - a.closeControl === t && (this.j.forceCloseControl = t); - switch (b) { - case "linksControl": - this.dispatchEvent(new P("onlinks_visible_changed")); - break; - case "clickOnRoad": - this.dispatchEvent(new P("onclickonroad_changed")); - break; - case "navigationControl": - this.dispatchEvent(new P("onnavigation_visible_changed")); - break; - case "indoorSceneSwitchControl": - this.dispatchEvent(new P("onindoor_default_switch_mode_changed")); - break; - case "albumsControl": - this.dispatchEvent(new P("onalbums_visible_changed")); - break; - case "albumsControlOptions": - this.dispatchEvent(new P("onalbums_options_changed")); - break; - case "copyrightControlOptions": - this.dispatchEvent(new P("oncopyright_options_changed")); - break; - case "closeControl": - this.dispatchEvent(new P("onclose_options_changed")); - break; - case "indoorExitControl": - this.dispatchEvent(new P("onindoorexit_options_changed")); - break; - case "indoorFloorControl": - this.dispatchEvent(new P("onindoorfloor_options_changed")) - } - } - }, - Ek: function() { - this.Dl.style.visibility = "hidden" - }, - Ry: function() { - this.Dl.style.visibility = "visible" - }, - cX: function() { - this.j.enableScrollWheelZoom = q - }, - NW: function() { - this.j.enableScrollWheelZoom = t - }, - show: function() { - this.j.visible = q - }, - U: function() { - this.j.visible = t - }, - er: function() { - return Ua() && !H() && "javascript" != this.j.panoramaRenderer ? "flashRender" : !H() && Ob() ? "cvsRender" : "cssRender" - }, - Ga: function(a) { - this.Je[a.ld] = a - }, - Qb: function(a) { - delete this.Je[a] - }, - kE: function() { - return this.j.visible - }, - fh: function() { - return new O(this.C.clientWidth,this.C.clientHeight) - }, - La: w("C"), - yL: function() { - var a = B.vg("baidumap", "?") - , b = this.Xb(); - if (b) { - var b = { - panotype: this.ft(), - heading: this.Ea().heading, - pitch: this.Ea().pitch, - pid: b, - panoid: b, - from: "api" - }, c; - for (c in b) - a += c + "=" + b[c] + "&" - } - return a.slice(0, -1) - }, - Px: function() { - this.Qk({ - copyrightControlOptions: { - logoVisible: t - } - }) - }, - NF: function() { - this.Qk({ - copyrightControlOptions: { - logoVisible: q - } - }) - }, - aC: function(a) { - function b(a, b) { - return function() { - a.xr.push({ - iN: b, - hN: arguments - }) - } - } - for (var c = a.getPanoMethodList(), e = "", f = 0, g = c.length; f < g; f++) - e = c[f], - this[e] = b(this, e); - this.Sg.push(a) - }, - rF: function(a) { - for (var b = this.Sg.length; b--; ) - this.Sg[b] === a && this.Sg.splice(b, 1) - }, - FF: u() - }); - var ce = Oa.prototype; - T(ce, { - setId: ce.vc, - setPosition: ce.sa, - setPov: ce.Pc, - setZoom: ce.Qc, - setOptions: ce.Qk, - getId: ce.Xb, - getPosition: ce.ga, - getPov: ce.Ea, - getZoom: ce.fa, - getLinks: ce.OX, - getBaiduMapUrl: ce.yL, - hideMapLogo: ce.Px, - showMapLogo: ce.NF, - enableDoubleClickZoom: ce.W2, - disableDoubleClickZoom: ce.J2, - enableScrollWheelZoom: ce.cX, - disableScrollWheelZoom: ce.NW, - show: ce.show, - hide: ce.U, - addPlugin: ce.aC, - removePlugin: ce.rF, - getVisible: ce.kE, - addOverlay: ce.Ga, - removeOverlay: ce.Qb, - getSceneType: ce.ft, - setPanoramaPOIType: ce.au, - exitInter: ce.Vo, - setInteractiveState: ce.FF - }); - T(window, { - BMAP_PANORAMA_POI_HOTEL: "hotel", - BMAP_PANORAMA_POI_CATERING: "catering", - BMAP_PANORAMA_POI_MOVIE: "movie", - BMAP_PANORAMA_POI_TRANSIT: "transit", - BMAP_PANORAMA_POI_INDOOR_SCENE: "indoor_scene", - BMAP_PANORAMA_POI_NONE: "none", - BMAP_PANORAMA_INDOOR_SCENE: "inter", - BMAP_PANORAMA_STREET_SCENE: "street" - }); - function de() { - z.lang.Ca.call(this); - this.ld = "PanoramaOverlay_" + this.aa; - this.P = s; - this.Qa = q - } - z.lang.ta(de, z.lang.Ca, "PanoramaOverlayBase"); - z.extend(de.prototype, { - E3: w("ld"), - na: function() { - aa("initialize\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - remove: function() { - aa("remove\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - Nf: function() { - aa("_setOverlayProperty\u65b9\u6cd5\u672a\u5b9e\u73b0") - } - }); - function ee(a, b) { - de.call(this); - var c = { - position: s, - altitude: 2, - displayDistance: q - }, b = b || {}, e; - for (e in b) - c[e] = b[e]; - this.Lb = c.position; - this.Ij = a; - this.xq = c.altitude; - this.zR = c.displayDistance; - this.UF = c.color; - this.kM = c.hoverColor; - this.backgroundColor = c.backgroundColor; - this.jK = c.backgroundHoverColor; - this.borderColor = c.borderColor; - this.oK = c.borderHoverColor; - this.fontSize = c.fontSize; - this.padding = c.padding; - this.pE = c.imageUrl; - this.size = c.size; - this.xe = c.image; - this.width = c.width; - this.height = c.height; - this.HY = c.imageData; - this.borderWidth = c.borderWidth - } - z.lang.ta(ee, de, "PanoramaLabel"); - z.extend(ee.prototype, { - j3: w("borderWidth"), - getImageData: w("HY"), - zm: w("UF"), - y3: w("kM"), - f3: w("backgroundColor"), - g3: w("jK"), - h3: w("borderColor"), - i3: w("oK"), - w3: w("fontSize"), - F3: w("padding"), - z3: w("pE"), - cb: w("size"), - zx: w("xe"), - sa: function(a) { - this.Lb = a; - this.Nf("position", a) - }, - ga: w("Lb"), - dd: function(a) { - this.Ij = a; - this.Nf("content", a) - }, - xk: w("Ij"), - AF: function(a) { - this.xq = a; - this.Nf("altitude", a) - }, - Yo: w("xq"), - Ea: function() { - var a = this.ga() - , b = s - , c = s; - this.P && (c = this.P.ga()); - if (a && c) - if (a.pb(c)) - b = this.P.Ea(); - else { - b = {}; - b.heading = fe(a.lng - c.lng, a.lat - c.lat) || 0; - var a = b - , c = this.Yo() - , e = this.Xn(); - a.pitch = Math.round(180 * (Math.atan(c / e) / Math.PI)) || 0 - } - return b - }, - Xn: function() { - var a = 0, b, c; - this.P && (b = this.P.ga(), - (c = this.ga()) && !c.pb(b) && (a = S.$o(b, c))); - return a - }, - U: function() { - aa("hide\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - show: function() { - aa("show\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - Nf: u() - }); - var ge = ee.prototype; - T(ge, { - setPosition: ge.sa, - getPosition: ge.ga, - setContent: ge.dd, - getContent: ge.xk, - setAltitude: ge.AF, - getAltitude: ge.Yo, - getPov: ge.Ea, - show: ge.show, - hide: ge.U - }); - function he(a, b) { - de.call(this); - var c = { - icon: "", - title: "", - panoInfo: s, - altitude: 2 - }, b = b || {}, e; - for (e in b) - c[e] = b[e]; - this.Lb = a; - this.gI = c.icon; - this.DJ = c.title; - this.xq = c.altitude; - this.OT = c.panoInfo; - this.Da = { - heading: 0, - pitch: 0 - } - } - z.lang.ta(he, de, "PanoramaMarker"); - z.extend(he.prototype, { - sa: function(a) { - this.Lb = a; - this.Nf("position", a) - }, - ga: w("Lb"), - Ec: function(a) { - this.DJ = a; - this.Nf("title", a) - }, - gp: w("DJ"), - Rb: function(a) { - this.gI = icon; - this.Nf("icon", a) - }, - ap: w("gI"), - AF: function(a) { - this.xq = a; - this.Nf("altitude", a) - }, - Yo: w("xq"), - $D: w("OT"), - Ea: function() { - var a = s; - if (this.P) { - var a = this.P.ga() - , b = this.ga() - , a = fe(b.lng - a.lng, b.lat - a.lat); - isNaN(a) && (a = 0); - a = { - heading: a, - pitch: 0 - } - } else - a = this.Da; - return a - }, - Nf: u() - }); - var ie = he.prototype; - T(ie, { - setPosition: ie.sa, - getPosition: ie.ga, - setTitle: ie.Ec, - getTitle: ie.gp, - setAltitude: ie.AF, - getAltitude: ie.Yo, - getPanoInfo: ie.$D, - getIcon: ie.ap, - setIcon: ie.Rb, - getPov: ie.Ea - }); - function fe(a, b) { - var c = 0; - if (0 !== a && 0 !== b) { - var c = 180 * (Math.atan(a / b) / Math.PI) - , e = 0; - 0 < a && 0 > b && (e = 90); - 0 > a && 0 > b && (e = 180); - 0 > a && 0 < b && (e = 270); - c = (c + 90) % 90 + e - } else - 0 === a ? c = 0 > b ? 180 : 0 : 0 === b && (c = 0 < a ? 90 : 270); - return Math.round(c) - } - function Na(a) { - if ("boolean" === typeof je) - return je; - if (a === t || !window.WebGLRenderingContext) - return je = t; - if (z.platform.Jm) { - a = 0; - try { - a = navigator.userAgent.split("Android ")[1].charAt(0) - } catch (b) {} - if (5 > a) - return je = t - } - var a = document.createElement("canvas") - , c = s; - try { - c = a.getContext("webgl") - } catch (e) { - je = t - } - return je = c === s ? t : q - } - var je; - function ke() { - if ("boolean" === typeof le) - return le; - le = q; - if (z.platform.zE) - return q; - var a = navigator.userAgent; - return -1 < a.indexOf("Chrome") || -1 < a.indexOf("SAMSUNG-GT-I9508") ? q : le = t - } - var le; - function ec(a, b) { - this.P = a || s; - var c = this; - c.P && c.ba(); - K.load("pservice", function() { - c.SQ() - }); - "api" == (b || {}).of ? Ra(Fa) : Ra(Ga); - this.xd = { - getPanoramaById: [], - getPanoramaByLocation: [], - getVisiblePOIs: [], - getRecommendPanosById: [], - getPanoramaVersions: [], - checkPanoSupportByCityCode: [], - getPanoramaByPOIId: [], - getCopyrightProviders: [] - } - } - B.Tm(function(a) { - "flashRender" !== a.er() && new ec(a,{ - of: "api" - }) - }); - z.extend(ec.prototype, { - ba: function() { - function a(a) { - if (a) { - if (a.id != b.jw) { - b.wO(a.id); - b.ea = a; - ke() || b.dispatchEvent(new P("onthumbnail_complete")); - b.Za != s && (b.vl = b._position); - for (var c in a) - if (a.hasOwnProperty(c)) - switch (b["_" + c] = a[c], - c) { - case "position": - b.Lb = a[c]; - break; - case "id": - b.Za = a[c]; - break; - case "links": - b.bo = a[c]; - break; - case "zoom": - b.Mc = a[c] - } - if (b.vl) { - var g = b.vl - , i = b._position; - c = g.lat; - var k = i.lat - , m = Pb(k - c) - , g = Pb(i.lng - g.lng); - c = Math.sin(m / 2) * Math.sin(m / 2) + Math.cos(Pb(c)) * Math.cos(Pb(k)) * Math.sin(g / 2) * Math.sin(g / 2); - b.wH = 6371E3 * 2 * Math.atan2(Math.sqrt(c), Math.sqrt(1 - c)) - } - c = new P("ondataload"); - c.data = a; - b.dispatchEvent(c); - b.dispatchEvent(new P("onposition_changed")); - b.dispatchEvent(new P("onlinks_changed")); - b.dispatchEvent(new P("oncopyright_changed"), { - copyright: a.copyright - }); - a.bm && b.j.closeControl ? z.D.show(b.WR) : z.D.U(b.WR) - } - } else - b.Za = b.ul, - b.Lb = b.vl, - b.dispatchEvent(new P("onnoresult")) - } - var b = this.P - , c = this; - b.addEventListener("id_changed", function() { - c.ep(b.Xb(), a) - }); - b.addEventListener("iid_changed", function() { - c.Tg(ec.el + "qt=idata&iid=" + b.CA + "&fn=", function(b) { - if (b && b.result && 0 == b.result.error) { - var b = b.content[0].interinfo - , f = {}; - f.bm = b.BreakID; - for (var g = b.Defaultfloor, i = s, k = 0; k < b.Floors.length; k++) - if (b.Floors[k].Floor == g) { - i = b.Floors[k]; - break - } - f.id = i.StartID || i.Points[0].PID; - c.ep(f.id, a, f) - } - }) - }); - b.addEventListener("position_changed_inner", function() { - c.kj(b.ga(), a) - }) - }, - ep: function(a, b) { - this.xd.getPanoramaById.push(arguments) - }, - kj: function(a, b, c) { - this.xd.getPanoramaByLocation.push(arguments) - }, - lE: function(a, b, c, e) { - this.xd.getVisiblePOIs.push(arguments) - }, - Kx: function(a, b) { - this.xd.getRecommendPanosById.push(arguments) - }, - Jx: function(a) { - this.xd.getPanoramaVersions.push(arguments) - }, - nC: function(a, b) { - this.xd.checkPanoSupportByCityCode.push(arguments) - }, - Ix: function(a, b) { - this.xd.getPanoramaByPOIId.push(arguments) - }, - CL: function(a) { - this.xd.getCopyrightProviders.push(arguments) - } - }); - var ne = ec.prototype; - T(ne, { - getPanoramaById: ne.ep, - getPanoramaByLocation: ne.kj, - getPanoramaByPOIId: ne.Ix - }); - function dc(a) { - Mc.call(this); - "api" == (a || {}).of ? Ra(Aa) : Ra(Ba) - } - dc.OG = B.vg("pano", "tile/"); - dc.prototype = new Mc; - dc.prototype.getTilesUrl = function(a, b) { - var c = dc.OG[(a.x + a.y) % dc.OG.length] + "?udt=20150114&qt=tile&styles=pl&x=" + a.x + "&y=" + a.y + "&z=" + b; - z.ca.ia && 6 >= z.ca.ia && (c += "&color_dep=32"); - return c - } - ; - dc.prototype.zt = ca(q); - oe.Wd = new S; - function oe() {} - z.extend(oe, { - OW: function(a, b, c) { - c = z.lang.Nc(c); - b = { - data: b - }; - "position_changed" == a && (b.data = oe.Wd.xj(new Q(b.data.mercatorX,b.data.mercatorY))); - c.dispatchEvent(new P("on" + a), b) - } - }); - var pe = oe; - T(pe, { - dispatchFlashEvent: pe.OW - }); - var qe = { - KP: 50 - }; - qe.Ou = B.vg("pano")[0]; - qe.Mu = { - width: 220, - height: 60 - }; - z.extend(qe, { - tM: function(a, b, c, e) { - if (!b || !c || !c.lngLat || !c.panoInstance) - e(); - else { - this.jo === l && (this.jo = new ec(s,{ - of: "api" - })); - var f = this; - this.jo.nC(b, function(b) { - b ? f.jo.kj(c.lngLat, qe.KP, function(b) { - if (b && b.id) { - var g = b.id - , m = b.rh - , b = b.th - , n = ec.Wd.kh(c.lngLat) - , o = f.AS(n, { - x: m, - y: b - }) - , m = f.PL(g, o, 0, qe.Mu.width, qe.Mu.height); - a.content = f.BS(a.content, m, c.titleTip, c.beforeDomId); - a.addEventListener("open", function() { - ia.M(z.Fc("infoWndPano"), "click", function() { - c.panoInstance.vc(g); - c.panoInstance.show(); - c.panoInstance.Pc({ - heading: o, - pitch: 0 - }) - }) - }) - } - e() - }) : e() - }) - } - }, - BS: function(a, b, c, e) { - var c = c || "", f; - !e || !a.split(e)[0] ? (e = a, - a = "") : (e = a.split(e)[0], - f = e.lastIndexOf("<"), - e = a.substring(0, f), - a = a.substring(f)); - f = []; - var g = qe.Mu.width - , i = qe.Mu.height; - f.push(e); - f.push("
    "); - f.push("" + c + "\u5916\u666f"); - f.push("
    \u8fdb\u5165\u5168\u666f>>"); - f.push("
    "); - f.push(a); - return f.join("") - }, - AS: function(a, b) { - var c = 90 - 180 * Math.atan2(a.y - b.y, a.x - b.x) / Math.PI; - 0 > c && (c += 360); - return c - }, - PL: function(a, b, c, e, f) { - var g = { - panoId: a, - panoHeading: b || 0, - panoPitch: c || 0, - width: e, - height: f - }; - return (qe.Ou + "?qt=pr3d&fovy=75&quality=80&panoid={panoId}&heading={panoHeading}&pitch={panoPitch}&width={width}&height={height}").replace(/\{(.*?)\}/g, function(a, b) { - return g[b] - }) - } - }); - var te = document, ue = Math, ve = te.createElement("div").style, we; - a: { - for (var xe = ["t", "webkitT", "MozT", "msT", "OT"], ye, ze = 0, Ae = xe.length; ze < Ae; ze++) - if (ye = xe[ze] + "ransform", - ye in ve) { - we = xe[ze].substr(0, xe[ze].length - 1); - break a - } - we = t - } - var Be = we ? "-" + we.toLowerCase() + "-" : "" - , De = Ce("transform") - , Ee = Ce("transitionProperty") - , Fe = Ce("transitionDuration") - , Ge = Ce("transformOrigin") - , He = Ce("transitionTimingFunction") - , Ie = Ce("transitionDelay") - , Sd = /android/gi.test(navigator.appVersion) - , Je = /iphone|ipad/gi.test(navigator.appVersion) - , Ke = /hp-tablet/gi.test(navigator.appVersion) - , Le = Ce("perspective")in ve - , Me = "ontouchstart"in window && !Ke - , Ne = we !== t - , Oe = Ce("transition")in ve - , Pe = "onorientationchange"in window ? "orientationchange" : "resize" - , Qe = Me ? "touchstart" : "mousedown" - , Re = Me ? "touchmove" : "mousemove" - , Se = Me ? "touchend" : "mouseup" - , Te = Me ? "touchcancel" : "mouseup" - , Ue = we === t ? t : { - "": "transitionend", - webkit: "webkitTransitionEnd", - Moz: "transitionend", - O: "otransitionend", - ms: "MSTransitionEnd" - }[we] - , Ve = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(a) { - return setTimeout(a, 1) - } - , We = window.cancelRequestAnimationFrame || window.U5 || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || clearTimeout - , Xe = Le ? " translateZ(0)" : ""; - function Ye(a, b) { - var c = this, e; - c.zn = "object" == typeof a ? a : te.getElementById(a); - c.zn.style.overflow = "hidden"; - c.Nb = c.zn.children[0]; - c.options = { - kp: q, - xn: q, - x: 0, - y: 0, - Go: q, - LV: t, - iy: q, - OE: q, - Yk: q, - wi: t, - n0: 0, - Pw: t, - Mx: q, - ii: q, - xi: q, - AD: Sd, - Qx: Je, - kX: Je && Le, - xF: "", - zoom: t, - $k: 1, - aq: 4, - QW: 2, - qP: "scroll", - iu: t, - Uy: 1, - CN: s, - uN: function(a) { - a.preventDefault() - }, - FN: s, - tN: s, - EN: s, - sN: s, - oy: s, - GN: s, - xN: s, - zp: s, - HN: s, - yp: s - }; - for (e in b) - c.options[e] = b[e]; - c.x = c.options.x; - c.y = c.options.y; - c.options.Yk = Ne && c.options.Yk; - c.options.ii = c.options.kp && c.options.ii; - c.options.xi = c.options.xn && c.options.xi; - c.options.zoom = c.options.Yk && c.options.zoom; - c.options.wi = Oe && c.options.wi; - c.options.zoom && Sd && (Xe = ""); - c.Nb.style[Ee] = c.options.Yk ? Be + "transform" : "top left"; - c.Nb.style[Fe] = "0"; - c.Nb.style[Ge] = "0 0"; - c.options.wi && (c.Nb.style[He] = "cubic-bezier(0.33,0.66,0.66,1)"); - c.options.Yk ? c.Nb.style[De] = "translate(" + c.x + "px," + c.y + "px)" + Xe : c.Nb.style.cssText += ";position:absolute;top:" + c.y + "px;left:" + c.x + "px"; - c.options.wi && (c.options.AD = q); - c.refresh(); - c.ba(Pe, window); - c.ba(Qe); - !Me && "none" != c.options.qP && (c.ba("DOMMouseScroll"), - c.ba("mousewheel")); - c.options.Pw && (c.XV = setInterval(function() { - c.PQ() - }, 500)); - this.options.Mx && (Event.prototype.stopImmediatePropagation || (document.body.removeEventListener = function(a, b, c) { - var e = Node.prototype.removeEventListener; - a === "click" ? e.call(document.body, a, b.iM || b, c) : e.call(document.body, a, b, c) - } - , - document.body.addEventListener = function(a, b, c) { - var e = Node.prototype.addEventListener; - a === "click" ? e.call(document.body, a, b.iM || (b.iM = function(a) { - a.RZ || b(a) - } - ), c) : e.call(document.body, a, b, c) - } - ), - c.ba("click", document.body, q)) - } - Ye.prototype = { - enabled: q, - x: 0, - y: 0, - yj: [], - scale: 1, - HC: 0, - IC: 0, - We: [], - wf: [], - fC: s, - cz: 0, - handleEvent: function(a) { - switch (a.type) { - case Qe: - if (!Me && 0 !== a.button) - break; - this.aw(a); - break; - case Re: - this.zT(a); - break; - case Se: - case Te: - this.lv(a); - break; - case Pe: - this.zB(); - break; - case "DOMMouseScroll": - case "mousewheel": - this.eV(a); - break; - case Ue: - this.$U(a); - break; - case "click": - this.$Q(a) - } - }, - PQ: function() { - !this.oh && (!this.al && !(this.Yl || this.Ky == this.Nb.offsetWidth * this.scale && this.Ip == this.Nb.offsetHeight * this.scale)) && this.refresh() - }, - Sv: function(a) { - var b; - this[a + "Scrollbar"] ? (this[a + "ScrollbarWrapper"] || (b = te.createElement("div"), - this.options.xF ? b.className = this.options.xF + a.toUpperCase() : b.style.cssText = "position:absolute;z-index:100;" + ("h" == a ? "height:7px;bottom:1px;left:2px;right:" + (this.xi ? "7" : "2") + "px" : "width:7px;bottom:" + (this.ii ? "7" : "2") + "px;top:2px;right:1px"), - b.style.cssText += ";pointer-events:none;" + Be + "transition-property:opacity;" + Be + "transition-duration:" + (this.options.kX ? "350ms" : "0") + ";overflow:hidden;opacity:" + (this.options.Qx ? "0" : "1"), - this.zn.appendChild(b), - this[a + "ScrollbarWrapper"] = b, - b = te.createElement("div"), - this.options.xF || (b.style.cssText = "position:absolute;z-index:100;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);" + Be + "background-clip:padding-box;" + Be + "box-sizing:border-box;" + ("h" == a ? "height:100%" : "width:100%") + ";" + Be + "border-radius:3px;border-radius:3px"), - b.style.cssText += ";pointer-events:none;" + Be + "transition-property:" + Be + "transform;" + Be + "transition-timing-function:cubic-bezier(0.33,0.66,0.66,1);" + Be + "transition-duration:0;" + Be + "transform: translate(0,0)" + Xe, - this.options.wi && (b.style.cssText += ";" + Be + "transition-timing-function:cubic-bezier(0.33,0.66,0.66,1)"), - this[a + "ScrollbarWrapper"].appendChild(b), - this[a + "ScrollbarIndicator"] = b), - "h" == a ? (this.fM = this.gM.clientWidth, - this.yY = ue.max(ue.round(this.fM * this.fM / this.Ky), 8), - this.xY.style.width = this.yY + "px") : (this.iP = this.jP.clientHeight, - this.L0 = ue.max(ue.round(this.iP * this.iP / this.Ip), 8), - this.K0.style.height = this.L0 + "px"), - this.AB(a, q)) : this[a + "ScrollbarWrapper"] && (Ne && (this[a + "ScrollbarIndicator"].style[De] = ""), - this[a + "ScrollbarWrapper"].parentNode.removeChild(this[a + "ScrollbarWrapper"]), - this[a + "ScrollbarWrapper"] = s, - this[a + "ScrollbarIndicator"] = s) - }, - zB: function() { - var a = this; - setTimeout(function() { - a.refresh() - }, Sd ? 200 : 0) - }, - Ar: function(a, b) { - this.al || (a = this.kp ? a : 0, - b = this.xn ? b : 0, - this.options.Yk ? this.Nb.style[De] = "translate(" + a + "px," + b + "px) scale(" + this.scale + ")" + Xe : (a = ue.round(a), - b = ue.round(b), - this.Nb.style.left = a + "px", - this.Nb.style.top = b + "px"), - this.x = a, - this.y = b, - this.AB("h"), - this.AB("v")) - }, - AB: function(a, b) { - var c = "h" == a ? this.x : this.y; - this[a + "Scrollbar"] && (c *= this[a + "ScrollbarProp"], - 0 > c ? (this.options.AD || (c = this[a + "ScrollbarIndicatorSize"] + ue.round(3 * c), - 8 > c && (c = 8), - this[a + "ScrollbarIndicator"].style["h" == a ? "width" : "height"] = c + "px"), - c = 0) : c > this[a + "ScrollbarMaxScroll"] && (this.options.AD ? c = this[a + "ScrollbarMaxScroll"] : (c = this[a + "ScrollbarIndicatorSize"] - ue.round(3 * (c - this[a + "ScrollbarMaxScroll"])), - 8 > c && (c = 8), - this[a + "ScrollbarIndicator"].style["h" == a ? "width" : "height"] = c + "px", - c = this[a + "ScrollbarMaxScroll"] + (this[a + "ScrollbarIndicatorSize"] - c))), - this[a + "ScrollbarWrapper"].style[Ie] = "0", - this[a + "ScrollbarWrapper"].style.opacity = b && this.options.Qx ? "0" : "1", - this[a + "ScrollbarIndicator"].style[De] = "translate(" + ("h" == a ? c + "px,0)" : "0," + c + "px)") + Xe) - }, - $Q: function(a) { - if (a.XR === q) - return this.YB = a.target, - this.sx = Date.now(), - q; - if (this.YB && this.sx) { - if (600 < Date.now() - this.sx) - return this.sx = this.YB = s, - q - } else { - for (var b = a.target; b != this.Nb && b != document.body; ) - b = b.parentNode; - if (b == document.body) - return q - } - for (b = a.target; 1 != b.nodeType; ) - b = b.parentNode; - b = b.tagName.toLowerCase(); - if ("select" != b && "input" != b && "textarea" != b) - return a.stopImmediatePropagation ? a.stopImmediatePropagation() : a.RZ = q, - a.stopPropagation(), - a.preventDefault(), - this.sx = this.YB = s, - t - }, - aw: function(a) { - var b = Me ? a.touches[0] : a, c, e; - if (this.enabled) { - this.options.uN && this.options.uN.call(this, a); - (this.options.wi || this.options.zoom) && this.FJ(0); - this.al = this.Yl = this.oh = t; - this.RC = this.QC = this.vw = this.uw = this.XC = this.WC = 0; - this.options.zoom && (Me && 1 < a.touches.length) && (e = ue.abs(a.touches[0].pageX - a.touches[1].pageX), - c = ue.abs(a.touches[0].pageY - a.touches[1].pageY), - this.p0 = ue.sqrt(e * e + c * c), - this.qy = ue.abs(a.touches[0].pageX + a.touches[1].pageX - 2 * this.iG) / 2 - this.x, - this.ty = ue.abs(a.touches[0].pageY + a.touches[1].pageY - 2 * this.jG) / 2 - this.y, - this.options.zp && this.options.zp.call(this, a)); - if (this.options.iy && (this.options.Yk ? (c = getComputedStyle(this.Nb, s)[De].replace(/[^0-9\-.,]/g, "").split(","), - e = +(c[12] || c[4]), - c = +(c[13] || c[5])) : (e = +getComputedStyle(this.Nb, s).left.replace(/[^0-9-]/g, ""), - c = +getComputedStyle(this.Nb, s).top.replace(/[^0-9-]/g, "")), - e != this.x || c != this.y)) - this.options.wi ? this.$d(Ue) : We(this.fC), - this.yj = [], - this.Ar(e, c), - this.options.oy && this.options.oy.call(this); - this.ww = this.x; - this.xw = this.y; - this.lu = this.x; - this.mu = this.y; - this.rh = b.pageX; - this.th = b.pageY; - this.startTime = a.timeStamp || Date.now(); - this.options.FN && this.options.FN.call(this, a); - this.ba(Re, window); - this.ba(Se, window); - this.ba(Te, window) - } - }, - zT: function(a) { - var b = Me ? a.touches[0] : a - , c = b.pageX - this.rh - , e = b.pageY - this.th - , f = this.x + c - , g = this.y + e - , i = a.timeStamp || Date.now(); - this.options.tN && this.options.tN.call(this, a); - if (this.options.zoom && Me && 1 < a.touches.length) - f = ue.abs(a.touches[0].pageX - a.touches[1].pageX), - g = ue.abs(a.touches[0].pageY - a.touches[1].pageY), - this.o0 = ue.sqrt(f * f + g * g), - this.al = q, - b = 1 / this.p0 * this.o0 * this.scale, - b < this.options.$k ? b = 0.5 * this.options.$k * Math.pow(2, b / this.options.$k) : b > this.options.aq && (b = 2 * this.options.aq * Math.pow(0.5, this.options.aq / b)), - this.rp = b / this.scale, - f = this.qy - this.qy * this.rp + this.x, - g = this.ty - this.ty * this.rp + this.y, - this.Nb.style[De] = "translate(" + f + "px," + g + "px) scale(" + b + ")" + Xe, - this.options.HN && this.options.HN.call(this, a); - else { - this.rh = b.pageX; - this.th = b.pageY; - if (0 < f || f < this.he) - f = this.options.Go ? this.x + c / 2 : 0 <= f || 0 <= this.he ? 0 : this.he; - if (g > this.sf || g < this.qd) - g = this.options.Go ? this.y + e / 2 : g >= this.sf || 0 <= this.qd ? this.sf : this.qd; - this.WC += c; - this.XC += e; - this.uw = ue.abs(this.WC); - this.vw = ue.abs(this.XC); - 6 > this.uw && 6 > this.vw || (this.options.OE && (this.uw > this.vw + 5 ? (g = this.y, - e = 0) : this.vw > this.uw + 5 && (f = this.x, - c = 0)), - this.oh = q, - this.Ar(f, g), - this.QC = 0 < c ? -1 : 0 > c ? 1 : 0, - this.RC = 0 < e ? -1 : 0 > e ? 1 : 0, - 300 < i - this.startTime && (this.startTime = i, - this.lu = this.x, - this.mu = this.y), - this.options.EN && this.options.EN.call(this, a)) - } - }, - lv: function(a) { - if (!(Me && 0 !== a.touches.length)) { - var b = this, c = Me ? a.changedTouches[0] : a, e, f, g = { - Ba: 0, - time: 0 - }, i = { - Ba: 0, - time: 0 - }, k = (a.timeStamp || Date.now()) - b.startTime; - e = b.x; - f = b.y; - b.$d(Re, window); - b.$d(Se, window); - b.$d(Te, window); - b.options.sN && b.options.sN.call(b, a); - if (b.al) - e = b.scale * b.rp, - e = Math.max(b.options.$k, e), - e = Math.min(b.options.aq, e), - b.rp = e / b.scale, - b.scale = e, - b.x = b.qy - b.qy * b.rp + b.x, - b.y = b.ty - b.ty * b.rp + b.y, - b.Nb.style[Fe] = "200ms", - b.Nb.style[De] = "translate(" + b.x + "px," + b.y + "px) scale(" + b.scale + ")" + Xe, - b.al = t, - b.refresh(), - b.options.yp && b.options.yp.call(b, a); - else { - if (b.oh) { - if (300 > k && b.options.iy) { - g = e ? b.BI(e - b.lu, k, -b.x, b.Ky - b.Cu + b.x, b.options.Go ? b.Cu : 0) : g; - i = f ? b.BI(f - b.mu, k, -b.y, 0 > b.qd ? b.Ip - b.An + b.y - b.sf : 0, b.options.Go ? b.An : 0) : i; - e = b.x + g.Ba; - f = b.y + i.Ba; - if (0 < b.x && 0 < e || b.x < b.he && e < b.he) - g = { - Ba: 0, - time: 0 - }; - if (b.y > b.sf && f > b.sf || b.y < b.qd && f < b.qd) - i = { - Ba: 0, - time: 0 - } - } - g.Ba || i.Ba ? (c = ue.max(ue.max(g.time, i.time), 10), - b.options.iu && (g = e - b.ww, - i = f - b.xw, - ue.abs(g) < b.options.Uy && ue.abs(i) < b.options.Uy ? b.scrollTo(b.ww, b.xw, 200) : (g = b.vJ(e, f), - e = g.x, - f = g.y, - c = ue.max(g.time, c))), - b.scrollTo(ue.round(e), ue.round(f), c)) : b.options.iu ? (g = e - b.ww, - i = f - b.xw, - ue.abs(g) < b.options.Uy && ue.abs(i) < b.options.Uy ? b.scrollTo(b.ww, b.xw, 200) : (g = b.vJ(b.x, b.y), - (g.x != b.x || g.y != b.y) && b.scrollTo(g.x, g.y, g.time))) : b.lo(200) - } else { - if (Me) - if (b.VK && b.options.zoom) - clearTimeout(b.VK), - b.VK = s, - b.options.zp && b.options.zp.call(b, a), - b.zoom(b.rh, b.th, 1 == b.scale ? b.options.QW : 1), - b.options.yp && setTimeout(function() { - b.options.yp.call(b, a) - }, 200); - else if (this.options.Mx) { - for (e = c.target; 1 != e.nodeType; ) - e = e.parentNode; - f = e.tagName.toLowerCase(); - "select" != f && "input" != f && "textarea" != f ? (f = te.createEvent("MouseEvents"), - f.initMouseEvent("click", q, q, a.view, 1, c.screenX, c.screenY, c.clientX, c.clientY, a.ctrlKey, a.altKey, a.shiftKey, a.metaKey, 0, s), - f.XR = q, - e.dispatchEvent(f)) : e.focus() - } - b.lo(400) - } - b.options.GN && b.options.GN.call(b, a) - } - } - }, - lo: function(a) { - var b = 0 <= this.x ? 0 : this.x < this.he ? this.he : this.x - , c = this.y >= this.sf || 0 < this.qd ? this.sf : this.y < this.qd ? this.qd : this.y; - if (b == this.x && c == this.y) { - if (this.oh && (this.oh = t, - this.options.oy && this.options.oy.call(this)), - this.ii && this.options.Qx && ("webkit" == we && (this.gM.style[Ie] = "300ms"), - this.gM.style.opacity = "0"), - this.xi && this.options.Qx) - "webkit" == we && (this.jP.style[Ie] = "300ms"), - this.jP.style.opacity = "0" - } else - this.scrollTo(b, c, a || 0) - }, - eV: function(a) { - var b = this, c, e; - if ("wheelDeltaX"in a) - c = a.wheelDeltaX / 12, - e = a.wheelDeltaY / 12; - else if ("wheelDelta"in a) - c = e = a.wheelDelta / 12; - else if ("detail"in a) - c = e = 3 * -a.detail; - else - return; - if ("zoom" == b.options.qP) { - if (e = b.scale * Math.pow(2, 1 / 3 * (e ? e / Math.abs(e) : 0)), - e < b.options.$k && (e = b.options.$k), - e > b.options.aq && (e = b.options.aq), - e != b.scale) - !b.cz && b.options.zp && b.options.zp.call(b, a), - b.cz++, - b.zoom(a.pageX, a.pageY, e, 400), - setTimeout(function() { - b.cz--; - !b.cz && b.options.yp && b.options.yp.call(b, a) - }, 400) - } else - c = b.x + c, - e = b.y + e, - 0 < c ? c = 0 : c < b.he && (c = b.he), - e > b.sf ? e = b.sf : e < b.qd && (e = b.qd), - 0 > b.qd && b.scrollTo(c, e, 0) - }, - $U: function(a) { - a.target == this.Nb && (this.$d(Ue), - this.MB()) - }, - MB: function() { - var a = this, b = a.x, c = a.y, e = Date.now(), f, g, i; - a.Yl || (a.yj.length ? (f = a.yj.shift(), - f.x == b && f.y == c && (f.time = 0), - a.Yl = q, - a.oh = q, - a.options.wi) ? (a.FJ(f.time), - a.Ar(f.x, f.y), - a.Yl = t, - f.time ? a.ba(Ue) : a.lo(0)) : (i = function() { - var k = Date.now(), m; - if (k >= e + f.time) { - a.Ar(f.x, f.y); - a.Yl = t; - a.options.zZ && a.options.zZ.call(a); - a.MB() - } else { - k = (k - e) / f.time - 1; - g = ue.sqrt(1 - k * k); - k = (f.x - b) * g + b; - m = (f.y - c) * g + c; - a.Ar(k, m); - if (a.Yl) - a.fC = Ve(i) - } - } - , - i()) : a.lo(400)) - }, - FJ: function(a) { - a += "ms"; - this.Nb.style[Fe] = a; - this.ii && (this.xY.style[Fe] = a); - this.xi && (this.K0.style[Fe] = a) - }, - BI: function(a, b, c, e, f) { - var b = ue.abs(a) / b - , g = b * b / 0.0012; - 0 < a && g > c ? (c += f / (6 / (6.0E-4 * (g / b))), - b = b * c / g, - g = c) : 0 > a && g > e && (e += f / (6 / (6.0E-4 * (g / b))), - b = b * e / g, - g = e); - return { - Ba: g * (0 > a ? -1 : 1), - time: ue.round(b / 6.0E-4) - } - }, - Zj: function(a) { - for (var b = -a.offsetLeft, c = -a.offsetTop; a = a.offsetParent; ) - b -= a.offsetLeft, - c -= a.offsetTop; - a != this.zn && (b *= this.scale, - c *= this.scale); - return { - left: b, - top: c - } - }, - vJ: function(a, b) { - var c, e, f; - f = this.We.length - 1; - c = 0; - for (e = this.We.length; c < e; c++) - if (a >= this.We[c]) { - f = c; - break - } - f == this.HC && (0 < f && 0 > this.QC) && f--; - a = this.We[f]; - e = (e = ue.abs(a - this.We[this.HC])) ? 500 * (ue.abs(this.x - a) / e) : 0; - this.HC = f; - f = this.wf.length - 1; - for (c = 0; c < f; c++) - if (b >= this.wf[c]) { - f = c; - break - } - f == this.IC && (0 < f && 0 > this.RC) && f--; - b = this.wf[f]; - c = (c = ue.abs(b - this.wf[this.IC])) ? 500 * (ue.abs(this.y - b) / c) : 0; - this.IC = f; - f = ue.round(ue.max(e, c)) || 200; - return { - x: a, - y: b, - time: f - } - }, - ba: function(a, b, c) { - (b || this.Nb).addEventListener(a, this, !!c) - }, - $d: function(a, b, c) { - (b || this.Nb).removeEventListener(a, this, !!c) - }, - NC: ga(2), - refresh: function() { - var a, b, c, e = 0; - b = 0; - this.scale < this.options.$k && (this.scale = this.options.$k); - this.Cu = this.zn.clientWidth || 1; - this.An = this.zn.clientHeight || 1; - this.sf = -this.options.n0 || 0; - this.Ky = ue.round(this.Nb.offsetWidth * this.scale); - this.Ip = ue.round((this.Nb.offsetHeight + this.sf) * this.scale); - this.he = this.Cu - this.Ky; - this.qd = this.An - this.Ip + this.sf; - this.RC = this.QC = 0; - this.options.CN && this.options.CN.call(this); - this.kp = this.options.kp && 0 > this.he; - this.xn = this.options.xn && (!this.options.LV && !this.kp || this.Ip > this.An); - this.ii = this.kp && this.options.ii; - this.xi = this.xn && this.options.xi && this.Ip > this.An; - a = this.Zj(this.zn); - this.iG = -a.left; - this.jG = -a.top; - if ("string" == typeof this.options.iu) { - this.We = []; - this.wf = []; - c = this.Nb.querySelectorAll(this.options.iu); - a = 0; - for (b = c.length; a < b; a++) - e = this.Zj(c[a]), - e.left += this.iG, - e.top += this.jG, - this.We[a] = e.left < this.he ? this.he : e.left * this.scale, - this.wf[a] = e.top < this.qd ? this.qd : e.top * this.scale - } else if (this.options.iu) { - for (this.We = []; e >= this.he; ) - this.We[b] = e, - e -= this.Cu, - b++; - this.he % this.Cu && (this.We[this.We.length] = this.he - this.We[this.We.length - 1] + this.We[this.We.length - 1]); - b = e = 0; - for (this.wf = []; e >= this.qd; ) - this.wf[b] = e, - e -= this.An, - b++; - this.qd % this.An && (this.wf[this.wf.length] = this.qd - this.wf[this.wf.length - 1] + this.wf[this.wf.length - 1]) - } - this.Sv("h"); - this.Sv("v"); - this.al || (this.Nb.style[Fe] = "0", - this.lo(400)) - }, - scrollTo: function(a, b, c, e) { - var f = a; - this.stop(); - f.length || (f = [{ - x: a, - y: b, - time: c, - TZ: e - }]); - a = 0; - for (b = f.length; a < b; a++) - f[a].TZ && (f[a].x = this.x - f[a].x, - f[a].y = this.y - f[a].y), - this.yj.push({ - x: f[a].x, - y: f[a].y, - time: f[a].time || 0 - }); - this.MB() - }, - disable: function() { - this.stop(); - this.lo(0); - this.enabled = t; - this.$d(Re, window); - this.$d(Se, window); - this.$d(Te, window) - }, - enable: function() { - this.enabled = q - }, - stop: function() { - this.options.wi ? this.$d(Ue) : We(this.fC); - this.yj = []; - this.Yl = this.oh = t - }, - zoom: function(a, b, c, e) { - var f = c / this.scale; - this.options.Yk && (this.al = q, - e = e === l ? 200 : e, - a = a - this.iG - this.x, - b = b - this.jG - this.y, - this.x = a - a * f + this.x, - this.y = b - b * f + this.y, - this.scale = c, - this.refresh(), - this.x = 0 < this.x ? 0 : this.x < this.he ? this.he : this.x, - this.y = this.y > this.sf ? this.sf : this.y < this.qd ? this.qd : this.y, - this.Nb.style[Fe] = e + "ms", - this.Nb.style[De] = "translate(" + this.x + "px," + this.y + "px) scale(" + c + ")" + Xe, - this.al = t) - } - }; - function Ce(a) { - if ("" === we) - return a; - a = a.charAt(0).toUpperCase() + a.substr(1); - return we + a - } - ve = s; - function Ze(a) { - this.j = { - anchor: Yb, - offset: new O(0,0), - maxWidth: "100%", - imageHeight: 80 - }; - var a = a || {}, b; - for (b in a) - this.j[b] = a[b]; - this.Ll = new ec(s,{ - of: "api" - }); - this.bk = []; - this.P = s; - this.ig = { - height: this.j.imageHeight, - width: this.j.imageHeight * $e - }; - this.Rc = this.BB = this.bm = this.Zc = s - } - var af = [0, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 5, 6, 6, 7, 8, 8, 8, 9, 10] - , bf = "\u5176\u4ed6 \u6b63\u95e8 \u623f\u578b \u8bbe\u65bd \u6b63\u95e8 \u9910\u996e\u8bbe\u65bd \u5176\u4ed6\u8bbe\u65bd \u6b63\u95e8 \u8bbe\u65bd \u89c2\u5f71\u5385 \u5176\u4ed6\u8bbe\u65bd".split(" "); - B.Tm(function(a) { - var b = s; - a.addEventListener("position_changed", function() { - a.j.visible && a.j.albumsControl === q && (b ? b.Ey(a.Xb()) : (b = new Ze(a.j.albumsControlOptions), - b.na(a))) - }); - a.addEventListener("albums_visible_changed", function() { - a.j.albumsControl === q ? (b ? b.Ey(a.Xb()) : (b = new Ze(a.j.albumsControlOptions), - b.na(a)), - b.show()) : b.U() - }); - a.addEventListener("albums_options_changed", function() { - b && b.Qk(a.j.albumsControlOptions) - }); - a.addEventListener("visible_changed", function() { - b && (a.kE() ? a.j.albumsControl === q && (b.C.style.visibility = "visible") : b.C.style.visibility = "hidden") - }) - }); - var $e = 1.8; - H() && ($e = 1); - z.extend(Ze.prototype, { - Qk: function(a) { - for (var b in a) - this.j[b] = a[b]; - a = this.j.imageHeight + "px"; - this.uc(this.j.anchor); - this.C.style.width = isNaN(Number(this.j.maxWidth)) === q ? this.j.maxWidth : this.j.maxWidth + "px"; - this.C.style.height = a; - this.gk.style.height = a; - this.Rh.style.height = a; - this.ig = { - height: this.j.imageHeight, - width: this.j.imageHeight * $e - }; - this.fk.style.height = this.ig.height - 6 + "px"; - this.fk.style.width = this.ig.width - 6 + "px"; - this.Ey(this.P.Xb(), q) - }, - na: function(a) { - this.P = a; - this.ls(); - this.yQ(); - this.OY(); - this.Ey(a.Xb()) - }, - ls: function() { - var a = this.j.imageHeight + "px"; - this.C = L("div"); - var b = this.C.style; - b.cssText = "background:rgb(37,37,37);background:rgba(37,37,37,0.9);"; - b.position = "absolute"; - b.zIndex = "2000"; - b.width = isNaN(Number(this.j.maxWidth)) === q ? this.j.maxWidth : this.j.maxWidth + "px"; - b.padding = "8px 0"; - b.visibility = "hidden"; - b.height = a; - this.gk = L("div"); - b = this.gk.style; - b.position = "absolute"; - b.overflow = "hidden"; - b.width = "100%"; - b.height = a; - this.Rh = L("div"); - b = this.Rh.style; - b.height = a; - this.gk.appendChild(this.Rh); - this.C.appendChild(this.gk); - this.P.C.appendChild(this.C); - this.fk = L("div", { - "class": "pano_photo_item_seleted" - }); - this.fk.style.height = this.ig.height - 6 + "px"; - this.fk.style.width = this.ig.width - 6 + "px"; - this.uc(this.j.anchor) - }, - RH: function(a) { - for (var b = this.bk, c = b.length - 1; 0 <= c; c--) - if (b[c].panoId == a) - return c; - return -1 - }, - Ey: function(a, b) { - if (b || !this.bk[this.Zc] || !(this.bk[this.Zc].panoId == a && 3 !== this.bk[this.Zc].recoType)) { - var c = this - , e = this.RH(a); - !b && -1 !== e && this.bk[e] && 3 !== this.bk[e].recoType ? this.Mp(e) : this.dY(function(a) { - for (var b = {}, e, k, m = t, n = [], o = 0, p = a.length; o < p; o++) - e = a[o].catlog, - k = a[o].floor, - l !== e && ("" === e && l !== k ? (m = q, - b[k] || (b[k] = []), - b[k].push(a[o])) : (b[af[e]] || (b[af[e]] = []), - b[af[e]].push(a[o]))); - for (var v in b) - m ? n.push({ - data: v + "F", - index: v - }) : n.push({ - data: bf[v], - index: v - }); - c.jH = b; - c.Ji = n; - c.Il(a); - 0 == a.length ? c.U() : c.show() - }) - } - }, - vW: function() { - if (!this.Gi) { - var a = this.SX(this.Ji) - , b = L("div"); - b.style.cssText = ["width:" + 134 * this.Ji.length + "px;", "overflow:hidden;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;"].join(""); - b.innerHTML = a; - a = L("div"); - a.appendChild(b); - a.style.cssText = "position:absolute;top:-25px;background:rgb(37,37,37);background:rgba(37,37,37,0.9);border-bottom:1px solid #4e596a;width:100%;line-height:25px;height:25px;overflow:scroll;outline:0"; - new Ye(a,{ - Go: t, - iy: q, - ii: t, - xi: t, - xn: t, - OE: q, - Pw: q, - Mx: q - }); - this.C.appendChild(a); - for (var c = this, e = b.getElementsByTagName("span"), f = 0, g = e.length; f < g; f++) - b = e[f], - z.M(b, "click", function() { - if (this.getAttribute("dataindex")) { - c.Il(c.jH[this.getAttribute("dataindex")]); - for (var a = 0, b = e.length; a < b; a++) - e[a].style.color = "#FFFFFF"; - this.style.color = "#3383FF" - } - }); - this.Gi = a - } - }, - sW: function() { - if (this.Gi) - a = this.AL(this.Ji), - this.OQ.innerHTML = a; - else { - var a = this.AL(this.Ji) - , b = L("ul") - , c = this; - b.style.cssText = "list-style: none;padding:0px;margin:0px;display:block;width:60px;position:absolute;top:7px"; - b.innerHTML = a; - z.M(b, "click", function(a) { - if (a = (a.srcElement || a.target).getAttribute("dataindex")) { - c.Il(c.jH[a]); - for (var e = b.getElementsByTagName("li"), f = 0, g = e.length; f < g; f++) - e[f].childNodes[0].getAttribute("dataindex") === a ? z.D.Ua(e[f], "pano_catlogLiActive") : z.D.Pb(e[f], "pano_catlogLiActive") - } - }); - var a = L("div") - , e = L("a") - , f = L("span") - , g = L("a") - , i = L("span") - , k = ["background:url(" + G.qa + "panorama/catlog_icon.png) no-repeat;", "display:block;width:10px;height:7px;margin:0 auto;"].join(""); - f.style.cssText = k + "background-position:-18px 0;"; - e.style.cssText = "background:#1C1C1C;display:block;position:absolute;width:58px;"; - i.style.cssText = k + "background-position:0 0;"; - g.style.cssText = "background:#1C1C1C;display:block;position:absolute;width:58px;"; - g.style.top = this.j.imageHeight - 7 + "px"; - a.style.cssText = "position:absolute;top:0px;left:0px;width:60px;"; - e.appendChild(f); - g.appendChild(i); - z.M(e, "mouseover", function() { - var a = parseInt(b.style.top, 10); - 7 !== a && (f.style.backgroundPosition = "-27px 0"); - new tb({ - Ic: 60, - kc: ub.Ks, - duration: 300, - va: function(c) { - b.style.top = a + (7 - a) * c + "px" - } - }) - }); - z.M(e, "mouseout", function() { - f.style.backgroundPosition = "-18px 0" - }); - z.M(g, "mouseover", function() { - var a = parseInt(b.style.top, 10) - , e = c.j.imageHeight - 14; - if (!(parseInt(b.offsetHeight, 10) < e)) { - var f = e - parseInt(b.offsetHeight, 10) + 7; - f !== a && (i.style.backgroundPosition = "-9px 0"); - new tb({ - Ic: 60, - kc: ub.Ks, - duration: 300, - va: function(c) { - b.style.top = a + (f - a) * c + "px" - } - }) - } - }); - z.M(g, "mouseout", function() { - i.style.backgroundPosition = "0 0" - }); - a.appendChild(e); - a.appendChild(g); - e = L("div"); - e.style.cssText = ["position:absolute;z-index:2001;left:20px;", "height:" + this.j.imageHeight + "px;", "width:62px;overflow:hidden;background:rgb(37,37,37);background:rgba(37,37,37,0.9);"].join(""); - e.appendChild(b); - e.appendChild(a); - this.Gi = e; - this.OQ = b; - this.C.appendChild(e) - } - }, - tW: function() { - if (this.Ji && !(0 >= this.Ji.length)) { - var a = L("div"); - a.innerHTML = this.hA; - a.style.cssText = "position:absolute;background:#252525"; - this.C.appendChild(a); - this.Os = a; - this.Rc.jg.style.left = this.ig.width + 8 + "px"; - this.Gi && (this.Gi.style.left = parseInt(this.Gi.style.left, 10) + this.ig.width + 8 + "px"); - var b = this; - z.M(a, "click", function() { - b.P.vc(b.gX) - }) - } - }, - Il: function(a) { - this.bk = a; - this.j.showCatalog && (0 < this.Ji.length ? (Ua() ? this.sW() : this.vW(), - this.Rc.offsetLeft = 60) : (this.Os && (this.C.removeChild(this.Os), - this.Os = s, - this.Rc.jg.style.left = "0px"), - this.Gi && (this.C.removeChild(this.Gi), - this.Gi = s), - this.Rc.offsetLeft = 0)); - var b = this.LX(a); - Ua() && (this.Ji && 0 < this.Ji.length && this.j.showExit && this.hA) && (this.Rc.offsetLeft += this.ig.width + 8, - this.Os ? this.Os.innerHTML = this.hA : this.tW()); - this.Rh.innerHTML = b; - this.Rh.style.width = (this.ig.width + 8) * a.length + 8 + "px"; - a = this.C.offsetWidth; - b = this.Rh.offsetWidth; - this.Rc.Vs && (b += this.Rc.Vs()); - b < a - 2 * this.Rc.Ai - this.Rc.offsetLeft ? this.C.style.width = b + this.Rc.offsetLeft + "px" : (this.C.style.width = isNaN(Number(this.j.maxWidth)) === q ? this.j.maxWidth : this.j.maxWidth + "px", - b < this.C.offsetWidth - 2 * this.Rc.Ai - this.Rc.offsetLeft && (this.C.style.width = b + this.Rc.offsetLeft + "px")); - this.Rc.refresh(); - this.BB = this.Rh.children; - this.Rh.appendChild(this.fk); - this.fk.style.left = "-100000px"; - a = this.RH(this.P.Xb(), this.Y1); - -1 !== a && this.Mp(a) - }, - SX: function(a) { - for (var b = "", c, e = 0, f = a.length; e < f; e++) - c = '
    ' + a[e].data + "
    ", - b += c; - return b - }, - AL: function(a) { - for (var b = "", c, e = 0, f = a.length; e < f; e++) - c = '
  • ' + a[e].data + "
  • ", - b += c; - return b - }, - LX: function(a) { - for (var b, c, e, f, g = [], i = this.ig.height, k = this.ig.width, m = 0; m < a.length; m++) - b = a[m], - recoType = b.recoType, - e = b.panoId, - f = b.name, - c = b.heading, - b = b.pitch, - c = qe.PL(e, c, b, 198, 108), - b = '' + f + '' + f + "", - 3 === recoType ? Ua() ? (this.hA = b, - this.gX = e, - a.splice(m, 1), - m--) : (b = '' + f + '
    ', - g.push(b)) : g.push(b); - return g.join("") - }, - dY: function(a) { - var b = this - , c = this.P.Xb(); - c && this.Ll.Kx(c, function(e) { - b.P.Xb() === c && a(e) - }) - }, - uc: function(a) { - if (!Wa(a) || isNaN(a) || a < Wb || 3 < a) - a = this.defaultAnchor; - var b = this.C - , c = this.j.offset.width - , e = this.j.offset.height; - b.style.left = b.style.top = b.style.right = b.style.bottom = "auto"; - switch (a) { - case Wb: - b.style.top = e + "px"; - b.style.left = c + "px"; - break; - case Xb: - b.style.top = e + "px"; - b.style.right = c + "px"; - break; - case Yb: - b.style.bottom = e + "px"; - b.style.left = c + "px"; - break; - case 3: - b.style.bottom = e + "px", - b.style.right = c + "px" - } - }, - yQ: function() { - this.wQ() - }, - wQ: function() { - var a = this; - z.M(this.C, "touchstart", function(a) { - a.stopPropagation() - }); - z.M(this.gk, "click", function(b) { - if ((b = (b.srcElement || b.target).getAttribute("data-index")) && b != a.Zc) - a.Mp(b), - a.P.vc(a.bk[b].panoId) - }); - z.M(this.Rh, "mouseover", function(b) { - b = (b.srcElement || b.target).getAttribute("data-index"); - b !== s && a.BK(b, q) - }); - this.P.addEventListener("size_changed", function() { - isNaN(Number(a.j.maxWidth)) && a.Qk({ - maxWidth: a.j.maxWidth - }) - }) - }, - Mp: function(a) { - this.fk.style.left = this.BB[a].offsetLeft + 8 + "px"; - this.fk.setAttribute("data-index", this.BB[a].getAttribute("data-index")); - this.Zc = a; - this.BK(a) - }, - BK: function(a, b) { - var c = this.ig.width + 8 - , e = 0; - this.Rc.Vs && (e = this.Rc.Vs() / 2); - var f = this.gk.offsetWidth - 2 * e - , g = this.Rh.offsetLeft || this.Rc.x - , g = g - e - , i = -a * c; - i > g && this.Rc.scrollTo(i + e); - c = i - c; - g -= f; - c < g && (!b || b && 8 < i - g) && this.Rc.scrollTo(c + f + e) - }, - OY: function() { - this.Rc = H() ? new Ye(this.gk,{ - Go: t, - iy: q, - ii: t, - xi: t, - xn: t, - OE: q, - Pw: q, - Mx: q - }) : new cf(this.gk) - }, - U: function() { - this.C.style.visibility = "hidden" - }, - show: function() { - this.C.style.visibility = "visible" - } - }); - function cf(a) { - this.C = a; - this.Vg = a.children[0]; - this.Pr = s; - this.Ai = 20; - this.offsetLeft = 0; - this.na() - } - cf.prototype = { - na: function() { - this.Vg.style.position = "relative"; - this.refresh(); - this.ls(); - this.$l() - }, - refresh: function() { - this.ho = this.C.offsetWidth - this.Vs(); - this.aB = -(this.Vg.offsetWidth - this.ho - this.Ai); - this.Ev = this.Ai + this.offsetLeft; - this.Vg.style.left = this.Ev + "px"; - this.Vg.children[0] && (this.Pr = this.Vg.children[0].offsetWidth); - this.jg && (this.jg.children[0].style.marginTop = this.Hr.children[0].style.marginTop = this.jg.offsetHeight / 2 - this.jg.children[0].offsetHeight / 2 + "px") - }, - Vs: function() { - return 2 * this.Ai - }, - ls: function() { - this.Tv = L("div"); - this.Tv.innerHTML = ''; - this.jg = this.Tv.children[0]; - this.Hr = this.Tv.children[1]; - this.C.appendChild(this.Tv); - this.jg.children[0].style.marginTop = this.Hr.children[0].style.marginTop = this.jg.offsetHeight / 2 - this.jg.children[0].offsetHeight / 2 + "px" - }, - $l: function() { - var a = this; - z.M(this.jg, "click", function() { - a.scrollTo(a.Vg.offsetLeft + a.ho) - }); - z.M(this.Hr, "click", function() { - a.scrollTo(a.Vg.offsetLeft - a.ho) - }) - }, - aV: function() { - z.D.Pb(this.jg, "pano_arrow_disable"); - z.D.Pb(this.Hr, "pano_arrow_disable"); - var a = this.Vg.offsetLeft; - a >= this.Ev && z.D.Ua(this.jg, "pano_arrow_disable"); - a - this.ho <= this.aB && z.D.Ua(this.Hr, "pano_arrow_disable") - }, - scrollTo: function(a) { - a = a < this.Vg.offsetLeft ? Math.ceil((a - this.Ai - this.ho) / this.Pr) * this.Pr + this.ho + this.Ai - 8 : Math.ceil((a - this.Ai) / this.Pr) * this.Pr + this.Ai; - a < this.aB ? a = this.aB : a > this.Ev && (a = this.Ev); - var b = this.Vg.offsetLeft - , c = this; - new tb({ - Ic: 60, - kc: ub.Ks, - duration: 300, - va: function(e) { - c.Vg.style.left = b + (a - b) * e + "px" - }, - finish: function() { - c.aV() - } - }) - } - }; - B.Map = Ka; - B.Hotspot = ib; - B.MapType = id; - B.Point = J; - B.Pixel = Q; - B.Size = O; - B.Bounds = fb; - B.TileLayer = Mc; - B.Projection = jc; - B.MercatorProjection = S; - B.PerspectiveProjection = hb; - B.Copyright = function(a, b, c) { - this.id = a; - this.bb = b; - this.content = c - } - ; - B.Overlay = mc; - B.Label = uc; - B.GroundOverlay = vc; - B.PointCollection = zc; - B.Marker = U; - B.CanvasLayer = Cc; - B.Icon = qc; - B.IconSequence = sc; - B.Symbol = rc; - B.Polyline = Gc; - B.Polygon = Fc; - B.InfoWindow = tc; - B.Circle = Hc; - B.Control = Vb; - B.NavigationControl = jb; - B.GeolocationControl = Zb; - B.OverviewMapControl = lb; - B.CopyrightControl = $b; - B.ScaleControl = kb; - B.MapTypeControl = mb; - B.CityListControl = ac; - B.PanoramaControl = cc; - B.TrafficLayer = Vc; - B.CustomLayer = nb; - B.ContextMenu = fc; - B.MenuItem = ic; - B.LocalSearch = cb; - B.TransitRoute = Kd; - B.DrivingRoute = Nd; - B.WalkingRoute = Od; - B.RidingRoute = Pd; - B.Autocomplete = Zd; - B.RouteSearch = Td; - B.Geocoder = Ud; - B.LocalCity = Wd; - B.Geolocation = Geolocation; - B.Convertor = lc; - B.BusLineSearch = Yd; - B.Boundary = Xd; - B.VectorCloudLayer = Tc; - B.VectorTrafficLayer = Uc; - B.Panorama = Oa; - B.PanoramaLabel = ee; - B.PanoramaService = ec; - B.PanoramaCoverageLayer = dc; - B.PanoramaFlashInterface = oe; - function T(a, b) { - for (var c in b) - a[c] = b[c] - } - T(window, { - BMap: B, - _jsload2: function(a, b) { - ia.Wy.ZY && ia.Wy.set(a, b); - K.WV(a, b) - }, - BMAP_API_VERSION: "2.0" - }); - var X = Ka.prototype; - T(X, { - getBounds: X.ve, - getCenter: X.Ka, - getMapType: X.oa, - getSize: X.cb, - setSize: X.Ce, - getViewport: X.ht, - getZoom: X.fa, - centerAndZoom: X.Fd, - panTo: X.qi, - panBy: X.Ag, - setCenter: X.Zf, - setCurrentCity: X.DF, - setMapType: X.Dg, - setViewport: X.yh, - setZoom: X.Qc, - highResolutionEnabled: X.Sx, - zoomTo: X.Gg, - zoomIn: X.kG, - zoomOut: X.lG, - addHotspot: X.Cw, - removeHotspot: X.VZ, - clearHotspots: X.dm, - checkResize: X.ZV, - addControl: X.Aw, - removeControl: X.VN, - getContainer: X.La, - addContextMenu: X.yo, - removeContextMenu: X.Cp, - addOverlay: X.Ga, - removeOverlay: X.Qb, - clearOverlays: X.yK, - openInfoWindow: X.pc, - closeInfoWindow: X.Yc, - pointToOverlayPixel: X.Xe, - overlayPixelToPoint: X.JN, - getInfoWindow: X.hh, - getOverlays: X.Hx, - getPanes: function() { - return { - floatPane: this.Yd.BD, - markerMouseTarget: this.Yd.RE, - floatShadow: this.Yd.sL, - labelPane: this.Yd.KE, - markerPane: this.Yd.fN, - markerShadow: this.Yd.gN, - mapPane: this.Yd.Et, - vertexPane: this.Yd.nP - } - }, - addTileLayer: X.Oe, - removeTileLayer: X.Yf, - pixelToPoint: X.xb, - pointToPixel: X.$b, - setFeatureStyle: X.Lp, - selectBaseElement: X.j5, - setMapStyle: X.Zt, - enable3DBuilding: X.Ro, - disable3DBuilding: X.KW, - getPanorama: X.tm, - initIndoorLayer: X.PY, - setNormalMapDisplay: X.D_ - }); - var df = id.prototype; - T(df, { - getTileLayer: df.oY, - getMinZoom: df.bp, - getMaxZoom: df.sm, - getProjection: df.wm, - getTextColor: df.zm, - getTips: df.gt - }); - T(window, { - BMAP_NORMAL_MAP: La, - BMAP_PERSPECTIVE_MAP: Qa, - BMAP_SATELLITE_MAP: Ya, - BMAP_HYBRID_MAP: Sa - }); - var ef = S.prototype; - T(ef, { - lngLatToPoint: ef.kh, - pointToLngLat: ef.xj - }); - var ff = hb.prototype; - T(ff, { - lngLatToPoint: ff.kh, - pointToLngLat: ff.xj - }); - var gf = fb.prototype; - T(gf, { - equals: gf.pb, - containsPoint: gf.js, - containsBounds: gf.kW, - intersects: gf.ot, - extend: gf.extend, - getCenter: gf.Ka, - isEmpty: gf.tj, - getSouthWest: gf.Ve, - getNorthEast: gf.Rf, - toSpan: gf.YF - }); - var hf = mc.prototype; - T(hf, { - isVisible: hf.jh, - show: hf.show, - hide: hf.U - }); - mc.getZIndex = mc.Ck; - var jf = gb.prototype; - T(jf, { - openInfoWindow: jf.pc, - closeInfoWindow: jf.Yc, - enableMassClear: jf.gj, - disableMassClear: jf.MW, - show: jf.show, - hide: jf.U, - getMap: jf.Dx, - addContextMenu: jf.yo, - removeContextMenu: jf.Cp - }); - var kf = U.prototype; - T(kf, { - setIcon: kf.Rb, - getIcon: kf.ap, - setPosition: kf.sa, - getPosition: kf.ga, - setOffset: kf.Ze, - getOffset: kf.Sf, - getLabel: kf.VD, - setLabel: kf.dn, - setTitle: kf.Ec, - setTop: kf.ui, - enableDragging: kf.Wb, - disableDragging: kf.TC, - setZIndex: kf.Sp, - getMap: kf.Dx, - setAnimation: kf.bn, - setShadow: kf.Oy, - hide: kf.U, - setRotation: kf.Op, - getRotation: kf.TL - }); - T(window, { - BMAP_ANIMATION_DROP: 1, - BMAP_ANIMATION_BOUNCE: 2 - }); - var lf = uc.prototype; - T(lf, { - setStyle: lf.Md, - setStyles: lf.ti, - setContent: lf.dd, - setPosition: lf.sa, - getPosition: lf.ga, - setOffset: lf.Ze, - getOffset: lf.Sf, - setTitle: lf.Ec, - setZIndex: lf.Sp, - getMap: lf.Dx, - getContent: lf.xk - }); - var mf = qc.prototype; - T(mf, { - setImageUrl: mf.mO, - setSize: mf.Ce, - setAnchor: mf.uc, - setImageOffset: mf.Yt, - setImageSize: mf.w_, - setInfoWindowAnchor: mf.z_, - setPrintImageUrl: mf.K_ - }); - var nf = tc.prototype; - T(nf, { - redraw: nf.je, - setTitle: nf.Ec, - setContent: nf.dd, - getContent: nf.xk, - getPosition: nf.ga, - enableMaximize: nf.dh, - disableMaximize: nf.kx, - isOpen: nf.Xa, - setMaxContent: nf.$t, - maximize: nf.hy, - enableAutoPan: nf.Ls - }); - var of = oc.prototype; - T(of, { - getPath: of.Ue, - setPath: of.ke, - setPositionAt: of.gn, - getStrokeColor: of.jY, - setStrokeWeight: of.Rp, - getStrokeWeight: of.WL, - setStrokeOpacity: of.Pp, - getStrokeOpacity: of.kY, - setFillOpacity: of.Xt, - getFillOpacity: of.HX, - setStrokeStyle: of.Qp, - getStrokeStyle: of.VL, - getFillColor: of.GX, - getBounds: of.ve, - enableEditing: of.mf, - disableEditing: of.LW, - getEditing: of.DX - }); - var pf = Hc.prototype; - T(pf, { - setCenter: pf.Zf, - getCenter: pf.Ka, - getRadius: pf.RL, - setRadius: pf.xf - }); - var qf = Fc.prototype; - T(qf, { - getPath: qf.Ue, - setPath: qf.ke, - setPositionAt: qf.gn - }); - var rf = ib.prototype; - T(rf, { - getPosition: rf.ga, - setPosition: rf.sa, - getText: rf.eE, - setText: rf.cu - }); - J.prototype.equals = J.prototype.pb; - Q.prototype.equals = Q.prototype.pb; - O.prototype.equals = O.prototype.pb; - T(window, { - BMAP_ANCHOR_TOP_LEFT: Wb, - BMAP_ANCHOR_TOP_RIGHT: Xb, - BMAP_ANCHOR_BOTTOM_LEFT: Yb, - BMAP_ANCHOR_BOTTOM_RIGHT: 3 - }); - var sf = Vb.prototype; - T(sf, { - setAnchor: sf.uc, - getAnchor: sf.HD, - setOffset: sf.Ze, - getOffset: sf.Sf, - show: sf.show, - hide: sf.U, - isVisible: sf.jh, - toString: sf.toString - }); - var tf = jb.prototype; - T(tf, { - getType: tf.ip, - setType: tf.hn - }); - T(window, { - BMAP_NAVIGATION_CONTROL_LARGE: 0, - BMAP_NAVIGATION_CONTROL_SMALL: 1, - BMAP_NAVIGATION_CONTROL_PAN: 2, - BMAP_NAVIGATION_CONTROL_ZOOM: 3 - }); - var uf = lb.prototype; - T(uf, { - changeView: uf.se, - setSize: uf.Ce, - getSize: uf.cb - }); - var vf = kb.prototype; - T(vf, { - getUnit: vf.sY, - setUnit: vf.LF - }); - T(window, { - BMAP_UNIT_METRIC: "metric", - BMAP_UNIT_IMPERIAL: "us" - }); - var wf = $b.prototype; - T(wf, { - addCopyright: wf.Bw, - removeCopyright: wf.qF, - getCopyright: wf.pm, - getCopyrightCollection: wf.PD - }); - T(window, { - BMAP_MAPTYPE_CONTROL_HORIZONTAL: bc, - BMAP_MAPTYPE_CONTROL_DROPDOWN: 1, - BMAP_MAPTYPE_CONTROL_MAP: 2 - }); - var xf = Mc.prototype; - T(xf, { - getMapType: xf.oa, - getCopyright: xf.pm, - isTransparentPng: xf.zt - }); - var yf = fc.prototype; - T(yf, { - addItem: yf.Dw, - addSeparator: yf.bC, - removeSeparator: yf.sF - }); - var zf = ic.prototype; - T(zf, { - setText: zf.cu - }); - var Af = W.prototype; - T(Af, { - getStatus: Af.xm, - setSearchCompleteCallback: Af.JF, - getPageCapacity: Af.qf, - setPageCapacity: Af.Np, - setLocation: Af.fn, - disableFirstResultSelection: Af.UC, - enableFirstResultSelection: Af.oD, - gotoPage: Af.Am, - searchNearby: Af.Jp, - searchInBounds: Af.an, - search: Af.search - }); - T(window, { - BMAP_STATUS_SUCCESS: 0, - BMAP_STATUS_CITY_LIST: 1, - BMAP_STATUS_UNKNOWN_LOCATION: sd, - BMAP_STATUS_UNKNOWN_ROUTE: 3, - BMAP_STATUS_INVALID_KEY: 4, - BMAP_STATUS_INVALID_REQUEST: 5, - BMAP_STATUS_PERMISSION_DENIED: td, - BMAP_STATUS_SERVICE_UNAVAILABLE: 7, - BMAP_STATUS_TIMEOUT: ud - }); - T(window, { - BMAP_POI_TYPE_NORMAL: 0, - BMAP_POI_TYPE_BUSSTOP: 1, - BMAP_POI_TYPE_BUSLINE: 2, - BMAP_POI_TYPE_SUBSTOP: 3, - BMAP_POI_TYPE_SUBLINE: 4 - }); - T(window, { - BMAP_TRANSIT_POLICY_RECOMMEND: 0, - BMAP_TRANSIT_POLICY_LEAST_TIME: 4, - BMAP_TRANSIT_POLICY_LEAST_TRANSFER: 1, - BMAP_TRANSIT_POLICY_LEAST_WALKING: 2, - BMAP_TRANSIT_POLICY_AVOID_SUBWAYS: 3, - BMAP_TRANSIT_POLICY_FIRST_SUBWAYS: 5, - BMAP_LINE_TYPE_BUS: 0, - BMAP_LINE_TYPE_SUBWAY: 1, - BMAP_LINE_TYPE_FERRY: 2, - BMAP_LINE_TYPE_TRAIN: 3, - BMAP_LINE_TYPE_AIRPLANE: 4, - BMAP_LINE_TYPE_COACH: 5 - }); - T(window, { - BMAP_TRANSIT_TYPE_POLICY_TRAIN: 0, - BMAP_TRANSIT_TYPE_POLICY_AIRPLANE: 1, - BMAP_TRANSIT_TYPE_POLICY_COACH: 2 - }); - T(window, { - BMAP_INTERCITY_POLICY_LEAST_TIME: 0, - BMAP_INTERCITY_POLICY_EARLY_START: 1, - BMAP_INTERCITY_POLICY_CHEAP_PRICE: 2 - }); - T(window, { - BMAP_TRANSIT_TYPE_IN_CITY: 0, - BMAP_TRANSIT_TYPE_CROSS_CITY: 1 - }); - T(window, { - BMAP_TRANSIT_PLAN_TYPE_ROUTE: 0, - BMAP_TRANSIT_PLAN_TYPE_LINE: 1 - }); - var Bf = Jd.prototype; - T(Bf, { - clearResults: Bf.Pe - }); - Ld = Kd.prototype; - T(Ld, { - setPolicy: Ld.bu, - toString: Ld.toString, - setPageCapacity: Ld.Np, - setIntercityPolicy: Ld.oO, - setTransitTypePolicy: Ld.xO - }); - T(window, { - BMAP_DRIVING_POLICY_DEFAULT: 0, - BMAP_DRIVING_POLICY_AVOID_HIGHWAYS: 3, - BMAP_DRIVING_POLICY_AVOID_CONGESTION: 5, - BMAP_DRIVING_POLICY_FIRST_HIGHWAYS: 4 - }); - T(window, { - BMAP_MODE_DRIVING: "driving", - BMAP_MODE_TRANSIT: "transit", - BMAP_MODE_WALKING: "walking", - BMAP_MODE_NAVIGATION: "navigation" - }); - var Cf = Td.prototype; - T(Cf, { - routeCall: Cf.gO - }); - T(window, { - BMAP_HIGHLIGHT_STEP: 1, - BMAP_HIGHLIGHT_ROUTE: 2 - }); - T(window, { - BMAP_ROUTE_TYPE_DRIVING: wd, - BMAP_ROUTE_TYPE_WALKING: vd, - BMAP_ROUTE_TYPE_RIDING: xd - }); - T(window, { - BMAP_ROUTE_STATUS_NORMAL: yd, - BMAP_ROUTE_STATUS_EMPTY: 1, - BMAP_ROUTE_STATUS_ADDRESS: 2 - }); - var Df = Nd.prototype; - T(Df, { - setPolicy: Df.bu - }); - var Ef = Zd.prototype; - T(Ef, { - show: Ef.show, - hide: Ef.U, - setTypes: Ef.KF, - setLocation: Ef.fn, - search: Ef.search, - setInputValue: Ef.Ly - }); - T(nb.prototype, {}); - var Ff = Xd.prototype; - T(Ff, { - get: Ff.get - }); - T(dc.prototype, {}); - T(db.prototype, {}); - T(window, { - BMAP_POINT_DENSITY_HIGH: 200, - BMAP_POINT_DENSITY_MEDIUM: Yc, - BMAP_POINT_DENSITY_LOW: 50 - }); - T(window, { - BMAP_POINT_SHAPE_STAR: 1, - BMAP_POINT_SHAPE_WATERDROP: 2, - BMAP_POINT_SHAPE_CIRCLE: wc, - BMAP_POINT_SHAPE_SQUARE: 4, - BMAP_POINT_SHAPE_RHOMBUS: 5 - }); - T(window, { - BMAP_POINT_SIZE_TINY: 1, - BMAP_POINT_SIZE_SMALLER: 2, - BMAP_POINT_SIZE_SMALL: 3, - BMAP_POINT_SIZE_NORMAL: xc, - BMAP_POINT_SIZE_BIG: 5, - BMAP_POINT_SIZE_BIGGER: 6, - BMAP_POINT_SIZE_HUGE: 7 - }); - T(window, { - BMap_Symbol_SHAPE_CAMERA: 11, - BMap_Symbol_SHAPE_WARNING: 12, - BMap_Symbol_SHAPE_SMILE: 13, - BMap_Symbol_SHAPE_CLOCK: 14, - BMap_Symbol_SHAPE_POINT: 9, - BMap_Symbol_SHAPE_PLANE: 10, - BMap_Symbol_SHAPE_CIRCLE: 1, - BMap_Symbol_SHAPE_RECTANGLE: 2, - BMap_Symbol_SHAPE_RHOMBUS: 3, - BMap_Symbol_SHAPE_STAR: 4, - BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW: 5, - BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW: 6, - BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW: 7, - BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW: 8 - }); - T(window, { - BMAP_CONTEXT_MENU_ICON_ZOOMIN: gc, - BMAP_CONTEXT_MENU_ICON_ZOOMOUT: hc - }); - T(window, { - BMAP_SYS_DRAWER: Ja, - BMAP_SVG_DRAWER: 1, - BMAP_VML_DRAWER: 2, - BMAP_CANVAS_DRAWER: 3, - BMAP_SVG_DRAWER_FIRST: 4 - }); - B.vV(); - B.Q0(); -} -)() diff --git a/static/BMap/js/map_city.js b/static/BMap/js/map_city.js deleted file mode 100644 index 97cc86d..0000000 --- a/static/BMap/js/map_city.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 离线地图城市坐标 - * 文本文件必须以UTF-8编码存储,建议用Notepad++编辑 - * 格式:城市名称 经度 纬度 - */ -var offlinemap_cities = [ - ['北京', 116.427265, 39.918698] - ,['上海', 121.472724, 31.239761] - ,['武汉', 114.28398, 30.601327] - ,['成都', 104.070606, 30.59138] - ,['广州', 113.270404, 23.159763] - ,['重庆', 106.595635, 29.619598] -]; - - -/* 城市数据映射 - * - */ -var offlinemap_cityobj = new Object(); -for(var i=0; i - - - diff --git a/static/BMap/images/well-heat.svg b/static/BMap/images/well-heat.svg deleted file mode 100644 index baee123..0000000 --- a/static/BMap/images/well-heat.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-power.svg b/static/BMap/images/well-power.svg deleted file mode 100644 index e731bcd..0000000 --- a/static/BMap/images/well-power.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-rain.svg b/static/BMap/images/well-rain.svg deleted file mode 100644 index f2ef906..0000000 --- a/static/BMap/images/well-rain.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-sewage.svg b/static/BMap/images/well-sewage.svg deleted file mode 100644 index a9a1662..0000000 --- a/static/BMap/images/well-sewage.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/js/apiv1.3.min.js b/static/BMap/js/apiv1.3.min.js deleted file mode 100644 index 63c0ac1..0000000 --- a/static/BMap/js/apiv1.3.min.js +++ /dev/null @@ -1,6424 +0,0 @@ -window.BMAP_AUTHENTIC_KEY = ""; -(function() { - var b2, a8 = b2 = a8 || { - version : "1.3.4" - }; - a8.guid = "$BAIDU$"; - window[a8.guid] = window[a8.guid] || {}; - a8.object = a8.object || {}; - a8.extend = a8.object.extend = function(cM, T) { - for ( var cL in T) { - if (T.hasOwnProperty(cL)) { - cM[cL] = T[cL] - } - } - return cM - }; - a8.dom = a8.dom || {}; - a8.dom.g = function(T) { - if ("string" == typeof T || T instanceof String) { - return document.getElementById(T) - } else { - if (T && T.nodeName && (T.nodeType == 1 || T.nodeType == 9)) { - return T - } - } - return null - }; - a8.g = a8.G = a8.dom.g; - a8.dom.hide = function(T) { - T = a8.dom.g(T); - T.style.display = "none"; - return T - }; - a8.hide = a8.dom.hide; - a8.lang = a8.lang || {}; - a8.lang.isString = function(T) { - return "[object String]" == Object.prototype.toString.call(T) - }; - a8.isString = a8.lang.isString; - a8.dom._g = function(T) { - if (a8.lang.isString(T)) { - return document.getElementById(T) - } - return T - }; - a8._g = a8.dom._g; - a8.dom.contains = function(T, cL) { - var cM = a8.dom._g; - T = cM(T); - cL = cM(cL); - return T.contains ? T != cL && T.contains(cL) : !!(T - .compareDocumentPosition(cL) & 16) - }; - a8.browser = a8.browser || {}; - if (/msie (\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.ie = a8.ie = document.documentMode || +RegExp["\x241"] - } - a8.dom._NAME_ATTRS = (function() { - var T = { - cellpadding : "cellPadding", - cellspacing : "cellSpacing", - colspan : "colSpan", - rowspan : "rowSpan", - valign : "vAlign", - usemap : "useMap", - frameborder : "frameBorder" - }; - if (a8.browser.ie < 8) { - T["for"] = "htmlFor"; - T["class"] = "className" - } else { - T.htmlFor = "for"; - T.className = "class" - } - return T - })(); - a8.dom.setAttr = function(cL, T, cM) { - cL = a8.dom.g(cL); - if ("style" == T) { - cL.style.cssText = cM - } else { - T = a8.dom._NAME_ATTRS[T] || T; - cL.setAttribute(T, cM) - } - return cL - }; - a8.setAttr = a8.dom.setAttr; - a8.dom.setAttrs = function(cM, T) { - cM = a8.dom.g(cM); - for ( var cL in T) { - a8.dom.setAttr(cM, cL, T[cL]) - } - return cM - }; - a8.setAttrs = a8.dom.setAttrs; - a8.string = a8.string || {}; - (function() { - var T = new RegExp( - "(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+\x24)", "g"); - a8.string.trim = function(cL) { - return String(cL).replace(T, "") - } - })(); - a8.trim = a8.string.trim; - a8.string.format = function(cM, T) { - cM = String(cM); - var cL = Array.prototype.slice.call(arguments, 1), cN = Object.prototype.toString; - if (cL.length) { - cL = cL.length == 1 ? (T !== null - && (/\[object Array\]|\[object Object\]/.test(cN.call(T))) ? T - : cL) - : cL; - return cM.replace(/#\{(.+?)\}/g, function(cO, cQ) { - var cP = cL[cQ]; - if ("[object Function]" == cN.call(cP)) { - cP = cP(cQ) - } - return ("undefined" == typeof cP ? "" : cP) - }) - } - return cM - }; - a8.format = a8.string.format; - a8.dom.removeClass = function(cP, cQ) { - cP = a8.dom.g(cP); - var cN = cP.className.split(/\s+/), cR = cQ.split(/\s+/), cL, T = cR.length, cM, cO = 0; - for (; cO < T; ++cO) { - for (cM = 0, cL = cN.length; cM < cL; ++cM) { - if (cN[cM] == cR[cO]) { - cN.splice(cM, 1); - break - } - } - } - cP.className = cN.join(" "); - return cP - }; - a8.removeClass = a8.dom.removeClass; - a8.dom.insertHTML = function(cN, T, cM) { - cN = a8.dom.g(cN); - var cL, cO; - if (cN.insertAdjacentHTML) { - cN.insertAdjacentHTML(T, cM) - } else { - cL = cN.ownerDocument.createRange(); - T = T.toUpperCase(); - if (T == "AFTERBEGIN" || T == "BEFOREEND") { - cL.selectNodeContents(cN); - cL.collapse(T == "AFTERBEGIN") - } else { - cO = T == "BEFOREBEGIN"; - cL[cO ? "setStartBefore" : "setEndAfter"](cN); - cL.collapse(cO) - } - cL.insertNode(cL.createContextualFragment(cM)) - } - return cN - }; - a8.insertHTML = a8.dom.insertHTML; - a8.dom.show = function(T) { - T = a8.dom.g(T); - T.style.display = ""; - return T - }; - a8.show = a8.dom.show; - a8.dom.getDocument = function(T) { - T = a8.dom.g(T); - return T.nodeType == 9 ? T : T.ownerDocument || T.document - }; - a8.dom.addClass = function(cP, cQ) { - cP = a8.dom.g(cP); - var cL = cQ.split(/\s+/), T = cP.className, cO = " " + T + " ", cN = 0, cM = cL.length; - for (; cN < cM; cN++) { - if (cO.indexOf(" " + cL[cN] + " ") < 0) { - T += " " + cL[cN] - } - } - cP.className = T; - return cP - }; - a8.addClass = a8.dom.addClass; - a8.dom._styleFixer = a8.dom._styleFixer || {}; - a8.dom._styleFilter = a8.dom._styleFilter || []; - a8.dom._styleFilter.filter = function(cL, cO, cP) { - for ( var T = 0, cN = a8.dom._styleFilter, cM; cM = cN[T]; T++) { - if (cM = cM[cP]) { - cO = cM(cL, cO) - } - } - return cO - }; - a8.string.toCamelCase = function(T) { - if (T.indexOf("-") < 0 && T.indexOf("_") < 0) { - return T - } - return T.replace(/[-_][^-_]/g, function(cL) { - return cL.charAt(1).toUpperCase() - }) - }; - a8.dom.getStyle = function(cM, cL) { - var cP = a8.dom; - cM = cP.g(cM); - cL = a8.string.toCamelCase(cL); - var cO = cM.style[cL]; - if (!cO) { - var T = cP._styleFixer[cL], cN = cM.currentStyle - || (a8.browser.ie ? cM.style : getComputedStyle(cM, null)); - cO = T && T.get ? T.get(cM, cN) : cN[T || cL] - } - if (T = cP._styleFilter) { - cO = T.filter(cL, cO, "get") - } - return cO - }; - a8.getStyle = a8.dom.getStyle; - if (/opera\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.opera = +RegExp["\x241"] - } - a8.browser.isWebkit = /webkit/i.test(navigator.userAgent); - a8.browser.isGecko = /gecko/i.test(navigator.userAgent) - && !/like gecko/i.test(navigator.userAgent); - a8.browser.isStrict = document.compatMode == "CSS1Compat"; - a8.dom.getPosition = function(T) { - T = a8.dom.g(T); - var cT = a8.dom.getDocument(T), cN = a8.browser, cQ = a8.dom.getStyle, cM = cN.isGecko > 0 - && cT.getBoxObjectFor - && cQ(T, "position") == "absolute" - && (T.style.top === "" || T.style.left === ""), cR = { - left : 0, - top : 0 - }, cP = (cN.ie && !cN.isStrict) ? cT.body : cT.documentElement, cU, cL; - if (T == cP) { - return cR - } - if (T.getBoundingClientRect) { - cL = T.getBoundingClientRect(); - cR.left = Math.floor(cL.left) - + Math.max(cT.documentElement.scrollLeft, - cT.body.scrollLeft); - cR.top = Math.floor(cL.top) - + Math.max(cT.documentElement.scrollTop, cT.body.scrollTop); - cR.left -= cT.documentElement.clientLeft; - cR.top -= cT.documentElement.clientTop; - var cS = cT.body, cV = parseInt(cQ(cS, "borderLeftWidth")), cO = parseInt(cQ( - cS, "borderTopWidth")); - if (cN.ie && !cN.isStrict) { - cR.left -= isNaN(cV) ? 2 : cV; - cR.top -= isNaN(cO) ? 2 : cO - } - } else { - cU = T; - do { - cR.left += cU.offsetLeft; - cR.top += cU.offsetTop; - if (cN.isWebkit > 0 && cQ(cU, "position") == "fixed") { - cR.left += cT.body.scrollLeft; - cR.top += cT.body.scrollTop; - break - } - cU = cU.offsetParent - } while (cU && cU != T); - if (cN.opera > 0 - || (cN.isWebkit > 0 && cQ(T, "position") == "absolute")) { - cR.top -= cT.body.offsetTop - } - cU = T.offsetParent; - while (cU && cU != cT.body) { - cR.left -= cU.scrollLeft; - if (!cN.opera || cU.tagName != "TR") { - cR.top -= cU.scrollTop - } - cU = cU.offsetParent - } - } - return cR - }; - if (/firefox\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.firefox = +RegExp["\x241"] - } - (function() { - var T = navigator.userAgent; - if (/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(T) - && !/chrome/i.test(T)) { - a8.browser.safari = +(RegExp["\x241"] || RegExp["\x242"]) - } - })(); - if (/chrome\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.chrome = +RegExp["\x241"] - } - a8.array = a8.array || {}; - a8.array.each = function(cP, cN) { - var cM, cO, cL, T = cP.length; - if ("function" == typeof cN) { - for (cL = 0; cL < T; cL++) { - cO = cP[cL]; - cM = cN.call(cP, cO, cL); - if (cM === false) { - break - } - } - } - return cP - }; - a8.each = a8.array.each; - a8.lang.guid = function() { - return "TANGRAM__" + (window[a8.guid]._counter++).toString(36) - }; - window[a8.guid]._counter = window[a8.guid]._counter || 1; - window[a8.guid]._instances = window[a8.guid]._instances || {}; - a8.lang.isFunction = function(T) { - return "[object Function]" == Object.prototype.toString.call(T) - }; - a8.lang.Class = function(T) { - this.guid = T || a8.lang.guid(); - window[a8.guid]._instances[this.guid] = this - }; - window[a8.guid]._instances = window[a8.guid]._instances || {}; - a8.lang.Class.prototype.dispose = function() { - delete window[a8.guid]._instances[this.guid]; - for ( var T in this) { - if (!a8.lang.isFunction(this[T])) { - delete this[T] - } - } - this.disposed = true - }; - a8.lang.Class.prototype.toString = function() { - return "[object " + (this._className || "Object") + "]" - }; - a8.lang.Event = function(T, cL) { - this.type = T; - this.returnValue = true; - this.target = cL || null; - this.currentTarget = null - }; - a8.lang.Class.prototype.addEventListener = function(cN, cM, cL) { - if (!a8.lang.isFunction(cM)) { - return - } - !this.__listeners && (this.__listeners = {}); - var T = this.__listeners, cO; - if (typeof cL == "string" && cL) { - if (/[^\w\-]/.test(cL)) { - throw ("nonstandard key:" + cL) - } else { - cM.hashCode = cL; - cO = cL - } - } - cN.indexOf("on") != 0 && (cN = "on" + cN); - typeof T[cN] != "object" && (T[cN] = {}); - cO = cO || a8.lang.guid(); - cM.hashCode = cO; - T[cN][cO] = cM - }; - a8.lang.Class.prototype.removeEventListener = function(cM, cL) { - if (a8.lang.isFunction(cL)) { - cL = cL.hashCode - } else { - if (!a8.lang.isString(cL)) { - return - } - } - !this.__listeners && (this.__listeners = {}); - cM.indexOf("on") != 0 && (cM = "on" + cM); - var T = this.__listeners; - if (!T[cM]) { - return - } - T[cM][cL] && delete T[cM][cL] - }; - a8.lang.Class.prototype.dispatchEvent = function(cN, T) { - if (a8.lang.isString(cN)) { - cN = new a8.lang.Event(cN) - } - !this.__listeners && (this.__listeners = {}); - T = T || {}; - for ( var cM in T) { - cN[cM] = T[cM] - } - var cM, cL = this.__listeners, cO = cN.type; - cN.target = cN.target || this; - cN.currentTarget = this; - cO.indexOf("on") != 0 && (cO = "on" + cO); - a8.lang.isFunction(this[cO]) && this[cO].apply(this, arguments); - if (typeof cL[cO] == "object") { - for (cM in cL[cO]) { - cL[cO][cM].apply(this, arguments) - } - } - return cN.returnValue - }; - a8.lang.inherits = function(cQ, cO, cN) { - var cM, cP, T = cQ.prototype, cL = new Function(); - cL.prototype = cO.prototype; - cP = cQ.prototype = new cL(); - for (cM in T) { - cP[cM] = T[cM] - } - cQ.prototype.constructor = cQ; - cQ.superClass = cO.prototype; - if ("string" == typeof cN) { - cP._className = cN - } - }; - a8.inherits = a8.lang.inherits; - a8.lang.instance = function(T) { - return window[a8.guid]._instances[T] || null - }; - a8.platform = a8.platform || {}; - a8.platform.isMacintosh = /macintosh/i.test(navigator.userAgent); - a8.platform.isWindows = /windows/i.test(navigator.userAgent); - a8.platform.isX11 = /x11/i.test(navigator.userAgent); - a8.platform.isAndroid = /android/i.test(navigator.userAgent); - a8.platform.isIpad = /ipad/i.test(navigator.userAgent); - a8.platform.isIphone = /iphone/i.test(navigator.userAgent); - a8.lang.Event.prototype.inherit = function(cM) { - var cL = this; - this.domEvent = cM = window.event || cM; - cL.clientX = cM.clientX || cM.pageX; - cL.clientY = cM.clientY || cM.pageY; - cL.offsetX = cM.offsetX || cM.layerX; - cL.offsetY = cM.offsetY || cM.layerY; - cL.screenX = cM.screenX; - cL.screenY = cM.screenY; - cL.ctrlKey = cM.ctrlKey || cM.metaKey; - cL.shiftKey = cM.shiftKey; - cL.altKey = cM.altKey; - if (cM.touches) { - cL.touches = []; - for ( var T = 0; T < cM.touches.length; T++) { - cL.touches.push( { - clientX : cM.touches[T].clientX, - clientY : cM.touches[T].clientY, - screenX : cM.touches[T].screenX, - screenY : cM.touches[T].screenY, - pageX : cM.touches[T].pageX, - pageY : cM.touches[T].pageY, - target : cM.touches[T].target, - identifier : cM.touches[T].identifier - }) - } - } - if (cM.changedTouches) { - cL.changedTouches = []; - for ( var T = 0; T < cM.changedTouches.length; T++) { - cL.changedTouches.push( { - clientX : cM.changedTouches[T].clientX, - clientY : cM.changedTouches[T].clientY, - screenX : cM.changedTouches[T].screenX, - screenY : cM.changedTouches[T].screenY, - pageX : cM.changedTouches[T].pageX, - pageY : cM.changedTouches[T].pageY, - target : cM.changedTouches[T].target, - identifier : cM.changedTouches[T].identifier - }) - } - } - if (cM.targetTouches) { - cL.targetTouches = []; - for ( var T = 0; T < cM.targetTouches.length; T++) { - cL.targetTouches.push( { - clientX : cM.targetTouches[T].clientX, - clientY : cM.targetTouches[T].clientY, - screenX : cM.targetTouches[T].screenX, - screenY : cM.targetTouches[T].screenY, - pageX : cM.targetTouches[T].pageX, - pageY : cM.targetTouches[T].pageY, - target : cM.targetTouches[T].target, - identifier : cM.targetTouches[T].identifier - }) - } - } - cL.rotation = cM.rotation; - cL.scale = cM.scale; - return cL - }; - a8.lang.decontrol = function(cL) { - var T = window[a8.guid]; - T._instances && (delete T._instances[cL]) - }; - a8.event = {}; - a8.on = a8.event.on = function(cM, cL, T) { - if (!(cM = a8.g(cM))) { - return cM - } - cL = cL.replace(/^on/, ""); - if (cM.addEventListener) { - cM.addEventListener(cL, T, false) - } else { - if (cM.attachEvent) { - cM.attachEvent("on" + cL, T) - } - } - return cM - }; - a8.un = a8.event.un = function(cM, cL, T) { - if (!(cM = a8.g(cM))) { - return cM - } - cL = cL.replace(/^on/, ""); - if (cM.removeEventListener) { - cM.removeEventListener(cL, T, false) - } else { - if (cM.detachEvent) { - cM.detachEvent("on" + cL, T) - } - } - return cM - }; - a8.dom.hasClass = function(cM, cL) { - if (!cM || !cM.className || typeof cM.className != "string") { - return false - } - var T = -1; - try { - T = cM.className == cL - || cM.className.search(new RegExp("(\\s|^)" + cL - + "(\\s|$)")) - } catch (cN) { - return false - } - return T > -1 - }; - window.BMap = window.BMap || {}; - window.BMap.version = "1.3"; - window.BMap._register = []; - window.BMap.register = function(T) { - this._register.push(T) - }; - window.BMap.apiLoad = window.BMap.apiLoad || function() { - }; - var bJ = window.BMAP_AUTHENTIC_KEY; - window.BMAP_AUTHENTIC_KEY = null; - function bz(cN, cP) { - cN = a8.g(cN); - if (!cN) { - return - } - var cO = this; - a8.lang.Class.call(cO); - cO.config = { - clickInterval : 200, - enableDragging : true, - enableKeyboard : false, - enableDblclickZoom : true, - enableContinuousZoom : false, - enableWheelZoom : false, - enableMouseDown : true, - enablePinchToZoom : true, - enableAutoResize : true, - fps : 25, - zoomerDuration : 240, - actionDuration : 450, - defaultCursor : cc.defaultCursor, - draggingCursor : cc.draggingCursor, - isOverviewMap : false, - minZoom : 1, - maxZoom : 18, - mapType : BMAP_NORMAL_MAP, - restrictBounds : false, - drawer : BMAP_SYS_DRAWER, - enableInertialDragging : false, - drawMargin : 500, - enableHighResolution : false - }; - a8.extend(cO.config, cP || {}); - if (cO.highResolutionEnabled()) { - var cR = document.querySelector("meta[name=viewport]"); - cR.content = "initial-scale=0.5, minimum-scale=0.5, maximum-scale=0.5, user-scalable=no, target-densitydpi=high-dpi" - } - cO.container = cN; - cO._setStyle(cN); - cN.unselectable = "on"; - cN.innerHTML = ""; - cN.appendChild(cO.render()); - var cL = cO.getSize(); - cO.width = cL.width; - cO.height = cL.height; - cO.offsetX = 0; - cO.offsetY = 0; - cO.platform = cN.firstChild; - cO.maskLayer = cO.platform.firstChild; - cO.maskLayer.style.width = cO.width + "px"; - cO.maskLayer.style.height = cO.height + "px"; - cO._panes = {}; - cO.centerPoint = new cd(0, 0); - cO.mercatorCenter = new cd(0, 0); - cO.zoomLevel = 1; - cO.lastLevel = 0; - cO.defaultZoomLevel = null; - cO.defaultCenter = null; - cO.currentCity = ""; - cO.cityCode = ""; - cO._hotspots = {}; - cO.currentOperation = 0; - cP = cP || {}; - var cQ = cO.mapType = cO.config.mapType; - cO.projection = cQ.getProjection(); - if (cQ === BMAP_PERSPECTIVE_MAP) { - _addStat(5002) - } - if (cQ === BMAP_SATELLITE_MAP || cQ === BMAP_HYBRID_MAP) { - _addStat(5003) - } - var T = cO.config; - T.userMinZoom = cP.minZoom; - T.userMaxZoom = cP.maxZoom; - cO._checkZoom(); - cO.temp = { - operating : false, - arrow : 0, - lastDomMoveTime : 0, - lastLoadTileTime : 0, - lastMovingTime : 0, - canKeyboard : false, - registerIndex : -1, - curSpots : [] - }; - cO.platform.style.cursor = cO.config.defaultCursor; - for ( var cM = 0; cM < BMap._register.length; cM++) { - BMap._register[cM](cO) - } - cO.temp.registerIndex = cM; - cO._bind(); - cA.load("map", function() { - cO._draw() - }); - if (bO()) { - cA.load("oppc", function() { - cO._asyncRegister() - }) - } - if (aA()) { - cA.load("opmb", function() { - cO._asyncRegister() - }) - } - cN = null - } - a8.lang.inherits(bz, a8.lang.Class, "Map"); - a8 - .extend( - bz.prototype, - { - render : function() { - var T = aa("div"); - var cN = T.style; - cN.overflow = "visible"; - cN.position = "absolute"; - cN.zIndex = "0"; - cN.top = cN.left = "0px"; - var cL = aa("div", { - "class" : "BMap_mask" - }); - var cM = cL.style; - cM.position = "absolute"; - cM.top = cM.left = "0px"; - cM.zIndex = "9"; - cM.overflow = "hidden"; - cM.WebkitUserSelect = "none"; - T.appendChild(cL); - return T - }, - _setStyle : function(cL) { - var T = cL.style; - T.overflow = "hidden"; - if (aJ(cL).position != "absolute") { - T.position = "relative"; - T.zIndex = 0 - } - T.backgroundColor = "#F3F1EC"; - T.color = "#000"; - T.textAlign = "left" - }, - _bind : function() { - var T = this; - T._watchSize = function() { - var cL = T.getSize(); - if (T.width != cL.width - || T.height != cL.height) { - var cN = new aH(T.width, T.height); - var cO = new bg("onbeforeresize"); - cO.size = cN; - T.dispatchEvent(cO); - T._updateCenterPoint( - (cL.width - T.width) / 2, - (cL.height - T.height) / 2); - T.maskLayer.style.width = (T.width = cL.width) - + "px"; - T.maskLayer.style.height = (T.height = cL.height) - + "px"; - var cM = new bg("onresize"); - cM.size = cL; - T.dispatchEvent(cM) - } - }; - if (T.config.enableAutoResize) { - T.temp.autoResizeTimer = setInterval( - T._watchSize, 80) - } - }, - _updateCenterPoint : function(cN, cL, cR, cQ) { - var cO = this.getMapType().getZoomUnits( - this.getZoom()); - var cS = this.projection; - var cP = true; - if (cR && cd.isInRange(cR)) { - this.centerPoint = new cd(cR.lng, cR.lat); - cP = false - } - var cM = (cR && cQ) ? cS.lngLatToMercator(cR, - this.currentCity) : this.mercatorCenter; - if (cM) { - this.mercatorCenter = new cd(cM.lng + cN * cO, - cM.lat - cL * cO); - var T = cS.mercatorToLngLat( - this.mercatorCenter, this.currentCity); - if (T && cP) { - this.centerPoint = T - } - } - }, - zoomTo : function(cN, cL) { - if (!aK(cN)) { - return - } - cN = this._getProperZoom(cN).zoom; - if (cN == this.zoomLevel) { - return - } - this.lastLevel = this.zoomLevel; - this.zoomLevel = cN; - var cM; - if (cL) { - cM = cL - } else { - if (this.getInfoWindow()) { - cM = this.getInfoWindow().getPosition() - } - } - if (cM) { - var T = this.pointToPixel(cM, this.lastLevel); - this._updateCenterPoint(this.width / 2 - T.x, - this.height / 2 - T.y, - this.pixelToPoint(T, this.lastLevel), - true) - } - this.dispatchEvent(new bg("onzoomstart")); - this.dispatchEvent(new bg("onzoomstartcode")) - }, - setZoom : function(T) { - this.zoomTo(T) - }, - zoomIn : function(T) { - this.zoomTo(this.zoomLevel + 1, T) - }, - zoomOut : function(T) { - this.zoomTo(this.zoomLevel - 1, T) - }, - panTo : function(T, cL) { - if (!(T instanceof cd)) { - return - } - this.mercatorCenter = this.projection - .lngLatToMercator(T, this.currentCity); - if (cd.isInRange(T)) { - this.centerPoint = new cd(T.lng, T.lat) - } else { - this.centerPoint = this.projection - .mercatorToLngLat(this.mercatorCenter, - this.currentCity) - } - }, - panBy : function(cL, T) { - cL = Math.round(cL) || 0; - T = Math.round(T) || 0; - this._updateCenterPoint(-cL, -T) - }, - addControl : function(T) { - if (T && I(T._i)) { - T._i(this); - this.dispatchEvent(new bg("onaddcontrol", T)) - } - }, - removeControl : function(T) { - if (T && I(T.remove)) { - T.remove(); - this - .dispatchEvent(new bg( - "onremovecontrol", T)) - } - }, - addContextMenu : function(T) { - if (T && I(T.initialize)) { - T.initialize(this); - this - .dispatchEvent(new bg( - "onaddcontextmenu", T)) - } - }, - removeContextMenu : function(T) { - if (T && I(T.remove)) { - this.dispatchEvent(new bg( - "onremovecontextmenu", T)); - T.remove() - } - }, - addOverlay : function(T) { - if (T && I(T._i)) { - T._i(this); - this.dispatchEvent(new bg("onaddoverlay", T)) - } - }, - removeOverlay : function(T) { - if (T && I(T.remove)) { - T.remove(); - this - .dispatchEvent(new bg( - "onremoveoverlay", T)) - } - }, - clearOverlays : function() { - this.dispatchEvent(new bg("onclearoverlays")) - }, - addTileLayer : function(T) { - if (T) { - this.dispatchEvent(new bg("onaddtilelayer", T)) - } - }, - removeTileLayer : function(T) { - if (T) { - this.dispatchEvent(new bg("onremovetilelayer", - T)) - } - }, - setMapType : function(cL) { - if (this.mapType === cL) { - return - } - var cM = new bg("onsetmaptype"); - var T = this.mapType; - cM.preMapType = T; - this.mapType = this.config.mapType = cL; - this.projection = this.mapType.getProjection(); - this._updateCenterPoint(0, 0, this.getCenter(), - true); - this._checkZoom(); - var cN = this._getProperZoom(this.getZoom()).zoom; - this.zoomTo(cN); - this.dispatchEvent(cM); - var cM = new bg("onmaptypechange"); - cM.zoomLevel = cN; - cM.mapType = cL; - this.dispatchEvent(cM); - if (cL === BMAP_SATELLITE_MAP - || cL === BMAP_HYBRID_MAP) { - _addStat(5003) - } - }, - setCenter : function(T) { - var cM = this; - if (T instanceof cd) { - cM.panTo(T, { - noAnimation : true - }) - } else { - if (b3(T)) { - var cL = this._getLocal(); - cL.setSearchCompleteCallback(function(cN) { - if (cL.getStatus() == 0 - && cL._json.result.type == 2) { - cM.setCenter(cN.getPoi(0).point); - if (BMAP_PERSPECTIVE_MAP - .getCityName(T)) { - cM.setCurrentCity(T) - } - } - }); - cL.search(T) - } - } - }, - centerAndZoom : function(T, cM) { - var cL = this; - if (b3(T)) { - var cP = cL._getLocal(); - cP - .setSearchCompleteCallback(function(cQ) { - if (cP.getStatus() == 0 - && cP._json.result.type == 2) { - var cS = cQ.getPoi(0).point; - var cR = cM - || S - .getBestLevel( - cP._json.content.level, - cL); - cL.centerAndZoom(cS, cR); - if (BMAP_PERSPECTIVE_MAP - .getCityName(T)) { - cL.setCurrentCity(T) - } - } - }); - cP.search(T); - return - } - if (!(T instanceof cd) || !cM) { - return - } - cM = cL._getProperZoom(cM).zoom; - cL.lastLevel = cL.zoomLevel || cM; - cL.zoomLevel = cM; - cL.centerPoint = new cd(T.lng, T.lat); - cL.mercatorCenter = cL.projection.lngLatToMercator( - cL.centerPoint, cL.currentCity); - cL.defaultZoomLevel = cL.defaultZoomLevel - || cL.zoomLevel; - cL.defaultCenter = cL.defaultCenter - || cL.centerPoint; - var cO = new bg("onload"); - var cN = new bg("onloadcode"); - cO.point = new cd(T.lng, T.lat); - cO.pixel = cL.pointToPixel(cL.centerPoint, - cL.zoomLevel); - cO.zoom = cM; - if (!cL.loaded) { - cL.loaded = true; - cL.dispatchEvent(cO) - } - cL.dispatchEvent(cN); - cL.dispatchEvent(new bg("onmoveend")); - if (cL.lastLevel != cL.zoomLevel) { - cL.dispatchEvent(new bg("onzoomend")) - } - }, - _getLocal : function() { - if (!this.temp.local) { - this.temp.local = new a4(1) - } - return this.temp.local - }, - reset : function() { - this.centerAndZoom(this.defaultCenter, - this.defaultZoomLevel, true) - }, - enableDragging : function() { - this.config.enableDragging = true - }, - disableDragging : function() { - this.config.enableDragging = false - }, - enableInertialDragging : function() { - this.config.enableInertialDragging = true - }, - disableInertialDragging : function() { - this.config.enableInertialDragging = false - }, - enableScrollWheelZoom : function() { - this.config.enableWheelZoom = true - }, - disableScrollWheelZoom : function() { - this.config.enableWheelZoom = false - }, - enableContinuousZoom : function() { - this.config.enableContinuousZoom = true - }, - disableContinuousZoom : function() { - this.config.enableContinuousZoom = false - }, - enableDoubleClickZoom : function() { - this.config.enableDblclickZoom = true - }, - disableDoubleClickZoom : function() { - this.config.enableDblclickZoom = false - }, - enableKeyboard : function() { - this.config.enableKeyboard = true - }, - disableKeyboard : function() { - this.config.enableKeyboard = false - }, - enablePinchToZoom : function() { - this.config.enablePinchToZoom = true - }, - disablePinchToZoom : function() { - this.config.enablePinchToZoom = false - }, - enableAutoResize : function() { - this.config.enableAutoResize = true; - this._watchSize(); - if (!this.temp.autoResizeTimer) { - this.temp.autoResizeTimer = setInterval( - this._watchSize, 80) - } - }, - disableAutoResize : function() { - this.config.enableAutoResize = false; - if (this.temp.autoResizeTimer) { - clearInterval(this.temp.autoResizeTimer); - this.temp.autoResizeTimer = null - } - }, - getSize : function() { - return new aH(this.container.clientWidth, - this.container.clientHeight) - }, - getCenter : function() { - return this.centerPoint - }, - getZoom : function() { - return this.zoomLevel - }, - checkResize : function() { - this._watchSize() - }, - _getProperZoom : function(cM) { - var cL = this.config.minZoom, T = this.config.maxZoom, cN = false; - if (cM < cL) { - cN = true; - cM = cL - } - if (cM > T) { - cN = true; - cM = T - } - return { - zoom : cM, - exceeded : cN - } - }, - getContainer : function() { - return this.container - }, - pointToPixel : function(T, cL) { - cL = cL || this.getZoom(); - return this.projection.pointToPixel(T, cL, - this.mercatorCenter, this.getSize(), - this.currentCity) - }, - pixelToPoint : function(T, cL) { - cL = cL || this.getZoom(); - return this.projection.pixelToPoint(T, cL, - this.mercatorCenter, this.getSize(), - this.currentCity) - }, - pointToOverlayPixel : function(T, cM) { - if (!T) { - return - } - var cN = new cd(T.lng, T.lat); - var cL = this.pointToPixel(cN, cM); - cL.x -= this.offsetX; - cL.y -= this.offsetY; - return cL - }, - overlayPixelToPoint : function(T, cM) { - if (!T) { - return - } - var cL = new bu(T.x, T.y); - cL.x += this.offsetX; - cL.y += this.offsetY; - return this.pixelToPoint(cL, cM) - }, - getBounds : function() { - if (!this.isLoaded()) { - return new bN() - } - var cL = arguments[0] || {}, cN = cL.margins - || [ 0, 0, 0, 0 ], T = cL.zoom || null, cO = this - .pixelToPoint( { - x : cN[3], - y : this.height - cN[2] - }, T), cM = this.pixelToPoint( { - x : this.width - cN[1], - y : cN[0] - }, T); - return new bN(cO, cM) - }, - isLoaded : function() { - return !!this.loaded - }, - _getBestLevel : function(cL, cM) { - var cP = this.getMapType(); - var cR = cM.margins || [ 10, 10, 10, 10 ], cO = cM.zoomFactor || 0, cS = cR[1] - + cR[3], cQ = cR[0] + cR[2], T = cP - .getMinZoom(), cU = cP.getMaxZoom(); - for ( var cN = cU; cN >= T; cN--) { - var cT = this.getMapType().getZoomUnits(cN); - if (cL.toSpan().lng / cT < this.width - cS - && cL.toSpan().lat / cT < this.height - - cQ) { - break - } - } - cN += cO; - if (cN < T) { - cN = T - } - if (cN > cU) { - cN = cU - } - return cN - }, - getViewport : function(cT, cL) { - var cX = { - center : this.getCenter(), - zoom : this.getZoom() - }; - if (!cT || !cT instanceof bN && cT.length == 0 - || cT instanceof bN && cT.isEmpty()) { - return cX - } - var cV = []; - if (cT instanceof bN) { - cV.push(cT.getNorthEast()); - cV.push(cT.getSouthWest()) - } else { - cV = cT.slice(0) - } - cL = cL || {}; - var cP = []; - for ( var cQ = 0, cO = cV.length; cQ < cO; cQ++) { - cP.push(this.projection.lngLatToMercator( - cV[cQ], this.currentCity)) - } - var cM = new bN(); - for ( var cQ = cP.length - 1; cQ >= 0; cQ--) { - cM.extend(cP[cQ]) - } - if (cM.isEmpty()) { - return cX - } - var T = cM.getCenter(); - var cW = this._getBestLevel(cM, cL); - if (cL.margins) { - var cS = cL.margins, cR = (cS[1] - cS[3]) / 2, cU = (cS[0] - cS[2]) / 2, cN = this - .getMapType().getZoomUnits(cW); - T.lng = T.lng + cN * cR; - T.lat = T.lat + cN * cU - } - T = this.projection.mercatorToLngLat(T, - this.currentCity); - return { - center : T, - zoom : cW - } - }, - setViewport : function(cL, cO) { - var T; - if (cL && cL.center) { - T = cL - } else { - T = this.getViewport(cL, cO) - } - cO = cO || {}; - var cM = cO.delay || 200; - if (T.zoom == this.zoomLevel - && cO.enableAnimation != false) { - var cN = this; - setTimeout(function() { - cN.panTo(T.center, { - duration : 210 - }) - }, cM) - } else { - this.centerAndZoom(T.center, T.zoom) - } - }, - getPanes : function() { - return this._panes - }, - getInfoWindow : function() { - if (this.temp.infoWin && this.temp.infoWin.isOpen()) { - return this.temp.infoWin - } - return null - }, - getDistance : function(cM, T) { - if (!cM || !T) { - return - } - var cL = 0; - cL = ba.getDistanceByLL(cM, T); - return cL - }, - getOverlays : function() { - var cN = [], cO = this._overlays, cM = this._customOverlays; - if (cO) { - for ( var cL in cO) { - if (cO[cL] instanceof Y) { - cN.push(cO[cL]) - } - } - } - if (cM) { - for ( var cL = 0, T = cM.length; cL < T; cL++) { - cN.push(cM[cL]) - } - } - return cN - }, - getMapType : function() { - return this.mapType - }, - _asyncRegister : function() { - for ( var T = this.temp.registerIndex; T < BMap._register.length; T++) { - BMap._register[T](this) - } - this.temp.registerIndex = T - }, - setCurrentCity : function(T) { - this.currentCity = BMAP_PERSPECTIVE_MAP - .getCityName(T); - this.cityCode = BMAP_PERSPECTIVE_MAP - .getCityCode(this.currentCity) - }, - setDefaultCursor : function(T) { - if (a8.browser.firefox && T.indexOf("url") == 0) { - T = T += ", -moz-grab" - } - this.config.defaultCursor = T; - if (this.platform) { - this.platform.style.cursor = this.config.defaultCursor - } - }, - getDefaultCursor : function() { - return this.config.defaultCursor - }, - setDraggingCursor : function(T) { - if (a8.browser.firefox && T.indexOf("url") == 0) { - T = T += ", -moz-grabbing" - } - this.config.draggingCursor = T - }, - getDraggingCursor : function() { - return this.config.draggingCursor - }, - highResolutionEnabled : function() { - return this.config.enableHighResolution - && window.devicePixelRatio > 1 - }, - addHotspot : function(cL) { - if (cL instanceof cm) { - this._hotspots[cL.guid] = cL; - cL.initialize(this) - } - var T = this; - cA.load("hotspot", function() { - T._asyncRegister() - }) - }, - removeHotspot : function(T) { - if (this._hotspots[T.guid]) { - delete this._hotspots[T.guid] - } - }, - clearHotspots : function() { - this._hotspots = {} - }, - _checkZoom : function() { - var cL = this.mapType.getMinZoom(); - var cM = this.mapType.getMaxZoom(); - var T = this.config; - T.minZoom = T.userMinZoom || cL; - T.maxZoom = T.userMaxZoom || cM; - if (T.minZoom < cL) { - T.minZoom = cL - } - if (T.maxZoom > cM) { - T.maxZoom = cM - } - }, - setMinZoom : function(T) { - if (T > this.config.maxZoom) { - T = this.config.maxZoom - } - this.config.userMinZoom = T; - this._updateZoom() - }, - setMaxZoom : function(T) { - if (T < this.config.minZoom) { - T = this.config.minZoom - } - this.config.userMaxZoom = T; - this._updateZoom() - }, - _updateZoom : function() { - this._checkZoom(); - var T = this.config; - if (this.zoomLevel < T.minZoom) { - this.setZoom(T.minZoom) - } else { - if (this.zoomLevel > T.maxZoom) { - this.setZoom(T.maxZoom) - } - } - var cL = new bg("onzoomspanchange"); - cL.minZoom = T.minZoom; - cL.maxZoom = T.maxZoom; - this.dispatchEvent(cL) - } - }); - window.BMAP_API_VERSION = "1.3"; - window.BMAP_COORD_LNGLAT = 0; - window.BMAP_COORD_MERCATOR = 1; - window.BMAP_SYS_DRAWER = 0; - window.BMAP_SVG_DRAWER = 1; - window.BMAP_VML_DRAWER = 2; - window.BMAP_CANVAS_DRAWER = 3; - window._addStat = function(cP, cO) { - if (!cP) { - return - } - cO = cO || {}; - var cN = ""; - for ( var cL in cO) { - cN = cN + "&" + cL + "=" + encodeURIComponent(cO[cL]) - } - var cQ = function(cR) { - if (!cR) { - return - } - _addStat._sending = true; - setTimeout(function() { - _addStat._img.src = cc.imgPath + "blank.gif?" + cR.src - }, 50) - }; - var T = function() { - var cR = _addStat._reqQueue.shift(); - if (cR) { - cQ(cR) - } - }; - var cM = (Math.random() * 100000000).toFixed(0); - if (_addStat._sending) { - _addStat._reqQueue.push( { - src : "t=" + cM + "&code=" + cP + cN - }) - } else { - cQ( { - src : "t=" + cM + "&code=" + cP + cN - }) - } - if (!_addStat._binded) { - a8.on(_addStat._img, "load", function() { - _addStat._sending = false; - T() - }); - a8.on(_addStat._img, "error", function() { - _addStat._sending = false; - T() - }); - _addStat._binded = true - } - }; - window._addStat._reqQueue = []; - window._addStat._img = new Image(); - _addStat(5000, { - v : BMap.version - }); - function g(cN) { - var T = { - duration : 1000, - fps : 30, - delay : 0, - transition : aw.linear, - onStop : function() { - } - }; - this._anis = []; - if (cN) { - for ( var cL in cN) { - T[cL] = cN[cL] - } - } - this._opts = T; - if (aK(T.delay)) { - var cM = this; - setTimeout(function() { - cM.start() - }, T.delay) - } else { - if (T.delay != g.INFINITE) { - this.start() - } - } - } - g.INFINITE = "INFINITE"; - g.prototype.start = function() { - this._beginTime = aE(); - this._endTime = this._beginTime + this._opts.duration; - this._launch() - }; - g.prototype.add = function(T) { - this._anis.push(T) - }; - g.prototype._launch = function() { - var cM = this; - var T = aE(); - if (T >= cM._endTime) { - if (I(cM._opts.render)) { - cM._opts.render(cM._opts.transition(1)) - } - if (I(cM._opts.finish)) { - cM._opts.finish() - } - if (cM._anis.length > 0) { - var cL = cM._anis[0]; - cL._anis = [].concat(cM._anis.slice(1)); - cL.start() - } - return - } - cM.schedule = cM._opts.transition((T - cM._beginTime) - / cM._opts.duration); - if (I(cM._opts.render)) { - cM._opts.render(cM.schedule) - } - if (!cM.terminative) { - cM._timer = setTimeout(function() { - cM._launch() - }, 1000 / cM._opts.fps) - } - }; - g.prototype.stop = function(cL) { - this.terminative = true; - for ( var T = 0; T < this._anis.length; T++) { - this._anis[T].stop(); - this._anis[T] = null - } - this._anis.length = 0; - if (this._timer) { - clearTimeout(this._timer); - this._timer = null - } - this._opts.onStop(this.schedule); - if (cL) { - this._endTime = this._beginTime; - this._launch() - } - }; - g.prototype.cancel = function() { - if (this._timer) { - clearTimeout(this._timer) - } - this._endTime = this._beginTime; - this.schedule = 0 - }; - g.prototype.setFinishCallback = function(T) { - if (this._anis.length > 0) { - this._anis[this._anis.length - 1]._opts.finish = T - } else { - this._opts.finish = T - } - }; - var aw = { - linear : function(T) { - return T - }, - reverse : function(T) { - return 1 - T - }, - easeInQuad : function(T) { - return T * T - }, - easeInCubic : function(T) { - return Math.pow(T, 3) - }, - easeOutQuad : function(T) { - return -(T * (T - 2)) - }, - easeOutCubic : function(T) { - return Math.pow((T - 1), 3) + 1 - }, - easeInOutQuad : function(T) { - if (T < 0.5) { - return T * T * 2 - } else { - return -2 * (T - 2) * T - 1 - } - return - }, - easeInOutCubic : function(T) { - if (T < 0.5) { - return Math.pow(T, 3) * 4 - } else { - return Math.pow(T - 1, 3) * 4 + 1 - } - }, - easeInOutSine : function(T) { - return (1 - Math.cos(Math.PI * T)) / 2 - } - }; - aw["ease-in"] = aw.easeInQuad; - aw["ease-out"] = aw.easeOutQuad; - var m = !!(window.BMAP_PROTOCOL == "https"); - var x = m ? "https://sapi.map.baidu.com/" : "http://api.map.baidu.com/"; - var cc = { - imgPath : "static/BMap/images/", //******* �Ķ�ͼƬimages·�� ******* - cityNames : { - "\u5317\u4eac" : "bj", - "\u4e0a\u6d77" : "sh", - "\u6df1\u5733" : "sz", - "\u5e7f\u5dde" : "gz" - }, - fontFamily : "arial,sans-serif" - }; - if (a8.browser.firefox) { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur),crosshair", - defaultCursor : "-moz-grab", - draggingCursor : "-moz-grabbing" - }); - if (a8.platform.isWindows) { - cc.fontFamily = "arial,simsun,sans-serif" - } - } else { - if (a8.browser.chrome || a8.browser.safari) { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur) 2 6,crosshair", - defaultCursor : "url(" + cc.imgPath - + "openhand.cur) 8 8,default", - draggingCursor : "url(" + cc.imgPath - + "closedhand.cur) 8 8,move" - }) - } else { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur),crosshair", - defaultCursor : "url(" + cc.imgPath + "openhand.cur),default", - draggingCursor : "url(" + cc.imgPath + "closedhand.cur),move" - }) - } - } - function av(cM, cL, T) { - this.id = cM; - this.bounds = cL; - this.content = T - } - var bn = { - undo : 1, - redo : 2, - zoom : 4, - drag : 8, - move : 16, - mousewheel : 32, - toolbarOperation : 64, - stdMapCtrlDrag : 128, - dblclick : 256 - }; - function bI(cM, T) { - var cL = cM.style; - cL.left = T[0] + "px"; - cL.top = T[1] + "px" - } - function cw(T) { - if (a8.browser.ie > 0) { - T.unselectable = "on" - } else { - T.style.MozUserSelect = "none" - } - } - function y(T) { - return T && T.parentNode && T.parentNode.nodeType != 11 - } - function at(cL, T) { - a8.dom.insertHTML(cL, "beforeEnd", T); - return cL.lastChild - } - function bY(T) { - var cL = { - left : 0, - top : 0 - }; - while (T && T.offsetParent) { - cL.left += T.offsetLeft; - cL.top += T.offsetTop; - T = T.offsetParent - } - return cL - } - function aP(T) { - var T = window.event || T; - T.stopPropagation ? T.stopPropagation() : T.cancelBubble = true - } - function cC(T) { - var T = window.event || T; - T.preventDefault ? T.preventDefault() : T.returnValue = false; - return false - } - function co(T) { - aP(T); - return cC(T) - } - function cG() { - var T = document.documentElement, cL = document.body; - if (T && (T.scrollTop || T.scrollLeft)) { - return [ T.scrollTop, T.scrollLeft ] - } else { - if (cL) { - return [ cL.scrollTop, cL.scrollLeft ] - } else { - return [ 0, 0 ] - } - } - } - function ct(cL, T) { - if (!cL || !T) { - return - } - return Math.round(Math.sqrt(Math.pow(cL.x - T.x, 2) - + Math.pow(cL.y - T.y, 2))) - } - function O(T, cM) { - var cL = []; - cM = cM || function(cO) { - return cO - }; - for ( var cN in T) { - cL.push(cN + "=" + cM(T[cN])) - } - return cL.join("&") - } - function aa(cL, T, cM) { - var cN = document.createElement(cL); - if (cM) { - cN = document.createElementNS(cM, cL) - } - return a8.dom.setAttrs(cN, T || {}) - } - function aJ(T) { - if (T.currentStyle) { - return T.currentStyle - } else { - if (T.ownerDocument && T.ownerDocument.defaultView) { - return T.ownerDocument.defaultView.getComputedStyle(T, null) - } - } - } - function I(T) { - return typeof T == "function" - } - function aK(T) { - return typeof T == "number" - } - function b3(T) { - return typeof T == "string" - } - function ch(T) { - return typeof T != "undefined" - } - function cJ(T) { - return typeof T == "object" - } - function aY(T) { - return "[object Array]" == Object.prototype.toString.call(T) - } - var cf = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - function bV(cN) { - var cL = ""; - var cU, cS, cQ = ""; - var cT, cR, cP, cO = ""; - var cM = 0; - var T = /[^A-Za-z0-9\+\/\=]/g; - if (!cN || T.exec(cN)) { - return cN - } - cN = cN.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - do { - cT = cf.indexOf(cN.charAt(cM++)); - cR = cf.indexOf(cN.charAt(cM++)); - cP = cf.indexOf(cN.charAt(cM++)); - cO = cf.indexOf(cN.charAt(cM++)); - cU = (cT << 2) | (cR >> 4); - cS = ((cR & 15) << 4) | (cP >> 2); - cQ = ((cP & 3) << 6) | cO; - cL = cL + String.fromCharCode(cU); - if (cP != 64) { - cL = cL + String.fromCharCode(cS) - } - if (cO != 64) { - cL = cL + String.fromCharCode(cQ) - } - cU = cS = cQ = ""; - cT = cR = cP = cO = "" - } while (cM < cN.length); - return cL - } - var bg = a8.lang.Event; - function aA() { - return !!(a8.platform.isIphone || a8.platform.isIpad || a8.platform.isAndroid) - } - function bO() { - return !!(a8.platform.isWindows || a8.platform.isMacintosh || a8.platform.isX11) - } - function aE() { - return (new Date).getTime() - } - var cx = { - request : function(cL) { - var T = aa("script", { - src : cL, - type : "text/javascript", - charset : "utf-8" - }); - if (T.addEventListener) { - T.addEventListener("load", function(cN) { - var cM = cN.target; - cM.parentNode.removeChild(cM) - }, false) - } else { - if (T.attachEvent) { - T - .attachEvent( - "onreadystatechange", - function(cN) { - var cM = window.event.srcElement; - if (cM - && (cM.readyState == "loaded" || cM.readyState == "complete")) { - cM.parentNode.removeChild(cM) - } - }) - } - } - setTimeout(function() { - document.getElementsByTagName("head")[0].appendChild(T); - T = null - }, 1) - } - }; - function cA() { - } - a8.object.extend(cA, { - Request : { - INITIAL : -1, - WAITING : 0, - COMPLETED : 1 - }, - Dependency : { - control : [], - marker : [], - poly : [ "marker" ], - infowindow : [ "marker" ], - menu : [], - oppc : [], - opmb : [], - scommon : [], - local : [ "scommon" ], - route : [ "scommon" ], - othersearch : [ "scommon" ], - autocomplete : [ "scommon" ], - buslinesearch : [ "route" ], - hotspot : [] - }, - preLoaded : {}, - Config : { - _baseUrl : "js/", //x + "getmodules?v=1.3", //******* �Ķ���Դ��map,oppc,tile,control��·�� ******* - _timeout : 5000 - }, - delayFlag : false, - Module : { - _modules : {}, - _arrMdls : [] - }, - load : function(cL, cN) { - var T = this.current(cL); - if (T._status == this.Request.COMPLETED) { - return - } else { - if (T._status == this.Request.INITIAL) { - this.combine(cL); - this.pushUniqueMdl(cL); - var cM = this; - if (cM.delayFlag == false) { - cM.delayFlag = true; - window.setTimeout(function() { - var cO = cM.Config._baseUrl + "/modules" //"&mod=" - //+ cM.Module._arrMdls.join(","); - cx.request(cO); - cM.Module._arrMdls.length = 0; - cM.delayFlag = false - }, 1) - } - T._status = this.Request.WAITING - } - T._callbacks.push(cN) - } - }, - combine : function(T) { - if (T && this.Dependency[T]) { - var cM = this.Dependency[T]; - for ( var cL = 0; cL < cM.length; cL++) { - this.combine(cM[cL]); - if (!this.Module._modules[cM[cL]]) { - this.pushUniqueMdl(cM[cL]) - } - } - } - }, - pushUniqueMdl : function(cL) { - for ( var T = 0; T < this.Module._arrMdls.length; T++) { - if (this.Module._arrMdls[T] == cL) { - return - } - } - this.Module._arrMdls.push(cL) - }, - run : function(cM, cO) { - var cL = this.current(cM); - try { - eval(cO) - } catch (cP) { - return - } - cL._status = this.Request.COMPLETED; - for ( var cN = 0, T = cL._callbacks.length; cN < T; cN++) { - cL._callbacks[cN]() - } - cL._callbacks.length = 0 - }, - check : function(cL, cM) { - var T = this; - T.timeout = setTimeout(function() { - var cN = T.Module._modules[cL]._status; - if (cN != T.Request.COMPLETED) { - T.remove(cL); - T.load(cL, cM) - } else { - clearTimeout(T.timeout) - } - }, T.Config._timeout) - }, - current : function(cL) { - var T; - if (!this.Module._modules[cL]) { - this.Module._modules[cL] = {}; - this.Module._modules[cL]._status = this.Request.INITIAL; - this.Module._modules[cL]._callbacks = [] - } - T = this.Module._modules[cL]; - return T - }, - remove : function(cL) { - var T = this.current(cL); - delete T - } - }); - window._jsload = function(T, cL) { - cA.run(T, cL) - }; - function bu(T, cL) { - this.x = T || 0; - this.y = cL || 0 - } - bu.prototype.equals = function(T) { - return T && T.x == this.x && T.y == this.y - }; - function aH(cL, T) { - this.width = cL || 0; - this.height = T || 0 - } - aH.prototype.equals = function(T) { - return T && this.width == T.width && this.height == T.height - }; - function cm(T, cL) { - if (!T) { - return - } - this._position = T; - this.guid = "spot" + (cm.guid++); - cL = cL || {}; - this._text = cL.text || ""; - this._offsets = cL.offsets ? cL.offsets.slice(0) : [ 5, 5, 5, 5 ]; - this._userData = cL.userData || null; - this._minZoom = cL.minZoom || null; - this._maxZoom = cL.maxZoom || null - } - cm.guid = 0; - a8.extend(cm.prototype, { - initialize : function(T) { - if (this._minZoom == null) { - this._minZoom = T.config.minZoom - } - if (this._maxZoom == null) { - this._maxZoom = T.config.maxZoom - } - }, - setPosition : function(T) { - if (T instanceof cd) { - this._position = T - } - }, - getPosition : function() { - return this._position - }, - setText : function(T) { - this._text = T - }, - getText : function() { - return this._text - }, - setUserData : function(T) { - this._userData = T - }, - getUserData : function() { - return this._userData - } - }); - function cp() { - this._map = null; - this._container; - this._type = "control"; - this.blockInfoWindow = true; - this._visible = true - } - a8.lang.inherits(cp, a8.lang.Class, "Control"); - a8 - .extend( - cp.prototype, - { - initialize : function(T) { - this._map = T; - if (this._container) { - T.container.appendChild(this._container); - return this._container - } - return - }, - _i : function(T) { - if (!this._container && this.initialize - && I(this.initialize)) { - this._container = this.initialize(T) - } - this._opts = this._opts || { - printable : false - }; - this._setStyle(); - this._setPosition(); - if (this._container) { - this._container._jsobj = this - } - }, - _setStyle : function() { - var cL = this._container; - if (cL) { - var T = cL.style; - T.position = "absolute"; - T.zIndex = this._cZIndex || "10"; - T.MozUserSelect = "none"; - T.WebkitTextSizeAdjust = "none"; - if (!this._opts.printable) { - a8.dom.addClass(cL, "BMap_noprint") - } - a8.on(cL, "contextmenu", co) - } - }, - remove : function() { - this._map = null; - if (!this._container) { - return - } - this._container.parentNode - && this._container.parentNode - .removeChild(this._container); - this._container._jsobj = null; - this._container = null - }, - _render : function() { - this._container = at(this._map.container, - "
    "); - if (this._visible == false) { - a8.dom.hide(this._container) - } - return this._container - }, - _setPosition : function() { - this.setAnchor(this._opts.anchor) - }, - setAnchor : function(cN) { - if (this.anchorFixed || !aK(cN) || isNaN(cN) - || cN < BMAP_ANCHOR_TOP_LEFT - || cN > BMAP_ANCHOR_BOTTOM_RIGHT) { - cN = this.defaultAnchor - } - this._opts = this._opts || { - printable : false - }; - this._opts.offset = this._opts.offset - || this.defaultOffset; - var cM = this._opts.anchor; - this._opts.anchor = cN; - if (!this._container) { - return - } - var cP = this._container; - var T = this._opts.offset.width; - var cO = this._opts.offset.height; - cP.style.left = cP.style.top = cP.style.right = cP.style.bottom = "auto"; - switch (cN) { - case BMAP_ANCHOR_TOP_LEFT: - cP.style.top = cO + "px"; - cP.style.left = T + "px"; - break; - case BMAP_ANCHOR_TOP_RIGHT: - cP.style.top = cO + "px"; - cP.style.right = T + "px"; - break; - case BMAP_ANCHOR_BOTTOM_LEFT: - cP.style.bottom = cO + "px"; - cP.style.left = T + "px"; - break; - case BMAP_ANCHOR_BOTTOM_RIGHT: - cP.style.bottom = cO + "px"; - cP.style.right = T + "px"; - break; - default: - break - } - var cL = [ "TL", "TR", "BL", "BR" ]; - a8.dom.removeClass(this._container, "anchor" - + cL[cM]); - a8.dom.addClass(this._container, "anchor" + cL[cN]) - }, - getAnchor : function() { - return this._opts.anchor - }, - setOffset : function(T) { - if (!(T instanceof aH)) { - return - } - this._opts = this._opts || { - printable : false - }; - this._opts.offset = new aH(T.width, T.height); - if (!this._container) { - return - } - this.setAnchor(this._opts.anchor) - }, - getOffset : function() { - return this._opts.offset - }, - getDom : function() { - return this._container - }, - show : function() { - if (this._visible == true) { - return - } - this._visible = true; - if (this._container) { - a8.dom.show(this._container) - } - }, - hide : function() { - if (this._visible == false) { - return - } - this._visible = false; - if (this._container) { - a8.dom.hide(this._container) - } - }, - isPrintable : function() { - return !!this._opts.printable - }, - isVisible : function() { - if (!this._container && !this._map) { - return false - } - return !!this._visible - } - }); - window.BMAP_ANCHOR_TOP_LEFT = 0; - window.BMAP_ANCHOR_TOP_RIGHT = 1; - window.BMAP_ANCHOR_BOTTOM_LEFT = 2; - window.BMAP_ANCHOR_BOTTOM_RIGHT = 3; - window.BMAP_NAVIGATION_CONTROL_LARGE = 0; - window.BMAP_NAVIGATION_CONTROL_SMALL = 1; - window.BMAP_NAVIGATION_CONTROL_PAN = 2; - window.BMAP_NAVIGATION_CONTROL_ZOOM = 3; - function L(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false, - showZoomInfo : true - }; - a8.object.extend(this._opts, T); - this.defaultAnchor = BMAP_ANCHOR_TOP_LEFT; - this.defaultOffset = new aH(10, 10); - this.setAnchor(T.anchor); - this.setType(T.type); - this._asyncLoadCode() - } - a8.lang.inherits(L, cp, "NavigationControl"); - a8.extend(L.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setType : function(T) { - if (aK(T) && T >= BMAP_NAVIGATION_CONTROL_LARGE - && T <= BMAP_NAVIGATION_CONTROL_ZOOM) { - this._opts.type = T - } else { - this._opts.type = BMAP_NAVIGATION_CONTROL_LARGE - } - }, - getType : function() { - return this._opts.type - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function am(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - a8.object.extend(this._opts, T); - this._copyrightCollection = []; - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_LEFT; - this.defaultOffset = new aH(5, 2); - this.setAnchor(T.anchor); - this._canShow = true; - this.blockInfoWindow = false; - this._asyncLoadCode() - } - a8.lang.inherits(am, cp, "CopyrightControl"); - a8.object - .extend( - am.prototype, - { - initialize : function(T) { - this._map = T; - return this._container - }, - addCopyright : function(cM) { - if (!cM || !aK(cM.id) || isNaN(cM.id)) { - return - } - var T = { - bounds : null, - content : "" - }; - for ( var cL in cM) { - T[cL] = cM[cL] - } - var cN = this.getCopyright(cM.id); - if (cN) { - for ( var cO in T) { - cN[cO] = T[cO] - } - } else { - this._copyrightCollection.push(T) - } - }, - getCopyright : function(cM) { - for ( var cL = 0, T = this._copyrightCollection.length; cL < T; cL++) { - if (this._copyrightCollection[cL].id == cM) { - return this._copyrightCollection[cL] - } - } - }, - getCopyrightCollection : function() { - return this._copyrightCollection - }, - removeCopyright : function(cM) { - for ( var cL = 0, T = this._copyrightCollection.length; cL < T; cL++) { - if (this._copyrightCollection[cL].id == cM) { - r = this._copyrightCollection.splice(cL, 1); - cL--; - T = this._copyrightCollection.length - } - } - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function cK(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - this._opts = a8.extend(a8.extend(this._opts, { - size : new aH(150, 150), - padding : 5, - isOpen : false, - zoomInterval : 4 - }), T); - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_RIGHT; - this.defaultOffset = new aH(0, 0); - this._btnWidth = 13; - this._btnHeight = 13; - this.setAnchor(T.anchor); - this.setSize(this._opts.size); - this._asyncLoadCode() - } - a8.lang.inherits(cK, cp, "OverviewMapControl"); - a8.extend(cK.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setAnchor : function(T) { - cp.prototype.setAnchor.call(this, T) - }, - changeView : function() { - this.changeView._running = true; - this._opts.isOpen = !this._opts.isOpen; - if (!this._container) { - this.changeView._running = false - } - }, - setSize : function(T) { - if (!(T instanceof aH)) { - T = new aH(150, 150) - } - T.width = T.width > 0 ? T.width : 150; - T.height = T.height > 0 ? T.height : 150; - this._opts.size = T - }, - getSize : function() { - return this._opts.size - }, - isOpen : function() { - return this._opts.isOpen - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function bK(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - this._opts = a8.object.extend(a8.object.extend(this._opts, { - color : "black", - unit : "metric" - }), T); - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_LEFT; - this.defaultOffset = new aH(81, 18); - this.setAnchor(T.anchor); - this._units = { - metric : { - name : "metric", - conv : 1, - incon : 1000, - u1 : "\u7c73", - u2 : "\u516c\u91cc" - }, - us : { - name : "us", - conv : 3.2808, - incon : 5280, - u1 : "\u82f1\u5c3a", - u2 : "\u82f1\u91cc" - } - }; - if (!this._units[this._opts.unit]) { - this._opts.unit = "metric" - } - this._scaleText = null; - this._numberArray = {}; - this._asyncLoadCode() - } - window.BMAP_UNIT_METRIC = "metric"; - window.BMAP_UNIT_IMPERIAL = "us"; - a8.lang.inherits(bK, cp, "ScaleControl"); - a8.object.extend(bK.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setColor : function(T) { - this._opts.color = T + "" - }, - getColor : function() { - return this._opts.color - }, - setUnit : function(T) { - this._opts.unit = this._units[T] && this._units[T].name - || this._opts.unit - }, - getUnit : function() { - return this._opts.unit - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - window.BMAP_MAPTYPE_CONTROL_HORIZONTAL = 0; - window.BMAP_MAPTYPE_CONTROL_DROPDOWN = 1; - function aL(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false, - mapTypes : [ BMAP_NORMAL_MAP, BMAP_SATELLITE_MAP, BMAP_HYBRID_MAP, - BMAP_PERSPECTIVE_MAP ], - type : BMAP_MAPTYPE_CONTROL_HORIZONTAL - }; - this.defaultAnchor = BMAP_ANCHOR_TOP_RIGHT; - this.defaultOffset = new aH(10, 10); - this.setAnchor(T.anchor); - this._opts = a8.extend(a8.extend(this._opts, { - offset : this.defaultOffset, - enableSwitch : true - }), T); - if (aY(T.mapTypes)) { - this._opts.mapTypes = T.mapTypes.slice(0) - } - this._asyncLoadCode() - } - a8.lang.inherits(aL, cp, "MapTypeControl"); - a8.object.extend(aL.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function cz(cL) { - a8.lang.Class.call(this); - this._opts = { - container : null, - cursor : "default" - }; - this._opts = a8.extend(this._opts, cL); - this._type = "contextmenu"; - this._map = null; - this._container; - this._shadow; - this._left = 0; - this._top = 0; - this._items = []; - this._rItems = []; - this._dividers = []; - this.curPixel = null; - this.curPoint = null; - this._isOpen = false; - var T = this; - cA.load("menu", function() { - T._draw() - }) - } - a8.lang.inherits(cz, a8.lang.Class, "ContextMenu"); - a8.object.extend(cz.prototype, { - initialize : function(cL, T) { - this._map = cL; - this._overlay = T || null - }, - remove : function() { - this._map = this._overlay = null - }, - addItem : function(cM) { - if (!cM || cM._type != "menuitem" || cM._text == "" - || cM._width <= 0) { - return - } - for ( var cL = 0, T = this._items.length; cL < T; cL++) { - if (this._items[cL] === cM) { - return - } - } - this._items.push(cM); - this._rItems.push(cM) - }, - removeItem : function(cM) { - if (!cM || cM._type != "menuitem") { - return - } - for ( var cL = 0, T = this._items.length; cL < T; cL++) { - if (this._items[cL] === cM) { - this._items[cL].remove(); - this._items.splice(cL, 1); - T-- - } - } - for ( var cL = 0, T = this._rItems.length; cL < T; cL++) { - if (this._rItems[cL] === cM) { - this._rItems[cL].remove(); - this._rItems.splice(cL, 1); - T-- - } - } - }, - addSeparator : function() { - this._items.push( { - _type : "divider", - _dIndex : this._dividers.length - }); - this._dividers.push( { - dom : null - }) - }, - removeSeparator : function(cL) { - if (!this._dividers[cL]) { - return - } - for ( var cM = 0, T = this._items.length; cM < T; cM++) { - if (this._items[cM] && this._items[cM]._type == "divider" - && this._items[cM]._dIndex == cL) { - this._items.splice(cM, 1); - T-- - } - if (this._items[cM] && this._items[cM]._type == "divider" - && this._items[cM]._dIndex > cL) { - this._items[cM]._dIndex-- - } - } - this._dividers.splice(cL, 1) - }, - getDom : function() { - return this._container - }, - show : function() { - if (this._isOpen == true) { - return - } - this._isOpen = true - }, - hide : function() { - if (this._isOpen == false) { - return - } - this._isOpen = false - }, - setCursor : function(T) { - if (!T) { - return - } - this._opts.cursor = T - }, - getItem : function(T) { - return this._rItems[T] - } - }); - function be(cM, cN, cL) { - if (!cM || !I(cN)) { - return - } - a8.lang.Class.call(this); - this._opts = { - width : 100, - id : "" - }; - cL = cL || {}; - this._opts.width = (cL.width * 1) ? cL.width : 100; - this._opts.id = cL.id ? cL.id : ""; - this._text = cM + ""; - this._callback = cN; - this._map = null; - this._type = "menuitem"; - this._contextmenu = null; - this._container = null; - this._enabled = true; - var T = this; - cA.load("menu", function() { - T._draw() - }) - } - a8.lang.inherits(be, a8.lang.Class, "MenuItem"); - a8.object.extend(be.prototype, { - initialize : function(T, cL) { - this._map = T; - this._contextmenu = cL - }, - remove : function() { - this._contextmenu = null; - this._map = null - }, - setText : function(T) { - if (!T) { - return - } - this._text = T + "" - }, - getDom : function() { - return this._container - }, - enable : function() { - this._enabled = true - }, - disable : function() { - this._enabled = false - } - }); - function bN(T, cL) { - if (T && !cL) { - cL = T - } - this._sw = this._ne = null; - this._swLng = this._swLat = null; - this._neLng = this._neLat = null; - if (T) { - this._sw = new cd(T.lng, T.lat); - this._ne = new cd(cL.lng, cL.lat); - this._swLng = T.lng; - this._swLat = T.lat; - this._neLng = cL.lng; - this._neLat = cL.lat - } - } - a8.object.extend(bN.prototype, { - isEmpty : function() { - return !this._sw || !this._ne - }, - equals : function(T) { - if (!(T instanceof bN) || this.isEmpty()) { - return false - } - return this.getSouthWest().equals(T.getSouthWest()) - && this.getNorthEast().equals(T.getNorthEast()) - }, - getSouthWest : function() { - return this._sw - }, - getNorthEast : function() { - return this._ne - }, - containsBounds : function(T) { - if (!(T instanceof bN) || this.isEmpty() || T.isEmpty()) { - return false - } - return (T._swLng > this._swLng && T._neLng < this._neLng - && T._swLat > this._swLat && T._neLat < this._neLat) - }, - getCenter : function() { - if (this.isEmpty()) { - return null - } - return new cd((this._swLng + this._neLng) / 2, - (this._swLat + this._neLat) / 2) - }, - intersects : function(cM) { - if (!(cM instanceof bN)) { - return null - } - if (Math.max(cM._swLng, cM._neLng) < Math.min(this._swLng, - this._neLng) - || Math.min(cM._swLng, cM._neLng) > Math.max(this._swLng, - this._neLng) - || Math.max(cM._swLat, cM._neLat) < Math.min(this._swLat, - this._neLat) - || Math.min(cM._swLat, cM._neLat) > Math.max(this._swLat, - this._neLat)) { - return null - } - var cO = Math.max(this._swLng, cM._swLng); - var cL = Math.min(this._neLng, cM._neLng); - var cN = Math.max(this._swLat, cM._swLat); - var T = Math.min(this._neLat, cM._neLat); - return new bN(new cd(cO, cN), new cd(cL, T)) - }, - containsPoint : function(T) { - if (!(T instanceof cd) || this.isEmpty()) { - return false - } - return (T.lng >= this._swLng && T.lng <= this._neLng - && T.lat >= this._swLat && T.lat <= this._neLat) - }, - extend : function(T) { - if (!(T instanceof cd)) { - return - } - var cL = T.lng, cM = T.lat; - if (!this._sw) { - this._sw = new cd(0, 0) - } - if (!this._ne) { - this._ne = new cd(0, 0) - } - if (!this._swLng || this._swLng > cL) { - this._sw.lng = this._swLng = cL - } - if (!this._neLng || this._neLng < cL) { - this._ne.lng = this._neLng = cL - } - if (!this._swLat || this._swLat > cM) { - this._sw.lat = this._swLat = cM - } - if (!this._neLat || this._neLat < cM) { - this._ne.lat = this._neLat = cM - } - }, - toSpan : function() { - if (this.isEmpty()) { - return new cd(0, 0) - } - return new cd(Math.abs(this._neLng - this._swLng), Math - .abs(this._neLat - this._swLat)) - } - }); - function cd(T, cL) { - if (isNaN(T)) { - T = bV(T); - T = isNaN(T) ? 0 : T - } - if (b3(T)) { - T = parseFloat(T) - } - if (isNaN(cL)) { - cL = bV(cL); - cL = isNaN(cL) ? 0 : cL - } - if (b3(cL)) { - cL = parseFloat(cL) - } - this.lng = T; - this.lat = cL - } - cd.isInRange = function(T) { - return T && T.lng <= 180 && T.lng >= -180 && T.lat <= 74 - && T.lat >= -74 - }; - cd.prototype.equals = function(T) { - return T && this.lat == T.lat && this.lng == T.lng - }; - function bd() { - } - bd.prototype.lngLatToPoint = function() { - throw "lngLatToPoint\u65b9\u6cd5\u672a\u5b9e\u73b0" - }; - bd.prototype.pointToLngLat = function() { - throw "pointToLngLat\u65b9\u6cd5\u672a\u5b9e\u73b0" - }; - function b6() { - } - a8 - .extend( - b6, - { - num : { - bj : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 6) - }, - gz : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - }, - sz : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - }, - sh : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - } - }, - correct_pts : { - bj : [ { - j : 116.305687, - w : 39.990912, - utm_x : 12947230.73, - utm_y : 4836903.65, - x : 630412, - y : 547340 - }, { - j : 116.381837, - w : 40.000198, - utm_x : 12955707.8, - utm_y : 4838247.62, - x : 667412, - y : 561832 - }, { - j : 116.430651, - w : 39.995216, - utm_x : 12961141.81, - utm_y : 4837526.55, - x : 686556, - y : 573372 - }, { - j : 116.474111, - w : 39.976323, - utm_x : 12965979.81, - utm_y : 4834792.55, - x : 697152, - y : 586816 - }, { - j : 116.280328, - w : 39.953159, - utm_x : 12944407.75, - utm_y : 4831441.53, - x : 603272, - y : 549976 - }, { - j : 116.316117, - w : 39.952496, - utm_x : 12948391.8, - utm_y : 4831345.64, - x : 618504, - y : 557872 - }, { - j : 116.350477, - w : 39.938107, - utm_x : 12952216.78, - utm_y : 4829264.65, - x : 627044, - y : 568220 - }, { - j : 116.432025, - w : 39.947158, - utm_x : 12961294.76, - utm_y : 4830573.59, - x : 666280, - y : 584016 - }, { - j : 116.46873, - w : 39.949516, - utm_x : 12965380.79, - utm_y : 4830914.63, - x : 683328, - y : 591444 - }, { - j : 116.280077, - w : 39.913823, - utm_x : 12944379.8, - utm_y : 4825753.62, - x : 586150, - y : 558552 - }, { - j : 116.308625, - w : 39.91374, - utm_x : 12947557.79, - utm_y : 4825741.62, - x : 598648, - y : 564732 - }, { - j : 116.369853, - w : 39.912979, - utm_x : 12954373.73, - utm_y : 4825631.62, - x : 624561, - y : 578039 - }, { - j : 116.433552, - w : 39.914694, - utm_x : 12961464.75, - utm_y : 4825879.53, - x : 652972, - y : 591348 - }, { - j : 116.457034, - w : 39.914273, - utm_x : 12964078.78, - utm_y : 4825818.67, - x : 663028, - y : 596444 - }, { - j : 116.490927, - w : 39.914127, - utm_x : 12967851.77, - utm_y : 4825797.57, - x : 677968, - y : 604188 - }, { - j : 116.483839, - w : 39.877198, - utm_x : 12967062.73, - utm_y : 4820460.67, - x : 658596, - y : 610312 - }, { - j : 116.405777, - w : 39.864461, - utm_x : 12958372.82, - utm_y : 4818620.62, - x : 619256, - y : 596088 - }, { - j : 116.35345, - w : 39.859774, - utm_x : 12952547.74, - utm_y : 4817943.6, - x : 594633, - y : 585851 - }, { - j : 116.403818, - w : 39.9141, - utm_x : 12958154.74, - utm_y : 4825793.66, - x : 639699, - y : 585226 - }, { - j : 116.318111, - w : 39.891101, - utm_x : 12948613.78, - utm_y : 4822469.56, - x : 592856, - y : 571480 - }, { - j : 116.413047, - w : 39.907238, - utm_x : 12959182.12, - utm_y : 4824801.76, - x : 640680, - y : 588704 - }, { - j : 116.390843, - w : 39.906113, - utm_x : 12956710.35, - utm_y : 4824639.16, - x : 630620, - y : 584108 - }, { - j : 116.446527, - w : 39.899438, - utm_x : 12962909.14, - utm_y : 4823674.4, - x : 651752, - y : 597416 - }, { - j : 116.388665, - w : 39.95527, - utm_x : 12956467.9, - utm_y : 4831746.87, - x : 650656, - y : 572800 - }, { - j : 116.398343, - w : 39.939704, - utm_x : 12957545.26, - utm_y : 4829495.6, - x : 648036, - y : 578452 - }, { - j : 116.355101, - w : 39.973581, - utm_x : 12952731.53, - utm_y : 4834395.82, - x : 643268, - y : 560944 - }, { - j : 116.380727, - w : 39.88464, - utm_x : 12955584.23, - utm_y : 4821535.94, - x : 616920, - y : 586496 - }, { - j : 116.360843, - w : 39.946452, - utm_x : 12953370.73, - utm_y : 4830471.48, - x : 635293, - y : 568765 - }, { - j : 116.340955, - w : 39.973421, - utm_x : 12951156.79, - utm_y : 4834372.67, - x : 638420, - y : 558632 - }, { - j : 116.322585, - w : 40.023941, - utm_x : 12949111.83, - utm_y : 4841684.79, - x : 652135, - y : 543802 - }, { - j : 116.356486, - w : 39.883341, - utm_x : 12952885.71, - utm_y : 4821348.24, - x : 606050, - y : 581443 - }, { - j : 116.339592, - w : 39.992259, - utm_x : 12951005.06, - utm_y : 4837098.59, - x : 645664, - y : 554400 - }, { - j : 116.3778, - w : 39.86392, - utm_x : 12955258.4, - utm_y : 4818542.48, - x : 606848, - y : 590328 - }, { - j : 116.377354, - w : 39.964124, - utm_x : 12955208.75, - utm_y : 4833027.64, - x : 649911, - y : 568581 - }, { - j : 116.361837, - w : 39.963897, - utm_x : 12953481.39, - utm_y : 4832994.8, - x : 643286, - y : 565175 - }, { - j : 116.441397, - w : 39.939403, - utm_x : 12962338.06, - utm_y : 4829452.07, - x : 666772, - y : 587728 - }, { - j : 116.359176, - w : 40.006631, - utm_x : 12953185.16, - utm_y : 4839178.78, - x : 660440, - y : 555411 - } ], - sz : [ { - w : 22.498861, - utm_x : 12677279.029193671, - utm_y : 2555027.9501714734, - j : 113.880696, - y : 1104472, - x : 947240 - }, { - w : 22.500706, - utm_x : 12683920.978881944, - utm_y : 2555248.973138607, - j : 113.940361, - y : 1122320, - x : 974864 - }, { - w : 22.576848, - utm_x : 12675897.984563945, - utm_y : 2564373.058056766, - j : 113.86829, - y : 1074048, - x : 979136 - }, { - w : 22.55689, - utm_x : 12680064.05051775, - utm_y : 2561981.0013635466, - j : 113.905714, - y : 1092484, - x : 986240 - }, { - w : 22.58066, - utm_x : 12678671.98513852, - utm_y : 2564829.983373251, - j : 113.893209, - y : 1080528, - x : 992088 - }, { - w : 22.595751, - utm_x : 12678298.949465925, - utm_y : 2566638.9913895614, - j : 113.889858, - y : 1074484, - x : 997960 - }, { - w : 22.557499, - utm_x : 12684523.001238672, - utm_y : 2562053.9875916084, - j : 113.945769, - y : 1104696, - x : 1004564 - }, { - w : 22.648419, - utm_x : 12676422.97299485, - utm_y : 2572954.0513219936, - j : 113.873006, - y : 1051384, - x : 1015916 - }, { - w : 22.562664, - utm_x : 12690460.958807131, - utm_y : 2562673.0054078405, - j : 113.99911, - y : 1119860, - x : 1030228 - }, { - w : 22.646618, - utm_x : 12683008.037804369, - utm_y : 2572738.0652955617, - j : 113.93216, - y : 1070324, - x : 1041496 - }, { - w : 22.571091, - utm_x : 12695789.992135335, - utm_y : 2563683.019582462, - j : 114.046981, - y : 1131924, - x : 1055628 - }, { - w : 22.704467, - utm_x : 12682276.994753957, - utm_y : 2579677.075645295, - j : 113.925593, - y : 1048536, - x : 1066348 - }, { - w : 22.547152, - utm_x : 12702917.96800879, - utm_y : 2560813.9850610085, - j : 114.111012, - y : 1160352, - x : 1072596 - }, { - w : 22.546192, - utm_x : 12704502.952164687, - utm_y : 2560698.9417545213, - j : 114.12525, - y : 1165256, - x : 1078452 - }, { - w : 22.5714, - utm_x : 12702350.00978689, - utm_y : 2563720.0558210905, - j : 114.10591, - y : 1150556, - x : 1081960 - }, { - w : 22.555004, - utm_x : 12704883.001041513, - utm_y : 2561754.9738317807, - j : 114.128664, - y : 1163304, - x : 1084172 - }, { - w : 22.551925, - utm_x : 12706255.028694374, - utm_y : 2561385.978019464, - j : 114.140989, - y : 1168216, - x : 1088116 - }, { - w : 22.693756, - utm_x : 12690318.02302569, - utm_y : 2578392.0635360866, - j : 113.997826, - y : 1075100, - x : 1092860 - }, { - w : 22.573769, - utm_x : 12705731.042149788, - utm_y : 2564004.003107545, - j : 114.136282, - y : 1159404, - x : 1096572 - }, { - w : 22.583238, - utm_x : 12706369.021093281, - utm_y : 2565139.002548978, - j : 114.142013, - y : 1157896, - x : 1103632 - }, { - w : 22.605844, - utm_x : 12704694.980375737, - utm_y : 2567848.984570506, - j : 114.126975, - y : 1145540, - x : 1107972 - }, { - w : 22.637228, - utm_x : 12702545.043656897, - utm_y : 2571612.010208761, - j : 114.107662, - y : 1128764, - x : 1114460 - }, { - w : 22.62496, - utm_x : 12707132.013185183, - utm_y : 2570140.9407190788, - j : 114.148867, - y : 1145732, - x : 1127028 - }, { - w : 22.644524, - utm_x : 12707016.01701364, - utm_y : 2572486.9446672536, - j : 114.147825, - y : 1138800, - x : 1135876 - }, { - w : 22.640188, - utm_x : 12711515.0431873, - utm_y : 2571966.966986786, - j : 114.18824, - y : 1152692, - x : 1151836 - }, { - w : 22.59807, - utm_x : 12720011.039168343, - utm_y : 2566916.995355996, - j : 114.26456, - y : 1191212, - x : 1165180 - }, { - w : 22.668221, - utm_x : 12714081.987256048, - utm_y : 2575329.007304823, - j : 114.211299, - y : 1150576, - x : 1175404 - }, { - w : 22.702591, - utm_x : 12717292.031020584, - utm_y : 2579452.0022288463, - j : 114.240135, - y : 1148204, - x : 1204600 - }, { - w : 22.731786, - utm_x : 12717795.9798388, - utm_y : 2582955.0308636553, - j : 114.244662, - y : 1139532, - x : 1220540 - }, { - w : 22.727494, - utm_x : 12720675.957721734, - utm_y : 2582439.9980541077, - j : 114.270533, - y : 1148992, - x : 1230084 - }, { - w : 22.716335, - utm_x : 12725500.040345404, - utm_y : 2581101.0132384477, - j : 114.313868, - y : 1166316, - x : 1244102 - } ], - gz : [ { - j : 113.335098, - w : 23.147289, - utm_x : 12616542.68, - utm_y : 2632892.7, - x : 1129109, - y : 1073920 - }, { - j : 113.320932, - w : 23.146956, - utm_x : 12614965.71, - utm_y : 2632852.62, - x : 1125620, - y : 1071640 - }, { - j : 113.321435, - w : 23.140119, - utm_x : 12615021.7, - utm_y : 2632029.65, - x : 1124032, - y : 1072882 - }, { - j : 113.321471, - w : 23.119165, - utm_x : 12615025.71, - utm_y : 2629507.68, - x : 1118932, - y : 1076530 - }, { - j : 113.340201, - w : 23.118616, - utm_x : 12617110.75, - utm_y : 2629441.61, - x : 1123238, - y : 1079667 - }, { - j : 113.358068, - w : 23.116323, - utm_x : 12619099.71, - utm_y : 2629165.66, - x : 1126968, - y : 1083116 - }, { - j : 113.357529, - w : 23.131271, - utm_x : 12619039.71, - utm_y : 2630964.68, - x : 1130508, - y : 1080440 - }, { - j : 113.365811, - w : 23.150595, - utm_x : 12619961.67, - utm_y : 2633290.66, - x : 1137205, - y : 1078567 - }, { - j : 113.294145, - w : 23.118467, - utm_x : 12611983.76, - utm_y : 2629423.68, - x : 1112245, - y : 1072043 - }, { - j : 113.28615, - w : 23.121525, - utm_x : 12611093.75, - utm_y : 2629791.7, - x : 1110993, - y : 1070197 - }, { - j : 113.307152, - w : 23.055497, - utm_x : 12613431.71, - utm_y : 2621847.21, - x : 1100144, - y : 1085123 - }, { - j : 113.333445, - w : 23.052687, - utm_x : 12616358.66, - utm_y : 2621509.2, - x : 1105784, - y : 1089948 - }, { - j : 113.347476, - w : 23.048755, - utm_x : 12617920.6, - utm_y : 2621036.24, - x : 1108099, - y : 1093064 - }, { - j : 113.385774, - w : 23.036574, - utm_x : 12622183.96, - utm_y : 2619571.12, - x : 1113850, - y : 1101834 - }, { - j : 113.364185, - w : 22.89798, - utm_x : 12619780.66, - utm_y : 2602910.64, - x : 1073186, - y : 1123374 - }, { - j : 113.404577, - w : 22.906481, - utm_x : 12624277.13, - utm_y : 2603932.06, - x : 1084888, - y : 1128692 - }, { - j : 113.430856, - w : 22.913156, - utm_x : 12627202.52, - utm_y : 2604734.12, - x : 1092892, - y : 1131761 - }, { - j : 113.384554, - w : 22.933021, - utm_x : 12622048.15, - utm_y : 2607121.32, - x : 1086975, - y : 1120403 - }, { - j : 113.263566, - w : 23.146333, - utm_x : 12608579.68, - utm_y : 2632777.63, - x : 1111742, - y : 1062098 - }, { - j : 113.239213, - w : 23.152996, - utm_x : 12605868.69, - utm_y : 2633579.69, - x : 1107616, - y : 1056740 - }, { - j : 113.253865, - w : 23.131628, - utm_x : 12607499.76, - utm_y : 2631007.65, - x : 1105912, - y : 1062966 - }, { - j : 113.240767, - w : 23.088434, - utm_x : 12606041.68, - utm_y : 2625809.7, - x : 1092270, - y : 1068184 - }, { - j : 113.279628, - w : 23.088284, - utm_x : 12610367.72, - utm_y : 2625791.65, - x : 1101412, - y : 1074883 - }, { - j : 113.462271, - w : 23.107058, - utm_x : 12630699.66, - utm_y : 2628050.7, - x : 1148752, - y : 1101736 - }, { - j : 113.401618, - w : 23.052957, - utm_x : 12623947.73, - utm_y : 2621541.68, - x : 1121925, - y : 1101535 - }, { - j : 113.422504, - w : 23.05905, - utm_x : 12626272.77, - utm_y : 2622274.61, - x : 1128470, - y : 1104049 - }, { - j : 113.362506, - w : 23.107149, - utm_x : 12619593.75, - utm_y : 2628061.65, - x : 1125835, - y : 1085505 - }, { - j : 113.419629, - w : 23.143176, - utm_x : 12625952.73, - utm_y : 2632397.61, - x : 1148133, - y : 1089052 - }, { - j : 113.23315, - w : 23.062251, - utm_x : 12605193.75, - utm_y : 2622659.67, - x : 1084184, - y : 1071368 - }, { - j : 113.314525, - w : 23.101412, - utm_x : 12614252.48, - utm_y : 2627371.29, - x : 1113011, - y : 1078426 - }, { - j : 113.307947, - w : 23.131369, - utm_x : 12613520.21, - utm_y : 2630976.47, - x : 1118622, - y : 1072198 - } ], - sh : [ { - j : 121.524411, - w : 31.245875, - utm_x : 13528182.75, - utm_y : 3642354.51, - x : 1086581, - y : 1065728 - }, { - j : 121.419229, - w : 31.244887, - utm_x : 13516473.81, - utm_y : 3642226.51, - x : 1032616, - y : 1029148 - }, { - j : 121.405637, - w : 31.237871, - utm_x : 13514960.74, - utm_y : 3641317.54, - x : 1022724, - y : 1027244 - }, { - j : 121.415348, - w : 31.222879, - utm_x : 13516041.78, - utm_y : 3639375.47, - x : 1018548, - y : 1036980 - }, { - j : 121.422561, - w : 31.224261, - utm_x : 13516844.73, - utm_y : 3639554.48, - x : 1022976, - y : 1038908 - }, { - j : 121.412581, - w : 31.204148, - utm_x : 13515733.75, - utm_y : 3636949.48, - x : 1006568, - y : 1043696 - }, { - j : 121.443025, - w : 31.206202, - utm_x : 13519122.8, - utm_y : 3637215.49, - x : 1022656, - y : 1053704 - }, { - j : 121.524061, - w : 31.246917, - utm_x : 13528143.79, - utm_y : 3642489.52, - x : 1082052, - y : 1064124 - }, { - j : 121.529343, - w : 31.217769, - utm_x : 13528731.78, - utm_y : 3638713.59, - x : 1072696, - y : 1079064 - }, { - j : 121.530268, - w : 31.210341, - utm_x : 13528834.75, - utm_y : 3637751.53, - x : 1068748, - y : 1082416 - }, { - j : 121.511601, - w : 31.227303, - utm_x : 13526756.73, - utm_y : 3639948.53, - x : 1069276, - y : 1068716 - }, { - j : 121.4966, - w : 31.243614, - utm_x : 13525086.81, - utm_y : 3642061.58, - x : 1071220, - y : 1056805 - }, { - j : 121.485021, - w : 31.26138, - utm_x : 13523797.82, - utm_y : 3644363.54, - x : 1075708, - y : 1045540 - }, { - j : 121.465114, - w : 31.278803, - utm_x : 13521581.76, - utm_y : 3646621.48, - x : 1073740, - y : 1031268 - }, { - j : 121.454784, - w : 31.266566, - utm_x : 13520431.82, - utm_y : 3645035.58, - x : 1063591, - y : 1033191 - }, { - j : 121.46851, - w : 31.24951, - utm_x : 13521959.81, - utm_y : 3642825.48, - x : 1060200, - y : 1044520 - }, { - j : 121.446384, - w : 31.248422, - utm_x : 13519496.73, - utm_y : 3642684.51, - x : 1048784, - y : 1037750 - }, { - j : 121.509499, - w : 31.246469, - utm_x : 13526522.73, - utm_y : 3642431.47, - x : 1079309, - y : 1060105 - }, { - j : 121.481643, - w : 31.283943, - utm_x : 13523421.78, - utm_y : 3647287.68, - x : 1087096, - y : 1035304 - }, { - j : 121.508054, - w : 31.280609, - utm_x : 13526361.87, - utm_y : 3646855.56, - x : 1098432, - y : 1045648 - }, { - j : 121.493854, - w : 31.19121, - utm_x : 13524781.12, - utm_y : 3635274.07, - x : 1039624, - y : 1077288 - }, { - j : 121.500079, - w : 31.185541, - utm_x : 13525474.09, - utm_y : 3634540.04, - x : 1039960, - y : 1081640 - }, { - j : 121.484482, - w : 31.202846, - utm_x : 13523737.82, - utm_y : 3636780.87, - x : 1041388, - y : 1069232 - }, { - j : 121.480877, - w : 31.189587, - utm_x : 13523336.51, - utm_y : 3635063.92, - x : 1032484, - y : 1073640 - }, { - j : 121.502652, - w : 31.195209, - utm_x : 13525760.52, - utm_y : 3635791.9, - x : 1046384, - y : 1078728 - } ] - }, - getLnglatIndex : function(cN, cR, cQ) { - var cM = 0; - var cL = 0; - var cS = 10000000, cP = 1000000000; - for ( var cO = 0; cO < this.correct_pts[cN].length; cO++) { - var T = this.getDis(this.correct_pts[cN][cO].x, - this.correct_pts[cN][cO].y, cR, cQ); - if (T < cP) { - if (T < cS) { - cP = cS; - cS = T; - cL = cM; - cM = cO - } else { - sedMinDis = T; - cL = cO - } - } - } - return { - lt : cM, - rb : cL - } - }, - getOMapIndex_mm : function(cN, cS, cR) { - var cM = 0; - var cL = 0; - var cQ = 1294723000, cP = 1294723000; - for ( var cO = 0; cO < this.correct_pts[cN].length; cO++) { - var T = this.getDis( - this.correct_pts[cN][cO].utm_x, - this.correct_pts[cN][cO].utm_y, cS, cR); - if (T < cP) { - if (T < cQ) { - cP = cQ; - cQ = T; - cL = cM; - cM = cO - } else { - sedMinDis = T; - cL = cO - } - } - } - return { - lt : cM, - rb : cL - } - }, - getDis : function(T, cN, cL, cM) { - return Math.abs(T - cL) + Math.abs(cN - cM) - }, - toMap : function(cN, T, cO) { - var cL = (T - cO) * this.num[cN].num; - var cM = (T + cO) * this.num[cN].num - * this.num[cN].num2; - return { - x : cL, - y : cM - } - }, - fromMap : function(cN, T, cO) { - cO = cO / this.num[cN].num2; - var cL = (T + cO) / (this.num[cN].num * 2); - var cM = (cO - T) / (this.num[cN].num * 2); - return { - x : cL, - y : cM - } - }, - getDgPix_mm : function(cO, cT, cP) { - var cS = this.fromMap(cO, - this.correct_pts[cO][cT].x, - this.correct_pts[cO][cT].y); - var cQ = this.fromMap(cO, - this.correct_pts[cO][cP].x, - this.correct_pts[cO][cP].y); - var cY = cS.x, cL = cS.y; - var cX = cQ.x, T = cQ.y; - var cV = this.correct_pts[cO][cT].utm_x, cN = this.correct_pts[cO][cT].utm_y; - var cR = this.correct_pts[cO][cP].utm_x, cM = this.correct_pts[cO][cP].utm_y; - var cW = Math.abs((cR - cV) * 100000 / (cX - cY)); - var cU = Math.abs((cM - cN) * 100000 / (T - cL)); - return { - j : cW, - w : cU, - x : 100000 / cW, - y : 100000 / cU - } - }, - getPx_mm : function(c1, cX, cW, cO, cN) { - var cM = this.correct_pts[c1][cO]; - var T = this.correct_pts[c1][cO]; - var cU = this.getDgPix_mm(c1, cO, cN); - var cQ = this.fromMap(c1, cM.x, cM.y); - var cP = T.utm_x, c3 = T.utm_y; - var c2 = cX, cV = cW; - var c0 = cQ.x; - var cL = cQ.y; - var cS = c2 - cP, cZ = cV - c3; - var cT = cS * cU.x + c0; - var cR = -cZ * cU.y + cL; - var cY = this.toMap(c1, cT, cR); - return cY - }, - getJw_mm : function(cZ, cU, cT, cP, cO) { - var cS = this.correct_pts[cZ][cP]; - var cL = this.correct_pts[cZ][cP]; - var cV = this.getDgPix_mm(cZ, cP, cO); - var cX = this.fromMap(cZ, cU, cT); - var cN = this.fromMap(cZ, cS.x, cS.y); - var cQ = cL.utm_x, c0 = cL.utm_y; - var cY = cN.x; - var cM = cN.y; - var c1 = cX.x - cY, cW = cM - cX.y; - var cR = c1 / cV.x + cQ; - var T = cW / cV.y + c0; - return { - lng : cR, - lat : T - } - }, - getOMap_pts : function(cL, T) { - return this.getOMap_index(cL, T.lng, T.lat, T.lt, - T.rb) - }, - getMapJw_pts : function(cL, T) { - return this.getMapJw_index(cL, T.lng, - 9998336 - T.lat, T.lt, T.rb) - }, - getOMap_index : function(cQ, cP, cO, T, cN) { - if (!T || !cN) { - var cL = this.getOMapIndex_mm(cQ, cP, cO) - } else { - var cL = { - lt : T, - rb : cN - } - } - var cM = this.getPx_mm(cQ, cP, cO, cL.lt, cL.rb); - return { - x : Math.floor(cM.x), - y : 9998336 - Math.floor(cM.y), - lt : cL.lt, - rb : cL.rb - } - }, - getMapJw_index : function(cP, cM, cQ, cL, cO) { - if (!cL || !cO) { - var cN = this.getLnglatIndex(cP, cM, cQ) - } else { - var cN = { - lt : cL, - rb : cO - } - } - var T = this.getJw_mm(cP, cM, cQ, cN.lt, cN.rb); - return { - lng : T.lng, - lat : T.lat, - lt : cN.lt, - rb : cN.rb - } - } - }); - function ba() { - } - ba.prototype = new bd(); - a8.extend(ba, - { - EARTHRADIUS : 6370996.81, - MCBAND : [ 12890594.86, 8362377.87, 5591021, 3481989.83, - 1678043.12, 0 ], - LLBAND : [ 75, 60, 45, 30, 15, 0 ], - MC2LL : [ - [ 1.410526172116255e-8, 0.00000898305509648872, - -1.9939833816331, 200.9824383106796, - -187.2403703815547, 91.6087516669843, - -23.38765649603339, 2.57121317296198, - -0.03801003308653, 17337981.2 ], - [ -7.435856389565537e-9, 0.000008983055097726239, - -0.78625201886289, 96.32687599759846, - -1.85204757529826, -59.36935905485877, - 47.40033549296737, -16.50741931063887, - 2.28786674699375, 10260144.86 ], - [ -3.030883460898826e-8, 0.00000898305509983578, - 0.30071316287616, 59.74293618442277, - 7.357984074871, -25.38371002664745, - 13.45380521110908, -3.29883767235584, - 0.32710905363475, 6856817.37 ], - [ -1.981981304930552e-8, 0.000008983055099779535, - 0.03278182852591, 40.31678527705744, - 0.65659298677277, -4.44255534477492, - 0.85341911805263, 0.12923347998204, - -0.04625736007561, 4482777.06 ], - [ 3.09191371068437e-9, 0.000008983055096812155, - 0.00006995724062, 23.10934304144901, - -0.00023663490511, -0.6321817810242, - -0.00663494467273, 0.03430082397953, - -0.00466043876332, 2555164.4 ], - [ 2.890871144776878e-9, 0.000008983055095805407, - -3.068298e-8, 7.47137025468032, - -0.00000353937994, -0.02145144861037, - -0.00001234426596, 0.00010322952773, - -0.00000323890364, 826088.5 ] ], - LL2MC : [ - [ -0.0015702102444, 111320.7020616939, - 1704480524535203, -10338987376042340, - 26112667856603880, -35149669176653700, - 26595700718403920, -10725012454188240, - 1800819912950474, 82.5 ], - [ 0.0008277824516172526, 111320.7020463578, - 647795574.6671607, -4082003173.641316, - 10774905663.51142, -15171875531.51559, - 12053065338.62167, -5124939663.577472, - 913311935.9512032, 67.5 ], - [ 0.00337398766765, 111320.7020202162, - 4481351.045890365, -23393751.19931662, - 79682215.47186455, -115964993.2797253, - 97236711.15602145, -43661946.33752821, - 8477230.501135234, 52.5 ], - [ 0.00220636496208, 111320.7020209128, - 51751.86112841131, 3796837.749470245, - 992013.7397791013, -1221952.21711287, - 1340652.697009075, -620943.6990984312, - 144416.9293806241, 37.5 ], - [ -0.0003441963504368392, 111320.7020576856, - 278.2353980772752, 2485758.690035394, - 6070.750963243378, 54821.18345352118, - 9540.606633304236, -2710.55326746645, - 1405.483844121726, 22.5 ], - [ -0.0003218135878613132, 111320.7020701615, - 0.00369383431289, 823725.6402795718, - 0.46104986909093, 2351.343141331292, - 1.58060784298199, 8.77738589078284, - 0.37238884252424, 7.45 ] ], - getDistanceByMC : function(cP, cN) { - if (!cP || !cN) { - return 0 - } - var cL, cO, T, cM; - cP = this.convertMC2LL(cP); - if (!cP) { - return 0 - } - cL = this.toRadians(cP.lng); - cO = this.toRadians(cP.lat); - cN = this.convertMC2LL(cN); - if (!cN) { - return 0 - } - T = this.toRadians(cN.lng); - cM = this.toRadians(cN.lat); - return this.getDistance(cL, T, cO, cM) - }, - getDistanceByLL : function(cP, cN) { - if (!cP || !cN) { - return 0 - } - cP.lng = this.getLoop(cP.lng, -180, 180); - cP.lat = this.getRange(cP.lat, -74, 74); - cN.lng = this.getLoop(cN.lng, -180, 180); - cN.lat = this.getRange(cN.lat, -74, 74); - var cL, T, cO, cM; - cL = this.toRadians(cP.lng); - cO = this.toRadians(cP.lat); - T = this.toRadians(cN.lng); - cM = this.toRadians(cN.lat); - return this.getDistance(cL, T, cO, cM) - }, - convertMC2LL : function(cL) { - var cM, cO; - cM = new cd(Math.abs(cL.lng), Math.abs(cL.lat)); - for ( var cN = 0; cN < this.MCBAND.length; cN++) { - if (cM.lat >= this.MCBAND[cN]) { - cO = this.MC2LL[cN]; - break - } - } - var T = this.convertor(cL, cO); - var cL = new cd(T.lng.toFixed(6), T.lat.toFixed(6)); - return cL - }, - convertLL2MC : function(T) { - var cL, cN; - T.lng = this.getLoop(T.lng, -180, 180); - T.lat = this.getRange(T.lat, -74, 74); - cL = new cd(T.lng, T.lat); - for ( var cM = 0; cM < this.LLBAND.length; cM++) { - if (cL.lat >= this.LLBAND[cM]) { - cN = this.LL2MC[cM]; - break - } - } - if (!cN) { - for ( var cM = this.LLBAND.length - 1; cM >= 0; cM--) { - if (cL.lat <= -this.LLBAND[cM]) { - cN = this.LL2MC[cM]; - break - } - } - } - var cO = this.convertor(T, cN); - var T = new cd(cO.lng.toFixed(2), cO.lat.toFixed(2)); - return T - }, - convertor : function(cM, cN) { - if (!cM || !cN) { - return - } - var T = cN[0] + cN[1] * Math.abs(cM.lng); - var cL = Math.abs(cM.lat) / cN[9]; - var cO = cN[2] + cN[3] * cL + cN[4] * cL * cL + cN[5] * cL - * cL * cL + cN[6] * cL * cL * cL * cL + cN[7] * cL - * cL * cL * cL * cL + cN[8] * cL * cL * cL * cL - * cL * cL; - T *= (cM.lng < 0 ? -1 : 1); - cO *= (cM.lat < 0 ? -1 : 1); - return new cd(T, cO) - }, - getDistance : function(cL, T, cN, cM) { - return this.EARTHRADIUS - * Math.acos((Math.sin(cN) * Math.sin(cM) + Math - .cos(cN) - * Math.cos(cM) * Math.cos(T - cL))) - }, - toRadians : function(T) { - return Math.PI * T / 180 - }, - toDegrees : function(T) { - return (180 * T) / Math.PI - }, - getRange : function(cM, cL, T) { - if (cL != null) { - cM = Math.max(cM, cL) - } - if (T != null) { - cM = Math.min(cM, T) - } - return cM - }, - getLoop : function(cM, cL, T) { - while (cM > T) { - cM -= T - cL - } - while (cM < cL) { - cM += T - cL - } - return cM - } - }); - a8.extend(ba.prototype, { - lngLatToMercator : function(T) { - return ba.convertLL2MC(T) - }, - lngLatToPoint : function(T) { - var cL = ba.convertLL2MC(T); - return new bu(cL.lng, cL.lat) - }, - mercatorToLngLat : function(T) { - return ba.convertMC2LL(T) - }, - pointToLngLat : function(T) { - var cL = new cd(T.x, T.y); - return ba.convertMC2LL(cL) - }, - pointToPixel : function(cL, cP, cO, cN, cQ) { - if (!cL) { - return - } - cL = this.lngLatToMercator(cL, cQ); - var cM = this.getZoomUnits(cP); - var T = Math.round((cL.lng - cO.lng) / cM + cN.width / 2); - var cR = Math.round((cO.lat - cL.lat) / cM + cN.height / 2); - return new bu(T, cR) - }, - pixelToPoint : function(T, cS, cO, cM, cL) { - if (!T) { - return - } - var cR = this.getZoomUnits(cS); - var cP = cO.lng + cR * (T.x - cM.width / 2); - var cN = cO.lat - cR * (T.y - cM.height / 2); - var cQ = new cd(cP, cN); - return this.mercatorToLngLat(cQ, cL) - }, - getZoomUnits : function(T) { - return Math.pow(2, (18 - T)) - } - }); - function cE() { - } - cE.prototype = new ba(); - a8.extend(cE.prototype, { - lngLatToMercator : function(cL, T) { - return this._convert2DTo3D(T, ba.convertLL2MC(cL)) - }, - mercatorToLngLat : function(cL, T) { - return ba.convertMC2LL(this._convert3DTo2D(T, cL)) - }, - lngLatToPoint : function(cM, T) { - var cL = this._convert2DTo3D(T, ba.convertLL2MC(cM)); - return new bu(cL.lng, cL.lat) - }, - pointToLngLat : function(cL, T) { - var cM = new cd(cL.x, cL.y); - return ba.convertMC2LL(this._convert3DTo2D(T, cM)) - }, - _convert2DTo3D : function(cM, T) { - var cL = b6.getOMap_pts(cM || "bj", T); - return new cd(cL.x, cL.y) - }, - _convert3DTo2D : function(cM, T) { - var cL = b6.getMapJw_pts(cM || "bj", T); - return new cd(cL.lng, cL.lat) - }, - getZoomUnits : function(T) { - return Math.pow(2, (20 - T)) - } - }); - function bG() { - this._type = "overlay" - } - a8.lang.inherits(bG, a8.lang.Class, "Overlay"); - bG.getZIndex = function(T) { - T = T * 1; - if (!T) { - return 0 - } - return (T * -100000) << 1 - }; - a8.extend(bG.prototype, { - _i : function(T) { - if (!this.domElement && I(this.initialize)) { - this.domElement = this.initialize(T); - if (this.domElement) { - this.domElement.style.WebkitUserSelect = "none" - } - } - this.draw() - }, - initialize : function(T) { - throw "initialize\u65b9\u6cd5\u672a\u5b9e\u73b0" - }, - draw : function() { - throw "draw\u65b9\u6cd5\u672a\u5b9e\u73b0" - }, - remove : function() { - if (this.domElement && this.domElement.parentNode) { - this.domElement.parentNode.removeChild(this.domElement) - } - this.domElement = null; - this.dispatchEvent(new bg("onremove")) - }, - hide : function() { - if (this.domElement) { - a8.dom.hide(this.domElement) - } - }, - show : function() { - if (this.domElement) { - a8.dom.show(this.domElement) - } - }, - isVisible : function() { - if (!this.domElement) { - return false - } - if (this.domElement.style.display == "none" - || this.domElement.style.visibility == "hidden") { - return false - } - return true - } - }); - BMap.register(function(cM) { - var T = cM.temp; - T.overlayDiv = cM.overlayDiv = cL(cM.platform, 200); - cM._panes.floatPane = cL(T.overlayDiv, 800); - cM._panes.markerMouseTarget = cL(T.overlayDiv, 700); - cM._panes.floatShadow = cL(T.overlayDiv, 600); - cM._panes.labelPane = cL(T.overlayDiv, 500); - cM._panes.markerPane = cL(T.overlayDiv, 400); - cM._panes.markerShadow = cL(T.overlayDiv, 300); - cM._panes.mapPane = cL(T.overlayDiv, 200); - function cL(cN, cQ) { - var cP = aa("div"), cO = cP.style; - cO.position = "absolute"; - cO.top = cO.left = cO.width = cO.height = "0"; - cO.zIndex = cQ; - cN.appendChild(cP); - return cP - } - }); - function Y() { - a8.lang.Class.call(this); - bG.call(this); - this.map = null; - this._visible = true; - this.infoWindow = null; - this._dblclickTime = 0 - } - a8.lang.inherits(Y, bG, "OverlayInternal"); - a8.extend(Y.prototype, { - initialize : function(T) { - this.map = T; - a8.lang.Class.call(this, this.guid); - return null - }, - getMap : function() { - return this.map - }, - draw : function() { - }, - remove : function() { - this.map = null; - a8.lang.decontrol(this.guid); - bG.prototype.remove.call(this) - }, - hide : function() { - if (this._visible == false) { - return - } - this._visible = false - }, - show : function() { - if (this._visible == true) { - return - } - this._visible = true - }, - isVisible : function() { - if (!this.domElement) { - return false - } - return !!this._visible - }, - getContainer : function() { - return this.domElement - }, - setConfig : function(cL) { - cL = cL || {}; - for ( var T in cL) { - this._config[T] = cL[T] - } - }, - setZIndex : function(T) { - this.zIndex = T - }, - enableMassClear : function() { - this._config.enableMassClear = true - }, - disableMassClear : function() { - this._config.enableMassClear = false - }, - addContextMenu : function(T) { - this._menu = T - }, - removeContextMenu : function(T) { - this._menu = null - } - }); - function cs() { - this.map = null; - this._overlays = {}; - this._customOverlays = [] - } - BMap - .register(function(cL) { - var T = new cs(); - T.map = cL; - cL._overlays = T._overlays; - cL._customOverlays = T._customOverlays; - cL.addEventListener("load", function(cM) { - T.draw(cM) - }); - cL.addEventListener("moveend", function(cM) { - T.draw(cM) - }); - if (a8.browser.ie && a8.browser.ie < 8 - || document.compatMode == "BackCompat") { - cL.addEventListener("zoomend", function(cM) { - setTimeout(function() { - T.draw(cM) - }, 20) - }) - } else { - cL.addEventListener("zoomend", function(cM) { - T.draw(cM) - }) - } - cL.addEventListener("maptypechange", function(cM) { - T.draw(cM) - }); - cL - .addEventListener( - "addoverlay", - function(cQ) { - var cN = cQ.target; - if (cN instanceof Y) { - if (!T._overlays[cN.guid]) { - T._overlays[cN.guid] = cN - } - } else { - var cP = false; - for ( var cO = 0, cM = T._customOverlays.length; cO < cM; cO++) { - if (T._customOverlays[cO] === cN) { - cP = true; - break - } - } - if (!cP) { - T._customOverlays.push(cN) - } - } - }); - cL - .addEventListener( - "removeoverlay", - function(cP) { - var cN = cP.target; - if (cN instanceof Y) { - delete T._overlays[cN.guid] - } else { - for ( var cO = 0, cM = T._customOverlays.length; cO < cM; cO++) { - if (T._customOverlays[cO] === cN) { - T._customOverlays.splice(cO, 1); - break - } - } - } - }); - cL - .addEventListener( - "clearoverlays", - function(cP) { - this.closeInfoWindow(); - for ( var cO in T._overlays) { - if (T._overlays[cO]._config.enableMassClear) { - T._overlays[cO].remove(); - delete T._overlays[cO] - } - } - for ( var cN = 0, cM = T._customOverlays.length; cN < cM; cN++) { - if (T._customOverlays[cN].enableMassClear != false) { - T._customOverlays[cN].remove(); - T._customOverlays[cN] = null; - T._customOverlays.splice(cN, 1); - cN--; - cM-- - } - } - }); - cL.addEventListener("infowindowopen", function(cN) { - var cM = this.infoWindow; - if (cM) { - a8.dom.hide(cM.popDom); - a8.dom.hide(cM.shadowDom) - } - }); - cL.addEventListener("movestart", function() { - if (this.getInfoWindow()) { - this.getInfoWindow()._setOverflow() - } - }); - cL.addEventListener("moveend", function() { - if (this.getInfoWindow()) { - this.getInfoWindow()._resetOverflow() - } - }) - }); - cs.prototype.draw = function(cM) { - for ( var cL in this._overlays) { - this._overlays[cL].draw() - } - a8.array.each(this._customOverlays, function(cN) { - cN.draw() - }); - if (this.map.temp.infoWin) { - this.map.temp.infoWin.setPosition() - } - if (BMap.DrawerSelector) { - var T = BMap.DrawerSelector.getDrawer(this.map); - T.setPalette() - } - }; - function cF(T) { - Y.call(this); - this._config = { - strokeColor : "#3a6bdb", - strokeWeight : 5, - strokeOpacity : 0.65, - strokeStyle : "solid", - enableMassClear : true, - getParseTolerance : null, - getParseCacheIndex : null, - enableEditing : false, - mouseOverTolerance : 15, - use3DCoords : false, - clickable : true - }; - T = T || {}; - this.setConfig(T); - if (this._config.strokeWeight <= 0) { - this._config.strokeWeight = 5 - } - if (this._config.strokeOpacity < 0 || this._config.strokeOpacity > 1) { - this._config.strokeOpacity = 0.65 - } - if (this._config.fillOpacity < 0 || this._config.fillOpacity > 1) { - this._config.fillOpacity = 0.65 - } - if (this._config.strokeStyle != "solid" - && this._config.strokeStyle != "dashed") { - this._config.strokeStyle = "solid" - } - if (ch(T.enableClicking)) { - this._config.clickable = T.enableClicking - } - this.domElement = null; - this._bounds = new BMap.Bounds(0, 0, 0, 0); - this._parseCache = []; - this.vertexMarkers = []; - this._temp = {} - } - a8.lang.inherits(cF, Y, "Graph"); - cF.getGraphPoints = function(cL) { - var T = []; - if (!cL) { - return T - } - if (b3(cL)) { - var cM = cL.split(";"); - a8.array.each(cM, function(cO) { - var cN = cO.split(","); - T.push(new cd(cN[0], cN[1])) - }) - } - if (cL.constructor == Array && cL.length > 0) { - T = cL - } - return T - }; - cF.parseTolerance = [ 0.09, 0.005, 0.0001, 0.00001 ]; - a8.extend(cF.prototype, { - initialize : function(T) { - this.map = T; - return null - }, - draw : function() { - return; - if (!this.domElement) { - return - } - if (this._drawer) { - this._drawer.setPath(this.domElement, this - ._getDisplayPixels(this.points)) - } - }, - setPath : function(T) { - this._parseCache.length = 0; - this.points = cF.getGraphPoints(T).slice(0); - this._calcBounds() - }, - _calcBounds : function() { - if (!this.points) { - return - } - var T = this; - T._bounds = new bN(); - a8.array.each(this.points, function(cL) { - T._bounds.extend(cL) - }) - }, - getPath : function() { - return this.points - }, - setPositionAt : function(cL, T) { - if (!T || !this.points[cL]) { - return - } - this._parseCache.length = 0; - this.points[cL] = new cd(T.lng, T.lat); - this._calcBounds() - }, - setStrokeColor : function(T) { - this._config.strokeColor = T - }, - getStrokeColor : function() { - return this._config.strokeColor - }, - setStrokeWeight : function(T) { - if (T > 0) { - this._config.strokeWeight = T - } - }, - getStrokeWeight : function() { - return this._config.strokeWeight - }, - setStrokeOpacity : function(T) { - if (!T || T > 1 || T < 0) { - return - } - this._config.strokeOpacity = T - }, - getStrokeOpacity : function() { - return this._config.strokeOpacity - }, - setFillOpacity : function(T) { - if (T > 1 || T < 0) { - return - } - this._config.fillOpacity = T - }, - getFillOpacity : function() { - return this._config.fillOpacity - }, - setStrokeStyle : function(T) { - if (T != "solid" && T != "dashed") { - return - } - this._config.strokeStyle = T - }, - getStrokeStyle : function() { - return this._config.strokeStyle - }, - setFillColor : function(T) { - this._config.fillColor = T || "" - }, - getFillColor : function() { - return this._config.fillColor - }, - getBounds : function() { - return this._bounds - }, - remove : function() { - if (this.map) { - this.map.removeEventListener("onmousemove", - this._graphMouseEvent) - } - Y.prototype.remove.call(this); - this._parseCache.length = 0 - }, - enableEditing : function() { - this._config.enableEditing = true - }, - disableEditing : function() { - this._config.enableEditing = false - } - }); - function n(T) { - Y.call(this); - this.map = null; - this.domElement = null; - this._config = { - width : 0, - height : 0, - offset : new aH(0, 0), - opacity : 1, - background : "transparent", - lineStroke : 1, - lineColor : "#000", - lineStyle : "solid", - point : null - }; - this.setConfig(T); - this.point = this._config.point - } - a8.lang.inherits(n, Y, "Division"); - a8 - .extend( - n.prototype, - { - _addDom : function() { - var T = this._config; - var cM = this.content; - var cL = [ '
    '); - cL.push(cM); - cL.push("
    "); - this.domElement = at( - this.map.getPanes().markerMouseTarget, cL - .join("")) - }, - initialize : function(T) { - this.map = T; - this._addDom(); - if (this.domElement) { - a8.on(this.domElement, "mousedown", - function(cL) { - aP(cL) - }) - } - return this.domElement - }, - draw : function() { - var T = this.map - .pointToOverlayPixel(this._config.point); - this._config.offset = new aH( - -Math.round(this._config.width / 2) - - Math - .round(this._config.lineStroke), - -Math.round(this._config.height / 2) - - Math - .round(this._config.lineStroke)); - this.domElement.style.left = T.x - + this._config.offset.width + "px"; - this.domElement.style.top = T.y - + this._config.offset.height + "px" - }, - getPosition : function() { - return this._config.point - }, - _getPixel : function(T) { - return this.map.pointToPixel(this.getPosition()) - }, - setPosition : function(T) { - this._config.point = T; - this.draw() - }, - setDimension : function(T, cL) { - this._config.width = Math.round(T); - this._config.height = Math.round(cL); - if (this.domElement) { - this.domElement.style.width = this._config.width - + "px"; - this.domElement.style.height = this._config.height - + "px"; - this.draw() - } - } - }); - function M(cL, cM, cN) { - if (!cL || !cM) { - return - } - this.imageUrl = cL; - this.size = cM; - var T = new aH(Math.floor(cM.width / 2), Math.floor(cM.height / 2)); - var cO = { - anchor : T, - imageOffset : new aH(0, 0) - }; - cN = cN || {}; - a8.extend(cO, cN); - this.anchor = cO.anchor; - this.imageOffset = cO.imageOffset; - this.infoWindowAnchor = cN.infoWindowAnchor || this.anchor; - this.printImageUrl = cN.printImageUrl || "" - } - var bD = M.prototype; - bD.setImageUrl = function(T) { - if (!T) { - return - } - this.imageUrl = T - }; - bD.setPrintImageUrl = function(T) { - if (!T) { - return - } - this.printImageUrl = T - }; - bD.setSize = function(T) { - if (!T) { - return - } - this.size = new aH(T.width, T.height) - }; - bD.setAnchor = function(T) { - if (!T) { - return - } - this.anchor = new aH(T.width, T.height) - }; - bD.setImageOffset = function(T) { - if (!T) { - return - } - this.imageOffset = new aH(T.width, T.height) - }; - bD.setInfoWindowAnchor = function(T) { - if (!T) { - return - } - this.infoWindowAnchor = new aH(T.width, T.height) - }; - bD.toString = function() { - return "Icon" - }; - function bP(cM, cL) { - a8.lang.Class.call(this); - this.content = cM; - this.map = null; - this._config = { - width : 0, - height : 0, - maxWidth : 600, - offset : new aH(0, 0), - title : "", - maxContent : "", - enableMaximize : false, - enableAutoPan : true, - enableCloseOnClick : true, - margin : [ 10, 10, 40, 10 ], - collisions : [ [ 10, 10 ], [ 10, 10 ], [ 10, 10 ], [ 10, 10 ] ], - ifMaxScene : false, - onClosing : function() { - return true - } - }; - a8.extend(this._config, cL || {}); - if (this._config.width != 0) { - if (this._config.width < 220) { - this._config.width = 220 - } - if (this._config.width > 730) { - this._config.width = 730 - } - } - if (this._config.height != 0) { - if (this._config.height < 60) { - this._config.height = 60 - } - if (this._config.height > 650) { - this._config.height = 650 - } - } - if (this._config.maxWidth != 0) { - if (this._config.maxWidth < 220) { - this._config.maxWidth = 220 - } - if (this._config.maxWidth > 730) { - this._config.maxWidth = 730 - } - } - this.isWinMax = false; - this.IMG_PATH = cc.imgPath; - this.overlay = null; - var T = this; - cA.load("infowindow", function() { - T._draw() - }) - } - a8.lang.inherits(bP, a8.lang.Class, "InfoWindow"); - a8.extend(bP.prototype, { - setWidth : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 220) { - T = 220 - } - if (T > 730) { - T = 730 - } - } - this._config.width = T - }, - setHeight : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 60) { - T = 60 - } - if (T > 650) { - T = 650 - } - } - this._config.height = T - }, - setMaxWidth : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 220) { - T = 220 - } - if (T > 730) { - T = 730 - } - } - this._config.maxWidth = T - }, - setTitle : function(T) { - this._config.title = T - }, - getTitle : function() { - return this._config.title - }, - setContent : function(T) { - this.content = T - }, - getContent : function() { - return this.content - }, - setMaxContent : function(T) { - this._config.maxContent = T + "" - }, - redraw : function() { - }, - enableAutoPan : function() { - this._config.enableAutoPan = true - }, - disableAutoPan : function() { - this._config.enableAutoPan = false - }, - enableCloseOnClick : function() { - this._config.enableCloseOnClick = true - }, - disableCloseOnClick : function() { - this._config.enableCloseOnClick = false - }, - enableMaximize : function() { - this._config.enableMaximize = true - }, - disableMaximize : function() { - this._config.enableMaximize = false - }, - show : function() { - this._visible = true - }, - hide : function() { - this._visible = false - }, - close : function() { - this.hide() - }, - maximize : function() { - this.isWinMax = true - }, - restore : function() { - this.isWinMax = false - }, - isVisible : function() { - return this.isOpen() - }, - isOpen : function() { - return false - }, - getPosition : function() { - if (this.overlay && this.overlay.getPosition) { - return this.overlay.getPosition() - } - }, - getOffset : function() { - return this._config.offset - } - }); - bz.prototype.openInfoWindow = function(cN, T) { - if (!(cN instanceof bP) || !(T instanceof cd)) { - return - } - var cL = this.temp; - if (!cL.marker) { - var cM = new M(cc.imgPath + "blank.gif", { - width : 1, - height : 1 - }); - cL.marker = new ad(T, { - icon : cM, - width : 1, - height : 1, - offset : new aH(0, 0), - infoWindowOffset : new aH(0, 0), - clickable : false - }); - cL.marker._fromMap = 1 - } else { - cL.marker.setPosition(T) - } - this.addOverlay(cL.marker); - cL.marker.openInfoWindow(cN) - }; - bz.prototype.closeInfoWindow = function() { - var T = this.temp.infoWin || this.temp._infoWin; - if (T && T.overlay) { - T.overlay.closeInfoWindow() - } - }; - Y.prototype.openInfoWindow = function(T) { - if (this.map) { - this.map.closeInfoWindow(); - T._visible = true; - this.map.temp._infoWin = T; - T.overlay = this; - a8.lang.Class.call(T, T.guid) - } - }; - Y.prototype.closeInfoWindow = function() { - if (this.map && this.map.temp._infoWin) { - this.map.temp._infoWin._visible = false; - a8.lang.decontrol(this.map.temp._infoWin.guid); - this.map.temp._infoWin = null - } - }; - function ag(cM, cL) { - Y.call(this); - this.content = cM; - this.map = null; - this.domElement = null; - this._config = { - width : 0, - offset : new aH(0, 0), - styles : { - backgroundColor : "#fff", - border : "1px solid #f00", - padding : "1px", - whiteSpace : "nowrap", - font : "12px " + cc.fontFamily, - zIndex : "80", - MozUserSelect : "none" - }, - position : null, - enableMassClear : true, - clickable : true - }; - cL = cL || {}; - this.setConfig(cL); - if (this._config.width < 0) { - this._config.width = 0 - } - if (ch(cL.enableClicking)) { - this._config.clickable = cL.enableClicking - } - this.point = this._config.position; - var T = this; - cA.load("marker", function() { - T._draw() - }) - } - a8.lang.inherits(ag, Y, "Label"); - a8.extend(ag.prototype, { - getPosition : function() { - if (this._marker) { - return this._marker.getPosition() - } - return this.point - }, - setPosition : function(T) { - if (T instanceof cd && !this.getMarker()) { - this.point = this._config.position = new cd(T.lng, T.lat) - } - }, - setContent : function(T) { - this.content = T - }, - setOpacity : function(T) { - if (T >= 0 && T <= 1) { - this._config.opacity = T - } - }, - setOffset : function(T) { - if (!(T instanceof aH)) { - return - } - this._config.offset = new aH(T.width, T.height) - }, - getOffset : function() { - return this._config.offset - }, - setStyle : function(T) { - T = T || {}; - this._config.styles = a8.extend(this._config.styles, T) - }, - setStyles : function(T) { - return this.setStyle(T) - }, - setTitle : function(T) { - this._config.title = T || "" - }, - getTitle : function() { - return this._config.title - }, - setMarker : function(T) { - this._marker = T; - if (T) { - this.point = this._config.position = T.getPosition() - } else { - this.point = this._config.position = null - } - }, - getMarker : function() { - return this._marker || null - } - }); - window.BMAP_ANIMATION_DROP = 1; - window.BMAP_ANIMATION_BOUNCE = 2; - var au = new M(cc.imgPath + "marker_red_sprite.png", new aH(19, 25), { - anchor : new aH(10, 25), - infoWindowAnchor : new aH(10, 0) - }); - var ar = new M(cc.imgPath + "marker_red_sprite.png", new aH(20, 11), { - anchor : new aH(6, 11), - imageOffset : new aH(-19, -13) - }); - function ad(T, cM) { - Y.call(this); - cM = cM || {}; - this.point = T; - this.map = null; - this._animation = null; - this._config = { - offset : new aH(0, 0), - icon : au, - shadow : ar, - title : "", - label : null, - baseZIndex : 0, - clickable : true, - zIndexFixed : false, - isTop : false, - enableMassClear : true, - enableDragging : false, - raiseOnDrag : false, - restrictDraggingArea : false, - draggingCursor : cc.draggingCursor - }; - this.setConfig(cM); - if (cM.icon && !cM.shadow) { - this._config.shadow = null - } - if (ch(cM.enableClicking)) { - this._config.clickable = cM.enableClicking - } - var cL = this; - cA.load("marker", function() { - cL._draw() - }) - } - ad.TOP_ZINDEX = bG.getZIndex(-90) + 1000000; - ad.DRAG_ZINDEX = ad.TOP_ZINDEX + 1000000; - a8.lang.inherits(ad, Y, "Marker"); - a8.extend(ad.prototype, { - setIcon : function(T) { - if (T instanceof M) { - this._config.icon = T - } - }, - getIcon : function() { - return this._config.icon - }, - setShadow : function(T) { - if (T instanceof M) { - this._config.shadow = T - } - }, - getShadow : function() { - return this._config.shadow - }, - setLabel : function(T) { - this._config.label = T || null - }, - getLabel : function() { - return this._config.label - }, - enableDragging : function() { - this._config.enableDragging = true - }, - disableDragging : function() { - this._config.enableDragging = false - }, - getPosition : function() { - return this.point - }, - setPosition : function(T) { - if (T instanceof cd) { - this.point = new cd(T.lng, T.lat) - } - }, - setTop : function(cL, T) { - this._config.isTop = !!cL; - if (cL) { - this._addi = T || 0 - } - }, - setTitle : function(T) { - this._config.title = T + "" - }, - getTitle : function() { - return this._config.title - }, - setOffset : function(T) { - if (T instanceof aH) { - this._config.offset = T - } - }, - getOffset : function() { - return this._config.offset - }, - setAnimation : function(T) { - this._animation = T - } - }); - function cn(T, cM) { - cF.call(this, cM); - cM = cM || {}; - this._config.fillOpacity = cM.fillOpacity ? cM.fillOpacity : 0.65; - if (cM.fillColor == "") { - this._config.fillColor = "" - } else { - this._config.fillColor = cM.fillColor ? cM.fillColor : "#fff" - } - this.setPath(T); - var cL = this; - cA.load("poly", function() { - cL._draw() - }) - } - a8.lang.inherits(cn, cF, "Polygon"); - a8.extend(cn.prototype, { - setPath : function(cL, T) { - this._userPoints = cF.getGraphPoints(cL).slice(0); - var cM = cF.getGraphPoints(cL).slice(0); - if (cM.length > 1 && !cM[0].equals(cM[cM.length - 1])) { - cM.push(new cd(cM[0].lng, cM[0].lat)) - } - cF.prototype.setPath.call(this, cM, T) - }, - setPositionAt : function(cL, T) { - if (!this._userPoints[cL]) { - return - } - this._userPoints[cL] = new cd(T.lng, T.lat); - this.points[cL] = new cd(T.lng, T.lat); - if (cL == 0 - && !this.points[0] - .equals(this.points[this.points.length - 1])) { - this.points[this.points.length - 1] = new cd(T.lng, T.lat) - } - this._calcBounds() - }, - getPath : function() { - var T = this._userPoints; - if (T.length == 0) { - T = this.points - } - return T - } - }); - function f(T, cM) { - cF.call(this, cM); - this.setPath(T); - var cL = this; - cA.load("poly", function() { - cL._draw() - }) - } - a8.lang.inherits(f, cF, "Polyline"); - function a(cL, T, cM) { - this.point = cL; - this.radius = Math.abs(T); - cn.call(this, [], cM) - } - a.parseTolerance = [ 0.01, 0.0001, 0.00001, 0.000004 ]; - a8.lang.inherits(a, cn, "Circle"); - a8 - .extend( - a.prototype, - { - initialize : function(T) { - this.map = T; - this.points = this._getPerimeterPoints(this.point, - this.radius); - this._calcBounds(); - return null - }, - getCenter : function() { - return this.point - }, - setCenter : function(T, cL) { - if (!T) { - return - } - this.point = T - }, - getRadius : function() { - return this.radius - }, - setRadius : function(T) { - this.radius = Math.abs(T) - }, - _getPerimeterPoints : function(T, cS) { - if (!T || !cS || !this.map) { - return [] - } - var cL = this.map; - var cP = T.lng, cN = T.lat; - var cZ = []; - var cU = cS / 6378800, cR = (Math.PI / 180) * cN, cX = (Math.PI / 180) - * cP; - for ( var cQ = 0; cQ < 360; cQ += 9) { - var cO = (Math.PI / 180) * cQ, cV = Math - .asin(Math.sin(cR) * Math.cos(cU) - + Math.cos(cR) * Math.sin(cU) - * Math.cos(cO)), cT = Math - .atan2(Math.sin(cO) * Math.sin(cU) - * Math.cos(cR), Math.cos(cU) - - Math.sin(cR) * Math.sin(cV)), cW = ((cX - - cT + Math.PI) % (2 * Math.PI)) - - Math.PI, cY = new cd(cW - * (180 / Math.PI), cV * (180 / Math.PI)); - cZ.push(cY) - } - var cM = cZ[0]; - cZ.push(new cd(cM.lng, cM.lat)); - return cZ - } - }); - function bR(T) { - this.map = T; - this.mapTypeLayers = []; - this.tileLayers = []; - this.bufferNumber = 300; - this.realBufferNumber = 0; - this.mapTiles = {}; - this.bufferTiles = {}; - this.numLoading = 0; - this._mapTypeLayerContainer = this._createDiv(1); - this._normalLayerContainer = this._createDiv(2); - T.platform.appendChild(this._mapTypeLayerContainer); - T.platform.appendChild(this._normalLayerContainer) - } - BMap.register(function(cL) { - var T = new bR(cL); - T.initialize() - }); - a8.extend(bR.prototype, { - initialize : function() { - var T = this, cL = T.map; - cL.addEventListener("loadcode", function() { - T.loadTiles() - }); - cL.addEventListener("addtilelayer", function(cM) { - T.addTileLayer(cM) - }); - cL.addEventListener("removetilelayer", function(cM) { - T.removeTileLayer(cM) - }); - cL.addEventListener("setmaptype", function(cM) { - T.setMapType(cM) - }); - cL.addEventListener("zoomstartcode", function(cM) { - T._zoom(cM) - }) - }, - loadTiles : function() { - var T = this; - if (a8.browser.ie) { - try { - document.execCommand("BackgroundImageCache", false, true) - } catch (cL) { - } - } - if (!this.loaded) { - T.initMapTypeTiles() - } - T.moveGridTiles(); - if (!this.loaded) { - this.loaded = true; - cA.load("tile", function() { - T._asyncLoadTiles() - }) - } - }, - initMapTypeTiles : function() { - var cL = this.map.getMapType(); - var cM = cL.getTileLayers(); - for ( var T = 0; T < cM.length; T++) { - var cN = new p(); - a8.extend(cN, cM[T]); - this.mapTypeLayers.push(cN); - cN.initialize(this.map, this._mapTypeLayerContainer) - } - }, - _createDiv : function(cL) { - var T = aa("div"); - T.style.position = "absolute"; - T.style.left = T.style.top = "0"; - T.style.zIndex = cL; - return T - }, - showTile : function(cP, cO, cS) { - var cV = this; - cV.centerPos = cO; - var cR = this.map.getMapType(); - var cM = cV.getTileName(cP, cS); - var cZ = cR.getTileSize(); - var cN = (cP[0] * cZ) + cO[0]; - var cY = 0; - if (cR === BMAP_PERSPECTIVE_MAP && cV.map.getZoom() == 15) { - cY = 0.5 - } - var cL = (cY - 1 - cP[1]) * cZ + cO[1]; - var cT = [ cN, cL ]; - var cU = this.mapTiles[cM]; - if (cU && cU.img) { - bI(cU.img, cT); - if (cU.loaded) { - this._checkTilesLoaded() - } else { - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }) - } - return - } - cU = this.bufferTiles[cM]; - if (cU && cU.img) { - cS.tilesDiv.insertBefore(cU.img, cS.tilesDiv.lastChild); - this.mapTiles[cM] = cU; - bI(cU.img, cT); - if (cU.loaded) { - this._checkTilesLoaded() - } else { - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }) - } - return - } - var cX = 256 * Math.pow(2, (cR.getMaxZoom() - cP[2])); - var cW = new cd(cP[0] * cX, cP[1] * cX); - var cQ = new bu(cP[0], cP[1]); - var T = cS.getTilesUrl(cQ, cP[2]); - cU = new bU(this, T, cT, cP, cS); - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }); - cU._load(); - this.mapTiles[cM] = cU - }, - _checkTilesLoaded : function() { - this.numLoading--; - var T = this; - if (this.numLoading == 0) { - if (this._checkLoadedTimer) { - clearTimeout(this._checkLoadedTimer); - this._checkLoadedTimer = null - } - this._checkLoadedTimer = setTimeout(function() { - if (T.numLoading == 0) { - T.map.dispatchEvent(new bg("ontilesloaded")) - } - T._checkLoadedTimer = null - }, 80) - } - }, - getTileName : function(T, cL) { - if (this.map.getMapType() === BMAP_PERSPECTIVE_MAP) { - return "TILE-" + cL.guid + "-" + this.map.cityCode + "-" + T[0] - + "-" + T[1] + "-" + T[2] - } else { - return "TILE-" + cL.guid + "-" + T[0] + "-" + T[1] + "-" + T[2] - } - }, - hideTile : function(cL) { - var T = cL.img; - if (T) { - J(T); - if (y(T)) { - T.parentNode.removeChild(T) - } - } - delete this.mapTiles[cL.name]; - if (!cL.loaded) { - J(T); - T = null; - cL._callCbks(); - cL.img = null; - cL.mgr = null - } - }, - moveGridTiles : function() { - var da = this.mapTypeLayers; - var cW = da.concat(this.tileLayers); - var c2 = cW.length; - for ( var c4 = 0; c4 < c2; c4++) { - var cP = cW[c4]; - if (cP.baseLayer) { - this.tilesDiv = cP.tilesDiv - } - var dg = this.map; - var dc = dg.getMapType(); - var dh = dc.getProjection(); - var c3 = dg.zoomLevel; - var c6 = dg.mercatorCenter; - this.mapCenterPoint = c6; - var cU = dc.getZoomUnits(c3); - var cX = dc.getZoomFactor(c3); - var cV = Math.ceil(c6.lng / cX); - var cQ = Math.ceil(c6.lat / cX); - var c1 = dc.getTileSize(); - var cO = [ cV, cQ, (c6.lng - cV * cX) / cX * c1, - (c6.lat - cQ * cX) / cX * c1 ]; - var db = cO[0] - Math.ceil((dg.width / 2 - cO[2]) / c1); - var cN = cO[1] - Math.ceil((dg.height / 2 - cO[3]) / c1); - var c7 = cO[0] + Math.ceil((dg.width / 2 + cO[2]) / c1); - var cZ = 0; - if (dc === BMAP_PERSPECTIVE_MAP && dg.getZoom() == 15) { - cZ = 1 - } - var cY = cO[1] + Math.ceil((dg.height / 2 + cO[3]) / c1) + cZ; - this.areaCenter = new cd(c6.lng, c6.lat); - var cM = this.mapTiles; - var cT = -this.areaCenter.lng / cU; - var cS = this.areaCenter.lat / cU; - var de = [ Math.round(cT), Math.round(cS) ]; - var cL = dg.getZoom(); - for ( var df in cM) { - var di = cM[df]; - var dd = di.info; - if (dd[2] != cL - || (dd[2] == cL && (db > dd[0] || c7 <= dd[0] - || cN > dd[1] || cY <= dd[1]))) { - this.hideTile(di) - } - } - var cR = -dg.offsetX + dg.width / 2; - var c0 = -dg.offsetY + dg.height / 2; - cP.tilesDiv.style.left = Math.round(cT + cR) - de[0] + "px"; - cP.tilesDiv.style.top = Math.round(cS + c0) - de[1] + "px"; - var T = []; - for ( var c9 = db; c9 < c7; c9++) { - for ( var c8 = cN; c8 < cY; c8++) { - T.push( [ c9, c8 ]) - } - } - T.sort((function(dj) { - return function(dk, dl) { - return ((0.4 * Math.abs(dk[0] - dj[0]) + 0.6 * Math - .abs(dk[1] - dj[1])) - (0.4 * Math.abs(dl[0] - - dj[0]) + 0.6 * Math.abs(dl[1] - dj[1]))) - } - })( [ cO[0] - 1, cO[1] - 1 ])); - this.numLoading += T.length; - for ( var c9 = 0, c5 = T.length; c9 < c5; c9++) { - this.showTile( [ T[c9][0], T[c9][1], cL ], de, cP) - } - } - return - }, - addTileLayer : function(cN) { - var cM = this; - var T = cN.target; - for ( var cL = 0; cL < cM.tileLayers.length; cL++) { - if (cM.tileLayers[cL] == T) { - return - } - } - T.initialize(this.map, this._normalLayerContainer); - cM.tileLayers.push(T) - }, - removeTileLayer : function(cO) { - var cN = this; - var cL = cO.target; - for ( var cM = 0, T = cN.tileLayers.length; cM < T; cM++) { - if (cL == cN.tileLayers[cM]) { - cN.tileLayers.splice(cM, 1) - } - } - cL.remove() - }, - setMapType : function() { - var cM = this; - var cN = this.mapTypeLayers; - for ( var cL = 0, T = cN.length; cL < T; cL++) { - cN[cL].remove() - } - delete this.tilesDiv; - this.mapTypeLayers = []; - this.bufferTiles = this.mapTiles = {}; - this.initMapTypeTiles(); - this.moveGridTiles() - }, - _zoom : function() { - var T = this; - if (T.zoomsDiv) { - a8.dom.hide(T.zoomsDiv) - } - setTimeout(function() { - T.moveGridTiles(); - T.map.dispatchEvent(new bg("onzoomend")) - }, 10) - } - }); - function bU(cR, T, cO, cL, cN) { - this.mgr = cR; - this.position = cO; - this._cbks = []; - this.name = cR.getTileName(cL, cN); - this.info = cL; - this._transparentPng = cN.isTransparentPng(); - var cS = aa("img"); - cw(cS); - cS.galleryImg = false; - var cQ = cS.style; - var cM = cR.map.getMapType(); - cQ.position = "absolute"; - cQ.border = "none"; - cQ.width = cM.getTileSize() + "px"; - cQ.height = cM.getTileSize() + "px"; - cQ.left = cO[0] + "px"; - cQ.top = cO[1] + "px"; - this.img = cS; - this.src = T; - if (E) { - this.img.style.opacity = 0 - } - var cP = this; - this.img.onload = function(cY) { - cP.loaded = true; - if (!cP.mgr) { - return - } - var cU = cP.mgr; - var cT = cU.bufferTiles; - if (!cT[cP.name]) { - cU.realBufferNumber++; - cT[cP.name] = cP - } - if (cP.img && !y(cP.img)) { - if (cN.tilesDiv) { - cN.tilesDiv.appendChild(cP.img); - if (a8.browser.ie <= 6 && a8.browser.ie > 0 - && cP._transparentPng) { - cP.img.style.cssText += ';filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + cP.src + '",sizingMethod=scale);' - } - } - } - var cW = cU.realBufferNumber - cU.bufferNumber; - for ( var cX in cT) { - if (cW <= 0) { - break - } - if (!cU.mapTiles[cX]) { - cT[cX].mgr = null; - var cV = cT[cX].img; - if (cV && cV.parentNode) { - cV.parentNode.removeChild(cV); - J(cV) - } - cV = null; - cT[cX].img = null; - delete cT[cX]; - cU.realBufferNumber--; - cW-- - } - } - if (E) { - new g( { - fps : 20, - duration : 200, - render : function(cZ) { - if (cP.img && cP.img.style) { - cP.img.style.opacity = cZ * 1 - } - }, - finish : function() { - if (cP.img && cP.img.style) { - delete cP.img.style.opacity - } - } - }) - } - cP._callCbks() - }; - this.img.onerror = function() { - var cU = cP.img, cV = cP.img.getAttribute("isError") || 0; - if (m && cV < 5) { - cV++; - cU.setAttribute("isError", cV); - cU.src = T + "&t=" + new Date().getTime() - } else { - cP._callCbks(); - if (!cP.mgr) { - return - } - var cT = cP.mgr; - var cW = cT.map.getMapType(); - if (cW.getErrorImageUrl()) { - cP.error = true; - cP.img.src = cW.getErrorImageUrl(); - if (cP.img && !y(cP.img)) { - cN.tilesDiv.appendChild(cP.img) - } - } - } - }; - cS = null - } - bU.prototype._addLoadCbk = function(T) { - this._cbks.push(T) - }; - bU.prototype._load = function() { - if (a8.browser.ie > 0 && a8.browser.ie <= 6 && this._transparentPng) { - this.img.src = cc.imgPath + "blank.gif" - } else { - this.img.src = this.src - } - }; - bU.prototype._callCbks = function() { - var cL = this; - for ( var T = 0; T < cL._cbks.length; T++) { - cL._cbks[T]() - } - cL._cbks.length = 0 - }; - function J(cN) { - if (!cN) { - return - } - cN.onload = cN.onerror = null; - var cL = cN.attributes, cM, T, cO; - if (cL) { - T = cL.length; - for (cM = 0; cM < T; cM += 1) { - cO = cL[cM].name; - if (I(cN[cO])) { - cN[cO] = null - } - } - } - cL = cN.children; - if (cL) { - T = cL.length; - for (cM = 0; cM < T; cM += 1) { - J(cN.children[cM]) - } - } - } - var E = (!a8.browser.ie || a8.browser.ie > 8); - function p(T) { - this.opts = T || {}; - this.copyright = this.opts.copyright || null; - this.transparentPng = this.opts.transparentPng || false; - this.baseLayer = this.opts.baseLayer || false; - this.zIndex = this.opts.zIndex || 0; - this.guid = p._guid++ - } - p._guid = 0; - a8.lang.inherits(p, a8.lang.Class, "TileLayer"); - a8.extend(p.prototype, { - initialize : function(cM, T) { - if (this.baseLayer) { - this.zIndex = -100 - } - this.map = cM; - if (!this.tilesDiv) { - var cN = aa("div"); - var cL = cN.style; - if (!a8.platform.isAndroid) { - T.style.WebkitBackfaceVisibility = "hidden" - } - cL.position = "absolute"; - cL.zIndex = this.zIndex; - cL.left = Math.ceil(-cM.offsetX + cM.width / 2) + "px"; - cL.top = Math.ceil(-cM.offsetY + cM.height / 2) + "px"; - T.appendChild(cN); - this.tilesDiv = cN - } - }, - remove : function() { - if (this.tilesDiv && this.tilesDiv.parentNode) { - this.tilesDiv.innerHTML = ""; - this.tilesDiv.parentNode.removeChild(this.tilesDiv) - } - delete this.tilesDiv - }, - isTransparentPng : function() { - return this.transparentPng - }, - getTilesUrl : function(cL, cM) { - var T = ""; - if (this.opts.tileUrlTemplate) { - T = this.opts.tileUrlTemplate.replace(/\{X\}/, cL.x); - T = T.replace(/\{Y\}/, cL.y); - T = T.replace(/\{Z\}/, cM) - } - return T - }, - getCopyright : function() { - return this.copyright - }, - getMapType : function() { - return this.mapType || BMAP_NORMAL_MAP - } - }); - function aC(T) { - p.call(this, T); - this._opts = {}; - T = T || {}; - this._opts = a8.object.extend(this._opts, T); - if (this._opts.predictDate) { - if (this._opts.predictDate.weekday < 1 - || this._opts.predictDate.weekday > 7) { - this._opts.predictDate = 1 - } - if (this._opts.predictDate.hour < 0 - || this._opts.predictDate.hour > 23) { - this._opts.predictDate.hour = 0 - } - } - this._tileUrl = "http://its.map.baidu.com:8002/traffic/" - } - aC.prototype = new p(); - aC.prototype.initialize = function(cL, T) { - p.prototype.initialize.call(this, cL, T); - this._map = cL - }; - aC.prototype.isTransparentPng = function() { - return true - }; - aC.prototype.getTilesUrl = function(cQ, cL) { - var cR = ""; - if (this._opts.predictDate) { - cR = "HistoryService?day=" + (this._opts.predictDate.weekday - 1) - + "&hour=" + this._opts.predictDate.hour + "&t=" - + new Date().getTime() + "&" - } else { - cR = "TrafficTileService?time=" + new Date().getTime() + "&" - } - var cM = this._map, cS = cQ.x, cN = cQ.y, cP = Math.floor(cS / 200), cO = Math - .floor(cN / 200), T = this._tileUrl + cR + "level=" + cL - + "&x=" + cS + "&y=" + cN; - return T.replace(/-(\d+)/gi, "M$1") - }; - function cu(T, cL, cM) { - this._name = T; - this._layers = cL instanceof p ? [ cL ] : cL.slice(0); - this._opts = { - tips : "", - labelText : "", - minZoom : 1, - maxZoom : 19, - tileSize : 256, - textColor : "black", - errorImageUrl : "", - projection : new ba() - }; - if (this._layers.length == 1) { - this._layers[0].baseLayer = true - } - a8.extend(this._opts, cM || {}) - } - a8.extend(cu.prototype, { - getName : function() { - return this._name - }, - getTips : function() { - return this._opts.tips - }, - getLabelText : function() { - return this._opts.labelText - }, - getTileLayer : function() { - return this._layers[0] - }, - getTileLayers : function() { - return this._layers - }, - getTileSize : function() { - return this._opts.tileSize - }, - getMinZoom : function() { - return this._opts.minZoom - }, - getMaxZoom : function() { - return this._opts.maxZoom - }, - getTextColor : function() { - return this._opts.textColor - }, - getProjection : function() { - return this._opts.projection - }, - getErrorImageUrl : function() { - return this._opts.errorImageUrl - }, - getZoomUnits : function(T) { - return Math.pow(2, (18 - T)) - }, - getZoomFactor : function(T) { - return this.getZoomUnits(T) * 256 - } - }); - var b7 = [ "http://shangetu0.map.bdimg.com/it/", - "http://shangetu1.map.bdimg.com/it/", - "http://shangetu2.map.bdimg.com/it/", - "http://shangetu3.map.bdimg.com/it/", - "http://shangetu4.map.bdimg.com/it/" ]; - var j = [ "http://online0.map.bdimg.com/tile/", - "http://online1.map.bdimg.com/tile/", - "http://online2.map.bdimg.com/tile/", - "http://online3.map.bdimg.com/tile/", - "http://online4.map.bdimg.com/tile/" ]; - if (m) { - b7 = [ x + "it/" ] - } - var aT = new p(); - aT.getTilesUrl = function(cM, cP) { - var cQ = cM.x; - var cN = cM.y; -// var T = "20130712"; -// var cO = "pl"; -// if (this.map.highResolutionEnabled()) { -// cO = "ph" -// } -// var cL = j[Math.abs(cQ + cN) % j.length] + "?qt=tile&x=" -// + (cQ + "").replace(/-/gi, "M") + "&y=" -// + (cN + "").replace(/-/gi, "M") + "&z=" + cP + "&styles=" + cO -// + (a8.browser.ie == 6 ? "&color_dep=32&colors=50" : "") -// + "&udt=" + T; -// if (m) { -// cL = b7[Math.abs(cQ + cN) % b7.length] + "u=x=" + cQ + ";y=" + cN -// + ";z=" + cP + ";v=017;type=web&fm=44" -// } - cL = "static/BMap/maptile/" + cP + "/" + cQ + "/" + cN + ".jpg"; - return cL.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_NORMAL_MAP = new cu("\u5730\u56fe", aT, { - tips : "\u663e\u793a\u666e\u901a\u5730\u56fe" - }); - var bs = new p(); - bs.tileUrls = [ "http://d0.map.baidu.com/resource/mappic/", - "http://d1.map.baidu.com/resource/mappic/", - "http://d2.map.baidu.com/resource/mappic/", - "http://d3.map.baidu.com/resource/mappic/" ]; - bs.getTilesUrl = function(T, cM) { - var cO = T.x; - var cL = T.y; - var cN = Math.pow(2, (20 - cM)) * 256; - cL = Math.round((9998336 - cN * (cL)) / cN) - 1; - url = this.tileUrls[Math.abs(cO + cL) % this.tileUrls.length] - + this.map.currentCity + "/" + this.map.cityCode + "/3/lv" - + (21 - cM) + "/" + cO + "," + cL + ".jpg"; - return url - }; - window.BMAP_PERSPECTIVE_MAP = new cu("\u4e09\u7ef4", bs, { - tips : "\u663e\u793a\u4e09\u7ef4\u5730\u56fe", - minZoom : 15, - maxZoom : 20, - textColor : "white", - projection : new cE() - }); - BMAP_PERSPECTIVE_MAP.getZoomUnits = function(T) { - return Math.pow(2, (20 - T)) - }; - BMAP_PERSPECTIVE_MAP.getCityName = function(T) { - if (!T) { - return "" - } - var cL = cc.cityNames; - for ( var cM in cL) { - if (T.search(cM) > -1) { - return cL[cM] - } - } - return "" - }; - BMAP_PERSPECTIVE_MAP.getCityCode = function(T) { - return ( { - bj : 2, - gz : 1, - sz : 14, - sh : 4 - })[T] - }; - var bQ = new p( { - baseLayer : true - }); - bQ.getTilesUrl = function(cL, cN) { - var cO = cL.x; - var cM = cL.y; - var T = b7[Math.abs(cO + cM) % b7.length] + "u=x=" + cO + ";y=" + cM - + ";z=" + cN + ";v=009;type=sate&fm=46"; - return T.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_SATELLITE_MAP = new cu("\u536b\u661f", bQ, { - tips : "\u663e\u793a\u536b\u661f\u5f71\u50cf", - minZoom : 1, - maxZoom : 19, - textColor : "white" - }); - var o = new p( { - transparentPng : true - }); - o.getTilesUrl = function(cM, cO) { - var cP = cM.x; - var cN = cM.y; - var T = "20130617"; - var cL = j[Math.abs(cP + cN) % j.length] + "?qt=tile&x=" - + (cP + "").replace(/-/gi, "M") + "&y=" - + (cN + "").replace(/-/gi, "M") + "&z=" + cO + "&styles=sl" - + (a8.browser.ie == 6 ? "&color_dep=32&colors=50" : "") - + "&udt=" + T; - return cL.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_HYBRID_MAP = new cu( - "\u6df7\u5408", - [ bQ, o ], - { - tips : "\u663e\u793a\u5e26\u6709\u8857\u9053\u7684\u536b\u661f\u5f71\u50cf", - labelText : "\u8def\u7f51", - minZoom : 1, - maxZoom : 19, - textColor : "white" - }); - window.BMAP_POI_TYPE_NORMAL = 0; - window.BMAP_POI_TYPE_BUSSTOP = 1; - window.BMAP_POI_TYPE_BUSLINE = 2; - window.BMAP_POI_TYPE_SUBSTOP = 3; - window.BMAP_POI_TYPE_SUBLINE = 4; - var H = 0; - var bh = 1; - var an = {}; - function w(cL, T) { - a8.lang.Class.call(this); - this._loc = {}; - this.setLocation(cL); - this._opts = { - renderOptions : { - panel : null, - map : null, - autoViewport : true - }, - onSearchComplete : function() { - }, - onMarkersSet : function() { - }, - onInfoHtmlSet : function() { - }, - onResultsHtmlSet : function() { - }, - onGetBusListComplete : function() { - }, - onGetBusLineComplete : function() { - }, - onBusListHtmlSet : function() { - }, - onBusLineHtmlSet : function() { - }, - onPolylinesSet : function() { - }, - reqFrom : "" - }; - a8.extend(this._opts, T); - if (typeof T != "undefined" && typeof T.renderOptions != "undefined" - && typeof T.renderOptions.autoViewport != "undefined") { - this._opts.renderOptions.autoViewport = T.renderOptions.autoViewport - } else { - this._opts.renderOptions.autoViewport = true - } - this._opts.renderOptions.panel = a8.G(this._opts.renderOptions.panel) - } - a8.inherits(w, a8.lang.Class); - a8.extend(w.prototype, { - getResults : function() { - if (!this._isMultiKey) { - return this._results - } else { - return this._arrResults - } - }, - enableAutoViewport : function() { - this._opts.renderOptions.autoViewport = true - }, - disableAutoViewport : function() { - this._opts.renderOptions.autoViewport = false - }, - setLocation : function(T) { - if (!T) { - return - } - this._loc.src = T - }, - setSearchCompleteCallback : function(T) { - this._opts.onSearchComplete = T || function() { - } - }, - setMarkersSetCallback : function(T) { - this._opts.onMarkersSet = T || function() { - } - }, - setPolylinesSetCallback : function(T) { - this._opts.onPolylinesSet = T || function() { - } - }, - setInfoHtmlSetCallback : function(T) { - this._opts.onInfoHtmlSet = T || function() { - } - }, - setResultsHtmlSetCallback : function(T) { - this._opts.onResultsHtmlSet = T || function() { - } - }, - getStatus : function() { - return this._status - } - }); - var bb = { - REQ_BASE_URL : x, - request : function(cQ, cN, cL, cS, cM) { - return; - var cO = (Math.random() * 100000).toFixed(0); - BMap._rd["_cbk" + cO] = function(cT) { - cL = cL || {}; - cQ && cQ(cT, cL); - delete BMap._rd["_cbk" + cO] - }; - cS = cS || ""; - var cR; - if (cL && cL.useEncodeURI) { - cR = O(cN, encodeURI) - } else { - cR = O(cN, encodeURIComponent) - } - var cP = this, T = cP.REQ_BASE_URL + cS + "?" + cR - + "&ie=utf-8&oue=1&fromproduct=jsapi"; - if (!cM) { - T += "&res=api" - } - T += "&callback=BMap._rd._cbk" + cO; - cx.request(T) - } - }; - BMap._rd = {}; - var S = {}; - S.removeHtml = function(T) { - return T.replace(/<\/?b>/g, "") - }; - S.parseGeoExtReg1 = function(T) { - return T - .replace( - /([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g, - "$1,$2;") - }; - S.parseGeoExtReg2 = function(cL, T) { - var cM = new RegExp( - "(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){" - + T + "}", "ig"); - return cL.replace(cM, "$1") - }; - window.BMAP_STATUS_SUCCESS = 0; - window.BMAP_STATUS_CITY_LIST = 1; - window.BMAP_STATUS_UNKNOWN_LOCATION = 2; - window.BMAP_STATUS_UNKNOWN_ROUTE = 3; - window.BMAP_STATUS_INVALID_KEY = 4; - window.BMAP_STATUS_INVALID_REQUEST = 5; - window.BMAP_STATUS_PERMISSION_DENIED = 6; - window.BMAP_STATUS_SERVICE_UNAVAILABLE = 7; - window.BMAP_STATUS_TIMEOUT = 8; - window.BMAP_ROUTE_TYPE_WALKING = 2; - window.BMAP_ROUTE_TYPE_DRIVING = 3; - var cv = "cur"; - var c = "cen"; - var cj = "s"; - var Q = "con"; - var al = "bd"; - var cb = "nb"; - var F = "bt"; - var bM = "nav"; - var bv = "walk"; - var bA = "gc"; - var d = "rgc"; - var U = "dec"; - var aQ = "bse"; - var e = "nse"; - var G = "bl"; - var bf = "bsl"; - var aG = "bda"; - var ai = "sa"; - var a1 = "nba"; - var ci = "drag"; - var b4 = "ext"; - var s = 2; - var a5 = 4; - var bt = 7; - var X = 11; - var aN = 12; - var bi = 14; - var a2 = 15; - var cy = 18; - var u = 20; - var R = 21; - var ap = 26; - var bE = 28; - var z = 31; - var bq = 35; - var bC = 44; - var ax = 45; - var ae = 46; - var bS = 47; - var a0 = -1; - var ab = 0; - var cq = 1; - var a6 = 2; - var B = 3; - var cI = "http://map.baidu.com/"; - BMap.I = window.Instance = a8.lang.instance; - var a4 = function(cM, cL) { - w.call(this, cM, cL); - cL = cL || {}; - cL.renderOptions = cL.renderOptions || {}; - this.setPageCapacity(cL.pageCapacity); - if (typeof cL.renderOptions.selectFirstResult != "undefined" - && !cL.renderOptions.selectFirstResult) { - this.disableFirstResultSelection() - } else { - this.enableFirstResultSelection() - } - this._overlays = []; - this._arrPois = []; - this._curIndex = -1; - this._queryList = []; - var T = this; - cA.load("local", function() { - T._check() - }) - }; - a8.inherits(a4, w, "LocalSearch"); - a4.DEFAULT_PAGE_CAPACITY = 10; - a4.MIN_PAGE_CAPACITY = 1; - a4.MAX_PAGE_CAPACITY = 100; - a4.DEFAULT_RADIUS = 2000; - a4.MAX_RADIUS = 100000; - a8.extend(a4.prototype, { - search : function(T) { - this._queryList.push( { - method : "search", - arguments : [ T ] - }) - }, - searchInBounds : function(T, cL) { - this._queryList.push( { - method : "searchInBounds", - arguments : [ T, cL ] - }) - }, - searchNearby : function(cM, cL, T) { - this._queryList.push( { - method : "searchNearby", - arguments : [ cM, cL, T ] - }) - }, - clearResults : function() { - delete this._json; - delete this._status; - delete this._results; - delete this._ud; - this._curIndex = -1; - this._setStatus(); - if (this._opts.renderOptions.panel) { - this._opts.renderOptions.panel.innerHTML = "" - } - }, - gotoPage : function() { - }, - enableFirstResultSelection : function() { - this._opts.renderOptions.selectFirstResult = true - }, - disableFirstResultSelection : function() { - this._opts.renderOptions.selectFirstResult = false - }, - setPageCapacity : function(T) { - if (typeof T == "number" && !isNaN(T)) { - this._opts.pageCapacity = T < 1 ? a4.DEFAULT_PAGE_CAPACITY - : (T > a4.MAX_PAGE_CAPACITY ? a4.DEFAULT_PAGE_CAPACITY - : T) - } else { - this._opts.pageCapacity = a4.DEFAULT_PAGE_CAPACITY - } - }, - getPageCapacity : function() { - return this._opts.pageCapacity - }, - toString : function() { - return "LocalSearch" - } - }); - var b5 = function(cL, T) { - w.call(this, cL, T) - }; - a8.inherits(b5, w, "BaseRoute"); - a8.extend(b5.prototype, { - clearResults : function() { - } - }); - window.BMAP_TRANSIT_POLICY_LEAST_TIME = 0; - window.BMAP_TRANSIT_POLICY_LEAST_TRANSFER = 2; - window.BMAP_TRANSIT_POLICY_LEAST_WALKING = 3; - window.BMAP_TRANSIT_POLICY_AVOID_SUBWAYS = 4; - window.BMAP_LINE_TYPE_BUS = 0; - window.BMAP_LINE_TYPE_SUBWAY = 1; - window.BMAP_LINE_TYPE_FERRY = 2; - function aU(cM, cL) { - b5.call(this, cM, cL); - cL = cL || {}; - this.setPolicy(cL.policy); - this.setPageCapacity(cL.pageCapacity); - this.QUERY_TYPE = F; - this.RETURN_TYPE = bi; - this.ROUTE_TYPE = bh; - this._overlays = []; - this._curIndex = -1; - this._queryList = []; - var T = this; - cA.load("route", function() { - T._asyncSearch() - }) - } - aU.MAX_PAGE_CAPACITY = 100; - aU.LINE_TYPE_MAPPING = [ 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 1 ]; - a8.inherits(aU, b5, "TransitRoute"); - a8.extend(aU.prototype, { - setPolicy : function(T) { - if (T >= BMAP_TRANSIT_POLICY_LEAST_TIME - && T <= BMAP_TRANSIT_POLICY_AVOID_SUBWAYS) { - this._opts.policy = T - } else { - this._opts.policy = BMAP_TRANSIT_POLICY_LEAST_TIME - } - }, - _internalSearch : function(cL, T) { - this._queryList.push( { - method : "_internalSearch", - arguments : [ cL, T ] - }) - }, - search : function(cL, T) { - this._queryList.push( { - method : "search", - arguments : [ cL, T ] - }) - }, - setPageCapacity : function(T) { - if (typeof T == "string") { - T = parseInt(T); - if (isNaN(T)) { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY; - return - } - } - if (typeof T != "number") { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY; - return - } - if (T >= 1 && T <= aU.MAX_PAGE_CAPACITY) { - this._opts.pageCapacity = Math.round(T) - } else { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY - } - }, - toString : function() { - return "TransitRoute" - }, - _shortTitle : function(T) { - return T.replace(/\(.*\)/, "") - } - }); - window.BMAP_HIGHLIGHT_STEP = 1; - window.BMAP_HIGHLIGHT_ROUTE = 2; - var bl = function(T, cN) { - b5.call(this, T, cN); - this._overlays = []; - this._curIndex = -1; - this._queryList = []; - var cM = this; - var cL = this._opts.renderOptions; - if (cL.highlightMode != BMAP_HIGHLIGHT_STEP - && cL.highlightMode != BMAP_HIGHLIGHT_ROUTE) { - cL.highlightMode = BMAP_HIGHLIGHT_STEP - } - this._enableDragging = this._opts.renderOptions.enableDragging ? true - : false; - cA.load("route", function() { - cM._asyncSearch() - }) - }; - bl.ROAD_TYPE = [ "", "\u73af\u5c9b", "\u65e0\u5c5e\u6027\u9053\u8def", - "\u4e3b\u8def", "\u9ad8\u901f\u8fde\u63a5\u8def", - "\u4ea4\u53c9\u70b9\u5185\u8def\u6bb5", "\u8fde\u63a5\u9053\u8def", - "\u505c\u8f66\u573a\u5185\u90e8\u9053\u8def", - "\u670d\u52a1\u533a\u5185\u90e8\u9053\u8def", "\u6865", - "\u6b65\u884c\u8857", "\u8f85\u8def", "\u531d\u9053", - "\u5168\u5c01\u95ed\u9053\u8def", - "\u672a\u5b9a\u4e49\u4ea4\u901a\u533a\u57df", - "POI\u8fde\u63a5\u8def", "\u96a7\u9053", "\u6b65\u884c\u9053", - "\u516c\u4ea4\u4e13\u7528\u9053", "\u63d0\u524d\u53f3\u8f6c\u9053" ]; - a8.inherits(bl, b5, "DWRoute"); - a8.extend(bl.prototype, { - search : function(cL, T) { - this._queryList.push( { - method : "search", - arguments : [ cL, T ] - }) - } - }); - window.BMAP_DRIVING_POLICY_LEAST_TIME = 0; - window.BMAP_DRIVING_POLICY_LEAST_DISTANCE = 1; - window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS = 2; - function q(T, cL) { - bl.call(this, T, cL); - cL = cL || {}; - this.setPolicy(cL.policy); - this.QUERY_TYPE = bM; - this.RETURN_TYPE = u; - this.ROUTE_TYPE = BMAP_ROUTE_TYPE_DRIVING - } - a8.inherits(q, bl, "DrivingRoute"); - a8.extend(q.prototype, { - setPolicy : function(T) { - if (T >= BMAP_DRIVING_POLICY_LEAST_TIME - && T <= BMAP_DRIVING_POLICY_AVOID_HIGHWAYS) { - this._opts.policy = T - } else { - this._opts.policy = BMAP_DRIVING_POLICY_LEAST_TIME - } - } - }); - function cD(T, cL) { - bl.call(this, T, cL); - this.QUERY_TYPE = bv; - this.RETURN_TYPE = z; - this.ROUTE_TYPE = BMAP_ROUTE_TYPE_WALKING; - this._enableDragging = false - } - a8.inherits(cD, bl, "WalkingRoute"); - function aX(cL) { - this._opts = {}; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(aX, a8.lang.Class, "Geocoder"); - a8.extend(aX.prototype, { - getPoint : function(T, cM, cL) { - this._queryList.push( { - method : "getPoint", - arguments : [ T, cM, cL ] - }) - }, - getLocation : function(T, cM, cL) { - this._queryList.push( { - method : "getLocation", - arguments : [ T, cM, cL ] - }) - }, - toString : function() { - return "Geocoder" - } - }); - function ak(cL) { - this._opts = {}; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.extend(ak.prototype, { - getCurrentPosition : function(cL, T) { - this._queryList.push( { - method : "getCurrentPosition", - arguments : [ cL, T ] - }) - }, - getStatus : function() { - return this._status - } - }); - function b9(cL) { - this._opts = { - renderOptions : { - map : null - } - }; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(b9, a8.lang.Class, "LocalCity"); - a8.extend(b9.prototype, { - get : function(T) { - this._queryList.push( { - method : "get", - arguments : [ T ] - }) - }, - toString : function() { - return "LocalCity" - } - }); - function V() { - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(V, a8.lang.Class, "Boundary"); - a8.extend(V.prototype, { - get : function(cL, T) { - this._queryList.push( { - method : "get", - arguments : [ cL, T ] - }) - }, - toString : function() { - return "Boundary" - } - }); - function bm(cM, cL) { - w.call(this, cM, cL); - this.QUERY_TYPE_BUSLIST = G; - this.RETURN_TYPE_BUSLIST = a2; - this.QUERY_TYPE_BUSLINE = bf; - this.RETURN_TYPE_BUSLINE = cy; - this._queryList = []; - var T = this; - cA.load("buslinesearch", function() { - T._asyncSearch() - }) - } - bm._iconOpen = cc.imgPath + "iw_plus.gif"; - bm._iconClose = cc.imgPath + "iw_minus.gif"; - bm._stopUrl = cc.imgPath + "stop_icon.png"; - a8.inherits(bm, w); - a8.extend(bm.prototype, { - getBusList : function(T) { - this._queryList.push( { - method : "getBusList", - arguments : [ T ] - }) - }, - getBusLine : function(T) { - this._queryList.push( { - method : "getBusLine", - arguments : [ T ] - }) - }, - setGetBusListCompleteCallback : function(T) { - this._opts.onGetBusListComplete = T || function() { - } - }, - setGetBusLineCompleteCallback : function(T) { - this._opts.onGetBusLineComplete = T || function() { - } - }, - setBusListHtmlSetCallback : function(T) { - this._opts.onBusListHtmlSet = T || function() { - } - }, - setBusLineHtmlSetCallback : function(T) { - this._opts.onBusLineHtmlSet = T || function() { - } - }, - setPolylinesSetCallback : function(T) { - this._opts.onPolylinesSet = T || function() { - } - } - }); - function by(cL) { - w.call(this, cL); - cL = cL || {}; - this._options = { - input : null, - types : [], - onSearchComplete : function() { - } - }; - a8.extend(this._options, cL); - this._loc.src = cL.location || "\u5168\u56fd"; - this._word = ""; - this._show = false; - this._suggestion = null; - this._inputValue = ""; - this._initialize(); - _addStat(5011); - var T = this; - cA.load("autocomplete", function() { - T._asyncSearch() - }) - } - a8.inherits(by, w, "Autocomplete"); - a8.extend(by.prototype, { - _initialize : function() { - }, - show : function() { - this._show = true - }, - hide : function() { - this._show = false - }, - setTypes : function(T) { - this._options.types = T - }, - setLocation : function(T) { - this._loc.src = T - }, - search : function(T) { - this._word = T - }, - setInputValue : function(T) { - this._inputValue = T - } - }); - function aj(T, cL) { - window.BMap[T] = cL - } - aj("Map", bz); - aj("Hotspot", cm); - aj("MapType", cu); - aj("Point", cd); - aj("Pixel", bu); - aj("Size", aH); - aj("Bounds", bN); - aj("TileLayer", p); - aj("Projection", bd); - aj("MercatorProjection", ba); - aj("PerspectiveProjection", cE); - aj("Copyright", av); - aj("Overlay", bG); - aj("Label", ag); - aj("Marker", ad); - aj("Icon", M); - aj("Polyline", f); - aj("Polygon", cn); - aj("InfoWindow", bP); - aj("Circle", a); - aj("Control", cp); - aj("NavigationControl", L); - aj("OverviewMapControl", cK); - aj("CopyrightControl", am); - aj("ScaleControl", bK); - aj("MapTypeControl", aL); - aj("TrafficLayer", aC); - aj("ContextMenu", cz); - aj("MenuItem", be); - aj("LocalSearch", a4); - aj("TransitRoute", aU); - aj("DrivingRoute", q); - aj("WalkingRoute", cD); - aj("Autocomplete", by); - aj("Geocoder", aX); - aj("LocalCity", b9); - aj("Geolocation", ak); - aj("BusLineSearch", bm); - aj("Boundary", V); - window.BMap.apiLoad(); -})(); diff --git a/static/BMap/js/bmap_offline_api_v3.0_min.js b/static/BMap/js/bmap_offline_api_v3.0_min.js deleted file mode 100644 index 878b4e9..0000000 --- a/static/BMap/js/bmap_offline_api_v3.0_min.js +++ /dev/null @@ -1,9809 +0,0 @@ -window.TILE_VERSION = { - "ditu": { - "normal": { - "version": "088", - "updateDate": "20180829" - }, - "satellite": { - "version": "009", - "updateDate": "20180829" - }, - "normalTraffic": { - "version": "081", - "updateDate": "20180829" - }, - "satelliteTraffic": { - "version": "083", - "updateDate": "20180829" - }, - "mapJS": { - "version": "104", - "updateDate": "20180829" - }, - "satelliteStreet": { - "version": "083", - "updateDate": "20180829" - }, - "panoClick": { - "version": "1033", - "updateDate": "20180816" - }, - "panoUdt": { - "version": "20180816", - "updateDate": "20180816" - }, - "panoSwfAPI": { - "version": "20150123", - "updateDate": "20150123" - }, - "panoSwfPlace": { - "version": "20141112", - "updateDate": "20141112" - }, - "earthVector": { - "version": "001", - "updateDate": "20180829" - } - }, - "webapp": { - "high_normal": { - "version": "001", - "updateDate": "20180829" - }, - "lower_normal": { - "version": "002", - "updateDate": "20180829" - } - }, - "api_for_mobile": { - "vector": { - "version": "002", - "updateDate": "20180829" - }, - "vectorIcon": { - "version": "002", - "updateDate": "20180829" - } - } -}; -window.BMAP_AUTHENTIC_KEY = ""; -var bmapcfg = { - 'imgext' : '.jpg', //瓦片图的后缀 ------ 根据需要修改,一般是 .png .jpg - 'tiles_dir' : 'static/BMap/maptile/', //普通瓦片图的地址,为空默认在 offlinemap/tiles/ 目录 - 'tiles_hybrid': '', //卫星瓦片图的地址,为空默认在 offlinemap/tiles_hybrid/ 目录 - 'tiles_self' : '', //自定义图层的地址,为空默认在 offlinemap/tiles_self/ 目录 - 'home':'static/BMap/' -}; -(function() { - function aa(a) { - throw a; - } - var l = void 0 - , q = !0 - , s = null - , t = !1; - function u() { - return function() {} - } - function ba(a) { - return function(b) { - this[a] = b - } - } - function w(a) { - return function() { - return this[a] - } - } - function ca(a) { - return function() { - return a - } - } - var da, ea = []; - function ga(a) { - return function() { - return ea[a].apply(this, arguments) - } - } - function ha(a, b) { - return ea[a] = b - } - var ia, z = ia = z || { - version: "1.3.4" - }; - z.aa = "$BAIDU$"; - window[z.aa] = window[z.aa] || {}; - z.object = z.object || {}; - z.extend = z.object.extend = function(a, b) { - for (var c in b) - b.hasOwnProperty(c) && (a[c] = b[c]); - return a - } - ; - z.D = z.D || {}; - z.D.$ = function(a) { - return "string" == typeof a || a instanceof String ? document.getElementById(a) : a && a.nodeName && (1 == a.nodeType || 9 == a.nodeType) ? a : s - } - ; - z.$ = z.Fc = z.D.$; - z.D.U = function(a) { - a = z.D.$(a); - if (a === s) - return a; - a.style.display = "none"; - return a - } - ; - z.U = z.D.U; - z.lang = z.lang || {}; - z.lang.wg = function(a) { - return "[object String]" == Object.prototype.toString.call(a) - } - ; - z.wg = z.lang.wg; - z.D.Oj = function(a) { - return z.lang.wg(a) ? document.getElementById(a) : a - } - ; - z.Oj = z.D.Oj; - z.D.getElementsByClassName = function(a, b) { - var c; - if (a.getElementsByClassName) - c = a.getElementsByClassName(b); - else { - var e = a; - e == s && (e = document); - c = []; - var e = e.getElementsByTagName("*"), f = e.length, g = RegExp("(^|\\s)" + b + "(\\s|$)"), i, k; - for (k = i = 0; i < f; i++) - g.test(e[i].className) && (c[k] = e[i], - k++) - } - return c - } - ; - z.getElementsByClassName = z.D.getElementsByClassName; - z.D.contains = function(a, b) { - var c = z.D.Oj - , a = c(a) - , b = c(b); - return a.contains ? a != b && a.contains(b) : !!(a.compareDocumentPosition(b) & 16) - } - ; - z.ca = z.ca || {}; - /msie (\d+\.\d)/i.test(navigator.userAgent) && (z.ca.ia = z.ia = document.documentMode || +RegExp.$1); - var ja = { - cellpadding: "cellPadding", - cellspacing: "cellSpacing", - colspan: "colSpan", - rowspan: "rowSpan", - valign: "vAlign", - usemap: "useMap", - frameborder: "frameBorder" - }; - 8 > z.ca.ia ? (ja["for"] = "htmlFor", - ja["class"] = "className") : (ja.htmlFor = "for", - ja.className = "class"); - z.D.RG = ja; - z.D.BF = function(a, b, c) { - a = z.D.$(a); - if (a === s) - return a; - if ("style" == b) - a.style.cssText = c; - else { - b = z.D.RG[b] || b; - a.setAttribute(b, c) - } - return a - } - ; - z.BF = z.D.BF; - z.D.CF = function(a, b) { - a = z.D.$(a); - if (a === s) - return a; - for (var c in b) - z.D.BF(a, c, b[c]); - return a - } - ; - z.CF = z.D.CF; - z.Wk = z.Wk || {}; - (function() { - var a = RegExp("(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+$)", "g"); - z.Wk.trim = function(b) { - return ("" + b).replace(a, "") - } - } - )(); - z.trim = z.Wk.trim; - z.Wk.Wo = function(a, b) { - var a = "" + a - , c = Array.prototype.slice.call(arguments, 1) - , e = Object.prototype.toString; - if (c.length) { - c = c.length == 1 ? b !== s && /\[object Array\]|\[object Object\]/.test(e.call(b)) ? b : c : c; - return a.replace(/#\{(.+?)\}/g, function(a, b) { - var i = c[b]; - "[object Function]" == e.call(i) && (i = i(b)); - return "undefined" == typeof i ? "" : i - }) - } - return a - } - ; - z.Wo = z.Wk.Wo; - z.D.Pb = function(a, b) { - a = z.D.$(a); - if (a === s) - return a; - for (var c = a.className.split(/\s+/), e = b.split(/\s+/), f, g = e.length, i, k = 0; k < g; ++k) { - i = 0; - for (f = c.length; i < f; ++i) - if (c[i] == e[k]) { - c.splice(i, 1); - break - } - } - a.className = c.join(" "); - return a - } - ; - z.Pb = z.D.Pb; - z.D.Vx = function(a, b, c) { - a = z.D.$(a); - if (a === s) - return a; - var e; - if (a.insertAdjacentHTML) - a.insertAdjacentHTML(b, c); - else { - e = a.ownerDocument.createRange(); - b = b.toUpperCase(); - if (b == "AFTERBEGIN" || b == "BEFOREEND") { - e.selectNodeContents(a); - e.collapse(b == "AFTERBEGIN") - } else { - b = b == "BEFOREBEGIN"; - e[b ? "setStartBefore" : "setEndAfter"](a); - e.collapse(b) - } - e.insertNode(e.createContextualFragment(c)) - } - return a - } - ; - z.Vx = z.D.Vx; - z.D.show = function(a) { - a = z.D.$(a); - if (a === s) - return a; - a.style.display = ""; - return a - } - ; - z.show = z.D.show; - z.D.QD = function(a) { - a = z.D.$(a); - return a === s ? a : a.nodeType == 9 ? a : a.ownerDocument || a.document - } - ; - z.D.Ua = function(a, b) { - a = z.D.$(a); - if (a === s) - return a; - for (var c = b.split(/\s+/), e = a.className, f = " " + e + " ", g = 0, i = c.length; g < i; g++) - f.indexOf(" " + c[g] + " ") < 0 && (e = e + (" " + c[g])); - a.className = e; - return a - } - ; - z.Ua = z.D.Ua; - z.D.PB = z.D.PB || {}; - z.D.Ol = z.D.Ol || []; - z.D.Ol.filter = function(a, b, c) { - for (var e = 0, f = z.D.Ol, g; g = f[e]; e++) - if (g = g[c]) - b = g(a, b); - return b - } - ; - z.Wk.RO = function(a) { - return a.indexOf("-") < 0 && a.indexOf("_") < 0 ? a : a.replace(/[-_][^-_]/g, function(a) { - return a.charAt(1).toUpperCase() - }) - } - ; - z.D.m0 = function(a) { - z.D.it(a, "expand") ? z.D.Pb(a, "expand") : z.D.Ua(a, "expand") - } - ; - z.D.it = function(a) { - if (arguments.length <= 0 || typeof a === "function") - return this; - if (this.size() <= 0) - return t; - var a = a.replace(/^\s+/g, "").replace(/\s+$/g, "").replace(/\s+/g, " "), b = a.split(" "), c; - z.forEach(this, function(a) { - for (var a = a.className, f = 0; f < b.length; f++) - if (!~(" " + a + " ").indexOf(" " + b[f] + " ")) { - c = t; - return - } - c !== t && (c = q) - }); - return c - } - ; - z.D.oj = function(a, b) { - var c = z.D - , a = c.$(a); - if (a === s) - return a; - var b = z.Wk.RO(b) - , e = a.style[b]; - if (!e) - var f = c.PB[b] - , e = a.currentStyle || (z.ca.ia ? a.style : getComputedStyle(a, s)) - , e = f && f.get ? f.get(a, e) : e[f || b]; - if (f = c.Ol) - e = f.filter(b, e, "get"); - return e - } - ; - z.oj = z.D.oj; - /opera\/(\d+\.\d)/i.test(navigator.userAgent) && (z.ca.opera = +RegExp.$1); - z.ca.HM = /webkit/i.test(navigator.userAgent); - z.ca.VY = /gecko/i.test(navigator.userAgent) && !/like gecko/i.test(navigator.userAgent); - z.ca.DE = "CSS1Compat" == document.compatMode; - z.D.ga = function(a) { - a = z.D.$(a); - if (a === s) - return a; - var b = z.D.QD(a) - , c = z.ca - , e = z.D.oj; - c.VY > 0 && b.getBoxObjectFor && e(a, "position"); - var f = { - left: 0, - top: 0 - }, g; - if (a == (c.ia && !c.DE ? b.body : b.documentElement)) - return f; - if (a.getBoundingClientRect) { - a = a.getBoundingClientRect(); - f.left = Math.floor(a.left) + Math.max(b.documentElement.scrollLeft, b.body.scrollLeft); - f.top = Math.floor(a.top) + Math.max(b.documentElement.scrollTop, b.body.scrollTop); - f.left = f.left - b.documentElement.clientLeft; - f.top = f.top - b.documentElement.clientTop; - a = b.body; - b = parseInt(e(a, "borderLeftWidth")); - e = parseInt(e(a, "borderTopWidth")); - if (c.ia && !c.DE) { - f.left = f.left - (isNaN(b) ? 2 : b); - f.top = f.top - (isNaN(e) ? 2 : e) - } - } else { - g = a; - do { - f.left = f.left + g.offsetLeft; - f.top = f.top + g.offsetTop; - if (c.HM > 0 && e(g, "position") == "fixed") { - f.left = f.left + b.body.scrollLeft; - f.top = f.top + b.body.scrollTop; - break - } - g = g.offsetParent - } while (g && g != a);if (c.opera > 0 || c.HM > 0 && e(a, "position") == "absolute") - f.top = f.top - b.body.offsetTop; - for (g = a.offsetParent; g && g != b.body; ) { - f.left = f.left - g.scrollLeft; - if (!c.opera || g.tagName != "TR") - f.top = f.top - g.scrollTop; - g = g.offsetParent - } - } - return f - } - ; - /firefox\/(\d+\.\d)/i.test(navigator.userAgent) && (z.ca.Te = +RegExp.$1); - /BIDUBrowser/i.test(navigator.userAgent) && (z.ca.n2 = q); - var ka = navigator.userAgent; - /(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(ka) && !/chrome/i.test(ka) && (z.ca.Iy = +(RegExp.$1 || RegExp.$2)); - /chrome\/(\d+\.\d)/i.test(navigator.userAgent) && (z.ca.Qw = +RegExp.$1); - z.mc = z.mc || {}; - z.mc.Fb = function(a, b) { - var c, e, f = a.length; - if ("function" == typeof b) - for (e = 0; e < f; e++) { - c = a[e]; - c = b.call(a, c, e); - if (c === t) - break - } - return a - } - ; - z.Fb = z.mc.Fb; - z.lang.aa = function() { - return "TANGRAM__" + (window[z.aa]._counter++).toString(36) - } - ; - window[z.aa]._counter = window[z.aa]._counter || 1; - window[z.aa]._instances = window[z.aa]._instances || {}; - z.lang.wt = function(a) { - return "[object Function]" == Object.prototype.toString.call(a) - } - ; - z.lang.Ca = function(a) { - this.aa = a || z.lang.aa(); - window[z.aa]._instances[this.aa] = this - } - ; - window[z.aa]._instances = window[z.aa]._instances || {}; - z.lang.Ca.prototype.ci = ga(0); - z.lang.Ca.prototype.toString = function() { - return "[object " + (this.UQ || "Object") + "]" - } - ; - z.lang.Ju = function(a, b) { - this.type = a; - this.returnValue = q; - this.target = b || s; - this.currentTarget = s - } - ; - z.lang.Ca.prototype.addEventListener = function(a, b, c) { - if (z.lang.wt(b)) { - !b.fl && (b.fl = {}); - !this.Ci && (this.Ci = {}); - var e = this.Ci, f; - if (typeof c == "string" && c) { - /[^\w\-]/.test(c) && aa("nonstandard key:" + c); - f = b.Nx = c - } - a.indexOf("on") != 0 && (a = "on" + a); - typeof e[a] != "object" && (e[a] = {}); - typeof b.fl[a] != "object" && (b.fl[a] = {}); - f = f || z.lang.aa(); - b.fl[a].Nx = f; - e[a][f] = b - } - } - ; - z.lang.Ca.prototype.removeEventListener = function(a, b) { - a.indexOf("on") != 0 && (a = "on" + a); - if (z.lang.wt(b)) { - if (!b.fl || !b.fl[a]) - return; - b = b.fl[a].Nx - } else if (!z.lang.wg(b)) - return; - !this.Ci && (this.Ci = {}); - var c = this.Ci; - c[a] && c[a][b] && delete c[a][b] - } - ; - z.lang.Ca.prototype.dispatchEvent = function(a, b) { - z.lang.wg(a) && (a = new z.lang.Ju(a)); - !this.Ci && (this.Ci = {}); - var b = b || {}, c; - for (c in b) - a[c] = b[c]; - var e = this.Ci - , f = a.type; - a.target = a.target || this; - a.currentTarget = this; - f.indexOf("on") != 0 && (f = "on" + f); - z.lang.wt(this[f]) && this[f].apply(this, arguments); - if (typeof e[f] == "object") - for (c in e[f]) - e[f][c].apply(this, arguments); - return a.returnValue - } - ; - z.lang.ta = function(a, b, c) { - var e, f, g = a.prototype; - f = new Function; - f.prototype = b.prototype; - f = a.prototype = new f; - for (e in g) - f[e] = g[e]; - a.prototype.constructor = a; - a.b0 = b.prototype; - if ("string" == typeof c) - f.UQ = c - } - ; - z.ta = z.lang.ta; - z.lang.Nc = function(a) { - return window[z.aa]._instances[a] || s - } - ; - z.platform = z.platform || {}; - z.platform.AM = /macintosh/i.test(navigator.userAgent); - z.platform.h4 = /MicroMessenger/i.test(navigator.userAgent); - z.platform.IM = /windows/i.test(navigator.userAgent); - z.platform.cZ = /x11/i.test(navigator.userAgent); - z.platform.Jm = /android/i.test(navigator.userAgent); - /android (\d+\.\d)/i.test(navigator.userAgent) && (z.platform.dK = z.dK = RegExp.$1); - z.platform.XY = /ipad/i.test(navigator.userAgent); - z.platform.zE = /iphone/i.test(navigator.userAgent); - function la(a, b) { - a.domEvent = b = window.event || b; - a.clientX = b.clientX || b.pageX; - a.clientY = b.clientY || b.pageY; - a.offsetX = b.offsetX || b.layerX; - a.offsetY = b.offsetY || b.layerY; - a.screenX = b.screenX; - a.screenY = b.screenY; - a.ctrlKey = b.ctrlKey || b.metaKey; - a.shiftKey = b.shiftKey; - a.altKey = b.altKey; - if (b.touches) { - a.touches = []; - for (var c = 0; c < b.touches.length; c++) - a.touches.push({ - clientX: b.touches[c].clientX, - clientY: b.touches[c].clientY, - screenX: b.touches[c].screenX, - screenY: b.touches[c].screenY, - pageX: b.touches[c].pageX, - pageY: b.touches[c].pageY, - target: b.touches[c].target, - identifier: b.touches[c].identifier - }) - } - if (b.changedTouches) { - a.changedTouches = []; - for (c = 0; c < b.changedTouches.length; c++) - a.changedTouches.push({ - clientX: b.changedTouches[c].clientX, - clientY: b.changedTouches[c].clientY, - screenX: b.changedTouches[c].screenX, - screenY: b.changedTouches[c].screenY, - pageX: b.changedTouches[c].pageX, - pageY: b.changedTouches[c].pageY, - target: b.changedTouches[c].target, - identifier: b.changedTouches[c].identifier - }) - } - if (b.targetTouches) { - a.targetTouches = []; - for (c = 0; c < b.targetTouches.length; c++) - a.targetTouches.push({ - clientX: b.targetTouches[c].clientX, - clientY: b.targetTouches[c].clientY, - screenX: b.targetTouches[c].screenX, - screenY: b.targetTouches[c].screenY, - pageX: b.targetTouches[c].pageX, - pageY: b.targetTouches[c].pageY, - target: b.targetTouches[c].target, - identifier: b.targetTouches[c].identifier - }) - } - a.rotation = b.rotation; - a.scale = b.scale; - return a - } - z.lang.hx = function(a) { - var b = window[z.aa]; - b.eT && delete b.eT[a] - } - ; - z.event = {}; - z.M = z.event.M = function(a, b, c) { - if (!(a = z.$(a))) - return a; - b = b.replace(/^on/, ""); - a.addEventListener ? a.addEventListener(b, c, t) : a.attachEvent && a.attachEvent("on" + b, c); - return a - } - ; - z.ed = z.event.ed = function(a, b, c) { - if (!(a = z.$(a))) - return a; - b = b.replace(/^on/, ""); - a.removeEventListener ? a.removeEventListener(b, c, t) : a.detachEvent && a.detachEvent("on" + b, c); - return a - } - ; - z.D.it = function(a, b) { - if (!a || !a.className || typeof a.className != "string") - return t; - var c = -1; - try { - c = a.className == b || a.className.search(RegExp("(\\s|^)" + b + "(\\s|$)")) - } catch (e) { - return t - } - return c > -1 - } - ; - z.iL = function() { - function a(a) { - document.addEventListener && (this.element = a, - this.lL = this.Dk ? "touchstart" : "mousedown", - this.xD = this.Dk ? "touchmove" : "mousemove", - this.wD = this.Dk ? "touchend" : "mouseup", - this.oh = t, - this.mu = this.lu = 0, - this.element.addEventListener(this.lL, this, t), - ia.M(this.element, "mousedown", u()), - this.handleEvent(s)) - } - a.prototype = { - Dk: "ontouchstart"in window || "createTouch"in document, - start: function(a) { - ma(a); - this.oh = t; - this.lu = this.Dk ? a.touches[0].clientX : a.clientX; - this.mu = this.Dk ? a.touches[0].clientY : a.clientY; - this.element.addEventListener(this.xD, this, t); - this.element.addEventListener(this.wD, this, t) - }, - move: function(a) { - na(a); - var c = this.Dk ? a.touches[0].clientY : a.clientY; - if (10 < Math.abs((this.Dk ? a.touches[0].clientX : a.clientX) - this.lu) || 10 < Math.abs(c - this.mu)) - this.oh = q - }, - end: function(a) { - na(a); - this.oh || (a = document.createEvent("Event"), - a.initEvent("tap", t, q), - this.element.dispatchEvent(a)); - this.element.removeEventListener(this.xD, this, t); - this.element.removeEventListener(this.wD, this, t) - }, - handleEvent: function(a) { - if (a) - switch (a.type) { - case this.lL: - this.start(a); - break; - case this.xD: - this.move(a); - break; - case this.wD: - this.end(a) - } - } - }; - return function(b) { - return new a(b) - } - }(); - var B = window.BMap || {}; - B.version = "3.0"; - B.gV = 0.34 > Math.random(); - 0 <= B.version.indexOf("#") && (B.version = "3.0"); - B.Fr = []; - B.Ye = function(a) { - this.Fr.push(a) - } - ; - B.ur = []; - B.Tm = function(a) { - this.ur.push(a) - } - ; - B.vV = B.apiLoad || u(); - B.Q0 = B.verify || function() { - B.version && B.version >= 1.5 && oa(B.Wc + "?qt=verify&ak=" + qa, function(a) { - if (a && a.error !== 0) { - if (typeof map !== "undefined") { - map.La().innerHTML = ""; - map.Ci = {} - } - B = s; - var b = "\u767e\u5ea6\u672a\u6388\u6743\u4f7f\u7528\u5730\u56feAPI\uff0c\u53ef\u80fd\u662f\u56e0\u4e3a\u60a8\u63d0\u4f9b\u7684\u5bc6\u94a5\u4e0d\u662f\u6709\u6548\u7684\u767e\u5ea6LBS\u5f00\u653e\u5e73\u53f0\u5bc6\u94a5\uff0c\u6216\u6b64\u5bc6\u94a5\u672a\u5bf9\u672c\u5e94\u7528\u7684\u767e\u5ea6\u5730\u56feJavaScriptAPI\u6388\u6743\u3002\u60a8\u53ef\u4ee5\u8bbf\u95ee\u5982\u4e0b\u7f51\u5740\u4e86\u89e3\u5982\u4f55\u83b7\u53d6\u6709\u6548\u7684\u5bc6\u94a5\uff1ahttp://lbsyun.baidu.com/apiconsole/key#\u3002"; - switch (a.error) { - case 101: - b = "\u5f00\u53d1\u8005\u7981\u7528\u4e86\u8be5ak\u7684jsapi\u670d\u52a1\u6743\u9650\u3002\u60a8\u53ef\u4ee5\u8bbf\u95ee\u5982\u4e0b\u7f51\u5740\u4e86\u89e3\u5982\u4f55\u83b7\u53d6\u6709\u6548\u7684\u5bc6\u94a5\uff1ahttp://lbsyun.baidu.com/apiconsole/key#\u3002"; - break; - case 102: - b = "\u5f00\u53d1\u8005Referer\u4e0d\u6b63\u786e\u3002\u60a8\u53ef\u4ee5\u8bbf\u95ee\u5982\u4e0b\u7f51\u5740\u4e86\u89e3\u5982\u4f55\u83b7\u53d6\u6709\u6548\u7684\u5bc6\u94a5\uff1ahttp://lbsyun.baidu.com/apiconsole/key#\u3002" - } - alert(b) - } - }) - } - ; - var qa = window.BMAP_AUTHENTIC_KEY; - window.BMAP_AUTHENTIC_KEY = s; - var ra = window.BMap_loadScriptTime - , sa = (new Date).getTime() - , ta = s - , ua = q - , va = 5042 - , xa = 5002 - , ya = 5003 - , za = "load_mapclick" - , Aa = 5038 - , Ba = 5041 - , Ca = 5047 - , Da = 5036 - , Ea = 5039 - , Fa = 5037 - , Ga = 5040 - , Ha = 5011 - , Ia = 7E3; - var Ja = 0; - function Ka(a, b) { - if (a = z.$(a)) { - var c = this; - z.lang.Ca.call(c); - b = b || {}; - c.K = { - tC: 200, - Wb: q, - px: t, - nD: q, - To: q, - Uo: b.enableWheelZoom || t, - gL: q, - pD: q, - Ns: q, - nx: q, - tD: q, - Ro: b.enable3DBuilding || t, - Ic: 25, - b1: 240, - iV: 450, - Vb: G.Vb, - Hd: G.Hd, - Yx: !!b.Yx, - gc: Math.round(b.minZoom) || 1, - Yb: Math.round(b.maxZoom) || 19, - Hb: b.mapType || La, - e5: t, - cL: b.drawer || Ja, - ox: q, - lx: 500, - aX: b.enableHighResolution !== t, - fj: b.enableMapClick !== t, - devicePixelRatio: b.devicePixelRatio || window.devicePixelRatio || 1, - fG: 99, - ye: b.mapStyle || s, - jZ: b.logoControl === t ? t : q, - DV: [], - Kw: b.beforeClickIcon || s, - Ms: t, - qN: q - }; - c.K.ye && (this.LY(c.K.ye.controls), - this.sM(c.K.ye.geotableId)); - c.K.ye && c.K.ye.styleId && c.O3(c.K.ye.styleId); - c.K.fm = { - dark: { - backColor: "#2D2D2D", - textColor: "#bfbfbf", - iconUrl: "dicons" - }, - normal: { - backColor: "#F3F1EC", - textColor: "#c61b1b", - iconUrl: "icons" - }, - light: { - backColor: "#EBF8FC", - textColor: "#017fb4", - iconUrl: "licons" - } - }; - b.enableAutoResize && (c.K.nx = b.enableAutoResize); - b.enableStreetEntrance === t && (c.K.tD = b.enableStreetEntrance); - b.enableDeepZoom === t && (c.K.gL = b.enableDeepZoom); - var e = c.K.DV; - if (H()) - for (var f = 0, g = e.length; f < g; f++) - if (z.ca[e[f]]) { - c.K.devicePixelRatio = 1; - break - } - e = -1 < navigator.userAgent.toLowerCase().indexOf("android"); - f = -1 < navigator.userAgent.toLowerCase().indexOf("mqqbrowser"); - if (-1 < navigator.userAgent.toLowerCase().indexOf("UCBrowser") || e && f) - c.K.fG = 99; - c.Wa = a; - c.IB(a); - a.unselectable = "on"; - a.innerHTML = ""; - a.appendChild(c.va()); - b.size && this.Ce(b.size); - e = c.cb(); - c.width = e.width; - c.height = e.height; - c.offsetX = 0; - c.offsetY = 0; - c.platform = a.firstChild; - c.ze = c.platform.firstChild; - c.ze.style.width = c.width + "px"; - c.ze.style.height = c.height + "px"; - c.Yd = {}; - c.re = new J(0,0); - c.fc = new J(0,0); - c.Oa = 3; - c.Oc = 0; - c.LC = s; - c.KC = s; - c.Ub = ""; - c.Rw = ""; - c.Jh = {}; - c.Jh.custom = {}; - c.Sa = 0; - b.useWebGL === t && Na(t); - c.P = new Oa(a,{ - of: "api", - jT: q - }); - c.P.U(); - c.P.GF(c); - b = b || {}; - e = c.Hb = c.K.Hb; - c.cd = e.wm(); - e === Qa && Ra(xa); - e === Sa && Ra(ya); - e = c.K; - e.hP = Math.round(b.minZoom); - e.gP = Math.round(b.maxZoom); - c.bv(); - c.R = { - Jc: t, - nc: 0, - Bt: 0, - MM: 0, - l4: 0, - lC: t, - pF: -1, - Qe: [] - }; - c.platform.style.cursor = c.K.Vb; - for (f = 0; f < B.Fr.length; f++) - B.Fr[f](c); - c.R.pF = f; - c.ba(); - K.load("map", function() { - c.ib() - }); - c.K.fj && (setTimeout(function() { - Ra(za) - }, 1E3), - K.load("mapclick", function() { - window.MPC_Mgr = window.MPC_Mgr || {}; - window.MPC_Mgr[c.aa] = new Ta(c) - }, q)); - Ua() && K.load("oppc", function() { - c.Dz() - }); - H() && K.load("opmb", function() { - c.Dz() - }); - a = s; - c.WB = [] - } - } - z.lang.ta(Ka, z.lang.Ca, "Map"); - z.extend(Ka.prototype, { - va: function() { - var a = L("div") - , b = a.style; - b.overflow = "visible"; - b.position = "absolute"; - b.zIndex = "0"; - b.top = b.left = "0px"; - var b = L("div", { - "class": "BMap_mask" - }) - , c = b.style; - c.position = "absolute"; - c.top = c.left = "0px"; - c.zIndex = "9"; - c.overflow = "hidden"; - c.WebkitUserSelect = "none"; - a.appendChild(b); - return a - }, - IB: function(a) { - var b = a.style; - b.overflow = "hidden"; - "absolute" !== Va(a).position && (b.position = "relative", - b.zIndex = 0); - b.backgroundColor = "#F3F1EC"; - b.color = "#000"; - b.textAlign = "left" - }, - ba: function() { - var a = this; - a.as = function() { - var b = a.cb(); - if (a.width !== b.width || a.height !== b.height) { - var c = new O(a.width,a.height) - , e = new P("onbeforeresize"); - e.size = c; - a.dispatchEvent(e); - a.ik((b.width - a.width) / 2, (b.height - a.height) / 2); - a.ze.style.width = (a.width = b.width) + "px"; - a.ze.style.height = (a.height = b.height) + "px"; - c = new P("onresize"); - c.size = b; - a.dispatchEvent(c) - } - } - ; - a.K.nx && (a.R.es = setInterval(a.as, 80)) - }, - ik: function(a, b, c, e) { - var f = this.oa().dc(this.fa()) - , g = this.cd - , i = q; - c && J.yM(c) && (this.re = new J(c.lng,c.lat), - i = t); - if (c = c && e ? g.vj(c, this.Ub) : this.fc) - if (this.fc = new J(c.lng + a * f,c.lat - b * f), - (a = g.nh(this.fc, this.Ub)) && i) - this.re = a - }, - Gg: function(a, b) { - if (Wa(a) && (this.bv(), - this.dispatchEvent(new P("onzoomstart")), - a = this.Yn(a).zoom, - a !== this.Oa)) { - this.Oc = this.Oa; - this.Oa = a; - var c; - b ? c = b : this.hh() && (c = this.hh().ga()); - c && (c = this.$b(c, this.Oc), - this.ik(this.width / 2 - c.x, this.height / 2 - c.y, this.xb(c, this.Oc), q)); - this.dispatchEvent(new P("onzoomstartcode")) - } - }, - Qc: function(a) { - this.Gg(a) - }, - kG: function(a) { - this.Gg(this.Oa + 1, a) - }, - lG: function(a) { - this.Gg(this.Oa - 1, a) - }, - qi: function(a) { - a instanceof J && (this.fc = this.cd.vj(a, this.Ub), - this.re = J.yM(a) ? new J(a.lng,a.lat) : this.cd.nh(this.fc, this.Ub)) - }, - Ag: function(a, b) { - a = Math.round(a) || 0; - b = Math.round(b) || 0; - this.ik(-a, -b) - }, - Aw: function(a) { - a && Xa(a.He) && (a.He(this), - this.dispatchEvent(new P("onaddcontrol",a))) - }, - VN: function(a) { - a && Xa(a.remove) && (a.remove(), - this.dispatchEvent(new P("onremovecontrol",a))) - }, - yo: function(a) { - a && Xa(a.na) && (a.na(this), - this.dispatchEvent(new P("onaddcontextmenu",a))) - }, - Cp: function(a) { - a && Xa(a.remove) && (this.dispatchEvent(new P("onremovecontextmenu",a)), - a.remove()) - }, - Ga: function(a) { - a && Xa(a.He) && (a.He(this), - this.dispatchEvent(new P("onaddoverlay",a))) - }, - Qb: function(a) { - a && Xa(a.remove) && (a.remove(), - this.dispatchEvent(new P("onremoveoverlay",a))) - }, - yK: function() { - this.dispatchEvent(new P("onclearoverlays")) - }, - Oe: function(a) { - a && this.dispatchEvent(new P("onaddtilelayer",a)) - }, - Yf: function(a) { - a && this.dispatchEvent(new P("onremovetilelayer",a)) - }, - Dg: function(a) { - if (this.Hb !== a) { - var b = new P("onsetmaptype"); - b.V4 = this.Hb; - this.Hb = this.K.Hb = a; - this.cd = this.Hb.wm(); - this.ik(0, 0, this.Ka(), q); - this.bv(); - var c = this.Yn(this.fa()).zoom; - this.Gg(c); - this.dispatchEvent(b); - b = new P("onmaptypechange"); - b.Oa = c; - b.Hb = a; - this.dispatchEvent(b); - (a === Ya || a === Sa) && Ra(ya) - } - }, - Zf: function(a) { - var b = this; - if (a instanceof J) - b.qi(a, { - noAnimation: q - }); - else if ($a(a)) - if (b.Hb === Qa) { - var c = G.pC[a]; - c && (pt = c.k, - b.Zf(pt)) - } else { - var e = this.WH(); - e.JF(function(c) { - 0 === e.xm() && 2 === e.Ia.result.type && (b.Zf(c.Ak(0).point), - Qa.wk(a) && b.DF(a)) - }); - e.search(a, { - log: "center" - }) - } - }, - Fd: function(a, b) { - "[object Undefined]" !== Object.prototype.toString.call(b) && (b = parseInt(b)); - B.Fn("cus.fire", "time", { - z_loadscripttime: sa - ra - }); - var c = this; - if ($a(a)) - if (c.Hb === Qa) { - var e = G.pC[a]; - e && (pt = e.k, - c.Fd(pt, b)) - } else { - var f = c.WH(); - f.JF(function(e) { - if (0 === f.xm() && (2 === f.Ia.result.type || 11 === f.Ia.result.type)) { - var e = e.Ak(0).point - , g = b || ab.tx(f.Ia.content.level, c); - c.Fd(e, g); - Qa.wk(a) && c.DF(a) - } - }); - f.search(a, { - log: "center" - }) - } - else if (a instanceof J && b) { - b = c.Yn(b).zoom; - c.Oc = c.Oa || b; - c.Oa = b; - e = c.re; - c.re = new J(a.lng,a.lat); - c.fc = c.cd.vj(c.re, c.Ub); - c.LC = c.LC || c.Oa; - c.KC = c.KC || c.re; - var g = new P("onload") - , i = new P("onloadcode"); - g.point = new J(a.lng,a.lat); - g.pixel = c.$b(c.re, c.Oa); - g.zoom = b; - c.loaded || (c.loaded = q, - c.dispatchEvent(g), - ta || (ta = bb())); - c.dispatchEvent(i); - g = new P("onmoveend"); - g.mv = "centerAndZoom"; - e.pb(c.re) || c.dispatchEvent(g); - c.dispatchEvent(new P("onmoveend")); - c.Oc !== c.Oa && (e = new P("onzoomend"), - e.mv = "centerAndZoom", - c.dispatchEvent(e)); - c.K.Ro && c.Ro() - } - }, - WH: function() { - this.R.YM || (this.R.YM = new cb(1)); - return this.R.YM - }, - reset: function() { - this.Fd(this.KC, this.LC, q) - }, - enableDragging: function() { - this.K.Wb = q - }, - disableDragging: function() { - this.K.Wb = t - }, - enableInertialDragging: function() { - this.K.ox = q - }, - disableInertialDragging: function() { - this.K.ox = t - }, - enableScrollWheelZoom: function() { - this.K.Uo = q - }, - disableScrollWheelZoom: function() { - this.K.Uo = t - }, - enableContinuousZoom: function() { - this.K.To = q - }, - disableContinuousZoom: function() { - this.K.To = t - }, - enableDoubleClickZoom: function() { - this.K.nD = q - }, - disableDoubleClickZoom: function() { - this.K.nD = t - }, - enableKeyboard: function() { - this.K.px = q - }, - disableKeyboard: function() { - this.K.px = t - }, - enablePinchToZoom: function() { - this.K.Ns = q - }, - disablePinchToZoom: function() { - this.K.Ns = t - }, - enableAutoResize: function() { - this.K.nx = q; - this.as(); - this.R.es || (this.R.es = setInterval(this.as, 80)) - }, - disableAutoResize: function() { - this.K.nx = t; - this.R.es && (clearInterval(this.R.es), - this.R.es = s) - }, - Ro: function() { - this.K.Ro = q; - this.Nn || (this.Nn = new db({ - pL: q - }), - this.Oe(this.Nn)) - }, - KW: function() { - this.K.Ro = t; - this.Nn && (this.Yf(this.Nn), - this.Nn = s, - delete this.Nn) - }, - cb: function() { - return this.xs && this.xs instanceof O ? new O(this.xs.width,this.xs.height) : new O(this.Wa.clientWidth,this.Wa.clientHeight) - }, - Ce: function(a) { - a && a instanceof O ? (this.xs = a, - this.Wa.style.width = a.width + "px", - this.Wa.style.height = a.height + "px") : this.xs = s - }, - Ka: w("re"), - fa: w("Oa"), - ZV: function() { - this.as() - }, - Yn: function(a) { - var b = this.K.gc - , c = this.K.Yb - , e = t - , a = Math.round(a); - a < b && (e = q, - a = b); - a > c && (e = q, - a = c); - return { - zoom: a, - yD: e - } - }, - La: w("Wa"), - $b: function(a, b) { - b = b || this.fa(); - return this.cd.$b(a, b, this.fc, this.cb(), this.Ub) - }, - xb: function(a, b) { - b = b || this.fa(); - return this.cd.xb(a, b, this.fc, this.cb(), this.Ub) - }, - Xe: function(a, b) { - if (a) { - var c = this.$b(new J(a.lng,a.lat), b); - c.x -= this.offsetX; - c.y -= this.offsetY; - return c - } - }, - JN: function(a, b) { - if (a) { - var c = new Q(a.x,a.y); - c.x += this.offsetX; - c.y += this.offsetY; - return this.xb(c, b) - } - }, - pointToPixelFor3D: function(a, b) { - var c = map.Ub; - this.Hb === Qa && c && eb.EK(a, this, b) - }, - P4: function(a, b) { - var c = map.Ub; - this.Hb === Qa && c && eb.DK(a, this, b) - }, - Q4: function(a, b) { - var c = this - , e = map.Ub; - c.Hb === Qa && e && eb.EK(a, c, function(a) { - a.x -= c.offsetX; - a.y -= c.offsetY; - b && b(a) - }) - }, - L4: function(a, b) { - var c = map.Ub; - this.Hb === Qa && c && (a.x += this.offsetX, - a.y += this.offsetY, - eb.DK(a, this, b)) - }, - ve: function(a) { - if (!this.Xx()) - return new fb; - var b = a || {} - , a = b.margins || [0, 0, 0, 0] - , c = b.zoom || s - , b = this.xb({ - x: a[3], - y: this.height - a[2] - }, c) - , a = this.xb({ - x: this.width - a[1], - y: a[0] - }, c); - return new fb(b,a) - }, - Xx: function() { - return !!this.loaded - }, - nS: function(a, b) { - for (var c = this.oa(), e = b.margins || [10, 10, 10, 10], f = b.zoomFactor || 0, g = e[1] + e[3], e = e[0] + e[2], i = c.bp(), k = c = c.sm(); k >= i; k--) { - var m = this.oa().dc(k); - if (a.YF().lng / m < this.width - g && a.YF().lat / m < this.height - e) - break - } - k += f; - k < i && (k = i); - k > c && (k = c); - return k - }, - ht: function(a, b) { - var c = { - center: this.Ka(), - zoom: this.fa() - }; - if (!a || !a instanceof fb && 0 === a.length || a instanceof fb && a.tj()) - return c; - var e = []; - a instanceof fb ? (e.push(a.Rf()), - e.push(a.Ve())) : e = a.slice(0); - for (var b = b || {}, f = [], g = 0, i = e.length; g < i; g++) - f.push(this.cd.vj(e[g], this.Ub)); - e = new fb; - for (g = f.length - 1; 0 <= g; g--) - e.extend(f[g]); - if (e.tj()) - return c; - c = e.Ka(); - f = this.nS(e, b); - b.margins && (e = b.margins, - g = (e[1] - e[3]) / 2, - e = (e[0] - e[2]) / 2, - i = this.oa().dc(f), - b.offset && (g = b.offset.width, - e = b.offset.height), - c.lng += i * g, - c.lat += i * e); - c = this.cd.nh(c, this.Ub); - return { - center: c, - zoom: f - } - }, - yh: function(a, b) { - var c; - c = a && a.center ? a : this.ht(a, b); - var b = b || {} - , e = b.delay || 200; - if (c.zoom === this.Oa && b.enableAnimation !== t) { - var f = this; - setTimeout(function() { - f.qi(c.center, { - duration: 210 - }) - }, e) - } else - this.Fd(c.center, c.zoom) - }, - Tf: w("Yd"), - hh: function() { - return this.R.qb && this.R.qb.Xa() ? this.R.qb : s - }, - getDistance: function(a, b) { - if (a && b) { - if (a.pb(b)) - return 0; - var c = 0 - , c = S.$o(a, b); - if (c === s || c === l) - c = 0; - return c - } - }, - Hx: function() { - var a = [] - , b = this.ya - , c = this.Ee; - if (b) - for (var e in b) - b[e]instanceof gb && a.push(b[e]); - if (c) { - e = 0; - for (b = c.length; e < b; e++) - a.push(c[e]) - } - return a - }, - oa: w("Hb"), - Dz: function() { - for (var a = this.R.pF; a < B.Fr.length; a++) - B.Fr[a](this); - this.R.pF = a - }, - DF: function(a) { - //修改 setCurrentCity - //i_setCurrentCity(this, a); - this.Ub = Qa.wk(a); - this.Rw = Qa.BL(this.Ub); - this.Hb === Qa && this.cd instanceof hb && (this.cd.$i = this.Ub) - }, - setDefaultCursor: function(a) { - this.K.Vb = a; - this.platform && (this.platform.style.cursor = this.K.Vb) - }, - getDefaultCursor: function() { - return this.K.Vb - }, - setDraggingCursor: function(a) { - this.K.Hd = a - }, - getDraggingCursor: function() { - return this.K.Hd - }, - Sx: function() { - return this.K.aX && 1.5 <= this.K.devicePixelRatio - }, - Cw: function(a, b) { - b ? this.Jh[b] || (this.Jh[b] = {}) : b = "custom"; - a.tag = b; - a instanceof ib && (this.Jh[b][a.aa] = a, - a.na(this)); - var c = this; - K.load("hotspot", function() { - c.Dz() - }, q) - }, - VZ: function(a, b) { - b || (b = "custom"); - this.Jh[b][a.aa] && delete this.Jh[b][a.aa] - }, - dm: function(a) { - a || (a = "custom"); - this.Jh[a] = {} - }, - bv: function() { - var a = this.Hb.bp() - , b = this.Hb.sm() - , c = this.K; - c.gc = c.hP || a; - c.Yb = c.gP || b; - c.gc < a && (c.gc = a); - c.Yb > b && (c.Yb = b) - }, - setMinZoom: function(a) { - a = Math.round(a); - a > this.K.Yb && (a = this.K.Yb); - this.K.hP = a; - this.HJ() - }, - setMaxZoom: function(a) { - a = Math.round(a); - a < this.K.gc && (a = this.K.gc); - this.K.gP = a; - this.HJ() - }, - HJ: function() { - this.bv(); - var a = this.K; - this.Oa < a.gc ? this.Qc(a.gc) : this.Oa > a.Yb && this.Qc(a.Yb); - var b = new P("onzoomspanchange"); - b.gc = a.gc; - b.Yb = a.Yb; - this.dispatchEvent(b) - }, - Q3: w("WB"), - getKey: function() { - return qa - }, - Zt: function(a) { - var b = this; - window.MPC_Mgr && window.MPC_Mgr[b.aa] && window.MPC_Mgr[b.aa].close(); - b.K.fj = t; - B.Fn("cus.fire", "count", "z_setmapstylecount"); - if (a) { - b = this; - a.styleJson && (a.styleStr = b.Z_(a.styleJson)); - H() && z.ca.Iy ? setTimeout(function() { - b.K.ye = a; - b.dispatchEvent(new P("onsetcustomstyles",a)) - }, 50) : (this.K.ye = a, - this.dispatchEvent(new P("onsetcustomstyles",a)), - this.sM(b.K.ye.geotableId)); - var c = { - style: a.style - }; - a.features && 0 < a.features.length && (c.features = q); - a.styleJson && 0 < a.styleJson.length && (c.styleJson = q); - Ra(5050, c); - a.style && (c = b.K.fm[a.style] ? b.K.fm[a.style].backColor : b.K.fm.normal.backColor) && (this.La().style.backgroundColor = c) - } - }, - LY: function(a) { - this.controls || (this.controls = { - navigationControl: new jb, - scaleControl: new kb, - overviewMapControl: new lb, - mapTypeControl: new mb - }); - var b = this, c; - for (c in this.controls) - b.VN(b.controls[c]); - a = a || []; - z.mc.Fb(a, function(a) { - b.Aw(b.controls[a]) - }) - }, - sM: function(a) { - a ? this.vs && this.vs.Cf === a || (this.Yf(this.vs), - this.vs = new nb({ - geotableId: a - }), - this.Oe(this.vs)) : this.Yf(this.vs) - }, - Sb: function() { - var a = this.fa() >= this.K.fG && this.oa() === La && 18 >= this.fa() - , b = t; - try { - document.createElement("canvas").getContext("2d"), - b = q - } catch (c) { - b = t - } - return a && b - }, - getCurrentCity: function() { - return { - name: this.$g, - code: this.fs - } - }, - tm: function() { - this.P.co(); - return this.P - }, - PY: function(a) { - B.alog("cus.fire", "count", "z_loadindoormapcount"); - La.setMaxZoom(a.maxZoom || 19); - var b = new P("oninitindoorlayer"); - b.vf = a; - this.dispatchEvent(b); - this.K.Ms = t - }, - D_: function(a) { - this.K.qN = a; - this.Va.Jb.parentElement.style.display = a ? "block" : "none" - }, - setPanorama: function(a) { - this.P = a; - this.P.GF(this) - }, - Z_: function(a) { - for (var b = { - featureType: "t", - elementType: "e", - visibility: "v", - color: "c", - lightness: "l", - saturation: "s", - weight: "w", - zoom: "z", - hue: "h" - }, c = { - all: "all", - geometry: "g", - "geometry.fill": "g.f", - "geometry.stroke": "g.s", - labels: "l", - "labels.text.fill": "l.t.f", - "labels.text.stroke": "l.t.s", - "lables.text": "l.t", - "labels.icon": "l.i" - }, e = [], f = 0, g; g = a[f]; f++) { - var i = g.stylers; - delete g.stylers; - z.extend(g, i); - var i = [], k; - for (k in b) - if (g[k]) - if ("elementType" === k) - i.push(b[k] + ":" + c[g[k]]); - else { - switch (g[k]) { - case "poilabel": - g[k] = "poi"; - break; - case "districtlabel": - g[k] = "label" - } - i.push(b[k] + ":" + g[k]) - } - 2 < i.length && e.push(i.join("|")) - } - return e.join(",") - } - }); - function Ra(a, b) { - if (a) { - var b = b || {}, c = "", e; - for (e in b) - c = c + "&" + e + "=" + encodeURIComponent(b[e]); - var f = function(a) { - a && (ob = q, - setTimeout(function() { - pb.src = B.Wc + "images/blank.gif?" + a.src - }, 50)) - } - , g = function() { - var a = qb.shift(); - a && f(a) - }; - e = (1E8 * Math.random()).toFixed(0); - ob ? qb.push({ - src: "product=jsapi&sub_product=jsapi&v=" + B.version + "&sub_product_v=" + B.version + "&t=" + e + "&code=" + a + "&da_src=" + a + c - }) : f({ - src: "product=jsapi&sub_product=jsapi&v=" + B.version + "&sub_product_v=" + B.version + "&t=" + e + "&code=" + a + "&da_src=" + a + c - }); - rb || (z.M(pb, "load", function() { - ob = t; - g() - }), - z.M(pb, "error", function() { - ob = t; - g() - }), - rb = q) - } - } - var ob, rb, qb = [], pb = new Image; - Ra(5E3, { - device_pixel_ratio: window.devicePixelRatio, - platform: navigator.platform - }); - B.mM = { - TILE_BASE_URLS: ["gss0.bdstatic.com/5bwHcj7lABFU8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFV8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFS8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFT8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFY8t_jkk_Z1zRvfdw6buu"], - TILE_ONLINE_URLS: ["gss0.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlRMgBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlRcgBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlRsgBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlQ1gBo1vgoIiO_jowehsv"], - TIlE_PERSPECT_URLS: ["gss0.bdstatic.com/-OR1cTe9KgQFm2e88IuM_a", "gss0.bdstatic.com/-ON1cTe9KgQFm2e88IuM_a", "gss0.bdstatic.com/-OZ1cTe9KgQFm2e88IuM_a", "gss0.bdstatic.com/-OV1cTe9KgQFm2e88IuM_a"], - geolocControl: "gsp0.baidu.com/8LkJsjOpB1gCo2Kml5_Y_D3", - TILES_YUN_HOST: ["gsp0.baidu.com/-eR1bSahKgkFkRGko9WTAnF6hhy", "gsp0.baidu.com/-eN1bSahKgkFkRGko9WTAnF6hhy", "gsp0.baidu.com/-eZ1bSahKgkFkRGko9WTAnF6hhy", "gsp0.baidu.com/-eV1bSahKgkFkRGko9WTAnF6hhy"], - traffic: "gsp0.baidu.com/7_AZsjOpB1gCo2Kml5_Y_DAcsMJiwa", - iw_pano: "gss0.bdstatic.com/5LUZemba_QUU8t7mm9GUKT-xh_", - message: "gsp0.baidu.com/7vo0bSba2gU2pMbgoY3K", - baidumap: "gsp0.baidu.com/80MWsjip0QIZ8tyhnq", - wuxian: "gsp0.baidu.com/6a1OdTeaKgQFm2e88IuM_a", - pano: ["gss0.bdstatic.com/5LUZemba_QUU8t7mm9GUKT-xh_", "gss0.bdstatic.com/5LUZemfa_QUU8t7mm9GUKT-xh_", "gss0.bdstatic.com/5LUZemja_QUU8t7mm9GUKT-xh_"], - main_domain_nocdn: { - baidu: "gsp0.baidu.com/9_Q4sjOpB1gCo2Kml5_Y_D3", - other: "api.map.baidu.com" - }, - main_domain_cdn: { - baidu: ["gss0.bdstatic.com/9_Q4vHSd2RZ3otebn9fN2DJv", "gss0.baidu.com/9_Q4vXSd2RZ3otebn9fN2DJv", "gss0.bdstatic.com/9_Q4vnSd2RZ3otebn9fN2DJv"], - other: ["api.map.baidu.com"], - webmap: ["gss0.baidu.com/6b1IcTe9R1gBo1vgoIiO_jowehsv"] - }, - map_click: "gsp0.baidu.com/80MWbzKh2wt3n2qy8IqW0jdnxx1xbK", - vector_traffic: "gss0.bdstatic.com/8aZ1cTe9KgQIm2_p8IuM_a" - }; - B.DY = { - TILE_BASE_URLS: ["shangetu0.map.bdimg.com", "shangetu1.map.bdimg.com", "shangetu2.map.bdimg.com", "shangetu3.map.bdimg.com", "shangetu4.map.bdimg.com"], - TILE_ONLINE_URLS: ["online0.map.bdimg.com", "online1.map.bdimg.com", "online2.map.bdimg.com", "online3.map.bdimg.com", "online4.map.bdimg.com"], - TIlE_PERSPECT_URLS: ["d0.map.baidu.com", "d1.map.baidu.com", "d2.map.baidu.com", "d3.map.baidu.com"], - geolocControl: "loc.map.baidu.com", - TILES_YUN_HOST: ["g0.api.map.baidu.com", "g1.api.map.baidu.com", "g2.api.map.baidu.com", "g3.api.map.baidu.com"], - traffic: "its.map.baidu.com:8002", - iw_pano: "pcsv0.map.bdimg.com", - message: "j.map.baidu.com", - baidumap: "map.baidu.com", - wuxian: "wuxian.baidu.com", - pano: ["pcsv0.map.bdimg.com", "pcsv1.map.bdimg.com", "pcsv2.map.bdimg.com"], - main_domain_nocdn: { - baidu: "api.map.baidu.com" - }, - main_domain_cdn: { - baidu: ["api0.map.bdimg.com", "api1.map.bdimg.com", "api2.map.bdimg.com"], - webmap: ["webmap0.map.bdimg.com"] - }, - map_click: "mapclick.map.baidu.com", - vector_traffic: "or.map.bdimg.com" - }; - B.F0 = { - "0": { - proto: "http://", - domain: B.DY - }, - 1: { - proto: "https://", - domain: B.mM - }, - 2: { - proto: "https://", - domain: B.mM - } - }; - window.BMAP_PROTOCOL && "https" === window.BMAP_PROTOCOL && (window.HOST_TYPE = 2); - B.xu = window.HOST_TYPE || "0"; - B.url = B.F0[B.xu]; - B.vp = B.url.proto + B.url.domain.baidumap + "/"; - //B.vp =bmapcfg.home; //修改,本地工具资源引用(离线路径) - B.Wc = B.url.proto + ("2" == B.xu ? B.url.domain.main_domain_nocdn.other : B.url.domain.main_domain_nocdn.baidu) + "/"; - //B.Wc =bmapcfg.home; //修改,本地工具资源引用(离线路径) - //B.ka=B.url.proto+("2"==B.xu?B.url.domain.main_domain_cdn.other[0]:B.url.domain.main_domain_cdn.baidu[0])+"/"; - B.ka = bmapcfg.home; //修改,本地工具资源引用(离线路径) - B.Yi = B.url.proto + B.url.domain.main_domain_cdn.webmap[0] + "/"; - //B.Yi =bmapcfg.home; //修改,本地工具资源引用(离线路径) - B.vg = function(a, b) { - var c, e, b = b || ""; - switch (a) { - case "main_domain_nocdn": - c = B.Wc + b; - break; - case "main_domain_cdn": - c = B.ka + b; - break; - default: - e = B.url.domain[a], - "[object Array]" == Object.prototype.toString.call(e) ? (c = [], - z.mc.Fb(e, function(a, e) { - c[e] = B.url.proto + a + "/" + b - })) : c = B.url.proto + B.url.domain[a] + "/" + b - } - return c - } - ; - function tb(a) { - var b = { - duration: 1E3, - Ic: 30, - No: 0, - kc: ub.UM, - Kt: u() - }; - this.dg = []; - if (a) - for (var c in a) - b[c] = a[c]; - this.j = b; - if (Wa(b.No)) { - var e = this; - setTimeout(function() { - e.start() - }, b.No) - } else - b.No != vb && this.start() - } - var vb = "INFINITE"; - tb.prototype.start = function() { - this.Uu = bb(); - this.gA = this.Uu + this.j.duration; - wb(this) - } - ; - tb.prototype.add = function(a) { - this.dg.push(a) - } - ; - function wb(a) { - var b = bb(); - b >= a.gA ? (Xa(a.j.va) && a.j.va(a.j.kc(1)), - Xa(a.j.finish) && a.j.finish(), - 0 < a.dg.length && (b = a.dg[0], - b.dg = [].concat(a.dg.slice(1)), - b.start())) : (a.Jy = a.j.kc((b - a.Uu) / a.j.duration), - Xa(a.j.va) && a.j.va(a.Jy), - a.TF || (a.Yr = setTimeout(function() { - wb(a) - }, 1E3 / a.j.Ic))) - } - tb.prototype.stop = function(a) { - this.TF = q; - for (var b = 0; b < this.dg.length; b++) - this.dg[b].stop(), - this.dg[b] = s; - this.dg.length = 0; - this.Yr && (clearTimeout(this.Yr), - this.Yr = s); - this.j.Kt(this.Jy); - a && (this.gA = this.Uu, - wb(this)) - } - ; - tb.prototype.cancel = ga(1); - var ub = { - UM: function(a) { - return a - }, - reverse: function(a) { - return 1 - a - }, - iD: function(a) { - return a * a - }, - hD: function(a) { - return Math.pow(a, 3) - }, - Ks: function(a) { - return -(a * (a - 2)) - }, - eL: function(a) { - return Math.pow(a - 1, 3) + 1 - }, - dL: function(a) { - return 0.5 > a ? 2 * a * a : -2 * (a - 2) * a - 1 - }, - R2: function(a) { - return 0.5 > a ? 4 * Math.pow(a, 3) : 4 * Math.pow(a - 1, 3) + 1 - }, - S2: function(a) { - return (1 - Math.cos(Math.PI * a)) / 2 - } - }; - ub["ease-in"] = ub.iD; - ub["ease-out"] = ub.Ks; - var G = { - oG: 34, - pG: 21, - qG: new O(21,32), - wP: new O(10,32), - vP: new O(24,36), - uP: new O(12,36), - mG: new O(13,1), - qa: B.ka + "images/", - a4: "http://api0.map.bdimg.com/images/", - nG: B.ka + "images/markers_new.png", - sP: 24, - tP: 73, - pC: { - "\u5317\u4eac": { - yy: "bj", - k: new J(116.403874,39.914889) - }, - "\u4e0a\u6d77": { - yy: "sh", - k: new J(121.487899,31.249162) - }, - "\u6df1\u5733": { - yy: "sz", - k: new J(114.025974,22.546054) - }, - "\u5e7f\u5dde": { - yy: "gz", - k: new J(113.30765,23.120049) - } - }, - fontFamily: "arial,sans-serif" - }; - z.ca.Te ? (z.extend(G, { - TK: "url(" + G.qa + "ruler.cur),crosshair", - Vb: "-moz-grab", - Hd: "-moz-grabbing" - }), - z.platform.IM && (G.fontFamily = "arial,simsun,sans-serif")) : z.ca.Qw || z.ca.Iy ? z.extend(G, { - TK: "url(" + G.qa + "ruler.cur) 2 6,crosshair", - Vb: "url(" + G.qa + "openhand.cur) 8 8,default", - Hd: "url(" + G.qa + "closedhand.cur) 8 8,move" - }) : z.extend(G, { - TK: "url(" + G.qa + "ruler.cur),crosshair", - Vb: "url(" + G.qa + "openhand.cur),default", - Hd: "url(" + G.qa + "closedhand.cur),move" - }); - function xb(a, b) { - var c = a.style; - c.left = b[0] + "px"; - c.top = b[1] + "px" - } - function yb(a) { - 0 < z.ca.ia ? a.unselectable = "on" : a.style.MozUserSelect = "none" - } - function zb(a) { - return a && a.parentNode && 11 !== a.parentNode.nodeType - } - function Ab(a, b) { - z.D.Vx(a, "beforeEnd", b); - return a.lastChild - } - function Bb(a) { - for (var b = { - left: 0, - top: 0 - }; a && a.offsetParent; ) - b.left += a.offsetLeft, - b.top += a.offsetTop, - a = a.offsetParent; - return b - } - function ma(a) { - a = window.event || a; - a.stopPropagation ? a.stopPropagation() : a.cancelBubble = q - } - function Cb(a) { - a = window.event || a; - a.preventDefault ? a.preventDefault() : a.returnValue = t; - return t - } - function na(a) { - ma(a); - return Cb(a) - } - function Eb() { - var a = document.documentElement - , b = document.body; - return a && (a.scrollTop || a.scrollLeft) ? [a.scrollTop, a.scrollLeft] : b ? [b.scrollTop, b.scrollLeft] : [0, 0] - } - function Fb(a, b) { - if (a && b) - return Math.round(Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2))) - } - function Gb(a, b) { - var c = [], b = b || function(a) { - return a - } - , e; - for (e in a) - c.push(e + "=" + b(a[e])); - return c.join("&") - } - function L(a, b, c) { - var e = document.createElement(a); - c && (e = document.createElementNS(c, a)); - return z.D.CF(e, b || {}) - } - function Va(a) { - if (a.currentStyle) - return a.currentStyle; - if (a.ownerDocument && a.ownerDocument.defaultView) - return a.ownerDocument.defaultView.getComputedStyle(a, s) - } - function Xa(a) { - return "function" === typeof a - } - function Wa(a) { - return "number" === typeof a - } - function $a(a) { - return "string" == typeof a - } - function Hb(a) { - return "undefined" != typeof a - } - function Ib(a) { - return "object" == typeof a - } - var Jb = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - function Kb(a) { - for (var b = "", c = 0; c < a.length; c++) { - var e = a.charCodeAt(c) << 1 - , f = e = e.toString(2); - 8 > e.length && (f = "00000000" + e, - f = f.substr(e.length, 8)); - b += f - } - a = 5 - b.length % 5; - e = []; - for (c = 0; c < a; c++) - e[c] = "0"; - b = e.join("") + b; - f = []; - for (c = 0; c < b.length / 5; c++) - e = b.substr(5 * c, 5), - f.push(String.fromCharCode(parseInt(e, 2) + 50)); - return f.join("") + a.toString() - } - function Lb(a) { - var b = "", c, e, f = "", g, i = "", k = 0; - g = /[^A-Za-z0-9\+\/\=]/g; - if (!a || g.exec(a)) - return a; - a = a.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - do - c = Jb.indexOf(a.charAt(k++)), - e = Jb.indexOf(a.charAt(k++)), - g = Jb.indexOf(a.charAt(k++)), - i = Jb.indexOf(a.charAt(k++)), - c = c << 2 | e >> 4, - e = (e & 15) << 4 | g >> 2, - f = (g & 3) << 6 | i, - b += String.fromCharCode(c), - 64 != g && (b += String.fromCharCode(e)), - 64 != i && (b += String.fromCharCode(f)); - while (k < a.length);return b - } - var P = z.lang.Ju; - function H() { - return !(!z.platform.zE && !z.platform.XY && !z.platform.Jm) - } - function Ua() { - return !(!z.platform.IM && !z.platform.AM && !z.platform.cZ) - } - function bb() { - return (new Date).getTime() - } - function Mb() { - var a = document.body.appendChild(L("div")); - a.innerHTML = ''; - var b = a.firstChild; - if (!b.style) - return t; - b.style.behavior = "url(#default#VML)"; - b = b ? "object" === typeof b.adj : q; - a.parentNode.removeChild(a); - return b - } - function Nb() { - return !!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Shape", "1.1") - } - function Ob() { - return !!L("canvas").getContext - } - function Pb(a) { - return a * Math.PI / 180 - } - B.iZ = function() { - var a = q - , b = q - , c = q - , e = q - , f = 0 - , g = 0 - , i = 0 - , k = 0; - return { - eR: function() { - f += 1; - a && (a = t, - setTimeout(function() { - Ra(5054, { - pic: f - }); - a = q; - f = 0 - }, 1E4)) - }, - v1: function() { - g += 1; - b && (b = t, - setTimeout(function() { - Ra(5055, { - move: g - }); - b = q; - g = 0 - }, 1E4)) - }, - x1: function() { - i += 1; - c && (c = t, - setTimeout(function() { - Ra(5056, { - zoom: i - }); - c = q; - i = 0 - }, 1E4)) - }, - w1: function(a) { - k += a; - e && (e = t, - setTimeout(function() { - Ra(5057, { - tile: k - }); - e = q; - k = 0 - }, 5E3)) - } - } - }(); - B.iq = { - DG: "#83a1ff", - kq: "#808080" - }; - function Qb(a, b, c) { - b.Om || (b.Om = [], - b.handle = {}); - b.Om.push({ - filter: c, - nm: a - }); - b.addEventListener || (b.addEventListener = function(a, c) { - b.attachEvent("on" + a, c) - } - ); - b.handle.click || (b.addEventListener("click", function(a) { - for (var c = a.target || a.srcElement; c != b; ) { - Rb(b.Om, function(b, i) { - RegExp(i.filter).test(c.getAttribute("filter")) && i.nm.call(c, a, c.getAttribute("filter")) - }); - c = c.parentNode - } - }, t), - b.handle.click = q) - } - function Rb(a, b) { - for (var c = 0, e = a.length; c < e; c++) - b(c, a[c]) - } - void function(a, b, c) { - void function(a, b, c) { - function i(a) { - if (!a.Mo) { - for (var c = q, e = [], g = a.ZZ, k = 0; g && k < g.length; k++) { - var m = g[k] - , n = pa[m] = pa[m] || {}; - if (n.Mo || n == a) - e.push(n.Nc); - else { - c = t; - if (!n.DW && (m = (Ma.get("alias") || {})[m] || m + ".js", - !R[m])) { - R[m] = q; - var o = b.createElement("script") - , p = b.getElementsByTagName("script")[0]; - o.async = q; - o.src = m; - p.parentNode.insertBefore(o, p) - } - n.bz = n.bz || {}; - n.bz[a.name] = a - } - } - if (c) { - a.Mo = q; - a.KK && (a.Nc = a.KK.apply(a, e)); - for (var v in a.bz) - i(a.bz[v]) - } - } - } - function k(a) { - return (a || new Date) - F - } - function m(a, b, c) { - if (a) { - "string" == typeof a && (c = b, - b = a, - a = M); - try { - a == M ? (N[b] = N[b] || [], - N[b].unshift(c)) : a.addEventListener ? a.addEventListener(b, c, t) : a.attachEvent && a.attachEvent("on" + b, c) - } catch (e) {} - } - } - function n(a, b, c) { - if (a) { - "string" == typeof a && (c = b, - b = a, - a = M); - try { - if (a == M) { - var e = N[b]; - if (e) - for (var f = e.length; f--; ) - e[f] === c && e.splice(f, 1) - } else - a.removeEventListener ? a.removeEventListener(b, c, t) : a.detachEvent && a.detachEvent("on" + b, c) - } catch (g) {} - } - } - function o(a) { - var b = N[a] - , c = 0; - if (b) { - for (var e = [], f = arguments, g = 1; g < f.length; g++) - e.push(f[g]); - for (g = b.length; g--; ) - b[g].apply(this, e) && c++; - return c - } - } - function p(a, b) { - if (a && b) { - var c = new Image(1,1), e = [], f = "img_" + +new Date, g; - for (g in b) - b[g] && e.push(g + "=" + encodeURIComponent(b[g])); - M[f] = c; - c.onload = c.onerror = function() { - M[f] = c = c.onload = c.onerror = s; - delete M[f] - } - ; - c.src = a + "?" + e.join("&") - } - } - function v() { - var a = arguments - , b = a[0]; - if (this.JK || /^(on|un|set|get|create)$/.test(b)) { - for (var b = y.prototype[b], c = [], e = 1, f = a.length; e < f; e++) - c.push(a[e]); - "function" == typeof b && b.apply(this, c) - } else - this.iK.push(a) - } - function x(a, b) { - var c = {}, e; - for (e in a) - a.hasOwnProperty(e) && (c[e] = a[e]); - for (e in b) - b.hasOwnProperty(e) && (c[e] = b[e]); - return c - } - function y(a) { - this.name = a; - this.Ps = { - protocolParameter: { - postUrl: s, - protocolParameter: s - } - }; - this.iK = []; - this.alog = M - } - function A(a) { - a = a || "default"; - if ("*" == a) { - var a = [], b; - for (b in fa) - a.push(fa[b]); - return a - } - (b = fa[a]) || (b = fa[a] = new y(a)); - return b - } - var E = c.alog; - if (!E || !E.Mo) { - var C = b.all && a.attachEvent - , F = E && E.IE || +new Date - , D = a.o4 || (+new Date).toString(36) + Math.random().toString(36).substr(2, 3) - , I = 0 - , R = {} - , M = function(a) { - var b = arguments, c, e, f, g; - if ("define" == a || "require" == a) { - for (e = 1; e < b.length; e++) - switch (typeof b[e]) { - case "string": - c = b[e]; - break; - case "object": - f = b[e]; - break; - case "function": - g = b[e] - } - "require" == a && (c && !f && (f = [c]), - c = s); - c = !c ? "#" + I++ : c; - e = pa[c] = pa[c] || {}; - e.Mo || (e.name = c, - e.ZZ = f, - e.KK = g, - "define" == a && (e.DW = q), - i(e)) - } else - "function" == typeof a ? a(M) : ("" + a).replace(/^(?:([\w$_]+)\.)?(\w+)$/, function(a, c, e) { - b[0] = e; - v.apply(M.bG(c), b) - }) - } - , N = {} - , fa = {} - , pa = { - i2: { - name: "alog", - Mo: q, - Nc: M - } - }; - y.prototype.start = y.prototype.create = function(a) { - if (!this.JK) { - "object" == typeof a && this.set(a); - this.JK = new Date; - for (this.Qs("create", this); a = this.iK.shift(); ) - v.apply(this, a) - } - } - ; - y.prototype.send = function(a, b) { - var c = x({ - ts: k().toString(36), - t: a, - sid: D - }, this.Ps); - if ("object" == typeof b) - c = x(c, b); - else { - var e = arguments; - switch (a) { - case "pageview": - e[1] && (c.page = e[1]); - e[2] && (c.title = e[2]); - break; - case "event": - e[1] && (c.eventCategory = e[1]); - e[2] && (c.eventAction = e[2]); - e[3] && (c.eventLabel = e[3]); - e[4] && (c.eventValue = e[4]); - break; - case "timing": - e[1] && (c.timingCategory = e[1]); - e[2] && (c.timingVar = e[2]); - e[3] && (c.timingValue = e[3]); - e[4] && (c.timingLabel = e[4]); - break; - case "exception": - e[1] && (c.exDescription = e[1]); - e[2] && (c.exFatal = e[2]); - break; - default: - return - } - } - this.Qs("send", c); - var f; - if (e = this.Ps.protocolParameter) { - var g = {}; - for (f in c) - e[f] !== s && (g[e[f] || f] = c[f]); - f = g - } else - f = c; - p(this.Ps.postUrl, f) - } - ; - y.prototype.set = function(a, b) { - if ("string" == typeof a) - "protocolParameter" == a && (b = x({ - postUrl: s, - protocolParameter: s - }, b)), - this.Ps[a] = b; - else if ("object" == typeof a) - for (var c in a) - this.set(c, a[c]) - } - ; - y.prototype.get = function(a, b) { - var c = this.Ps[a]; - "function" == typeof b && b(c); - return c - } - ; - y.prototype.Qs = function(a, b) { - return M.Qs(this.name + "." + a, b) - } - ; - y.prototype.M = function(a, b) { - M.M(this.name + "." + a, b) - } - ; - y.prototype.ed = function(a, b) { - M.ed(this.name + "." + a, b) - } - ; - M.name = "alog"; - M.BO = D; - M.Mo = q; - M.timestamp = k; - M.ed = n; - M.M = m; - M.Qs = o; - M.bG = A; - M("init"); - var wa = y.prototype; - T(wa, { - start: wa.start, - create: wa.create, - send: wa.send, - set: wa.set, - get: wa.get, - on: wa.M, - un: wa.ed, - fire: wa.Qs - }); - var Ma = A(); - Ma.set("protocolParameter", { - h2: s - }); - if (E) { - wa = [].concat(E.wb || [], E.Wm || []); - E.wb = E.Wm = s; - for (var sb in M) - M.hasOwnProperty(sb) && (E[sb] = M[sb]); - M.wb = M.Wm = { - push: function(a) { - M.apply(M, a) - } - }; - for (E = 0; E < wa.length; E++) - M.apply(M, wa[E]) - } - c.alog = M; - C && m(b, "mouseup", function(a) { - a = a.target || a.srcElement; - 1 == a.nodeType && /^ajavascript:/i.test(a.tagName + a.href) - }); - var Za = t; - a.onerror = function(a, b, e, f) { - var i = q; - !b && /^script error/i.test(a) && (Za ? i = t : Za = q); - i && c.alog("exception.send", "exception", { - Ht: a, - HE: b, - Dt: e, - hs: f - }); - return t - } - ; - c.alog("exception.on", "catch", function(a) { - c.alog("exception.send", "exception", { - Ht: a.Ht, - HE: a.path, - Dt: a.Dt, - method: a.method, - rL: "catch" - }) - }) - } - }(a, b, c); - void function(a, b, c) { - var i = "18_3"; - H() && (i = "18_4"); - var k = "http://static.tieba.baidu.com"; - "https:" === a.location.protocol && (k = "https://gsp0.baidu.com/5aAHeD3nKhI2p27j8IqW0jdnxx1xbK"); - var m = Math.random - , k = k + "/tb/pms/img/st.gif" - , n = { - wh: "0.1" - } - , o = { - wh: "0.1" - } - , p = { - wh: "0.1" - } - , v = { - wh: "0" - }; - if (n && n.wh && m() < n.wh) { - var x = c.alog.bG("monkey"), y, n = a.screen, A = b.referrer; - x.set("ver", 5); - x.set("pid", 241); - n && x.set("px", n.width + "*" + n.height); - x.set("ref", A); - c.alog("monkey.on", "create", function() { - y = c.alog.timestamp; - x.set("protocolParameter", { - reports: s - }) - }); - c.alog("monkey.on", "send", function(a) { - "pageview" == a.t && (a.cmd = "open"); - a.now && (a.ts = y(a.now).toString(36), - a.now = "") - }); - c.alog("monkey.create", { - page: i, - pid: "241", - p: "18", - dv: 6, - postUrl: k, - reports: { - refer: 1 - } - }); - c.alog("monkey.send", "pageview", { - now: +new Date - }) - } - if (o && o.wh && m() < o.wh) { - var E = t; - a.onerror = function(a, b, e, f) { - var i = q; - !b && /^script error/i.test(a) && (E ? i = t : E = q); - i && c.alog("exception.send", "exception", { - Ht: a, - HE: b, - Dt: e, - hs: f - }); - return t - } - ; - c.alog("exception.on", "catch", function(a) { - c.alog("exception.send", "exception", { - Ht: a.Ht, - HE: a.path, - Dt: a.Dt, - method: a.method, - rL: "catch" - }) - }); - c.alog("exception.create", { - postUrl: k, - dv: 7, - page: i, - pid: "170", - p: "18" - }) - } - p && (p.wh && m() < p.wh) && (c.alog("cus.on", "time", function(a) { - var b = {}, e = t, f; - if ("[object Object]" === a.toString()) { - for (var i in a) - "page" == i ? b.page = a[i] : (f = parseInt(a[i]), - 0 < f && /^z_/.test(i) && (e = q, - b[i] = f)); - e && c.alog("cus.send", "time", b) - } - }), - c.alog("cus.on", "count", function(a) { - var b = {} - , e = t; - "string" === typeof a && (a = [a]); - if (a instanceof Array) - for (var f = 0; f < a.length; f++) - /^z_/.test(a[f]) ? (e = q, - b[a[f]] = 1) : /^page:/.test(a[f]) && (b.page = a[f].substring(5)); - e && c.alog("cus.send", "count", b) - }), - c.alog("cus.create", { - dv: 3, - postUrl: k, - page: i, - p: "18" - })); - if (v && v.wh && m() < v.wh) { - var C = ["Moz", "O", "ms", "Webkit"] - , F = ["-webkit-", "-moz-", "-o-", "-ms-"] - , D = function() { - return typeof b.createElement !== "function" ? b.createElement(arguments[0]) : b.createElement.apply(b, arguments) - } - , I = D("dpFeatureTest").style - , R = function(a) { - return M(a, l, l) - } - , M = function(a, b, c) { - var e = a.charAt(0).toUpperCase() + a.slice(1) - , f = (a + " " + C.join(e + " ") + e).split(" "); - if (typeof b === "string" || typeof b === "undefined") - return N(f, b); - f = (a + " " + C.join(e + " ") + e).split(" "); - a: { - var a = f, g; - for (g in a) - if (a[g]in b) { - if (c === t) { - b = a[g]; - break a - } - g = b[a[g]]; - b = typeof g === "function" ? fnBind(g, c || b) : g; - break a - } - b = t - } - return b - } - , N = function(a, b) { - var c, e, f; - e = a.length; - for (c = 0; c < e; c++) { - f = a[c]; - ~("" + f).indexOf("-") && (f = fa(f)); - if (I[f] !== l) - return b == "pfx" ? f : q - } - return t - } - , fa = function(a) { - return a.replace(/([a-z])-([a-z])/g, function(a, b, c) { - return b + c.toUpperCase() - }).replace(/^-/, "") - } - , pa = function(a, b, c) { - if (a.indexOf("@") === 0) - return atRule(a); - a.indexOf("-") != -1 && (a = fa(a)); - return !b ? M(a, "pfx") : M(a, b, c) - } - , wa = function() { - var a = D("canvas"); - return !(!a.getContext || !a.getContext("2d")) - } - , Ma = function() { - var a = D("div"); - return "draggable"in a || "ondragstart"in a && "ondrop"in a - } - , sb = function() { - try { - localStorage.setItem("localStorage", "localStorage"); - localStorage.removeItem("localStorage"); - return q - } catch (a) { - return t - } - } - , Za = function() { - return "content"in b.createElement("template") - } - , Pa = function() { - return "createShadowRoot"in b.createElement("a") - } - , oi = function() { - return "registerElement"in b - } - , pi = function() { - return "import"in b.createElement("link") - } - , qi = function() { - return "getItems"in b - } - , ri = function() { - return "EventSource"in window - } - , re = function(a, b) { - var c = new Image; - c.onload = function() { - b(a, c.width > 0 && c.height > 0) - } - ; - c.onerror = function() { - b(a, t) - } - ; - c.src = "data:image/webp;base64," + { - r4: "UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA", - q4: "UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==", - alpha: "UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==", - kk: "UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA" - }[a] - } - , se = function(a, b) { - return Tb.ei["WebP-" + a] = b - } - , si = function() { - return "openDatabase"in a - } - , ti = function() { - return "performance"in a && "timing"in a.performance - } - , ui = function() { - return "performance"in a && "mark"in a.performance - } - , vi = function() { - return !(!Array.prototype || !Array.prototype.every || !Array.prototype.filter || !Array.prototype.forEach || !Array.prototype.indexOf || !Array.prototype.lastIndexOf || !Array.prototype.map || !Array.prototype.some || !Array.prototype.reduce || !Array.prototype.reduceRight || !Array.isArray) - } - , wi = function() { - return "Promise"in a && "cast"in a.lq && "resolve"in a.lq && "reject"in a.lq && "all"in a.lq && "race"in a.lq && function() { - var b; - new a.lq(function(a) { - b = a - } - ); - return typeof b === "function" - }() - } - , xi = function() { - var b = !!a.i1 - , c = a.XMLHttpRequest && "withCredentials"in new XMLHttpRequest; - return !!a.l1 && b && c - } - , yi = function() { - return "geolocation"in navigator - } - , zi = function() { - var b = D("canvas") - , c = "probablySupportsContext"in b ? "probablySupportsContext" : "supportsContext"; - return c in b ? b[c]("webgl") || b[c]("experimental-webgl") : "WebGLRenderingContext"in a - } - , Ai = function() { - return !!b.createElementNS && !!b.createElementNS("http://www.w3.org/2000/svg", "svg").A2 - } - , Bi = function() { - return !!a.s1 - } - , Ci = function() { - return "WebSocket"in a && a.p1.f1 === 2 - } - , Di = function() { - return !!b.createElement("video").canPlayType - } - , Ei = function() { - return !!b.createElement("audio").canPlayType - } - , Fi = function() { - return !!(a.history && "pushState"in a.history) - } - , Gi = function() { - return !(!a.g1 || !a.h1) - } - , Hi = function() { - return "postMessage"in window - } - , Ii = function() { - return !!a.webkitNotifications || "Notification"in a && "permission"in a.PP && "requestPermission"in a.PP - } - , Ji = function() { - for (var b = ["webkit", "moz", "o", "ms"], c = a.requestAnimationFrame, f = 0; f < b.length && !c; ++f) - c = a[b[f] + "RequestAnimationFrame"]; - return !!c - } - , Ki = function() { - return "JSON"in a && "parse"in JSON && "stringify"in JSON - } - , Li = function() { - return !(!pa("exitFullscreen", b, t) && !pa("cancelFullScreen", b, t)) - } - , Mi = function() { - return !!pa("Intl", a) - } - , Ni = function() { - return R("flexBasis") - } - , Oi = function() { - return !!R("perspective") - } - , Pi = function() { - return R("shapeOutside") - } - , Qi = function() { - var a = D("div"); - a.style.cssText = F.join("filter:blur(2px); "); - return !!a.style.length && (b.documentMode === l || b.documentMode > 9) - } - , Ri = function() { - return "XMLHttpRequest"in a && "withCredentials"in new XMLHttpRequest - } - , Si = function() { - return D("progress").max !== l - } - , Ti = function() { - return D("meter").max !== l - } - , Ui = function() { - return "sendBeacon"in navigator - } - , Vi = function() { - return R("borderRadius") - } - , Wi = function() { - return R("boxShadow") - } - , Xi = function() { - var a = D("div").style; - a.cssText = F.join("opacity:.55;"); - return /^0.55$/.test(a.opacity) - } - , Yi = function() { - return N(["textShadow"], l) - } - , Zi = function() { - return R("animationName") - } - , $i = function() { - return R("transition") - } - , aj = function() { - return navigator.userAgent.indexOf("Android 2.") === -1 && R("transform") - } - , Tb = { - ei: {}, - pa: function(a, b, c) { - this.ei[a] = b.apply(this, [].slice.call(arguments, 2)) - }, - Ed: function(a, b) { - a.apply(this, [].slice.call(arguments, 1)) - }, - f_: function() { - this.pa("bdrs", Vi); - this.pa("bxsd", Wi); - this.pa("opat", Xi); - this.pa("txsd", Yi); - this.pa("anim", Zi); - this.pa("trsi", $i); - this.pa("trfm", aj); - this.pa("flex", Ni); - this.pa("3dtr", Oi); - this.pa("shpe", Pi); - this.pa("fltr", Qi); - this.pa("cavs", wa); - this.pa("dgdp", Ma); - this.pa("locs", sb); - this.pa("wctem", Za); - this.pa("wcsdd", Pa); - this.pa("wccse", oi); - this.pa("wchti", pi); - this.Ed(re, "lossy", se); - this.Ed(re, "lossless", se); - this.Ed(re, "alpha", se); - this.Ed(re, "animation", se); - this.pa("wsql", si); - this.pa("natm", ti); - this.pa("ustm", ui); - this.pa("arra", vi); - this.pa("prms", wi); - this.pa("xhr2", xi); - this.pa("wbgl", zi); - this.pa("geol", yi); - this.pa("svg", Ai); - this.pa("work", Bi); - this.pa("wbsk", Ci); - this.pa("vido", Di); - this.pa("audo", Ei); - this.pa("hsty", Fi); - this.pa("file", Gi); - this.pa("psmg", Hi); - this.pa("wknf", Ii); - this.pa("rqaf", Ji); - this.pa("json", Ki); - this.pa("flsc", Li); - this.pa("i18n", Mi); - this.pa("cors", Ri); - this.pa("prog", Si); - this.pa("metr", Ti); - this.pa("becn", Ui); - this.pa("mcrd", qi); - this.pa("esrc", ri) - } - } - , x = c.alog.bG("feature"); - x.M("commit", function() { - Tb.f_(); - var a = setInterval(function() { - if ("WebP-lossy"in Tb.ei && "WebP-lossless"in Tb.ei && "WebP-alpha"in Tb.ei && "WebP-animation"in Tb.ei) { - for (var b in Tb.ei) - Tb.ei[b] = Tb.ei[b] ? "y" : "n"; - x.send("feature", Tb.ei); - clearInterval(a) - } - }, 500) - }); - c.alog("feature.create", { - P2: 4, - R4: k, - page: i, - wb: "18" - }); - c.alog("feature.fire", "commit") - } - }(a, b, c) - }(window, document, B); - B.Fn = B.alog || u(); - B.alog("cus.fire", "count", "z_loadscriptcount"); - "https:" === location.protocol && B.alog("cus.fire", "count", "z_httpscount"); - function Sb(a) { - var b = window.TILE_VERSION - , c = "20170927"; - b && b.ditu && (b = b.ditu, - b[a] && b[a].updateDate && (c = b[a].updateDate)); - return c - } - ;function oa(a, b) { - if (/^http/.test(a)) return;//修改 屏蔽ak验证,若调用外部资源直接返回 - - if (b) { - var c = (1E5 * Math.random()).toFixed(0); - B._rd["_cbk" + c] = function(a) { - b && b(a); - delete B._rd["_cbk" + c] - } - ; - a += "&callback=BMap._rd._cbk" + c - } - var e = L("script", { - type: "text/javascript" - }); - e.charset = "utf-8"; - e.src = a; - e.addEventListener ? e.addEventListener("load", function(a) { - a = a.target; - a.parentNode.removeChild(a) - }, t) : e.attachEvent && e.attachEvent("onreadystatechange", function() { - var a = window.event.srcElement; - a && ("loaded" == a.readyState || "complete" == a.readyState) && a.parentNode.removeChild(a) - }); - setTimeout(function() { - document.getElementsByTagName("head")[0].appendChild(e); - e = s - }, 1) - } - ;var Ub = { //修改,这里是所有的模块,用到时自动加载(在线),离线的话要先下载下来放到本地,如http://api0.map.bdimg.com/getmodules?v=3.0&mod=模块1,模块2 - //模块命名格式是map_dbwcej,直接拼接起来 - map: "dbwcej", - common: "wkrfcz", - style: "fkofpc", - tile: "ok3b3m", - vectordrawlib: "4pdipq", - newvectordrawlib: "wbnuee", - groundoverlay: "ekozhc", - pointcollection: "feabuc", - marker: "00uyqy", - symbol: "cq3a5n", - canvablepath: "dia5aw", - vmlcontext: "phwtog", - markeranimation: "rfnmxu", - poly: "r52vuo", - draw: "jb4osz", - drawbysvg: "vxyn51", - drawbyvml: "whxmqq", - drawbycanvas: "ufwkvb", - infowindow: "wtflsn", - oppc: "10riq5", - opmb: "2c1ejz", - menu: "152mop", - control: "hlzh1t", - navictrl: "h32mnb", - geoctrl: "xprajs", - copyrightctrl: "gmc2ps", - citylistcontrol: "ms3ahy", - scommon: "oadc3d", - local: "k0pcpi", - route: "v4yyam", - othersearch: "pwg4ey", - mapclick: "e40viw", - buslinesearch: "vxmb31", - hotspot: "vuwxs4", - autocomplete: "punr3o", - coordtrans: "lmf5kv", - coordtransutils: "d33qf1", - convertor: "d0ze2w", - clayer: "0hwrfx", - pservice: "j5tlrp", - pcommon: "yqek4k", - panorama: "jbqj24", - panoramaflash: "dm4xq2", - vector: "2hrruc" - }; - z.Wy = function() { - function a(a) { - return e && !!c[b + a + "_" + Ub[a]] - } - var b = "BMap_" - , c = window.localStorage - , e = "localStorage"in window && c !== s && c !== l; - return { - ZY: e, - set: function(a, g) { - if (e) { - for (var i = b + a + "_", k = c.length, m; k--; ) - m = c.key(k), - -1 < m.indexOf(i) && c.removeItem(m); - try { - c.setItem(b + a + "_" + Ub[a], g) - } catch (n) { - c.clear() - } - } - }, - get: function(f) { - return e && a(f) ? c.getItem(b + f + "_" + Ub[f]) : t - }, - uK: a - } - }(); - function K() {} - z.object.extend(K, { - Cj: { - EG: -1, - cQ: 0, - cq: 1 - }, - GL: function() { - var a = "canvablepath" - , b = B.gV ? "newvectordrawlib" : "vectordrawlib"; - if (!H() || !Ob()) - Nb() || (Mb() ? a = "vmlcontext" : Ob()); - return { - tile: [b, "style"], - control: [], - marker: ["symbol"], - symbol: ["canvablepath", "common"], - canvablepath: "canvablepath" === a ? [] : [a], - vmlcontext: [], - style: [], - poly: ["marker", "drawbycanvas", "drawbysvg", "drawbyvml"], - drawbysvg: ["draw"], - drawbyvml: ["draw"], - drawbycanvas: ["draw"], - infowindow: ["common", "marker"], - menu: [], - oppc: [], - opmb: [], - scommon: [], - local: ["scommon"], - route: ["scommon"], - othersearch: ["scommon"], - autocomplete: ["scommon"], - citylistcontrol: ["autocomplete"], - mapclick: ["scommon"], - buslinesearch: ["route"], - hotspot: [], - coordtransutils: ["coordtrans"], - convertor: [], - clayer: ["tile"], - pservice: [], - pcommon: ["style", "pservice"], - panorama: ["pcommon"], - panoramaflash: ["pcommon"] - } - }, - U4: {}, - wG: { - tQ: B.ka + "getmodules?v=3.0", - WU: 5E3 - }, - MC: t, - Rd: { - xl: {}, - Hn: [], - cw: [] - }, - load: function(a, b, c) { - var e = this.kb(a); - if (e.Me == this.Cj.cq) - c && b(); - else { - if (e.Me == this.Cj.EG) { - this.AK(a); - this.SN(a); - var f = this; - f.MC == t && (f.MC = q, - setTimeout(function() { - for (var a = [], b = 0, c = f.Rd.Hn.length; b < c; b++) { - var e = f.Rd.Hn[b] - , n = ""; - ia.Wy.uK(e) ? n = ia.Wy.get(e) : (n = "", - a.push(e + "_" + Ub[e])); - f.Rd.cw.push({ - jN: e, - ZE: n - }) - } - f.MC = t; - f.Rd.Hn.length = 0; - //0 == a.length ? f.kL() : oa(f.wG.tQ + "&mod=" + a.join(",")) - // 修改 加载本地模块文件,在 modules 目录下 - console.log(a); //打印所需模块 - if( a.length > 0 ){ - for(i=0; i"); - this.Qa == t && z.D.U(this.C); - return this.C - }, - Nr: function() { - this.uc(this.j.anchor) - }, - uc: function(a) { - if (this.j2 || !Wa(a) || isNaN(a) || a < Wb || 3 < a) - a = this.defaultAnchor; - this.j = this.j || { - Cg: t - }; - this.j.za = this.j.za || this.defaultOffset; - var b = this.j.anchor; - this.j.anchor = a; - if (this.C) { - var c = this.C - , e = this.j.za.width - , f = this.j.za.height; - c.style.left = c.style.top = c.style.right = c.style.bottom = "auto"; - switch (a) { - case Wb: - c.style.top = f + "px"; - c.style.left = e + "px"; - break; - case Xb: - c.style.top = f + "px"; - c.style.right = e + "px"; - break; - case Yb: - c.style.bottom = f + "px"; - c.style.left = e + "px"; - break; - case 3: - c.style.bottom = f + "px", - c.style.right = e + "px" - } - c = ["TL", "TR", "BL", "BR"]; - z.D.Pb(this.C, "anchor" + c[b]); - z.D.Ua(this.C, "anchor" + c[a]) - } - }, - HD: function() { - return this.j.anchor - }, - getContainer: w("C"), - Ze: function(a) { - a instanceof O && (this.j = this.j || { - Cg: t - }, - this.j.za = new O(a.width,a.height), - this.C && this.uc(this.j.anchor)) - }, - Sf: function() { - return this.j.za - }, - Jd: w("C"), - show: function() { - this.Qa != q && (this.Qa = q, - this.C && z.D.show(this.C)) - }, - U: function() { - this.Qa != t && (this.Qa = t, - this.C && z.D.U(this.C)) - }, - isPrintable: function() { - return !!this.j.Cg - }, - jh: function() { - return !this.C && !this.B ? t : !!this.Qa - } - }); - var Wb = 0 - , Xb = 1 - , Yb = 2; - function jb(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - OF: a.showZoomInfo || q, - anchor: a.anchor, - za: a.offset, - type: a.type, - $W: a.enableGeolocation || t - }; - this.defaultAnchor = H() ? 3 : Wb; - this.defaultOffset = new O(10,10); - this.uc(a.anchor); - this.hn(a.type); - this.De() - } - z.lang.ta(jb, Vb, "NavigationControl"); - z.extend(jb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - hn: function(a) { - this.j.type = Wa(a) && 0 <= a && 3 >= a ? a : 0 - }, - ip: function() { - return this.j.type - }, - De: function() { - var a = this; - K.load("navictrl", function() { - a.zf() - }) - } - }); - function Zb(a) { - Vb.call(this); - a = a || {}; - this.j = { - anchor: a.anchor || Yb, - za: a.offset || new O(10,30), - O_: a.showAddressBar !== t, - U2: a.enableAutoLocation || t, - bN: a.locationIcon || s - }; - var b = this; - this.Hz = 1200; - b.I0 = []; - this.pe = []; - K.load("geoctrl", function() { - (function e() { - if (0 !== b.pe.length) { - var a = b.pe.shift(); - b[a.method].apply(b, a.arguments); - e() - } - } - )(); - b.sQ() - }); - Ra(Ia) - } - z.lang.ta(Zb, Vb, "GeolocationControl"); - z.extend(Zb.prototype, { - location: function() { - this.pe.push({ - method: "location", - arguments: arguments - }) - }, - getAddressComponent: ca(s) - }); - function $b(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - anchor: a.anchor, - za: a.offset - }; - this.cc = []; - this.defaultAnchor = Yb; - this.defaultOffset = new O(5,2); - this.uc(a.anchor); - this.nK = t; - this.De() - } - z.lang.ta($b, Vb, "CopyrightControl"); - z.object.extend($b.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - Bw: function(a) { - if (a && Wa(a.id) && !isNaN(a.id)) { - var b = { - bounds: s, - content: "" - }, c; - for (c in a) - b[c] = a[c]; - if (a = this.pm(a.id)) - for (var e in b) - a[e] = b[e]; - else - this.cc.push(b) - } - }, - pm: function(a) { - for (var b = 0, c = this.cc.length; b < c; b++) - if (this.cc[b].id == a) - return this.cc[b] - }, - PD: w("cc"), - qF: function(a) { - for (var b = 0, c = this.cc.length; b < c; b++) - this.cc[b].id == a && (r = this.cc.splice(b, 1), - b--, - c = this.cc.length) - }, - De: function() { - var a = this; - K.load("copyrightctrl", function() { - a.zf() - }) - } - }); - function lb(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - size: a.size || new O(150,150), - padding: 5, - Xa: a.isOpen === q ? q : t, - $0: 4, - za: a.offset, - anchor: a.anchor - }; - this.defaultAnchor = 3; - this.defaultOffset = new O(0,0); - this.Bq = this.Cq = 13; - this.uc(a.anchor); - this.Ce(this.j.size); - this.De() - } - z.lang.ta(lb, Vb, "OverviewMapControl"); - z.extend(lb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - uc: function(a) { - Vb.prototype.uc.call(this, a) - }, - se: function() { - this.se.mo = q; - this.j.Xa = !this.j.Xa; - this.C || (this.se.mo = t) - }, - Ce: function(a) { - a instanceof O || (a = new O(150,150)); - a.width = 0 < a.width ? a.width : 150; - a.height = 0 < a.height ? a.height : 150; - this.j.size = a - }, - cb: function() { - return this.j.size - }, - Xa: function() { - return this.j.Xa - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }) - } - }); - function ac(a) { - Vb.call(this); - a = a || {}; - this.defaultAnchor = Wb; - this.TV = a.canCheckSize === t ? t : q; - this.$i = ""; - this.defaultOffset = new O(10,10); - this.onChangeBefore = []; - this.onChangeAfter = []; - this.onChangeSuccess = []; - this.j = { - Cg: t, - za: a.offset || this.defaultOffset, - anchor: a.anchor || this.defaultAnchor, - expand: !!a.expand - }; - a.onChangeBefore && Xa(a.onChangeBefore) && this.onChangeBefore.push(a.onChangeBefore); - a.onChangeAfter && Xa(a.onChangeAfter) && this.onChangeAfter.push(a.onChangeAfter); - a.onChangeSuccess && Xa(a.onChangeSuccess) && this.onChangeSuccess.push(a.onChangeSuccess); - this.uc(a.anchor); - this.De() - } - z.lang.ta(ac, Vb, "CityListControl"); - z.object.extend(ac.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - De: function() { - var a = this; - K.load("citylistcontrol", function() { - a.zf() - }, q) - } - }); - function kb(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - color: "black", - fd: "metric", - za: a.offset - }; - this.defaultAnchor = Yb; - this.defaultOffset = new O(81,18); - this.uc(a.anchor); - this.Uh = { - metric: { - name: "metric", - CK: 1, - rM: 1E3, - bP: "\u7c73", - cP: "\u516c\u91cc" - }, - us: { - name: "us", - CK: 3.2808, - rM: 5280, - bP: "\u82f1\u5c3a", - cP: "\u82f1\u91cc" - } - }; - this.Uh[this.j.fd] || (this.j.fd = "metric"); - this.gJ = s; - this.GI = {}; - this.De() - } - z.lang.ta(kb, Vb, "ScaleControl"); - z.object.extend(kb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - Pk: function(a) { - this.j.color = a + "" - }, - n3: function() { - return this.j.color - }, - LF: function(a) { - this.j.fd = this.Uh[a] && this.Uh[a].name || this.j.fd - }, - sY: function() { - return this.j.fd - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }) - } - }); - var bc = 0; - function mb(a) { - Vb.call(this); - a = a || {}; - this.defaultAnchor = Xb; - this.defaultOffset = new O(10,10); - this.j = { - Cg: t, - mh: [La, Ya, Sa, Qa], - BW: ["B_DIMENSIONAL_MAP", "B_SATELLITE_MAP", "B_NORMAL_MAP"], - type: a.type || bc, - za: a.offset || this.defaultOffset, - dX: q - }; - this.uc(a.anchor); - "[object Array]" == Object.prototype.toString.call(a.mapTypes) && (this.j.mh = a.mapTypes.slice(0)); - this.De() - } - z.lang.ta(mb, Vb, "MapTypeControl"); - z.object.extend(mb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - Xy: function(a) { - this.B.ao = a - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }, q) - } - }); - function cc(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - za: a.offset, - anchor: a.anchor - }; - this.Ni = t; - this.hw = s; - this.QI = new dc({ - of: "api" - }); - this.RI = new ec(s,{ - of: "api" - }); - this.defaultAnchor = Xb; - this.defaultOffset = new O(10,10); - this.uc(a.anchor); - this.De(); - Ra(va) - } - z.lang.ta(cc, Vb, "PanoramaControl"); - z.extend(cc.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }) - } - }); - function fc(a) { - z.lang.Ca.call(this); - this.j = { - Wa: s, - cursor: "default" - }; - this.j = z.extend(this.j, a); - this.Mb = "contextmenu"; - this.B = s; - this.xa = []; - this.Kf = []; - this.Fe = []; - this.fx = this.qs = s; - this.Kh = t; - var b = this; - K.load("menu", function() { - b.ib() - }) - } - z.lang.ta(fc, z.lang.Ca, "ContextMenu"); - z.object.extend(fc.prototype, { - na: function(a, b) { - this.B = a; - this.Cl = b || s - }, - remove: function() { - this.B = this.Cl = s - }, - Dw: function(a) { - if (a && !("menuitem" != a.Mb || "" == a.Wg || 0 >= a.Vi)) { - for (var b = 0, c = this.xa.length; b < c; b++) - if (this.xa[b] === a) - return; - this.xa.push(a); - this.Kf.push(a) - } - }, - removeItem: function(a) { - if (a && "menuitem" == a.Mb) { - for (var b = 0, c = this.xa.length; b < c; b++) - this.xa[b] === a && (this.xa[b].remove(), - this.xa.splice(b, 1), - c--); - b = 0; - for (c = this.Kf.length; b < c; b++) - this.Kf[b] === a && (this.Kf[b].remove(), - this.Kf.splice(b, 1), - c--) - } - }, - bC: function() { - this.xa.push({ - Mb: "divider", - Lj: this.Fe.length - }); - this.Fe.push({ - D: s - }) - }, - sF: function(a) { - if (this.Fe[a]) { - for (var b = 0, c = this.xa.length; b < c; b++) - this.xa[b] && ("divider" == this.xa[b].Mb && this.xa[b].Lj == a) && (this.xa.splice(b, 1), - c--), - this.xa[b] && ("divider" == this.xa[b].Mb && this.xa[b].Lj > a) && this.xa[b].Lj--; - this.Fe.splice(a, 1) - } - }, - Jd: w("C"), - show: function() { - this.Kh != q && (this.Kh = q) - }, - U: function() { - this.Kh != t && (this.Kh = t) - }, - t_: function(a) { - a && (this.j.cursor = a) - }, - getItem: function(a) { - return this.Kf[a] - } - }); - var gc = G.qa + "menu_zoom_in.png" - , hc = G.qa + "menu_zoom_out.png"; - function ic(a, b, c) { - if (a && Xa(b)) { - z.lang.Ca.call(this); - this.j = { - width: 100, - id: "", - Dm: "" - }; - c = c || {}; - this.j.width = 1 * c.width ? c.width : 100; - this.j.id = c.id ? c.id : ""; - this.j.Dm = c.iconUrl ? c.iconUrl : ""; - this.Wg = a + ""; - this.Kz = b; - this.B = s; - this.Mb = "menuitem"; - this.Ur = this.yv = this.C = this.Eh = s; - this.Ih = q; - var e = this; - K.load("menu", function() { - e.ib() - }) - } - } - z.lang.ta(ic, z.lang.Ca, "MenuItem"); - z.object.extend(ic.prototype, { - na: function(a, b) { - this.B = a; - this.Eh = b - }, - remove: function() { - this.B = this.Eh = s - }, - cu: function(a) { - a && (this.Wg = a + "") - }, - Rb: function(a) { - a && (this.j.Dm = a) - }, - Jd: w("C"), - enable: function() { - this.Ih = q - }, - disable: function() { - this.Ih = t - } - }); - function fb(a, b) { - a && !b && (b = a); - this.Ie = this.Xd = this.Ne = this.Zd = this.Pl = this.Al = s; - a && (this.Pl = new J(a.lng,a.lat), - this.Al = new J(b.lng,b.lat), - this.Ne = a.lng, - this.Zd = a.lat, - this.Ie = b.lng, - this.Xd = b.lat) - } - z.object.extend(fb.prototype, { - tj: function() { - return !this.Pl || !this.Al - }, - pb: function(a) { - return !(a instanceof fb) || this.tj() ? t : this.Ve().pb(a.Ve()) && this.Rf().pb(a.Rf()) - }, - Ve: w("Pl"), - Rf: w("Al"), - kW: function(a) { - return !(a instanceof fb) || this.tj() || a.tj() ? t : a.Ne > this.Ne && a.Ie < this.Ie && a.Zd > this.Zd && a.Xd < this.Xd - }, - Ka: function() { - return this.tj() ? s : new J((this.Ne + this.Ie) / 2,(this.Zd + this.Xd) / 2) - }, - ot: function(a) { - if (!(a instanceof fb) || Math.max(a.Ne, a.Ie) < Math.min(this.Ne, this.Ie) || Math.min(a.Ne, a.Ie) > Math.max(this.Ne, this.Ie) || Math.max(a.Zd, a.Xd) < Math.min(this.Zd, this.Xd) || Math.min(a.Zd, a.Xd) > Math.max(this.Zd, this.Xd)) - return s; - var b = Math.max(this.Ne, a.Ne) - , c = Math.min(this.Ie, a.Ie) - , e = Math.max(this.Zd, a.Zd) - , a = Math.min(this.Xd, a.Xd); - return new fb(new J(b,e),new J(c,a)) - }, - js: function(a) { - return !(a instanceof J) || this.tj() ? t : a.lng >= this.Ne && a.lng <= this.Ie && a.lat >= this.Zd && a.lat <= this.Xd - }, - extend: function(a) { - if (a instanceof J) { - var b = a.lng - , a = a.lat; - this.Pl || (this.Pl = new J(0,0)); - this.Al || (this.Al = new J(0,0)); - if (!this.Ne || this.Ne > b) - this.Pl.lng = this.Ne = b; - if (!this.Ie || this.Ie < b) - this.Al.lng = this.Ie = b; - if (!this.Zd || this.Zd > a) - this.Pl.lat = this.Zd = a; - if (!this.Xd || this.Xd < a) - this.Al.lat = this.Xd = a - } - }, - YF: function() { - return this.tj() ? new J(0,0) : new J(Math.abs(this.Ie - this.Ne),Math.abs(this.Xd - this.Zd)) - } - }); - function J(a, b) { - isNaN(a) && (a = Lb(a), - a = isNaN(a) ? 0 : a); - $a(a) && (a = parseFloat(a)); - isNaN(b) && (b = Lb(b), - b = isNaN(b) ? 0 : b); - $a(b) && (b = parseFloat(b)); - this.lng = a; - this.lat = b - } - J.yM = function(a) { - return a && 180 >= a.lng && -180 <= a.lng && 74 >= a.lat && -74 <= a.lat - } - ; - J.prototype.pb = function(a) { - return a && this.lat == a.lat && this.lng == a.lng - } - ; - function jc() {} - jc.prototype.kh = function() { - aa("lngLatToPoint\u65b9\u6cd5\u672a\u5b9e\u73b0") - } - ; - jc.prototype.xj = function() { - aa("pointToLngLat\u65b9\u6cd5\u672a\u5b9e\u73b0") - } - ; - function kc() {} - ;var eb = { - EK: function(a, b, c) { - K.load("coordtransutils", function() { - eb.AV(a, b, c) - }, q) - }, - DK: function(a, b, c) { - K.load("coordtransutils", function() { - eb.zV(a, b, c) - }, q) - } - }; - function lc() { - this.Pa = []; - var a = this; - K.load("convertor", function() { - a.qQ() - }) - } - z.ta(lc, z.lang.Ca, "Convertor"); - z.extend(lc.prototype, { - translate: function(a, b, c, e) { - this.Pa.push({ - method: "translate", - arguments: [a, b, c, e] - }) - } - }); - T(lc.prototype, { - translate: lc.prototype.translate - }); - function S() {} - S.prototype = new jc; - z.extend(S, { - GP: 6370996.81, - IG: [1.289059486E7, 8362377.87, 5591021, 3481989.83, 1678043.12, 0], - Nu: [75, 60, 45, 30, 15, 0], - MP: [[1.410526172116255E-8, 8.98305509648872E-6, -1.9939833816331, 200.9824383106796, -187.2403703815547, 91.6087516669843, -23.38765649603339, 2.57121317296198, -0.03801003308653, 1.73379812E7], [-7.435856389565537E-9, 8.983055097726239E-6, -0.78625201886289, 96.32687599759846, -1.85204757529826, -59.36935905485877, 47.40033549296737, -16.50741931063887, 2.28786674699375, 1.026014486E7], [-3.030883460898826E-8, 8.98305509983578E-6, 0.30071316287616, 59.74293618442277, 7.357984074871, -25.38371002664745, 13.45380521110908, -3.29883767235584, 0.32710905363475, 6856817.37], [-1.981981304930552E-8, 8.983055099779535E-6, 0.03278182852591, 40.31678527705744, 0.65659298677277, -4.44255534477492, 0.85341911805263, 0.12923347998204, -0.04625736007561, 4482777.06], [3.09191371068437E-9, 8.983055096812155E-6, 6.995724062E-5, 23.10934304144901, -2.3663490511E-4, -0.6321817810242, -0.00663494467273, 0.03430082397953, -0.00466043876332, 2555164.4], [2.890871144776878E-9, 8.983055095805407E-6, -3.068298E-8, 7.47137025468032, -3.53937994E-6, -0.02145144861037, -1.234426596E-5, 1.0322952773E-4, -3.23890364E-6, 826088.5]], - FG: [[-0.0015702102444, 111320.7020616939, 1704480524535203, -10338987376042340, 26112667856603880, -35149669176653700, 26595700718403920, -10725012454188240, 1800819912950474, 82.5], [8.277824516172526E-4, 111320.7020463578, 6.477955746671607E8, -4.082003173641316E9, 1.077490566351142E10, -1.517187553151559E10, 1.205306533862167E10, -5.124939663577472E9, 9.133119359512032E8, 67.5], [0.00337398766765, 111320.7020202162, 4481351.045890365, -2.339375119931662E7, 7.968221547186455E7, -1.159649932797253E8, 9.723671115602145E7, -4.366194633752821E7, 8477230.501135234, 52.5], [0.00220636496208, 111320.7020209128, 51751.86112841131, 3796837.749470245, 992013.7397791013, -1221952.21711287, 1340652.697009075, -620943.6990984312, 144416.9293806241, 37.5], [-3.441963504368392E-4, 111320.7020576856, 278.2353980772752, 2485758.690035394, 6070.750963243378, 54821.18345352118, 9540.606633304236, -2710.55326746645, 1405.483844121726, 22.5], [-3.218135878613132E-4, 111320.7020701615, 0.00369383431289, 823725.6402795718, 0.46104986909093, 2351.343141331292, 1.58060784298199, 8.77738589078284, 0.37238884252424, 7.45]], - t3: function(a, b) { - if (!a || !b) - return 0; - var c, e, a = this.Tb(a); - if (!a) - return 0; - c = this.Xk(a.lng); - e = this.Xk(a.lat); - b = this.Tb(b); - return !b ? 0 : this.pf(c, this.Xk(b.lng), e, this.Xk(b.lat)) - }, - $o: function(a, b) { - if (!a || !b) - return 0; - a.lng = this.WD(a.lng, -180, 180); - a.lat = this.aE(a.lat, -74, 74); - b.lng = this.WD(b.lng, -180, 180); - b.lat = this.aE(b.lat, -74, 74); - return this.pf(this.Xk(a.lng), this.Xk(b.lng), this.Xk(a.lat), this.Xk(b.lat)) - }, - Tb: function(a) { - if (a === s || a === l) - return new J(0,0); - var b, c; - b = new J(Math.abs(a.lng),Math.abs(a.lat)); - for (var e = 0; e < this.IG.length; e++) - if (b.lat >= this.IG[e]) { - c = this.MP[e]; - break - } - a = this.FK(a, c); - return a = new J(a.lng.toFixed(6),a.lat.toFixed(6)) - }, - Eb: function(a) { - if (a === s || a === l || 180 < a.lng || -180 > a.lng || 90 < a.lat || -90 > a.lat) - return new J(0,0); - var b, c; - a.lng = this.WD(a.lng, -180, 180); - a.lat = this.aE(a.lat, -74, 74); - b = new J(a.lng,a.lat); - for (var e = 0; e < this.Nu.length; e++) - if (b.lat >= this.Nu[e]) { - c = this.FG[e]; - break - } - if (!c) - for (e = 0; e < this.Nu.length; e++) - if (b.lat <= -this.Nu[e]) { - c = this.FG[e]; - break - } - a = this.FK(a, c); - return a = new J(a.lng.toFixed(2),a.lat.toFixed(2)) - }, - FK: function(a, b) { - if (a && b) { - var c = b[0] + b[1] * Math.abs(a.lng) - , e = Math.abs(a.lat) / b[9] - , e = b[2] + b[3] * e + b[4] * e * e + b[5] * e * e * e + b[6] * e * e * e * e + b[7] * e * e * e * e * e + b[8] * e * e * e * e * e * e - , c = c * (0 > a.lng ? -1 : 1) - , e = e * (0 > a.lat ? -1 : 1); - return new J(c,e) - } - }, - pf: function(a, b, c, e) { - return this.GP * Math.acos(Math.sin(c) * Math.sin(e) + Math.cos(c) * Math.cos(e) * Math.cos(b - a)) - }, - Xk: function(a) { - return Math.PI * a / 180 - }, - B5: function(a) { - return 180 * a / Math.PI - }, - aE: function(a, b, c) { - b != s && (a = Math.max(a, b)); - c != s && (a = Math.min(a, c)); - return a - }, - WD: function(a, b, c) { - for (; a > c; ) - a -= c - b; - for (; a < b; ) - a += c - b; - return a - } - }); - z.extend(S.prototype, { - vj: function(a) { - return S.Eb(a) - }, - kh: function(a) { - a = S.Eb(a); - return new Q(a.lng,a.lat) - }, - nh: function(a) { - return S.Tb(a) - }, - xj: function(a) { - a = new J(a.x,a.y); - return S.Tb(a) - }, - $b: function(a, b, c, e, f) { - if (a) - return a = this.vj(a, f), - b = this.dc(b), - new Q(Math.round((a.lng - c.lng) / b + e.width / 2),Math.round((c.lat - a.lat) / b + e.height / 2)) - }, - xb: function(a, b, c, e, f) { - if (a) - return b = this.dc(b), - this.nh(new J(c.lng + b * (a.x - e.width / 2),c.lat - b * (a.y - e.height / 2)), f) - }, - dc: function(a) { - return Math.pow(2, 18 - a) - } - }); - function hb() { - this.$i = "bj" - } - hb.prototype = new S; - z.extend(hb.prototype, { - vj: function(a, b) { - return this.bR(b, S.Eb(a)) - }, - nh: function(a, b) { - return S.Tb(this.cR(b, a)) - }, - lngLatToPointFor3D: function(a, b) { - var c = this - , e = S.Eb(a); - K.load("coordtrans", function() { - var a = kc.ZD(c.$i || "bj", e) - , a = new Q(a.x,a.y); - b && b(a) - }, q) - }, - pointToLngLatFor3D: function(a, b) { - var c = this - , e = new J(a.x,a.y); - K.load("coordtrans", function() { - var a = kc.XD(c.$i || "bj", e) - , a = new J(a.lng,a.lat) - , a = S.Tb(a); - b && b(a) - }, q) - }, - bR: function(a, b) { - if (K.kb("coordtrans").Me == K.Cj.cq) { - var c = kc.ZD(a || "bj", b); - return new J(c.x,c.y) - } - K.load("coordtrans", u()); - return new J(0,0) - }, - cR: function(a, b) { - if (K.kb("coordtrans").Me == K.Cj.cq) { - var c = kc.XD(a || "bj", b); - return new J(c.lng,c.lat) - } - K.load("coordtrans", u()); - return new J(0,0) - }, - dc: function(a) { - return Math.pow(2, 20 - a) - } - }); - function mc() { - this.Mb = "overlay" - } - z.lang.ta(mc, z.lang.Ca, "Overlay"); - mc.Ck = function(a) { - a *= 1; - return !a ? 0 : -1E5 * a << 1 - } - ; - z.extend(mc.prototype, { - He: function(a) { - if (!this.V && Xa(this.initialize) && (this.V = this.initialize(a))) - this.V.style.WebkitUserSelect = "none"; - this.draw() - }, - initialize: function() { - aa("initialize\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - draw: function() { - aa("draw\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - remove: function() { - this.V && this.V.parentNode && this.V.parentNode.removeChild(this.V); - this.V = s; - this.dispatchEvent(new P("onremove")) - }, - U: function() { - this.V && z.D.U(this.V) - }, - show: function() { - this.V && z.D.show(this.V) - }, - jh: function() { - return !this.V || "none" == this.V.style.display || "hidden" == this.V.style.visibility ? t : q - } - }); - B.Ye(function(a) { - function b(a, b) { - var c = L("div") - , i = c.style; - i.position = "absolute"; - i.top = i.left = i.width = i.height = "0"; - i.zIndex = b; - a.appendChild(c); - return c - } - var c = a.R; - c.rd = a.rd = b(a.platform, 200); - a.Yd.BD = b(c.rd, 800); - a.Yd.RE = b(c.rd, 700); - a.Yd.sL = b(c.rd, 600); - a.Yd.KE = b(c.rd, 500); - a.Yd.fN = b(c.rd, 400); - a.Yd.gN = b(c.rd, 300); - a.Yd.nP = b(c.rd, 201); - a.Yd.Et = b(c.rd, 200) - }); - function gb() { - z.lang.Ca.call(this); - mc.call(this); - this.map = s; - this.Qa = q; - this.zb = s; - this.vH = 0 - } - z.lang.ta(gb, mc, "OverlayInternal"); - z.extend(gb.prototype, { - initialize: function(a) { - this.map = a; - z.lang.Ca.call(this, this.aa); - return s - }, - Dx: w("map"), - draw: u(), - Ej: u(), - remove: function() { - this.map = s; - z.lang.hx(this.aa); - mc.prototype.remove.call(this) - }, - U: function() { - this.Qa !== t && (this.Qa = t) - }, - show: function() { - this.Qa !== q && (this.Qa = q) - }, - jh: function() { - return !this.V ? t : !!this.Qa - }, - La: w("V"), - lO: function(a) { - var a = a || {}, b; - for (b in a) - this.z[b] = a[b] - }, - Sp: ba("zIndex"), - gj: function() { - this.z.gj = q - }, - MW: function() { - this.z.gj = t - }, - yo: ba("lg"), - Cp: function() { - this.lg = s - } - }); - function nc() { - this.map = s; - this.ya = {}; - this.Ee = [] - } - B.Ye(function(a) { - var b = new nc; - b.map = a; - a.ya = b.ya; - a.Ee = b.Ee; - a.addEventListener("load", function(a) { - b.draw(a) - }); - a.addEventListener("moveend", function(a) { - b.draw(a) - }); - z.ca.ia && 8 > z.ca.ia || "BackCompat" === document.compatMode ? a.addEventListener("zoomend", function(a) { - setTimeout(function() { - b.draw(a) - }, 20) - }) : a.addEventListener("zoomend", function(a) { - b.draw(a) - }); - a.addEventListener("maptypechange", function(a) { - b.draw(a) - }); - a.addEventListener("addoverlay", function(a) { - a = a.target; - if (a instanceof gb) - b.ya[a.aa] || (b.ya[a.aa] = a); - else { - for (var e = t, f = 0, g = b.Ee.length; f < g; f++) - if (b.Ee[f] === a) { - e = q; - break - } - e || b.Ee.push(a) - } - }); - a.addEventListener("removeoverlay", function(a) { - a = a.target; - if (a instanceof gb) - delete b.ya[a.aa]; - else - for (var e = 0, f = b.Ee.length; e < f; e++) - if (b.Ee[e] === a) { - b.Ee.splice(e, 1); - break - } - }); - a.addEventListener("clearoverlays", function() { - this.Yc(); - for (var a in b.ya) - b.ya[a].z.gj && (b.ya[a].remove(), - delete b.ya[a]); - a = 0; - for (var e = b.Ee.length; a < e; a++) - b.Ee[a].enableMassClear !== t && (b.Ee[a].remove(), - b.Ee[a] = s, - b.Ee.splice(a, 1), - a--, - e--) - }); - a.addEventListener("infowindowopen", function() { - var a = this.zb; - a && (z.D.U(a.Ac), - z.D.U(a.ac)) - }); - a.addEventListener("movestart", function() { - this.hh() && this.hh().mJ() - }); - a.addEventListener("moveend", function() { - this.hh() && this.hh().cJ() - }) - }); - nc.prototype.draw = function(a) { - if (B.hq) { - var b = B.hq.Ws(this.map); - "canvas" === b.Mb && b.canvas && b.XQ(b.canvas.getContext("2d")) - } - for (var c in this.ya) - this.ya[c].draw(a); - z.mc.Fb(this.Ee, function(a) { - a.draw() - }); - this.map.R.qb && this.map.R.qb.sa(); - B.hq && b.IF() - } - ; - function oc(a) { - gb.call(this); - a = a || {}; - this.z = { - strokeColor: a.strokeColor || "#3a6bdb", - rc: a.strokeWeight || 5, - td: a.strokeOpacity || 0.65, - strokeStyle: a.strokeStyle || "solid", - gj: a.enableMassClear === t ? t : q, - zk: s, - um: s, - mf: a.enableEditing === q ? q : t, - kN: 5, - G0: t, - jf: a.enableClicking === t ? t : q, - ji: a.icons && 0 < a.icons.length ? a.icons : s - }; - 0 >= this.z.rc && (this.z.rc = 5); - if (0 > this.z.td || 1 < this.z.td) - this.z.td = 0.65; - if (0 > this.z.tg || 1 < this.z.tg) - this.z.tg = 0.65; - "solid" != this.z.strokeStyle && "dashed" != this.z.strokeStyle && (this.z.strokeStyle = "solid"); - this.V = s; - this.Vu = new fb(0,0); - this.gf = []; - this.tc = []; - this.Ra = {} - } - z.lang.ta(oc, gb, "Graph"); - oc.yx = function(a) { - var b = []; - if (!a) - return b; - $a(a) && z.mc.Fb(a.split(";"), function(a) { - a = a.split(","); - b.push(new J(a[0],a[1])) - }); - "[object Array]" == Object.prototype.toString.apply(a) && 0 < a.length && (b = a); - return b - } - ; - oc.eF = [0.09, 0.0050, 1.0E-4, 1.0E-5]; - z.extend(oc.prototype, { - initialize: function(a) { - this.map = a; - return s - }, - draw: u(), - Mr: function(a) { - this.gf.length = 0; - this.ja = oc.yx(a).slice(0); - this.Bh() - }, - ke: function(a) { - this.Mr(a) - }, - Bh: function() { - if (this.ja) { - var a = this; - a.Vu = new fb; - z.mc.Fb(this.ja, function(b) { - a.Vu.extend(b) - }) - } - }, - Ue: w("ja"), - gn: function(a, b) { - b && this.ja[a] && (this.gf.length = 0, - this.ja[a] = new J(b.lng,b.lat), - this.Bh()) - }, - setStrokeColor: function(a) { - this.z.strokeColor = a - }, - jY: function() { - return this.z.strokeColor - }, - Rp: function(a) { - 0 < a && (this.z.rc = a) - }, - WL: function() { - return this.z.rc - }, - Pp: function(a) { - a == l || (1 < a || 0 > a) || (this.z.td = a) - }, - kY: function() { - return this.z.td - }, - Xt: function(a) { - 1 < a || 0 > a || (this.z.tg = a) - }, - HX: function() { - return this.z.tg - }, - Qp: function(a) { - "solid" != a && "dashed" != a || (this.z.strokeStyle = a) - }, - VL: function() { - return this.z.strokeStyle - }, - setFillColor: function(a) { - this.z.fillColor = a || "" - }, - GX: function() { - return this.z.fillColor - }, - ve: w("Vu"), - remove: function() { - this.map && this.map.removeEventListener("onmousemove", this.vv); - gb.prototype.remove.call(this); - this.gf.length = 0 - }, - mf: function() { - if (!(2 > this.ja.length)) { - this.z.mf = q; - var a = this; - K.load("poly", function() { - a.Ul() - }, q) - } - }, - LW: function() { - this.z.mf = t; - var a = this; - K.load("poly", function() { - a.nk() - }, q) - }, - DX: function() { - return this.z.mf - } - }); - function pc(a) { - gb.call(this); - this.V = this.map = s; - this.z = { - width: 0, - height: 0, - za: new O(0,0), - opacity: 1, - background: "transparent", - ey: 1, - SM: "#000", - hZ: "solid", - point: s - }; - this.lO(a); - this.point = this.z.point - } - z.lang.ta(pc, gb, "Division"); - z.extend(pc.prototype, { - Ej: function() { - var a = this.z - , b = this.content - , c = ['
    '); - c.push(b); - c.push("
    "); - this.V = Ab(this.map.Tf().RE, c.join("")) - }, - initialize: function(a) { - this.map = a; - this.Ej(); - this.V && z.M(this.V, H() ? "touchstart" : "mousedown", function(a) { - ma(a) - }); - return this.V - }, - draw: function() { - var a = this.map.Xe(this.z.point); - this.z.za = new O(-Math.round(this.z.width / 2) - Math.round(this.z.ey),-Math.round(this.z.height / 2) - Math.round(this.z.ey)); - this.V.style.left = a.x + this.z.za.width + "px"; - this.V.style.top = a.y + this.z.za.height + "px" - }, - ga: function() { - return this.z.point - }, - L1: function() { - return this.map.$b(this.ga()) - }, - sa: function(a) { - this.z.point = a; - this.draw() - }, - u_: function(a, b) { - this.z.width = Math.round(a); - this.z.height = Math.round(b); - this.V && (this.V.style.width = this.z.width + "px", - this.V.style.height = this.z.height + "px", - this.draw()) - } - }); - function qc(a, b, c) { - a && b && (this.imageUrl = a, - this.size = b, - a = new O(Math.floor(b.width / 2),Math.floor(b.height / 2)), - c = c || {}, - a = c.anchor || a, - b = c.imageOffset || new O(0,0), - this.imageSize = c.imageSize, - this.anchor = a, - this.imageOffset = b, - this.infoWindowAnchor = c.infoWindowAnchor || this.anchor, - this.printImageUrl = c.printImageUrl || "") - } - z.extend(qc.prototype, { - mO: function(a) { - a && (this.imageUrl = a) - }, - K_: function(a) { - a && (this.printImageUrl = a) - }, - Ce: function(a) { - a && (this.size = new O(a.width,a.height)) - }, - uc: function(a) { - a && (this.anchor = new O(a.width,a.height)) - }, - Yt: function(a) { - a && (this.imageOffset = new O(a.width,a.height)) - }, - z_: function(a) { - a && (this.infoWindowAnchor = new O(a.width,a.height)) - }, - w_: function(a) { - a && (this.imageSize = new O(a.width,a.height)) - }, - toString: ca("Icon") - }); - function rc(a, b) { - if (a) { - b = b || {}; - this.style = { - anchor: b.anchor || new O(0,0), - fillColor: b.fillColor || "#000", - tg: b.fillOpacity || 0, - scale: b.scale || 1, - rotation: b.rotation || 0, - strokeColor: b.strokeColor || "#000", - td: b.strokeOpacity || 1, - rc: b.strokeWeight - }; - this.Mb = "number" === typeof a ? a : "UserDefined"; - this.Di = this.style.anchor; - this.rr = new O(0,0); - this.anchor = s; - this.vB = a; - var c = this; - K.load("symbol", function() { - c.Mn() - }, q) - } - } - z.extend(rc.prototype, { - setPath: ba("vB"), - setAnchor: function(a) { - this.Di = this.style.anchor = a - }, - setRotation: function(a) { - this.style.rotation = a - }, - setScale: function(a) { - this.style.scale = a - }, - setStrokeWeight: function(a) { - this.style.rc = a - }, - setStrokeColor: function(a) { - a = z.is.AC(a, this.style.td); - this.style.strokeColor = a - }, - setStrokeOpacity: function(a) { - this.style.td = a - }, - setFillOpacity: function(a) { - this.style.tg = a - }, - setFillColor: function(a) { - this.style.fillColor = a - } - }); - function sc(a, b, c, e) { - a && (this.Ov = {}, - this.qL = e ? !!e : t, - this.Vc = [], - this.c0 = a instanceof rc ? a : s, - this.WI = b === l ? q : !!(b.indexOf("%") + 1), - this.Zj = isNaN(parseFloat(b)) ? 1 : this.WI ? parseFloat(b) / 100 : parseFloat(b), - this.XI = !!(c.indexOf("%") + 1), - this.repeat = c != l ? this.XI ? parseFloat(c) / 100 : parseFloat(c) : 0) - } - ;function tc(a, b) { - z.lang.Ca.call(this); - this.content = a; - this.map = s; - b = b || {}; - this.z = { - width: b.width || 0, - height: b.height || 0, - maxWidth: b.maxWidth || 730, - za: b.offset || new O(0,0), - title: b.title || "", - SE: b.maxContent || "", - dh: b.enableMaximize || t, - Ls: b.enableAutoPan === t ? t : q, - lD: b.enableCloseOnClick === t ? t : q, - margin: b.margin || [10, 10, 40, 10], - vC: b.collisions || [[10, 10], [10, 10], [10, 10], [10, 10]], - GY: t, - AZ: b.onClosing || ca(q), - hL: t, - qD: b.enableParano === q ? q : t, - message: b.message, - sD: b.enableSearchTool === q ? q : t, - Ox: b.headerContent || "", - mD: b.enableContentScroll || t - }; - if (0 != this.z.width && (220 > this.z.width && (this.z.width = 220), - 730 < this.z.width)) - this.z.width = 730; - if (0 != this.z.height && (60 > this.z.height && (this.z.height = 60), - 650 < this.z.height)) - this.z.height = 650; - if (0 != this.z.maxWidth && (220 > this.z.maxWidth && (this.z.maxWidth = 220), - 730 < this.z.maxWidth)) - this.z.maxWidth = 730; - this.de = t; - this.yi = G.qa; - this.fb = s; - var c = this; - K.load("infowindow", function() { - c.ib() - }) - } - z.lang.ta(tc, z.lang.Ca, "InfoWindow"); - z.extend(tc.prototype, { - setWidth: function(a) { - !a && 0 != a || (isNaN(a) || 0 > a) || (0 != a && (220 > a && (a = 220), - 730 < a && (a = 730)), - this.z.width = a) - }, - setHeight: function(a) { - !a && 0 != a || (isNaN(a) || 0 > a) || (0 != a && (60 > a && (a = 60), - 650 < a && (a = 650)), - this.z.height = a) - }, - qO: function(a) { - !a && 0 != a || (isNaN(a) || 0 > a) || (0 != a && (220 > a && (a = 220), - 730 < a && (a = 730)), - this.z.maxWidth = a) - }, - Ec: function(a) { - this.z.title = a - }, - getTitle: function() { - return this.z.title - }, - dd: ba("content"), - xk: w("content"), - $t: function(a) { - this.z.SE = a + "" - }, - je: u(), - Ls: function() { - this.z.Ls = q - }, - disableAutoPan: function() { - this.z.Ls = t - }, - enableCloseOnClick: function() { - this.z.lD = q - }, - disableCloseOnClick: function() { - this.z.lD = t - }, - dh: function() { - this.z.dh = q - }, - kx: function() { - this.z.dh = t - }, - show: function() { - this.Qa = q - }, - U: function() { - this.Qa = t - }, - close: function() { - this.U() - }, - hy: function() { - this.de = q - }, - restore: function() { - this.de = t - }, - jh: function() { - return this.Xa() - }, - Xa: ca(t), - ga: function() { - if (this.fb && this.fb.ga) - return this.fb.ga() - }, - Sf: function() { - return this.z.za - } - }); - Ka.prototype.pc = function(a, b) { - if (a instanceof tc && b instanceof J) { - var c = this.R; - c.Nm ? c.Nm.sa(b) : (c.Nm = new U(b,{ - icon: new qc(G.qa + "blank.gif",{ - width: 1, - height: 1 - }), - offset: new O(0,0), - clickable: t - }), - c.Nm.bS = 1); - this.Ga(c.Nm); - c.Nm.pc(a) - } - } - ; - Ka.prototype.Yc = function() { - var a = this.R.qb || this.R.rl; - a && a.fb && a.fb.Yc() - } - ; - gb.prototype.pc = function(a) { - this.map && (this.map.Yc(), - a.Qa = q, - this.map.R.rl = a, - a.fb = this, - z.lang.Ca.call(a, a.aa)) - } - ; - gb.prototype.Yc = function() { - this.map && this.map.R.rl && (this.map.R.rl.Qa = t, - z.lang.hx(this.map.R.rl.aa), - this.map.R.rl = s) - } - ; - function uc(a, b) { - gb.call(this); - this.content = a; - this.V = this.map = s; - b = b || {}; - this.z = { - width: 0, - za: b.offset || new O(0,0), - Wp: { - backgroundColor: "#fff", - border: "1px solid #f00", - padding: "1px", - whiteSpace: "nowrap", - font: "12px " + G.fontFamily, - zIndex: "80", - MozUserSelect: "none" - }, - position: b.position || s, - gj: b.enableMassClear === t ? t : q, - jf: q - }; - 0 > this.z.width && (this.z.width = 0); - Hb(b.enableClicking) && (this.z.jf = b.enableClicking); - this.point = this.z.position; - var c = this; - K.load("marker", function() { - c.ib() - }) - } - z.lang.ta(uc, gb, "Label"); - z.extend(uc.prototype, { - ga: function() { - return this.Dv ? this.Dv.ga() : this.point - }, - sa: function(a) { - a instanceof J && !this.Ex() && (this.point = this.z.position = new J(a.lng,a.lat)) - }, - dd: ba("content"), - HF: function(a) { - 0 <= a && 1 >= a && (this.z.opacity = a) - }, - Ze: function(a) { - a instanceof O && (this.z.za = new O(a.width,a.height)) - }, - Sf: function() { - return this.z.za - }, - Md: function(a) { - a = a || {}; - this.z.Wp = z.extend(this.z.Wp, a) - }, - ti: function(a) { - return this.Md(a) - }, - Ec: function(a) { - this.z.title = a || "" - }, - getTitle: function() { - return this.z.title - }, - pO: function(a) { - this.point = (this.Dv = a) ? this.z.position = a.ga() : this.z.position = s - }, - Ex: function() { - return this.Dv || s - }, - xk: w("content") - }); - function vc(a, b) { - if (0 !== arguments.length) { - gb.apply(this, arguments); - b = b || {}; - this.z = { - bb: a, - opacity: b.opacity || 1, - Gm: b.Gm || "", - Bs: b.displayOnMinLevel || 1, - gj: b.enableMassClear === t ? t : q, - As: b.displayOnMaxLevel || 19, - X_: b.stretch || t - }; - var c = this; - K.load("groundoverlay", function() { - c.ib() - }) - } - } - z.lang.ta(vc, gb, "GroundOverlay"); - z.extend(vc.prototype, { - setBounds: function(a) { - this.z.bb = a - }, - getBounds: function() { - return this.z.bb - }, - setOpacity: function(a) { - this.z.opacity = a - }, - getOpacity: function() { - return this.z.opacity - }, - setImageURL: function(a) { - this.z.Gm = a - }, - getImageURL: function() { - return this.z.Gm - }, - setDisplayOnMinLevel: function(a) { - this.z.Bs = a - }, - getDisplayOnMinLevel: function() { - return this.z.Bs - }, - setDisplayOnMaxLevel: function(a) { - this.z.As = a - }, - getDisplayOnMaxLevel: function() { - return this.z.As - } - }); - var wc = 3 - , xc = 4; - function yc() { - var a = document.createElement("canvas"); - return !(!a.getContext || !a.getContext("2d")) - } - function zc(a, b) { - var c = this; - yc() && (a === l && aa(Error("\u6ca1\u6709\u4f20\u5165points\u6570\u636e")), - "[object Array]" !== Object.prototype.toString.call(a) && aa(Error("points\u6570\u636e\u4e0d\u662f\u6570\u7ec4")), - b = b || {}, - gb.apply(c, arguments), - c.ea = { - ja: a - }, - c.z = { - shape: b.shape || wc, - size: b.size || xc, - color: b.color || "#fa937e", - gj: q - }, - this.sB = [], - this.pe = [], - K.load("pointcollection", function() { - for (var a = 0, b; b = c.sB[a]; a++) - c[b.method].apply(c, b.arguments); - for (a = 0; b = c.pe[a]; a++) - c[b.method].apply(c, b.arguments) - })) - } - z.lang.ta(zc, gb, "PointCollection"); - z.extend(zc.prototype, { - initialize: function(a) { - this.sB && this.sB.push({ - method: "initialize", - arguments: arguments - }) - }, - setPoints: function(a) { - this.pe && this.pe.push({ - method: "setPoints", - arguments: arguments - }) - }, - setStyles: function(a) { - this.pe && this.pe.push({ - method: "setStyles", - arguments: arguments - }) - }, - clear: function() { - this.pe && this.pe.push({ - method: "clear", - arguments: arguments - }) - }, - remove: function() { - this.pe && this.pe.push({ - method: "remove", - arguments: arguments - }) - } - }); - var Ac = new qc(G.qa + "marker_red_sprite.png",new O(19,25),{ - anchor: new O(10,25), - infoWindowAnchor: new O(10,0) - }) - , Bc = new qc(G.qa + "marker_red_sprite.png",new O(20,11),{ - anchor: new O(6,11), - imageOffset: new O(-19,-13) - }); - function U(a, b) { - gb.call(this); - b = b || {}; - this.point = a; - this.yq = this.map = s; - this.z = { - za: b.offset || new O(0,0), - rj: b.icon || Ac, - Sk: Bc, - title: b.title || "", - label: s, - lK: b.baseZIndex || 0, - jf: q, - X5: t, - EE: t, - gj: b.enableMassClear === t ? t : q, - Wb: t, - UN: b.raiseOnDrag === q ? q : t, - aO: t, - Hd: b.draggingCursor || G.Hd, - rotation: b.rotation || 0 - }; - b.icon && !b.shadow && (this.z.Sk = s); - b.enableDragging && (this.z.Wb = b.enableDragging); - Hb(b.enableClicking) && (this.z.jf = b.enableClicking); - var c = this; - K.load("marker", function() { - c.ib() - }) - } - U.Qu = mc.Ck(-90) + 1E6; - U.AG = U.Qu + 1E6; - z.lang.ta(U, gb, "Marker"); - z.extend(U.prototype, { - Rb: function(a) { - if (a instanceof qc || a instanceof rc) - this.z.rj = a - }, - ap: function() { - return this.z.rj - }, - Oy: function(a) { - a instanceof qc && (this.z.Sk = a) - }, - getShadow: function() { - return this.z.Sk - }, - dn: function(a) { - this.z.label = a || s - }, - VD: function() { - return this.z.label - }, - Wb: function() { - this.z.Wb = q - }, - TC: function() { - this.z.Wb = t - }, - ga: w("point"), - sa: function(a) { - a instanceof J && (this.point = new J(a.lng,a.lat)) - }, - ui: function(a, b) { - this.z.EE = !!a; - a && (this.XG = b || 0) - }, - Ec: function(a) { - this.z.title = a + "" - }, - getTitle: function() { - return this.z.title - }, - Ze: function(a) { - a instanceof O && (this.z.za = a) - }, - Sf: function() { - return this.z.za - }, - bn: ba("yq"), - Op: function(a) { - this.z.rotation = a - }, - TL: function() { - return this.z.rotation - } - }); - function Cc(a) { - this.options = a || {}; - this.GZ = this.options.paneName || "labelPane"; - this.zIndex = this.options.zIndex || 0 - } - z.lang.ta(Cc, gb, "CanvasLayer"); - Cc.prototype.initialize = function(a) { - this.B = a; - var b = this.canvas = document.createElement("canvas") - , c = this.canvas.getContext("2d"); - b.style.cssText = "position:absolute;left:0;top:0;z-index:" + this.zIndex + ";"; - Dc(this); - Ec(c); - a.getPanes()[this.GZ].appendChild(b); - var e = this; - a.addEventListener("resize", function() { - Dc(e); - e.ib() - }); - return this.canvas - } - ; - function Dc(a) { - var b = a.B.cb() - , a = a.canvas; - a.width = b.width; - a.height = b.height; - a.style.width = a.width + "px"; - a.style.height = a.height + "px" - } - function Ec(a) { - var b = (window.devicePixelRatio || 1) / (a.CV || a.T5 || a.x4 || a.y4 || a.B4 || a.CV || 1) - , c = a.canvas.width - , e = a.canvas.height; - a.canvas.width = c * b; - a.canvas.height = e * b; - a.canvas.style.width = c + "px"; - a.canvas.style.height = e + "px"; - a.scale(b, b) - } - Cc.prototype.draw = function() { - var a = this - , b = arguments; - clearTimeout(a.j0); - a.j0 = setTimeout(function() { - a.ib.apply(a, b) - }, 15) - } - ; - da = Cc.prototype; - da.ib = function() { - var a = this.B; - this.canvas.style.left = -a.offsetX + "px"; - this.canvas.style.top = -a.offsetY + "px"; - this.dispatchEvent("draw"); - this.options.update && this.options.update.apply(this, arguments) - } - ; - da.La = w("canvas"); - da.show = function() { - this.canvas || this.B.Ga(this); - this.canvas.style.display = "block" - } - ; - da.U = function() { - this.canvas.style.display = "none" - } - ; - da.Sp = function(a) { - this.canvas.style.zIndex = a - } - ; - da.Ck = w("zIndex"); - function Fc(a, b) { - oc.call(this, b); - b = b || {}; - this.z.tg = b.fillOpacity ? b.fillOpacity : 0.65; - this.z.fillColor = "" == b.fillColor ? "" : b.fillColor ? b.fillColor : "#fff"; - this.ke(a); - var c = this; - K.load("poly", function() { - c.ib() - }) - } - z.lang.ta(Fc, oc, "Polygon"); - z.extend(Fc.prototype, { - ke: function(a, b) { - this.vo = oc.yx(a).slice(0); - var c = oc.yx(a).slice(0); - 1 < c.length && c.push(new J(c[0].lng,c[0].lat)); - oc.prototype.ke.call(this, c, b) - }, - gn: function(a, b) { - this.vo[a] && (this.vo[a] = new J(b.lng,b.lat), - this.ja[a] = new J(b.lng,b.lat), - 0 == a && !this.ja[0].pb(this.ja[this.ja.length - 1]) && (this.ja[this.ja.length - 1] = new J(b.lng,b.lat)), - this.Bh()) - }, - Ue: function() { - var a = this.vo; - 0 == a.length && (a = this.ja); - return a - } - }); - function Gc(a, b) { - oc.call(this, b); - this.Mr(a); - var c = this; - K.load("poly", function() { - c.ib() - }) - } - z.lang.ta(Gc, oc, "Polyline"); - function Hc(a, b, c) { - this.point = a; - this.wa = Math.abs(b); - Fc.call(this, [], c) - } - Hc.eF = [0.01, 1.0E-4, 1.0E-5, 4.0E-6]; - z.lang.ta(Hc, Fc, "Circle"); - z.extend(Hc.prototype, { - initialize: function(a) { - this.map = a; - this.ja = this.qv(this.point, this.wa); - this.Bh(); - return s - }, - Ka: w("point"), - Zf: function(a) { - a && (this.point = a) - }, - RL: w("wa"), - xf: function(a) { - this.wa = Math.abs(a) - }, - qv: function(a, b) { - if (!a || !b || !this.map) - return []; - for (var c = [], e = b / 6378800, f = Math.PI / 180 * a.lat, g = Math.PI / 180 * a.lng, i = 0; 360 > i; i += 9) { - var k = Math.PI / 180 * i - , m = Math.asin(Math.sin(f) * Math.cos(e) + Math.cos(f) * Math.sin(e) * Math.cos(k)) - , k = new J(((g - Math.atan2(Math.sin(k) * Math.sin(e) * Math.cos(f), Math.cos(e) - Math.sin(f) * Math.sin(m)) + Math.PI) % (2 * Math.PI) - Math.PI) * (180 / Math.PI),m * (180 / Math.PI)); - c.push(k) - } - e = c[0]; - c.push(new J(e.lng,e.lat)); - return c - } - }); - var Ic = {}; - function Jc(a) { - this.map = a; - this.Mm = []; - this.$f = []; - this.Fg = []; - this.OV = 300; - this.oF = 0; - this.yg = {}; - this.Zi = {}; - this.ph = 0; - this.yE = q; - this.MK = {}; - this.eo = this.Kj(1); - this.od = this.Kj(2); - this.Bl = this.Kj(3); - this.Ki = this.Kj(4); - a.platform.appendChild(this.eo); - a.platform.appendChild(this.od); - a.platform.appendChild(this.Bl); - a.platform.appendChild(this.Ki); - var b = 256 * Math.pow(2, 15) - , c = 3 * b - , a = S.Eb(new J(180,0)).lng - , c = c - a - , b = -3 * b - , e = S.Eb(new J(-180,0)).lng; - this.yI = a; - this.zI = e; - this.ZA = c + (e - b); - this.AI = a - e - } - B.Ye(function(a) { - var b = new Jc(a); - b.na(); - a.Va = b - }); - z.extend(Jc.prototype, { - na: function() { - var a = this - , b = a.map; - b.addEventListener("loadcode", function() { - a.up() - }); - b.addEventListener("addtilelayer", function(b) { - a.Oe(b) - }); - b.addEventListener("removetilelayer", function(b) { - a.Yf(b) - }); - b.addEventListener("setmaptype", function(b) { - a.Dg(b) - }); - b.addEventListener("zoomstartcode", function(b) { - a.Mc(b) - }); - b.addEventListener("setcustomstyles", function(b) { - a.Zt(b.target); - a.Wf(q) - }); - b.addEventListener("initindoorlayer", function(b) { - a.tE(b) - }) - }, - up: function() { - var a = this; - if (z.ca.ia) - try { - document.execCommand("BackgroundImageCache", t, q) - } catch (b) {} - this.loaded || a.Ux(); - a.Wf(); - this.loaded || (this.loaded = q, - K.load("tile", function() { - a.rQ() - })) - }, - tE: function(a) { - this.zu = new Kc(this); - this.zu.Oe(new Lc(this.map,this.zu,a.vf)) - }, - Ux: function() { - for (var a = this.map.oa().ff, b = 0; b < a.length; b++) { - var c = new Mc; - z.extend(c, a[b]); - this.Mm.push(c); - c.na(this.map, this.eo) - } - this.Zt() - }, - Kj: function(a) { - var b = L("div"); - b.style.position = "absolute"; - b.style.overflow = "visible"; - b.style.left = b.style.top = "0"; - b.style.zIndex = a; - return b - }, - Af: function() { - this.ph--; - var a = this; - this.yE && (this.map.dispatchEvent(new P("onfirsttileloaded")), - this.yE = t); - 0 == this.ph && (this.Hi && (clearTimeout(this.Hi), - this.Hi = s), - this.Hi = setTimeout(function() { - if (a.ph == 0) { - a.map.dispatchEvent(new P("ontilesloaded")); - a.yE = q - } - a.Hi = s - }, 80)) - }, - fE: function(a, b) { - return "TILE-" + b.aa + "-" + a[0] + "-" + a[1] + "-" + a[2] - }, - Rx: function(a) { - var b = a.Gb; - b && zb(b) && b.parentNode.removeChild(b); - delete this.yg[a.name]; - a.loaded || (Nc(a), - a.Gb = s, - a.Pm = s) - }, - pj: function(a, b, c) { - var e = this.map - , f = e.oa() - , g = e.Oa - , i = e.fc - , k = f.dc(g) - , m = this.DL() - , n = m[0] - , o = m[1] - , p = m[2] - , v = m[3] - , x = m[4] - , c = "undefined" != typeof c ? c : 0 - , f = f.$c() - , m = e.aa.replace(/^TANGRAM_/, ""); - for (this.hc ? this.hc.length = 0 : this.hc = []; n < p; n++) - for (var y = o; y < v; y++) { - var A = n - , E = y; - this.hc.push([A, E]); - A = m + "_" + b + "_" + A + "_" + E + "_" + g; - this.MK[A] = A - } - this.hc.sort(function(a) { - return function(b, c) { - return 0.4 * Math.abs(b[0] - a[0]) + 0.6 * Math.abs(b[1] - a[1]) - (0.4 * Math.abs(c[0] - a[0]) + 0.6 * Math.abs(c[1] - a[1])) - } - }([x[0] - 1, x[1] - 1])); - i = [Math.round(-i.lng / k), Math.round(i.lat / k)]; - n = -e.offsetY + e.height / 2; - a.style.left = -e.offsetX + e.width / 2 + "px"; - a.style.top = n + "px"; - this.Cc ? this.Cc.length = 0 : this.Cc = []; - n = 0; - for (e = a.childNodes.length; n < e; n++) - y = a.childNodes[n], - y.Sj = t, - this.Cc.push(y); - if (n = this.qh) - for (var C in n) - delete n[C]; - else - this.qh = {}; - this.Dc ? this.Dc.length = 0 : this.Dc = []; - n = 0; - for (e = this.hc.length; n < e; n++) { - C = this.hc[n][0]; - k = this.hc[n][1]; - y = 0; - for (o = this.Cc.length; y < o; y++) - if (p = this.Cc[y], - p.id == m + "_" + b + "_" + C + "_" + k + "_" + g) { - p.Sj = q; - this.qh[p.id] = p; - break - } - } - n = 0; - for (e = this.Cc.length; n < e; n++) - p = this.Cc[n], - p.Sj || this.Dc.push(p); - this.nn = []; - y = (f + c) * this.map.K.devicePixelRatio; - n = 0; - for (e = this.hc.length; n < e; n++) - C = this.hc[n][0], - k = this.hc[n][1], - v = C * f + i[0] - c / 2, - x = (-1 - k) * f + i[1] - c / 2, - A = m + "_" + b + "_" + C + "_" + k + "_" + g, - o = this.qh[A], - p = s, - o ? (p = o.style, - p.left = v + "px", - p.top = x + "px", - o.yd || this.nn.push([C, k, o])) : (0 < this.Dc.length ? (o = this.Dc.shift(), - o.getContext("2d").clearRect(-c / 2, -c / 2, y, y), - p = o.style) : (o = document.createElement("canvas"), - p = o.style, - p.position = "absolute", - p.width = f + c + "px", - p.height = f + c + "px", - this.Zx() && (p.WebkitTransform = "scale(1.001)"), - o.setAttribute("width", y), - o.setAttribute("height", y), - a.appendChild(o)), - o.id = A, - p.left = v + "px", - p.top = x + "px", - -1 < A.indexOf("bg") && (v = "#F3F1EC", - this.map.K.Eo && (v = this.map.K.Eo), - p.background = v ? v : ""), - this.nn.push([C, k, o])), - o.style.visibility = ""; - n = 0; - for (e = this.Dc.length; n < e; n++) - this.Dc[n].style.visibility = "hidden"; - return this.nn - }, - Zx: function() { - return /M040/i.test(navigator.userAgent) - }, - DL: function() { - var a = this.map - , b = a.oa() - , c = b.mE(a.Oa) - , e = a.fc - , f = Math.ceil(e.lng / c) - , g = Math.ceil(e.lat / c) - , b = b.$c() - , c = [f, g, (e.lng - f * c) / c * b, (e.lat - g * c) / c * b]; - return [c[0] - Math.ceil((a.width / 2 - c[2]) / b), c[1] - Math.ceil((a.height / 2 - c[3]) / b), c[0] + Math.ceil((a.width / 2 + c[2]) / b), c[1] + Math.ceil((a.height / 2 + c[3]) / b), c] - }, - R_: function(a, b, c, e) { - var f = this; - f.u2 = b; - var g = this.map.oa() - , i = f.fE(a, c) - , k = g.$c() - , b = [a[0] * k + b[0], (-1 - a[1]) * k + b[1]] - , m = this.yg[i]; - if (this.map.oa() !== Ya && this.map.oa() !== Sa) { - var n = this.Lw(a[0], a[2]).offsetX; - b[0] += n; - b.Q1 = n - } - m && m.Gb ? (xb(m.Gb, b), - e && (e = new Q(a[0],a[1]), - g = this.map.K.ye ? this.map.K.ye.style : "normal", - e = c.getTilesUrl(e, a[2], g), - m.loaded = t, - Oc(m, e)), - m.loaded ? this.Af() : Pc(m, function() { - f.Af() - })) : (m = this.Zi[i]) && m.Gb ? (c.Jb.insertBefore(m.Gb, c.Jb.lastChild), - this.yg[i] = m, - xb(m.Gb, b), - e && (e = new Q(a[0],a[1]), - g = this.map.K.ye ? this.map.K.ye.style : "normal", - e = c.getTilesUrl(e, a[2], g), - m.loaded = t, - Oc(m, e)), - m.loaded ? this.Af() : Pc(m, function() { - f.Af() - })) : (m = k * Math.pow(2, g.sm() - a[2]), - new J(a[0] * m,a[1] * m), - e = new Q(a[0],a[1]), - g = this.map.K.ye ? this.map.K.ye.style : "normal", - e = c.getTilesUrl(e, a[2], g), - m = new Qc(this,e,b,a,c), - Pc(m, function() { - f.Af() - }), - m.co(), - this.yg[i] = m) - }, - Af: function() { - this.ph--; - var a = this; - 0 == this.ph && (this.Hi && (clearTimeout(this.Hi), - this.Hi = s), - this.Hi = setTimeout(function() { - if (a.ph == 0) { - a.map.dispatchEvent(new P("ontilesloaded")); - if (ua) { - if (ra && sa && ta) { - var b = bb() - , c = a.map.cb(); - setTimeout(function() { - Ra(5030, { - load_script_time: sa - ra, - load_tiles_time: b - ta, - map_width: c.width, - map_height: c.height, - map_size: c.width * c.height - }) - }, 1E4); - B.Fn("cus.fire", "time", { - z_imgfirstloaded: b - ta - }) - } - ua = t - } - } - a.Hi = s - }, 80)) - }, - fE: function(a, b) { - return this.map.oa() === Qa ? "TILE-" + b.aa + "-" + this.map.Rw + "-" + a[0] + "-" + a[1] + "-" + a[2] : "TILE-" + b.aa + "-" + a[0] + "-" + a[1] + "-" + a[2] - }, - Rx: function(a) { - var b = a.Gb; - b && (Rc(b), - zb(b) && b.parentNode.removeChild(b)); - delete this.yg[a.name]; - a.loaded || (Rc(b), - Nc(a), - a.Gb = s, - a.Pm = s) - }, - Lw: function(a, b) { - for (var c = 0, e = 6 * Math.pow(2, b - 3), f = e / 2 - 1, g = -e / 2; a > f; ) - a -= e, - c -= this.ZA; - for (; a < g; ) - a += e, - c += this.ZA; - c = Math.round(c / Math.pow(2, 18 - b)); - return { - offsetX: c, - hs: a - } - }, - QV: function(a) { - for (var b = a.lng; b > this.yI; ) - b -= this.AI; - for (; b < this.zI; ) - b += this.AI; - a.lng = b; - return a - }, - RV: function(a, b) { - for (var c = 256 * Math.pow(2, 18 - b), e = Math.floor(this.yI / c), f = Math.floor(this.zI / c), c = Math.floor(this.ZA / c), g = [], i = 0; i < a.length; i++) { - var k = a[i] - , m = k[0] - , k = k[1]; - if (m >= e) { - var m = m + c - , n = "id_" + m + "_" + k + "_" + b; - a[n] || (a[n] = q, - g.push([m, k])) - } else - m <= f && (m -= c, - n = "id_" + m + "_" + k + "_" + b, - a[n] || (a[n] = q, - g.push([m, k]))) - } - for (i = 0; i < g.length; i++) - a.push(g[i]); - return a - }, - Wf: function(a) { - var b = this; - if (b.map.oa() == Qa) - K.load("coordtrans", function() { - b.map.Ub || (b.map.Ub = Qa.wk(b.map.$g), - b.map.Rw = Qa.BL(b.map.Ub)); - b.CI() - }, q); - else { - if (a && a) - for (var c in this.Zi) - delete this.Zi[c]; - b.CI(a) - } - }, - CI: function(a) { - var b = this.Mm.concat(this.$f) - , c = b.length - , e = this.map - , f = e.oa() - , g = e.fc; - this.map.oa() !== Ya && this.map.oa() !== Sa && (g = this.QV(g)); - for (var i = 0; i < c; i++) { - var k = b[i]; - if (k.gc && e.Oa < k.gc) - break; - if (k.Jw) { - var m = this.Jb = k.Jb; - if (a) { - var n = m; - if (n && n.childNodes) - for (var o = n.childNodes.length, p = o - 1; 0 <= p; p--) - o = n.childNodes[p], - n.removeChild(o), - o = s - } - if (this.map.Sb()) { - this.od.style.display = "block"; - m.style.display = "none"; - this.map.dispatchEvent(new P("vectorchanged"), { - isvector: q - }); - continue - } else - m.style.display = "block", - this.od.style.display = "none", - this.map.dispatchEvent(new P("vectorchanged"), { - isvector: t - }) - } - if (!k.pI && !(k.pp && !this.map.Sb() || k.GM && this.map.Sb())) { - e = this.map; - f = e.oa(); - m = f.wm(); - o = e.Oa; - g = e.fc; - f == Qa && g.pb(new J(0,0)) && (g = e.fc = m.vj(e.re, e.Ub)); - var v = f.dc(o) - , m = f.mE(o) - , n = Math.ceil(g.lng / m) - , x = Math.ceil(g.lat / m) - , y = f.$c() - , m = [n, x, (g.lng - n * m) / m * y, (g.lat - x * m) / m * y] - , p = m[0] - Math.ceil((e.width / 2 - m[2]) / y) - , n = m[1] - Math.ceil((e.height / 2 - m[3]) / y) - , x = m[0] + Math.ceil((e.width / 2 + m[2]) / y) - , A = 0; - f === Qa && 15 == e.fa() && (A = 1); - f = m[1] + Math.ceil((e.height / 2 + m[3]) / y) + A; - this.gK = new J(g.lng,g.lat); - var E = this.yg, y = -this.gK.lng / v, A = this.gK.lat / v, v = [Math.ceil(y), Math.ceil(A)], g = e.fa(), C; - for (C in E) { - var F = E[C] - , D = F.info; - (D[2] != g || D[2] == g && (p > D[0] || x <= D[0] || n > D[1] || f <= D[1])) && this.Rx(F) - } - E = -e.offsetX + e.width / 2; - F = -e.offsetY + e.height / 2; - k.Jb && (k.Jb.style.left = Math.ceil(y + E) - v[0] + "px", - k.Jb.style.top = Math.ceil(A + F) - v[1] + "px", - k.Jb.style.WebkitTransform = "translate3d(0,0,0)"); - y = []; - for (e.WB = []; p < x; p++) - for (A = n; A < f; A++) - y.push([p, A]), - e.WB.push({ - x: p, - y: A - }); - this.map.oa() !== Ya && this.map.oa() !== Sa && (y = this.RV(y, o)); - y.sort(function(a) { - return function(b, c) { - return 0.4 * Math.abs(b[0] - a[0]) + 0.6 * Math.abs(b[1] - a[1]) - (0.4 * Math.abs(c[0] - a[0]) + 0.6 * Math.abs(c[1] - a[1])) - } - }([m[0] - 1, m[1] - 1])); - o = y.length; - this.ph += o; - for (p = 0; p < o; p++) - this.R_([y[p][0], y[p][1], g], v, k, a) - } - } - }, - Oe: function(a) { - var b = this - , c = a.target - , a = b.map.Sb(); - if (c instanceof db) - a && !c.Im && (c.na(this.map, this.od), - c.Im = q); - else if (c.ag && this.map.Oe(c.ag), - c.pp) { - for (a = 0; a < b.Fg.length; a++) - if (b.Fg[a] == c) - return; - K.load("vector", function() { - c.na(b.map, b.od); - b.Fg.push(c) - }, q) - } else { - for (a = 0; a < b.$f.length; a++) - if (b.$f[a] == c) - return; - c.na(this.map, this.Bl); - b.$f.push(c) - } - }, - Yf: function(a) { - var a = a.target - , b = this.map.Sb(); - if (a instanceof db) - b && a.Im && (a.remove(), - a.Im = t); - else { - a.ag && this.map.Yf(a.ag); - if (a.pp) - for (var b = 0, c = this.Fg.length; b < c; b++) - a == this.Fg[b] && this.Fg.splice(b, 1); - else { - b = 0; - for (c = this.$f.length; b < c; b++) - a == this.$f[b] && this.$f.splice(b, 1) - } - a.remove() - } - }, - Dg: function() { - for (var a = this.Mm, b = 0, c = a.length; b < c; b++) - a[b].remove(); - delete this.Jb; - this.Mm = []; - this.Zi = this.yg = {}; - this.Ux(); - this.Wf() - }, - Mc: function() { - var a = this; - a.vd && z.D.U(a.vd); - setTimeout(function() { - a.Wf(); - a.map.dispatchEvent(new P("onzoomend")) - }, 10) - }, - L5: u(), - Zt: function(a) { - var b = this.map.oa(); - if (!this.map.Sb() && (a ? this.map.K.$_ = a : a = this.map.K.$_, - a)) - for (var c = s, c = "2" == B.xu ? [B.url.proto + B.url.domain.main_domain_cdn.other[0] + "/"] : [B.url.proto + B.url.domain.main_domain_cdn.baidu[0] + "/", B.url.proto + B.url.domain.main_domain_cdn.baidu[1] + "/", B.url.proto + B.url.domain.main_domain_cdn.baidu[2] + "/"], e = 0, f; f = this.Mm[e]; e++) - if (f.M_ == q) { - b.j.Yb = 18; - f.getTilesUrl = function(b, e) { - var f = b.x - , f = this.map.Va.Lw(f, e).hs - , m = b.y - , n = Sb("normal") - , o = 1; - this.map.Sx() && (o = 2); - n = "customimage/tile?&x=" + f + "&y=" + m + "&z=" + e + "&udt=" + n + "&scale=" + o + "&ak=" + qa; - n = a.styleStr ? n + ("&styles=" + encodeURIComponent(a.styleStr)) : n + ("&customid=" + a.style); - return c[Math.abs(f + m) % c.length] + n - } - ; - break - } - } - }); - function Qc(a, b, c, e, f) { - this.Pm = a; - this.position = c; - this.$u = []; - this.name = a.fE(e, f); - this.info = e; - this.GJ = f.zt(); - e = L("img"); - yb(e); - e.uL = t; - var g = e.style - , a = a.map.oa(); - g.position = "absolute"; - g.border = "none"; - g.width = a.$c() + "px"; - g.height = a.$c() + "px"; - g.left = c[0] + "px"; - g.top = c[1] + "px"; - g.maxWidth = "none"; - this.Gb = e; - this.src = b; - Sc && (this.Gb.style.opacity = 0); - var i = this; - this.Gb.onload = function() { - B.iZ.eR(); - i.loaded = q; - if (i.Pm) { - var a = i.Pm - , b = a.Zi; - if (!b[i.name]) { - a.oF++; - b[i.name] = i - } - if (i.Gb && !zb(i.Gb) && f.Jb) { - f.Jb.appendChild(i.Gb); - if (z.ca.ia <= 6 && z.ca.ia > 0 && i.GJ) - i.Gb.style.cssText = i.Gb.style.cssText + (';filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + i.src + '",sizingMethod=scale);') - } - var c = a.oF - a.OV, e; - for (e in b) { - if (c <= 0) - break; - if (!a.yg[e]) { - b[e].Pm = s; - var g = b[e].Gb; - if (g && g.parentNode) { - g.parentNode.removeChild(g); - Rc(g) - } - g = s; - b[e].Gb = s; - delete b[e]; - a.oF--; - c-- - } - } - Sc && new tb({ - Ic: 20, - duration: 200, - va: function(a) { - if (i.Gb && i.Gb.style) - i.Gb.style.opacity = a * 1 - }, - finish: function() { - i.Gb && i.Gb.style && delete i.Gb.style.opacity - } - }); - Nc(i) - } - } - ; - this.Gb.onerror = function() { - Nc(i); - if (i.Pm) { - var a = i.Pm.map.oa(); - if (a.j.vD) { - i.error = q; - i.Gb.src = a.j.vD; - i.Gb && !zb(i.Gb) && f.Jb.appendChild(i.Gb) - } - } - } - ; - e = s - } - function Pc(a, b) { - a.$u.push(b) - } - Qc.prototype.co = function() { - this.Gb.src = 0 < z.ca.ia && 6 >= z.ca.ia && this.GJ ? G.qa + "blank.gif" : "" !== this.src && this.Gb.src == this.src ? this.src + "&t = " + Date.now() : this.src - } - ; - function Nc(a) { - for (var b = 0; b < a.$u.length; b++) - a.$u[b](); - a.$u.length = 0 - } - function Rc(a) { - if (a) { - a.onload = a.onerror = s; - var b = a.attributes, c, e, f; - if (b) { - e = b.length; - for (c = 0; c < e; c += 1) - f = b[c].name, - Xa(a[f]) && (a[f] = s) - } - if (b = a.children) { - e = b.length; - for (c = 0; c < e; c += 1) - Rc(a.children[c]) - } - } - } - function Oc(a, b) { - a.src = b; - a.co() - } - var Sc = !z.ca.ia || 8 < z.ca.ia; - function Mc(a) { - this.vf = a || {}; - this.mW = this.vf.copyright || s; - this.B0 = this.vf.transparentPng || t; - this.Jw = this.vf.baseLayer || t; - this.zIndex = this.vf.zIndex || 0; - this.aa = Mc.SS++ - } - Mc.SS = 0; - z.lang.ta(Mc, z.lang.Ca, "TileLayer"); - z.extend(Mc.prototype, { - na: function(a, b) { - this.Jw && (this.zIndex = -100); - this.map = a; - if (!this.Jb) { - var c = L("div") - , e = c.style; - e.position = "absolute"; - e.overflow = "visible"; - e.zIndex = this.zIndex; - e.left = Math.ceil(-a.offsetX + a.width / 2) + "px"; - e.top = Math.ceil(-a.offsetY + a.height / 2) + "px"; - b.appendChild(c); - this.Jb = c - } - }, - remove: function() { - this.Jb && this.Jb.parentNode && (this.Jb.innerHTML = "", - this.Jb.parentNode.removeChild(this.Jb)); - delete this.Jb - }, - zt: w("B0"), - getTilesUrl: function(a, b) { - if (this.map.oa() !== Ya && this.map.oa() !== Sa) - var c = this.map.Va.Lw(a.x, b).hs; - var e = ""; - this.vf.tileUrlTemplate && (e = this.vf.tileUrlTemplate.replace(/\{X\}/, c), - e = e.replace(/\{Y\}/, a.y), - e = e.replace(/\{Z\}/, b)); - return e - }, - pm: w("mW"), - oa: function() { - return this.Hb || La - } - }); - function Tc(a, b) { - Ib(a) ? b = a || {} : (b = b || {}, - b.databoxId = a); - this.j = { - OK: b.databoxId, - eh: b.geotableId, - Wm: b.q || "", - pu: b.tags || "", - filter: b.filter || "", - Vy: b.sortby || "", - Y_: b.styleId || "", - Vl: b.ak || qa, - Gw: b.age || 36E5, - zIndex: 11, - fZ: "VectorCloudLayer", - Fk: b.hotspotName || "vector_md_" + (1E5 * Math.random()).toFixed(0), - uV: "LBS\u4e91\u9ebb\u70b9\u5c42" - }; - this.pp = q; - Mc.call(this, this.j); - this.GW = B.Wc + "geosearch/detail/"; - this.HW = B.Wc + "geosearch/v2/detail/"; - this.lp = {} - } - z.ta(Tc, Mc, "VectorCloudLayer"); - function Uc(a) { - a = a || {}; - this.j = z.extend(a, { - zIndex: 1, - fZ: "VectorTrafficLayer", - uV: "\u77e2\u91cf\u8def\u51b5\u5c42" - }); - this.pp = q; - Mc.call(this, this.j); - this.x0 = B.url.proto + B.url.domain.vector_traffic + "/gvd/?qt=lgvd&styles=pl&layers=tf"; - this.Db = { - "0": [2, 1354709503, 2, 2, 0, [], 0, 0], - 1: [2, 1354709503, 3, 2, 0, [], 0, 0], - 10: [2, -231722753, 2, 2, 0, [], 0, 0], - 11: [2, -231722753, 3, 2, 0, [], 0, 0], - 12: [2, -231722753, 4, 2, 0, [], 0, 0], - 13: [2, -231722753, 5, 2, 0, [], 0, 0], - 14: [2, -231722753, 6, 2, 0, [], 0, 0], - 15: [2, -1, 4, 0, 0, [], 0, 0], - 16: [2, -1, 5.5, 0, 0, [], 0, 0], - 17: [2, -1, 7, 0, 0, [], 0, 0], - 18: [2, -1, 8.5, 0, 0, [], 0, 0], - 19: [2, -1, 10, 0, 0, [], 0, 0], - 2: [2, 1354709503, 4, 2, 0, [], 0, 0], - 3: [2, 1354709503, 5, 2, 0, [], 0, 0], - 4: [2, 1354709503, 6, 2, 0, [], 0, 0], - 5: [2, -6350337, 2, 2, 0, [], 0, 0], - 6: [2, -6350337, 3, 2, 0, [], 0, 0], - 7: [2, -6350337, 4, 2, 0, [], 0, 0], - 8: [2, -6350337, 5, 2, 0, [], 0, 0], - 9: [2, -6350337, 6, 2, 0, [], 0, 0] - } - } - z.ta(Uc, Mc, "VectorTrafficLayer"); - function db(a) { - this.PV = [B.url.proto + B.url.domain.TILE_ONLINE_URLS[1] + "/gvd/?", B.url.proto + B.url.domain.TILE_ONLINE_URLS[2] + "/gvd/?", B.url.proto + B.url.domain.TILE_ONLINE_URLS[3] + "/gvd/?", B.url.proto + B.url.domain.TILE_ONLINE_URLS[4] + "/gvd/?"]; - this.j = { - pL: t - }; - for (var b in a) - this.j[b] = a[b]; - this.Th = this.Fh = this.Ya = this.C = this.B = s; - this.LM = 0; - var c = this; - K.load("vector", function() { - c.De() - }) - } - z.extend(db.prototype, { - na: function(a, b) { - this.B = a; - this.C = b - }, - remove: function() { - this.C = this.B = s - } - }); - function Vc(a) { - Mc.call(this, a); - this.j = a || {}; - this.GM = q; - this.ag = new Uc; - this.ag.$y = this; - if (this.j.predictDate) { - if (1 > this.j.predictDate.weekday || 7 < this.j.predictDate.weekday) - this.j.predictDate = 1; - if (0 > this.j.predictDate.hour || 23 < this.j.predictDate.hour) - this.j.predictDate.hour = 0 - } - this.VU = B.url.proto + B.url.domain.traffic + "/traffic/" - } - Vc.prototype = new Mc; - Vc.prototype.na = function(a, b) { - Mc.prototype.na.call(this, a, b); - this.B = a - } - ; - Vc.prototype.zt = ca(q); - Vc.prototype.getTilesUrl = function(a, b) { - var c = ""; - this.j.predictDate ? c = "HistoryService?day=" + (this.j.predictDate.weekday - 1) + "&hour=" + this.j.predictDate.hour + "&t=" + (new Date).getTime() + "&" : (c = "TrafficTileService?time=" + (new Date).getTime() + "&", - c += "label=web2D&v=016&"); - var c = this.VU + c + "level=" + b + "&x=" + a.x + "&y=" + a.y - , e = 1; - this.B.Sx() && (e = 2); - return (c + "&scaler=" + e).replace(/-(\d+)/gi, "M$1") - } - ; - var Wc = [B.url.proto + B.url.domain.TILES_YUN_HOST[0] + "/georender/gss", B.url.proto + B.url.domain.TILES_YUN_HOST[1] + "/georender/gss", B.url.proto + B.url.domain.TILES_YUN_HOST[2] + "/georender/gss", B.url.proto + B.url.domain.TILES_YUN_HOST[3] + "/georender/gss"] - , Xc = B.url.proto + B.url.domain.main_domain_nocdn.baidu + "/style/poi/rangestyle" - , Yc = 100; - function nb(a, b) { - Mc.call(this); - var c = this; - this.GM = q; - var e = t; - try { - document.createElement("canvas").getContext("2d"), - e = q - } catch (f) { - e = t - } - e && (this.ag = new Tc(a,b), - this.ag.$y = this); - Ib(a) ? b = a || {} : (c.Rn = a, - b = b || {}); - b.geotableId && (c.Cf = b.geotableId); - b.databoxId && (c.Rn = b.databoxId); - e = B.Wc + "geosearch"; - c.ub = { - ON: b.pointDensity || Yc, - BY: e + "/detail/", - CY: e + "/v2/detail/", - Gw: b.age || 36E5, - Wm: b.q || "", - i0: "png", - X3: [5, 5, 5, 5], - eZ: { - backgroundColor: "#FFFFD5", - borderColor: "#808080" - }, - Vl: b.ak || qa, - pu: b.tags || "", - filter: b.filter || "", - Vy: b.sortby || "", - Fk: b.hotspotName || "tile_md_" + (1E5 * Math.random()).toFixed(0), - dG: q - }; - K.load("clayer", function() { - c.Sd() - }) - } - nb.prototype = new Mc; - nb.prototype.na = function(a, b) { - Mc.prototype.na.call(this, a, b); - this.B = a - } - ; - nb.prototype.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y - , f = this.ub - , c = Wc[Math.abs(c + e) % Wc.length] + "/image?grids=" + c + "_" + e + "_" + b + "&q=" + f.Wm + "&tags=" + f.pu + "&filter=" + f.filter + "&sortby=" + f.Vy + "&ak=" + this.ub.Vl + "&age=" + f.Gw + "&page_size=" + f.ON + "&format=" + f.i0; - f.dG || (f = (1E5 * Math.random()).toFixed(0), - c += "&timeStamp=" + f); - this.Cf ? c += "&geotable_id=" + this.Cf : this.Rn && (c += "&databox_id=" + this.Rn); - return c - } - ; - nb.prototype.enableUseCache = function() { - this.ub.dG = q - } - ; - nb.prototype.disableUseCache = function() { - this.ub.dG = t - } - ; - nb.tU = /^point\(|\)$/ig; - nb.uU = /\s+/; - nb.wU = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; - var Zc = {}; - function $c(a, b) { - this.kd = a; - this.uQ = 18; - this.j = { - le: 256, - cd: new S - }; - z.extend(this.j, b || {}) - } - var ad = [0, 0, 0, 8, 7, 7, 6, 6, 5, 5, 4, 3, 3, 3, 2, 2, 1, 1, 0, 0, 0, 0] - , bd = [512, 2048, 4096, 32768, 65536, 262144, 1048576, 4194304, 8388608] - , cd = [0, 0, 0, 3, 5, 5, 7, 7, 9, 9, 10, 12, 12, 12, 15, 15, 17, 17, 19, 19, 19, 19] - , dd = [0, 0, 0, 256, 256, 512, 256, 512, 256, 512, 256, 256, 512, 1024, 256, 512, 512, 1024, 512, 1024, 2048, 4096]; - $c.prototype = { - getName: w("kd"), - $c: function(a) { - return "na" === this.kd ? dd[a] : this.j.le - }, - FL: function(a) { - return "na" === this.kd ? cd[a] : a - }, - wm: function() { - return this.j.cd - }, - dc: function(a) { - return Math.pow(2, this.uQ - a) - }, - RX: function(a) { - return "na" === this.kd ? bd[ad[a]] : this.dc(a) * this.$c(a) - } - }; - P = z.lang.Ju; - function Lc(a, b, c) { - this.B = a; - this.cV = b; - this.Cd = b.qc; - this.ub = { - h0: "na", - zIndex: 0, - OO: c.tileUrls, - AO: q - }; - this.UB = ""; - this.qT = {}; - var c = c.urlOpts || {}, e; - for (e in c) - c.hasOwnProperty(e) && (this.UB = this.UB + "&" + e + "=" + c[e]); - this.GC = []; - this.JE = 0; - this.zM = t; - a = this.ub.h0; - Zc[a] ? a = Zc[a] : (b = new $c(a,l), - a = Zc[a] = b); - this.Wr = a - } - window.VectorIndoorTileLayer = "VectorIndoorTileLayer"; - da = Lc.prototype; - da.na = function() { - var a = this.B - , b = a.Va; - if (!this.Vh) { - var c = b.Kj(this.ub.zIndex); - c.style.WebkitTransform = "translate3d(0px, 0px, 0)"; - this.Vh = c - } - b.Ki.appendChild(this.Vh); - b.b4 = c; - if (this.ub.AO) { - ed(this); - var e = this; - a.addEventListener("checkvectorclick", function(a) { - var b; - a: { - b = a.offsetX; - var c = a.offsetY - , k = e.GC.N4; - if (k) - for (var m = 0; m < k.length; m++) - for (var n = k[m], o = 0; o < n.length; o++) - if (a = n[o], - !a.f4 && a.EY && b > a.WE && b < a.TE && c > a.XE && c < a.UE) { - b = a.EY; - b = { - type: 9, - name: a.name, - uid: a.uid, - point: { - x: b.H2 + b.width / 2, - y: b.I2 + 6 - } - }; - break a - } - b = s - } - b && (a = new P("onvectorclick"), - a.Y3 = b, - a.of = "base", - this.dispatchEvent(a)) - }) - } - } - ; - function ed(a) { - var b = a.B - , c = b.Va - , e = a.Cd - , f = b.cb() - , g = f.width - , f = f.height - , i = L("canvas"); - i.style.cssText = "position: absolute;left:0;top:0;width:" + g + "px;height:" + f + "px;z-index:2;"; - i.width = g * e; - i.height = f * e; - a.by = i; - a.At = i.getContext("2d"); - a.At.scale(e, e); - a.At.textBaseline = "top"; - c.Ki.appendChild(i); - b.ZS = i - } - da.update = function(a, b) { - b = b || {}; - if (this.ub.AO && (b.Tw && this.Tw(), - b.S_)) { - var c = this.Cd - , e = this.B.cb() - , f = e.width - , e = e.height - , g = this.by - , i = g.style; - i.width = f + "px"; - i.height = e + "px"; - g.width = f * c; - g.height = e * c; - this.At.scale(c, c); - this.At.textBaseline = "top" - } - if (b.M5) { - c = this.Vh; - f = 0; - for (e = c.childNodes.length; f < e; f++) - c.childNodes[f].yd = t - } - this.NK = a; - this.up(a) - } - ; - da.up = function(a) { - this.GC = []; - var b = this.B - , c = b.fa() - , e = b.cd.vj(b.re) - , f = this.Wr.dc(c) - , e = [Math.round(-e.lng / f), Math.round(e.lat / f)] - , f = this.Wr.$c(c) - , g = b.aa.replace(/^TANGRAM_/, "") - , i = this.Wr.FL(c) - , b = this.B - , k = -b.offsetY + b.height / 2 - , m = this.Vh; - m.style.left = -b.offsetX + b.width / 2 + "px"; - m.style.top = k + "px"; - this.Cc ? this.Cc.length = 0 : this.Cc = []; - b = 0; - for (k = m.childNodes.length; b < k; b++) { - var n = m.childNodes[b]; - n.Sj = t; - this.Cc.push(n) - } - if (b = this.qh) - for (var o in b) - delete b[o]; - else - this.qh = {}; - this.Dc ? this.Dc.length = 0 : this.Dc = []; - b = 0; - for (k = a.length; b < k; b++) { - var n = a[b][0] - , p = a[b][1]; - o = 0; - for (var v = this.Cc.length; o < v; o++) { - var x = this.Cc[o]; - if (x.id === g + "_" + n + "_" + p + "_" + i + "_" + c) { - x.Sj = q; - this.qh[x.id] = x; - break - } - } - } - b = 0; - for (k = this.Cc.length; b < k; b++) - x = this.Cc[b], - x.Sj || (x.Lc = s, - delete x.Lc, - x.yd = t, - this.Dc.push(x)); - o = []; - v = f * this.Cd; - b = 0; - for (k = a.length; b < k; b++) { - var n = a[b][0] - , p = a[b][1] - , x = n * f + e[0] - , y = (-1 - p) * f + e[1] - , A = g + "_" + n + "_" + p + "_" + i + "_" + c - , E = this.qh[A] - , C = s; - if (E) - C = E.style, - C.left = x + "px", - C.top = y + "px", - C.width = f + "px", - C.height = f + "px", - E.yd ? E.MO && E.MO && this.GC.push(E.MO) : (E.NR = q, - E.Lc = s, - delete E.Lc, - o.push([n, p, E])); - else { - if (0 < this.Dc.length) { - var E = this.Dc.shift() - , F = E.getContext("2d"); - E.getAttribute("width") !== v && (E._scale = t); - E.setAttribute("width", v); - E.setAttribute("height", v); - C = E.style; - C.width = f + "px"; - C.height = f + "px"; - F.clearRect(0, 0, v, v) - } else - E = document.createElement("canvas"), - C = E.style, - C.position = "absolute", - this.ub.backgroundColor && (C.background = this.ub.backgroundColor), - C.width = f + "px", - C.height = f + "px", - E.setAttribute("width", v), - E.setAttribute("height", v), - m.appendChild(E); - E.id = A; - C.left = x + "px"; - C.top = y + "px"; - o.push([n, p, E]) - } - E.style.visibility = "" - } - b = 0; - for (k = this.Dc.length; b < k; b++) - this.Dc[b].style.visibility = "hidden"; - if (0 === o.length) - fd(this); - else { - this.JE = o.length; - this.zM = t; - c = this.Wr.FL(this.B.fa()); - for (e = 0; e < a.length; e++) - a[e][3] = c; - for (e = 0; e < o.length; e++) - a = o[e][2], - f = o[e][0], - g = o[e][1], - o[e][3] = c, - a.yd = t, - a.NR = t, - gd(this, f, g, c, a) - } - } - ; - function gd(a, b, c, e, f) { - var g = b + "_" + c + "_" + e - , i = a.qT; - if (i[g]) { - if ("loading" === i[g].status) - return - } else - i[g] = { - status: "init", - bO: 0 - }; - var k = a - , m = k.B - , n = [] - , n = "0" === B.xu ? k.ub.OO.http : k.ub.OO.https - , o = Math.abs(b + c) % n.length - , p = "x=" + b + "&y=" + c + "&z=" + e - , v = hd(a.cV) - , x = v.O0 - , v = v.C0 - , y = "_" + (0 > b ? "_" : "") + (0 > c ? "$" : "") + parseInt(Math.abs(b) + "" + Math.abs(c) + "" + e, 10).toString(36) - , p = p + a.UB + "v=" + x + "&udt=" + v + "&fn=window." + y - , x = n[o] + "&" + p - , x = n[o] + "¶m=" + window.encodeURIComponent(Kb(p)); - window[y] = function(a) { - clearTimeout(i[g].Od); - i[g] = s; - if (a) { - m.fa(); - var n; - a: { - for (n = 0; n < k.NK.length; n++) { - var o = k.NK[n]; - if (o[0] === b && o[1] === c && o[3] === e) { - n = q; - break a - } - } - n = t - } - n !== t && (n = new P("updateindoor"), - n.IndoorCanvas = [], - n.IndoorCanvas.push({ - canvasDom: f, - data: a, - canvasID: f.id, - ratio: k.Cd - }), - m.dispatchEvent(n), - k.JE--, - (0 === k.JE || k.zM === q) && fd(k), - delete window[y]) - } - } - ; - oa(x); - i[g].status = "loading"; - k = a; - i[g].Od = setTimeout(function() { - 3 > i[g].bO ? (i[g].bO++, - i[g].status = "init", - gd(k, b, c, e, f)) : i[g] = s - }, 4E3) - } - function fd(a) { - if (a.by) { - var b = a.B; - a.by.style.left = -b.offsetX + "px"; - a.by.style.top = -b.offsetY + "px"; - a = new P("updateindoorlabel"); - a.labelCanvasDom = b.ZS; - b.dispatchEvent(a) - } - } - da.Tw = function() { - var a = this.B.cb() - , b = this.Cd; - this.At.clearRect(0, 0, a.width * b, a.height * b) - } - ; - da.remove = function() { - var a = this.B.Va; - this.Vh && a.Ki.removeChild(this.Vh) - } - ; - function Kc(a) { - this.B = a.map; - this.ff = []; - this.Xr = {}; - this.qc = this.B.K.devicePixelRatio; - this.na() - } - window.VectorIndoorTileMgr = "VectorIndoorTileMgr"; - da = Kc.prototype; - da.na = function() { - var a = this - , b = this.B; - b.addEventListener("addtilelayer", function(b) { - a.Oe(b.target) - }); - b.addEventListener("removetilelayer", function(b) { - a.Yf(b.target) - }); - setTimeout(function() { - b.addEventListener("onmoveend", function(b) { - "centerAndZoom" !== b.mv && a.update() - }); - b.addEventListener("onzoomend", function(b) { - "centerAndZoom" !== b.mv && a.update({ - Tw: q - }) - }); - b.addEventListener("centerandzoom", function() { - a.update({ - Tw: q - }) - }) - }, 1); - b.addEventListener("indoor_data_refresh", u()); - b.addEventListener("onresize", function() { - a.update({ - S_: q - }) - }); - a.update() - } - ; - da.Oe = function(a) { - if (a instanceof Lc) { - for (var b = 0; b < this.ff.length; b++) - if (this.ff[b] === a) - return; - this.ff.push(a); - a.na(); - this.B.loaded && this.update() - } - } - ; - da.Yf = function(a) { - if (a instanceof Lc) { - for (var b = 0; b < this.ff.length; b++) - if (this.ff[b] === a) { - this.ff.splice(b, 1); - break - } - a.remove() - } - } - ; - da.pj = function(a) { - var b = a.getName(); - if (this.Xr[b]) - return this.Xr[b]; - var c = this.B - , e = c.fa() - , f = c.fc - , g = a.RX(e); - c.aa.replace(/^TANGRAM_/, ""); - var i = Math.ceil(f.lng / g) - , k = Math.ceil(f.lat / g) - , a = a.$c(e) - , m = [i, k, (f.lng / g - i) * a, (f.lat / g - k) * a] - , e = m[0] - Math.ceil((c.width / 2 - m[2]) / a) - , f = m[1] - Math.ceil((c.height / 2 - m[3]) / a) - , g = m[0] + Math.ceil((c.width / 2 + m[2]) / a) - , c = m[1] + Math.ceil((c.height / 2 + m[3]) / a); - this.hc ? this.hc.length = 0 : this.hc = []; - for (a = e; a < g; a++) - for (e = f; e < c; e++) - this.hc.push([a, e]); - this.hc.sort(function(a) { - return function(b, c) { - return 0.4 * Math.abs(b[0] - a[0]) + 0.6 * Math.abs(b[1] - a[1]) - (0.4 * Math.abs(c[0] - a[0]) + 0.6 * Math.abs(c[1] - a[1])) - } - }([i, k])); - this.Xr[b] = this.hc.slice(0); - return this.Xr[b] - } - ; - function hd(a) { - if (a.gG) - return a.gG; - var b = "undefined" !== typeof TVC ? TVC.K2.z4 : {}; - a.gG = { - O0: b.version ? b.version : "001", - C0: b.wn ? b.wn : "20171110" - }; - return a.gG - } - da.update = function(a) { - this.Xr = {}; - for (var b = 0; b < this.ff.length; b++) { - var c = this.ff[b] - , e = this.pj(c.Wr); - c.update(e, a) - } - } - ; - function id(a, b, c) { - this.kd = a; - this.ff = b instanceof Mc ? [b] : b.slice(0); - c = c || {}; - this.j = { - k0: c.tips || "", - LE: "", - gc: c.minZoom || 3, - Yb: c.maxZoom || 18, - W3: c.minZoom || 3, - V3: c.maxZoom || 18, - le: 256, - UF: c.textColor || "black", - vD: c.errorImageUrl || "", - bb: new fb(new J(-21364736,-16023552),new J(23855104,19431424)), - cd: c.projection || new S - }; - 1 <= this.ff.length && (this.ff[0].Jw = q); - z.extend(this.j, c) - } - z.extend(id.prototype, { - getName: w("kd"), - gt: function() { - return this.j.k0 - }, - B3: function() { - return this.j.LE - }, - oY: function() { - return this.ff[0] - }, - P3: w("ff"), - $c: function() { - return this.j.le - }, - bp: function() { - return this.j.gc - }, - sm: function() { - return this.j.Yb - }, - setMaxZoom: function(a) { - this.j.Yb = a - }, - zm: function() { - return this.j.UF - }, - wm: function() { - return this.j.cd - }, - u3: function() { - return this.j.vD - }, - $c: function() { - return this.j.le - }, - dc: function(a) { - return Math.pow(2, 18 - a) - }, - mE: function(a) { - return this.dc(a) * this.$c() - } - }); - var jd = [B.url.proto + B.url.domain.TILE_BASE_URLS[0] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[1] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[2] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[3] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[4] + "/it/"] - , kd = [B.url.proto + B.url.domain.TILE_ONLINE_URLS[0] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[1] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[2] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[3] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[4] + "/tile/"] - , ld = { - dark: "dl", - light: "ll", - normal: "pl" - } - , md = new Mc; - md.M_ = q; - md.getTilesUrl = function(a, b, c) { - var e = a.x - , a = a.y - , f = Sb("normal") - , g = 1 - , c = ld[c]; - //this.map.Sx() && (g = 2); //修改 - //e = this.map.Va.Lw(e, b).hs; - //return (kd[Math.abs(e + a) % kd.length] + "?qt=tile&x=" + (e + "").replace(/-/gi, "M") + "&y=" + (a + "").replace(/-/gi, "M") + "&z=" + b + "&styles=" + c + "&scaler=" + g + (6 == z.ca.ia ? "&color_dep=32&colors=50" : "") + "&udt=" + f).replace(/-(\d+)/gi, "M$1") - - var tdir = bmapcfg.tiles_dir.length>0?bmapcfg.tiles_dir:bmapcfg.home + "tiles"; - return tdir + "/" + b + "/" + e + "/" + a + bmapcfg.imgext; // 使用本地的瓦片 - } - ; - var La = new id("\u5730\u56fe",md,{ - tips: "\u663e\u793a\u666e\u901a\u5730\u56fe", - maxZoom: 19 - }) - , nd = new Mc; - nd.NO = [B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[0] + "/resource/mappic/", B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[1] + "/resource/mappic/", B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[2] + "/resource/mappic/", B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[3] + "/resource/mappic/"]; - nd.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y - , f = 256 * Math.pow(2, 20 - b) - , e = Math.round((9998336 - f * e) / f) - 1; - /*var tdir = bmapcfg.tiles_hybrid.length > 0 ? bmapcfg.tiles_hybrid : bmapcfg.home + "tiles_hybrid";//修改 使用本地卫星的瓦片 - tdir = tdir + "/" + b + "/" + c + "/" + e + bmapcfg.imgext; //修改 使用本地卫星的瓦片 - return tdir;*/ - return url = this.NO[Math.abs(c + e) % this.NO.length] + this.map.Ub + "/" + this.map.Rw + "/3/lv" + (21 - b) + "/" + c + "," + e + ".jpg" - } - ; - var Qa = new id("\u4e09\u7ef4",nd,{ - tips: "\u663e\u793a\u4e09\u7ef4\u5730\u56fe", - minZoom: 15, - maxZoom: 20, - textColor: "white", - projection: new hb - }); - Qa.dc = function(a) { - return Math.pow(2, 20 - a) - } - ; - Qa.wk = function(a) { - if (!a) - return ""; - var b = G.pC, c; - for (c in b) - if (-1 < a.search(c)) - return b[c].yy; - return "" - } - ; - Qa.BL = function(a) { - return { - bj: 2, - gz: 1, - sz: 14, - sh: 4 - }[a] - } - ; - var od = new Mc({ - Jw: q - }); - od.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y; - return (jd[Math.abs(c + e) % jd.length] + "u=x=" + c + ";y=" + e + ";z=" + b + ";v=009;type=sate&fm=46&udt=" + Sb("satellite")).replace(/-(\d+)/gi, "M$1") - } - ; - var Ya = new id("\u536b\u661f",od,{ - tips: "\u663e\u793a\u536b\u661f\u5f71\u50cf", - minZoom: 1, - maxZoom: 19, - textColor: "white" - }) - , pd = new Mc({ - transparentPng: q - }); - pd.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y - , f = Sb("satelliteStreet"); - return (kd[Math.abs(c + e) % kd.length] + "?qt=vtile&x=" + (c + "").replace(/-/gi, "M") + "&y=" + (e + "").replace(/-/gi, "M") + "&z=" + b + "&styles=sl" + (6 == z.ca.ia ? "&color_dep=32&colors=50" : "") + "&udt=" + f).replace(/-(\d+)/gi, "M$1") - } - ; - var Sa = new id("\u6df7\u5408",[od, pd],{ - tips: "\u663e\u793a\u5e26\u6709\u8857\u9053\u7684\u536b\u661f\u5f71\u50cf", - labelText: "\u8def\u7f51", - minZoom: 1, - maxZoom: 19, - textColor: "white" - }); - var qd = 1 - , V = {}; - window.c1 = V; - function W(a, b) { - z.lang.Ca.call(this); - this.Ad = {}; - this.fn(a); - b = b || {}; - b.la = b.renderOptions || {}; - this.j = { - la: { - Ma: b.la.panel || s, - map: b.la.map || s, - Zg: b.la.autoViewport || q, - Ut: b.la.selectFirstResult, - kt: b.la.highlightMode, - Wb: b.la.enableDragging || t - }, - py: b.onSearchComplete || u(), - BN: b.onMarkersSet || u(), - AN: b.onInfoHtmlSet || u(), - DN: b.onResultsHtmlSet || u(), - zN: b.onGetBusListComplete || u(), - yN: b.onGetBusLineComplete || u(), - wN: b.onBusListHtmlSet || u(), - vN: b.onBusLineHtmlSet || u(), - bF: b.onPolylinesSet || u(), - Dp: b.reqFrom || "" - }; - this.j.la.Zg = "undefined" != typeof b && "undefined" != typeof b.renderOptions && "undefined" != typeof b.renderOptions.autoViewport ? b.renderOptions.autoViewport : q; - this.j.la.Ma = z.Fc(this.j.la.Ma) - } - z.ta(W, z.lang.Ca); - z.extend(W.prototype, { - getResults: function() { - return this.Hc ? this.Ei : this.ha - }, - enableAutoViewport: function() { - this.j.la.Zg = q - }, - disableAutoViewport: function() { - this.j.la.Zg = t - }, - fn: function(a) { - a && (this.Ad.src = a) - }, - JF: function(a) { - this.j.py = a || u() - }, - setMarkersSetCallback: function(a) { - this.j.BN = a || u() - }, - setPolylinesSetCallback: function(a) { - this.j.bF = a || u() - }, - setInfoHtmlSetCallback: function(a) { - this.j.AN = a || u() - }, - setResultsHtmlSetCallback: function(a) { - this.j.DN = a || u() - }, - xm: w("Me") - }); - var rd = { - KG: B.Wc, - ab: function(a, b, c, e, f) { - this.SZ(b); - var g = (1E5 * Math.random()).toFixed(0); - B._rd["_cbk" + g] = function(b) { - b.result && b.result.error && 202 === b.result.error ? alert("\u8be5AK\u56e0\u4e3a\u6076\u610f\u884c\u4e3a\u5df2\u7ecf\u88ab\u7ba1\u7406\u5458\u5c01\u7981\uff01") : (c = c || {}, - a && a(b, c), - delete B._rd["_cbk" + g]) - } - ; - e = e || ""; - b = c && c.H0 ? Gb(b, encodeURI) : Gb(b, encodeURIComponent); - this.KG = c && c.jL ? c.$N ? c.$N : B.vp : B.Wc; - e = this.KG + e + "?" + b + "&ie=utf-8&oue=1&fromproduct=jsapi"; - f || (e += "&res=api"); - e = e + ("&callback=BMap._rd._cbk" + g) + ("&ak=" + qa); - oa(e) - }, - SZ: function(a) { - if (a.qt) { - var b = ""; - switch (a.qt) { - case "bt": - b = "z_qt|bt"; - break; - case "nav": - b = "z_qt|nav"; - break; - case "walk": - b = "z_qt|walk"; - break; - case "bse": - b = "z_qt|bse"; - break; - case "nse": - b = "z_qt|nse"; - break; - case "drag": - b = "z_qt|drag" - } - "" !== b && B.alog("cus.fire", "count", b) - } - } - }; - window.o1 = rd; - B._rd = {}; - var ab = {}; - window.n1 = ab; - ab.WN = function(a) { - a = a.replace(/<\/?[^>]*>/g, ""); - return a = a.replace(/[ | ]* /g, " ") - } - ; - ab.JZ = function(a) { - return a.replace(/([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g, "$1,$2;") - } - ; - ab.KZ = function(a, b) { - return a.replace(RegExp("(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){" + b + "}", "ig"), "$1") - } - ; - var sd = 2 - , td = 6 - , ud = 8 - , vd = 2 - , wd = 3 - , xd = 6 - , yd = 0 - , zd = "bt" - , Ad = "nav" - , Bd = "walk" - , Cd = "bl" - , Dd = "bsl" - , Ed = "ride" - , Fd = 15 - , Gd = 18; - B.I = window.Instance = z.lang.Nc; - function Hd(a, b, c) { - z.lang.Ca.call(this); - if (a) { - this.Wa = "object" == typeof a ? a : z.Fc(a); - this.page = 1; - this.Kd = 100; - this.hK = "pg"; - this.Xf = 4; - this.qK = b; - this.update = q; - a = { - page: 1, - $e: 100, - Kd: 100, - Xf: 4, - hK: "pg", - update: q - }; - c || (c = a); - for (var e in c) - "undefined" != typeof c[e] && (this[e] = c[e]); - this.va() - } - } - z.extend(Hd.prototype, { - va: function() { - this.na() - }, - na: function() { - this.YV(); - this.Wa.innerHTML = this.uW() - }, - YV: function() { - isNaN(parseInt(this.page)) && (this.page = 1); - isNaN(parseInt(this.Kd)) && (this.Kd = 1); - 1 > this.page && (this.page = 1); - 1 > this.Kd && (this.Kd = 1); - this.page > this.Kd && (this.page = this.Kd); - this.page = parseInt(this.page); - this.Kd = parseInt(this.Kd) - }, - G3: function() { - location.search.match(RegExp("[?&]?" + this.hK + "=([^&]*)[&$]?", "gi")); - this.page = RegExp.$1 - }, - uW: function() { - var a = [] - , b = this.page - 1 - , c = this.page + 1; - a.push('

    '); - if (!(1 > b)) { - if (this.page >= this.Xf) { - var e; - a.push('\u9996\u9875'.replace("{temp1}", "BMap.I('" + this.aa + "').toPage(1);")) - } - a.push('\u4e0a\u4e00\u9875'.replace("{temp2}", "BMap.I('" + this.aa + "').toPage(" + b + ");")) - } - if (this.page < this.Xf) - e = 0 == this.page % this.Xf ? this.page - this.Xf - 1 : this.page - this.page % this.Xf + 1, - b = e + this.Xf - 1; - else { - e = Math.floor(this.Xf / 2); - var f = this.Xf % 2 - 1 - , b = this.Kd > this.page + e ? this.page + e : this.Kd; - e = this.page - e - f - } - this.page > this.Kd - this.Xf && this.page >= this.Xf && (e = this.Kd - this.Xf + 1, - b = this.Kd); - for (f = e; f <= b; f++) - 0 < f && (f == this.page ? a.push('' + f + "") : 1 <= f && f <= this.Kd && (e = '[' + f + "]", - a.push(e.replace("{temp3}", "BMap.I('" + this.aa + "').toPage(" + f + ");")))); - c > this.Kd || a.push('\u4e0b\u4e00\u9875'.replace("{temp4}", "BMap.I('" + this.aa + "').toPage(" + c + ");")); - a.push("

    "); - return a.join("") - }, - toPage: function(a) { - a = a ? a : 1; - "function" == typeof this.qK && (this.qK(a), - this.page = a); - this.update && this.va() - } - }); - function cb(a, b) { - W.call(this, a, b); - b = b || {}; - b.renderOptions = b.renderOptions || {}; - this.Np(b.pageCapacity); - "undefined" != typeof b.renderOptions.selectFirstResult && !b.renderOptions.selectFirstResult ? this.UC() : this.oD(); - this.ya = []; - this.yf = []; - this.mb = -1; - this.Pa = []; - var c = this; - K.load("local", function() { - c.Nz() - }, q) - } - z.ta(cb, W, "LocalSearch"); - cb.fq = 10; - cb.k1 = 1; - cb.En = 100; - cb.zG = 2E3; - cb.HG = 1E5; - z.extend(cb.prototype, { - search: function(a, b) { - this.Pa.push({ - method: "search", - arguments: [a, b] - }) - }, - an: function(a, b, c) { - this.Pa.push({ - method: "searchInBounds", - arguments: [a, b, c] - }) - }, - Jp: function(a, b, c, e) { - this.Pa.push({ - method: "searchNearby", - arguments: [a, b, c, e] - }) - }, - Pe: function() { - delete this.Ia; - delete this.Me; - delete this.ha; - delete this.ua; - this.mb = -1; - this.Ta(); - this.j.la.Ma && (this.j.la.Ma.innerHTML = "") - }, - Am: u(), - oD: function() { - this.j.la.Ut = q - }, - UC: function() { - this.j.la.Ut = t - }, - Np: function(a) { - this.j.Jk = "number" == typeof a && !isNaN(a) ? 1 > a ? cb.fq : a > cb.En ? cb.fq : a : cb.fq - }, - qf: function() { - return this.j.Jk - }, - toString: ca("LocalSearch") - }); - var Id = cb.prototype; - T(Id, { - clearResults: Id.Pe, - setPageCapacity: Id.Np, - getPageCapacity: Id.qf, - gotoPage: Id.Am, - searchNearby: Id.Jp, - searchInBounds: Id.an, - search: Id.search, - enableFirstResultSelection: Id.oD, - disableFirstResultSelection: Id.UC - }); - function Jd(a, b) { - W.call(this, a, b) - } - z.ta(Jd, W, "BaseRoute"); - z.extend(Jd.prototype, { - Pe: u() - }); - function Kd(a, b) { - W.call(this, a, b); - b = b || {}; - this.bu(b.policy); - this.oO(b.intercityPolicy); - this.xO(b.transitTypePolicy); - this.Np(b.pageCapacity); - this.Ab = zd; - this.mq = qd; - this.ya = []; - this.mb = -1; - this.j.Vn = b.enableTraffic || t; - this.Pa = []; - var c = this; - K.load("route", function() { - c.Sd() - }) - } - Kd.En = 100; - Kd.HP = [0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 1]; - Kd.IP = [0, 3, 4, 0, 0, 0, 5]; - z.ta(Kd, Jd, "TransitRoute"); - z.extend(Kd.prototype, { - bu: function(a) { - this.j.ie = 0 <= a && 5 >= a ? a : 0 - }, - oO: function(a) { - this.j.Hm = 0 <= a && 2 >= a ? a : 0 - }, - xO: function(a) { - this.j.tn = 0 <= a && 2 >= a ? a : 0 - }, - NA: function(a, b) { - this.Pa.push({ - method: "_internalSearch", - arguments: [a, b] - }) - }, - search: function(a, b) { - this.Pa.push({ - method: "search", - arguments: [a, b] - }) - }, - Np: function(a) { - if ("string" === typeof a && (a = parseInt(a, 10), - isNaN(a))) { - this.j.Jk = Kd.En; - return - } - this.j.Jk = "number" !== typeof a ? Kd.En : 1 <= a && a <= Kd.En ? Math.round(a) : Kd.En - }, - toString: ca("TransitRoute"), - Z1: function(a) { - return a.replace(/\(.*\)/, "") - } - }); - var Ld = Kd.prototype; - T(Ld, { - _internalSearch: Ld.NA - }); - function Md(a, b) { - W.call(this, a, b); - this.ya = []; - this.mb = -1; - this.Pa = []; - var c = this - , e = this.j.la; - 1 !== e.kt && 2 !== e.kt && (e.kt = 1); - this.kv = this.j.la.Wb ? q : t; - K.load("route", function() { - c.Sd() - }); - this.vE && this.vE() - } - Md.WP = " \u73af\u5c9b \u65e0\u5c5e\u6027\u9053\u8def \u4e3b\u8def \u9ad8\u901f\u8fde\u63a5\u8def \u4ea4\u53c9\u70b9\u5185\u8def\u6bb5 \u8fde\u63a5\u9053\u8def \u505c\u8f66\u573a\u5185\u90e8\u9053\u8def \u670d\u52a1\u533a\u5185\u90e8\u9053\u8def \u6865 \u6b65\u884c\u8857 \u8f85\u8def \u531d\u9053 \u5168\u5c01\u95ed\u9053\u8def \u672a\u5b9a\u4e49\u4ea4\u901a\u533a\u57df POI\u8fde\u63a5\u8def \u96a7\u9053 \u6b65\u884c\u9053 \u516c\u4ea4\u4e13\u7528\u9053 \u63d0\u524d\u53f3\u8f6c\u9053".split(" "); - z.ta(Md, Jd, "DWRoute"); - z.extend(Md.prototype, { - search: function(a, b, c) { - this.Pa.push({ - method: "search", - arguments: [a, b, c] - }) - } - }); - function Nd(a, b) { - Md.call(this, a, b); - b = b || {}; - this.j.Vn = b.enableTraffic || t; - this.bu(b.policy); - this.Ab = Ad; - this.mq = wd - } - z.ta(Nd, Md, "DrivingRoute"); - Nd.prototype.bu = function(a) { - this.j.ie = 0 <= a && 5 >= a ? a : 0 - } - ; - function Od(a, b) { - Md.call(this, a, b); - this.Ab = Bd; - this.mq = vd; - this.kv = t - } - z.ta(Od, Md, "WalkingRoute"); - function Pd(a, b) { - Md.call(this, a, b); - this.Ab = Ed; - this.mq = xd; - this.kv = t - } - z.ta(Pd, Md, "RidingRoute"); - function Qd(a, b) { - z.lang.Ca.call(this); - this.Vf = []; - this.Kk = []; - this.j = b; - this.uj = a; - this.map = this.j.la.map || s; - this.hO = this.j.hO; - this.zb = s; - this.pk = 0; - this.SF = ""; - this.nf = 1; - this.uD = ""; - this.Ep = [0, 0, 0, 0, 0, 0, 0]; - this.XM = []; - this.os = [1, 1, 1, 1, 1, 1, 1]; - this.VO = [1, 1, 1, 1, 1, 1, 1]; - this.Fp = [0, 0, 0, 0, 0, 0, 0]; - this.Zm = [0, 0, 0, 0, 0, 0, 0]; - this.Ib = [{ - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }]; - this.bi = -1; - this.ru = []; - this.aG = []; - K.load("route", u()) - } - z.lang.ta(Qd, z.lang.Ca, "RouteAddr"); - var Rd = navigator.userAgent; - /ipad|iphone|ipod|iph/i.test(Rd); - var Sd = /android/i.test(Rd); - function Td(a) { - this.vf = a || {} - } - z.extend(Td.prototype, { - gO: function(a, b, c) { - var e = this; - K.load("route", function() { - e.Sd(a, b, c) - }) - } - }); - function Ud(a) { - this.j = {}; - z.extend(this.j, a); - this.Pa = []; - var b = this; - K.load("othersearch", function() { - b.Sd() - }) - } - z.ta(Ud, z.lang.Ca, "Geocoder"); - z.extend(Ud.prototype, { - vm: function(a, b, c) { - this.Pa.push({ - method: "getPoint", - arguments: [a, b, c] - }) - }, - rm: function(a, b, c) { - this.Pa.push({ - method: "getLocation", - arguments: [a, b, c] - }) - }, - toString: ca("Geocoder") - }); - var Vd = Ud.prototype; - T(Vd, { - getPoint: Vd.vm, - getLocation: Vd.rm - }); - function Geolocation(a) { - a = a || {}; - this.K = { - timeout: a.timeout || 1E4, - maximumAge: a.maximumAge || 6E5, - enableHighAccuracy: a.enableHighAccuracy || t, - zi: a.SDKLocation || t - }; - this.pe = []; - var b = this; - K.load("othersearch", function() { - for (var a = 0, e; e = b.pe[a]; a++) - b[e.method].apply(b, e.arguments) - }) - } - z.extend(Geolocation.prototype, { - getCurrentPosition: function(a, b) { - this.pe.push({ - method: "getCurrentPosition", - arguments: arguments - }) - }, - getStatus: function() { - return sd - }, - enableSDKLocation: function() { - H() && (this.K.zi = q) - }, - disableSDKLocation: function() { - this.K.zi = t - } - }); - function Wd(a) { - a = a || {}; - a.la = a.renderOptions || {}; - this.j = { - la: { - map: a.la.map || s - } - }; - this.Pa = []; - var b = this; - K.load("othersearch", function() { - b.Sd() - }) - } - z.ta(Wd, z.lang.Ca, "LocalCity"); - z.extend(Wd.prototype, { - get: function(a) { - this.Pa.push({ - method: "get", - arguments: [a] - }) - }, - toString: ca("LocalCity") - }); - function Xd() { - this.Pa = []; - var a = this; - K.load("othersearch", function() { - a.Sd() - }) - } - z.ta(Xd, z.lang.Ca, "Boundary"); - z.extend(Xd.prototype, { - get: function(a, b) { - this.Pa.push({ - method: "get", - arguments: [a, b] - }) - }, - toString: ca("Boundary") - }); - function Yd(a, b) { - W.call(this, a, b); - this.TP = Cd; - this.VP = Fd; - this.SP = Dd; - this.UP = Gd; - this.Pa = []; - var c = this; - K.load("buslinesearch", function() { - c.Sd() - }) - } - Yd.zv = G.qa + "iw_plus.gif"; - Yd.YS = G.qa + "iw_minus.gif"; - Yd.RU = G.qa + "stop_icon.png"; - z.ta(Yd, W); - z.extend(Yd.prototype, { - getBusList: function(a) { - this.Pa.push({ - method: "getBusList", - arguments: [a] - }) - }, - getBusLine: function(a) { - this.Pa.push({ - method: "getBusLine", - arguments: [a] - }) - }, - setGetBusListCompleteCallback: function(a) { - this.j.zN = a || u() - }, - setGetBusLineCompleteCallback: function(a) { - this.j.yN = a || u() - }, - setBusListHtmlSetCallback: function(a) { - this.j.wN = a || u() - }, - setBusLineHtmlSetCallback: function(a) { - this.j.vN = a || u() - }, - setPolylinesSetCallback: function(a) { - this.j.bF = a || u() - } - }); - function Zd(a) { - W.call(this, a); - a = a || {}; - this.ub = { - input: a.input || s, - gC: a.baseDom || s, - types: a.types || [], - py: a.onSearchComplete || u() - }; - this.Ad.src = a.location || "\u5168\u56fd"; - this.Wi = ""; - this.pg = s; - this.lI = ""; - this.Mi(); - Ra(Ha); - var b = this; - K.load("autocomplete", function() { - b.Sd() - }) - } - z.ta(Zd, W, "Autocomplete"); - z.extend(Zd.prototype, { - Mi: u(), - show: u(), - U: u(), - KF: function(a) { - this.ub.types = a - }, - fn: function(a) { - this.Ad.src = a - }, - search: ba("Wi"), - Ly: ba("lI") - }); - var Ta; - function Oa(a, b) { - function c() { - f.j.visible ? ("inter" === f.Ke && f.j.haveBreakId && f.j.indoorExitControl === q ? z.D.show(f.GA) : z.D.U(f.GA), - this.j.closeControl && this.Bf && this.B && this.B.La() === this.C ? z.D.show(f.Bf) : z.D.U(f.Bf), - this.j.forceCloseControl && z.D.show(f.Bf)) : (z.D.U(f.Bf), - z.D.U(f.GA)) - } - this.C = "string" == typeof a ? z.$(a) : a; - this.aa = $d++; - this.j = { - enableScrollWheelZoom: q, - panoramaRenderer: "flash", - swfSrc: B.vg("main_domain_nocdn", "res/swf/") + "APILoader.swf", - visible: q, - indoorExitControl: q, - indoorFloorControl: t, - linksControl: q, - clickOnRoad: q, - navigationControl: q, - closeControl: q, - indoorSceneSwitchControl: q, - albumsControl: t, - albumsControlOptions: {}, - copyrightControlOptions: {}, - forceCloseControl: t, - haveBreakId: t - }; - var b = b || {}, e; - for (e in b) - this.j[e] = b[e]; - b.closeControl === q && (this.j.forceCloseControl = q); - b.useWebGL === t && Na(t); - this.Da = { - heading: 0, - pitch: 0 - }; - this.bo = []; - this.Lb = this.Za = s; - this.dk = this.er(); - this.ya = []; - this.Mc = 1; - this.Ke = this.xT = this.jl = ""; - this.Je = {}; - this.Of = s; - this.Sg = []; - this.xr = []; - "cvsRender" == this.dk || Na() ? (this.Vj = 90, - this.Xj = -90) : "cssRender" == this.dk && (this.Vj = 45, - this.Xj = -45); - this.Br = t; - var f = this; - this.co = function() { - this.dk === "flashRender" ? K.load("panoramaflash", function() { - f.Mi() - }, q) : K.load("panorama", function() { - f.ib() - }, q); - b.of == "api" ? Ra(Da) : Ra(Ea); - this.co = u() - } - ; - this.j.jT !== q && (this.co(), - B.Fn("cus.fire", "count", "z_loadpanoramacount")); - this.aU(this.C); - this.addEventListener("id_changed", function() { - Ra(Ca, { - from: b.of - }) - }); - this.mQ(); - this.addEventListener("indoorexit_options_changed", c); - this.addEventListener("scene_type_changed", c); - this.addEventListener("onclose_options_changed", c); - this.addEventListener("onvisible_changed", c) - } - var ae = 4 - , be = 1 - , $d = 0; - z.lang.ta(Oa, z.lang.Ca, "Panorama"); - z.extend(Oa.prototype, { - mQ: function() { - var a = this - , b = this.Bf = L("div"); - b.className = "pano_close"; - b.style.cssText = "z-index: 1201;display: none"; - b.title = "\u9000\u51fa\u5168\u666f"; - b.onclick = function() { - a.U() - } - ; - this.C.appendChild(b); - var c = this.GA = L("a"); - c.className = "pano_pc_indoor_exit"; - c.style.cssText = "z-index: 1201;display: none"; - c.innerHTML = '\u51fa\u53e3'; - c.title = "\u9000\u51fa\u5ba4\u5185\u666f"; - c.onclick = function() { - a.Vo() - } - ; - this.C.appendChild(c); - window.ActiveXObject && !document.addEventListener && (b.style.backgroundColor = "rgb(37,37,37)", - c.style.backgroundColor = "rgb(37,37,37)") - }, - Vo: u(), - aU: function(a) { - var b, c; - b = a.style; - c = Va(a).position; - "absolute" != c && "relative" != c && (b.position = "relative", - b.zIndex = 0); - if ("absolute" === c || "relative" === c) - if (a = Va(a).zIndex, - !a || "auto" === a) - b.zIndex = 0 - }, - OX: w("bo"), - Xb: w("Za"), - pY: w("jw"), - wO: w("jw"), - ga: w("Lb"), - Ea: w("Da"), - fa: w("Mc"), - jj: w("jl"), - I3: function() { - return this.U1 || [] - }, - D3: w("xT"), - ft: w("Ke"), - Ny: function(a) { - a !== this.Ke && (this.Ke = a, - this.dispatchEvent(new P("onscene_type_changed"))) - }, - vc: function(a, b, c) { - "object" === typeof b && (c = b, - b = l); - a != this.Za && (this.ul = this.Za, - this.vl = this.Lb, - this.Za = a, - this.Ke = b || "street", - this.Lb = s, - c && c.pov && this.Pc(c.pov)) - }, - sa: function(a) { - a.pb(this.Lb) || (this.ul = this.Za, - this.vl = this.Lb, - this.Lb = a, - this.Za = s) - }, - Pc: function(a) { - a && (this.Da = a, - a = this.Da.pitch, - a > this.Vj ? a = this.Vj : a < this.Xj && (a = this.Xj), - this.Br = q, - this.Da.pitch = a) - }, - H_: function(a, b) { - this.Xj = 0 <= a ? 0 : a; - this.Vj = 0 >= b ? 0 : b - }, - Qc: function(a) { - a != this.Mc && (a > ae && (a = ae), - a < be && (a = be), - a != this.Mc && (this.Mc = a), - "cssRender" === this.dk && this.Pc(this.Da)) - }, - GB: function() { - if (this.B) - for (var a = this.B.Hx(), b = 0; b < a.length; b++) - (a[b]instanceof U || a[b]instanceof uc) && a[b].point && this.ya.push(a[b]) - }, - GF: ba("B"), - au: function(a) { - this.Of = a || "none" - }, - Qk: function(a) { - for (var b in a) { - if ("object" == typeof a[b]) - for (var c in a[b]) - this.j[b][c] = a[b][c]; - else - this.j[b] = a[b]; - a.closeControl === q && (this.j.forceCloseControl = q); - a.closeControl === t && (this.j.forceCloseControl = t); - switch (b) { - case "linksControl": - this.dispatchEvent(new P("onlinks_visible_changed")); - break; - case "clickOnRoad": - this.dispatchEvent(new P("onclickonroad_changed")); - break; - case "navigationControl": - this.dispatchEvent(new P("onnavigation_visible_changed")); - break; - case "indoorSceneSwitchControl": - this.dispatchEvent(new P("onindoor_default_switch_mode_changed")); - break; - case "albumsControl": - this.dispatchEvent(new P("onalbums_visible_changed")); - break; - case "albumsControlOptions": - this.dispatchEvent(new P("onalbums_options_changed")); - break; - case "copyrightControlOptions": - this.dispatchEvent(new P("oncopyright_options_changed")); - break; - case "closeControl": - this.dispatchEvent(new P("onclose_options_changed")); - break; - case "indoorExitControl": - this.dispatchEvent(new P("onindoorexit_options_changed")); - break; - case "indoorFloorControl": - this.dispatchEvent(new P("onindoorfloor_options_changed")) - } - } - }, - Ek: function() { - this.Dl.style.visibility = "hidden" - }, - Ry: function() { - this.Dl.style.visibility = "visible" - }, - cX: function() { - this.j.enableScrollWheelZoom = q - }, - NW: function() { - this.j.enableScrollWheelZoom = t - }, - show: function() { - this.j.visible = q - }, - U: function() { - this.j.visible = t - }, - er: function() { - return Ua() && !H() && "javascript" != this.j.panoramaRenderer ? "flashRender" : !H() && Ob() ? "cvsRender" : "cssRender" - }, - Ga: function(a) { - this.Je[a.ld] = a - }, - Qb: function(a) { - delete this.Je[a] - }, - kE: function() { - return this.j.visible - }, - fh: function() { - return new O(this.C.clientWidth,this.C.clientHeight) - }, - La: w("C"), - yL: function() { - var a = B.vg("baidumap", "?") - , b = this.Xb(); - if (b) { - var b = { - panotype: this.ft(), - heading: this.Ea().heading, - pitch: this.Ea().pitch, - pid: b, - panoid: b, - from: "api" - }, c; - for (c in b) - a += c + "=" + b[c] + "&" - } - return a.slice(0, -1) - }, - Px: function() { - this.Qk({ - copyrightControlOptions: { - logoVisible: t - } - }) - }, - NF: function() { - this.Qk({ - copyrightControlOptions: { - logoVisible: q - } - }) - }, - aC: function(a) { - function b(a, b) { - return function() { - a.xr.push({ - iN: b, - hN: arguments - }) - } - } - for (var c = a.getPanoMethodList(), e = "", f = 0, g = c.length; f < g; f++) - e = c[f], - this[e] = b(this, e); - this.Sg.push(a) - }, - rF: function(a) { - for (var b = this.Sg.length; b--; ) - this.Sg[b] === a && this.Sg.splice(b, 1) - }, - FF: u() - }); - var ce = Oa.prototype; - T(ce, { - setId: ce.vc, - setPosition: ce.sa, - setPov: ce.Pc, - setZoom: ce.Qc, - setOptions: ce.Qk, - getId: ce.Xb, - getPosition: ce.ga, - getPov: ce.Ea, - getZoom: ce.fa, - getLinks: ce.OX, - getBaiduMapUrl: ce.yL, - hideMapLogo: ce.Px, - showMapLogo: ce.NF, - enableDoubleClickZoom: ce.W2, - disableDoubleClickZoom: ce.J2, - enableScrollWheelZoom: ce.cX, - disableScrollWheelZoom: ce.NW, - show: ce.show, - hide: ce.U, - addPlugin: ce.aC, - removePlugin: ce.rF, - getVisible: ce.kE, - addOverlay: ce.Ga, - removeOverlay: ce.Qb, - getSceneType: ce.ft, - setPanoramaPOIType: ce.au, - exitInter: ce.Vo, - setInteractiveState: ce.FF - }); - T(window, { - BMAP_PANORAMA_POI_HOTEL: "hotel", - BMAP_PANORAMA_POI_CATERING: "catering", - BMAP_PANORAMA_POI_MOVIE: "movie", - BMAP_PANORAMA_POI_TRANSIT: "transit", - BMAP_PANORAMA_POI_INDOOR_SCENE: "indoor_scene", - BMAP_PANORAMA_POI_NONE: "none", - BMAP_PANORAMA_INDOOR_SCENE: "inter", - BMAP_PANORAMA_STREET_SCENE: "street" - }); - function de() { - z.lang.Ca.call(this); - this.ld = "PanoramaOverlay_" + this.aa; - this.P = s; - this.Qa = q - } - z.lang.ta(de, z.lang.Ca, "PanoramaOverlayBase"); - z.extend(de.prototype, { - E3: w("ld"), - na: function() { - aa("initialize\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - remove: function() { - aa("remove\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - Nf: function() { - aa("_setOverlayProperty\u65b9\u6cd5\u672a\u5b9e\u73b0") - } - }); - function ee(a, b) { - de.call(this); - var c = { - position: s, - altitude: 2, - displayDistance: q - }, b = b || {}, e; - for (e in b) - c[e] = b[e]; - this.Lb = c.position; - this.Ij = a; - this.xq = c.altitude; - this.zR = c.displayDistance; - this.UF = c.color; - this.kM = c.hoverColor; - this.backgroundColor = c.backgroundColor; - this.jK = c.backgroundHoverColor; - this.borderColor = c.borderColor; - this.oK = c.borderHoverColor; - this.fontSize = c.fontSize; - this.padding = c.padding; - this.pE = c.imageUrl; - this.size = c.size; - this.xe = c.image; - this.width = c.width; - this.height = c.height; - this.HY = c.imageData; - this.borderWidth = c.borderWidth - } - z.lang.ta(ee, de, "PanoramaLabel"); - z.extend(ee.prototype, { - j3: w("borderWidth"), - getImageData: w("HY"), - zm: w("UF"), - y3: w("kM"), - f3: w("backgroundColor"), - g3: w("jK"), - h3: w("borderColor"), - i3: w("oK"), - w3: w("fontSize"), - F3: w("padding"), - z3: w("pE"), - cb: w("size"), - zx: w("xe"), - sa: function(a) { - this.Lb = a; - this.Nf("position", a) - }, - ga: w("Lb"), - dd: function(a) { - this.Ij = a; - this.Nf("content", a) - }, - xk: w("Ij"), - AF: function(a) { - this.xq = a; - this.Nf("altitude", a) - }, - Yo: w("xq"), - Ea: function() { - var a = this.ga() - , b = s - , c = s; - this.P && (c = this.P.ga()); - if (a && c) - if (a.pb(c)) - b = this.P.Ea(); - else { - b = {}; - b.heading = fe(a.lng - c.lng, a.lat - c.lat) || 0; - var a = b - , c = this.Yo() - , e = this.Xn(); - a.pitch = Math.round(180 * (Math.atan(c / e) / Math.PI)) || 0 - } - return b - }, - Xn: function() { - var a = 0, b, c; - this.P && (b = this.P.ga(), - (c = this.ga()) && !c.pb(b) && (a = S.$o(b, c))); - return a - }, - U: function() { - aa("hide\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - show: function() { - aa("show\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - Nf: u() - }); - var ge = ee.prototype; - T(ge, { - setPosition: ge.sa, - getPosition: ge.ga, - setContent: ge.dd, - getContent: ge.xk, - setAltitude: ge.AF, - getAltitude: ge.Yo, - getPov: ge.Ea, - show: ge.show, - hide: ge.U - }); - function he(a, b) { - de.call(this); - var c = { - icon: "", - title: "", - panoInfo: s, - altitude: 2 - }, b = b || {}, e; - for (e in b) - c[e] = b[e]; - this.Lb = a; - this.gI = c.icon; - this.DJ = c.title; - this.xq = c.altitude; - this.OT = c.panoInfo; - this.Da = { - heading: 0, - pitch: 0 - } - } - z.lang.ta(he, de, "PanoramaMarker"); - z.extend(he.prototype, { - sa: function(a) { - this.Lb = a; - this.Nf("position", a) - }, - ga: w("Lb"), - Ec: function(a) { - this.DJ = a; - this.Nf("title", a) - }, - gp: w("DJ"), - Rb: function(a) { - this.gI = icon; - this.Nf("icon", a) - }, - ap: w("gI"), - AF: function(a) { - this.xq = a; - this.Nf("altitude", a) - }, - Yo: w("xq"), - $D: w("OT"), - Ea: function() { - var a = s; - if (this.P) { - var a = this.P.ga() - , b = this.ga() - , a = fe(b.lng - a.lng, b.lat - a.lat); - isNaN(a) && (a = 0); - a = { - heading: a, - pitch: 0 - } - } else - a = this.Da; - return a - }, - Nf: u() - }); - var ie = he.prototype; - T(ie, { - setPosition: ie.sa, - getPosition: ie.ga, - setTitle: ie.Ec, - getTitle: ie.gp, - setAltitude: ie.AF, - getAltitude: ie.Yo, - getPanoInfo: ie.$D, - getIcon: ie.ap, - setIcon: ie.Rb, - getPov: ie.Ea - }); - function fe(a, b) { - var c = 0; - if (0 !== a && 0 !== b) { - var c = 180 * (Math.atan(a / b) / Math.PI) - , e = 0; - 0 < a && 0 > b && (e = 90); - 0 > a && 0 > b && (e = 180); - 0 > a && 0 < b && (e = 270); - c = (c + 90) % 90 + e - } else - 0 === a ? c = 0 > b ? 180 : 0 : 0 === b && (c = 0 < a ? 90 : 270); - return Math.round(c) - } - function Na(a) { - if ("boolean" === typeof je) - return je; - if (a === t || !window.WebGLRenderingContext) - return je = t; - if (z.platform.Jm) { - a = 0; - try { - a = navigator.userAgent.split("Android ")[1].charAt(0) - } catch (b) {} - if (5 > a) - return je = t - } - var a = document.createElement("canvas") - , c = s; - try { - c = a.getContext("webgl") - } catch (e) { - je = t - } - return je = c === s ? t : q - } - var je; - function ke() { - if ("boolean" === typeof le) - return le; - le = q; - if (z.platform.zE) - return q; - var a = navigator.userAgent; - return -1 < a.indexOf("Chrome") || -1 < a.indexOf("SAMSUNG-GT-I9508") ? q : le = t - } - var le; - function ec(a, b) { - this.P = a || s; - var c = this; - c.P && c.ba(); - K.load("pservice", function() { - c.SQ() - }); - "api" == (b || {}).of ? Ra(Fa) : Ra(Ga); - this.xd = { - getPanoramaById: [], - getPanoramaByLocation: [], - getVisiblePOIs: [], - getRecommendPanosById: [], - getPanoramaVersions: [], - checkPanoSupportByCityCode: [], - getPanoramaByPOIId: [], - getCopyrightProviders: [] - } - } - B.Tm(function(a) { - "flashRender" !== a.er() && new ec(a,{ - of: "api" - }) - }); - z.extend(ec.prototype, { - ba: function() { - function a(a) { - if (a) { - if (a.id != b.jw) { - b.wO(a.id); - b.ea = a; - ke() || b.dispatchEvent(new P("onthumbnail_complete")); - b.Za != s && (b.vl = b._position); - for (var c in a) - if (a.hasOwnProperty(c)) - switch (b["_" + c] = a[c], - c) { - case "position": - b.Lb = a[c]; - break; - case "id": - b.Za = a[c]; - break; - case "links": - b.bo = a[c]; - break; - case "zoom": - b.Mc = a[c] - } - if (b.vl) { - var g = b.vl - , i = b._position; - c = g.lat; - var k = i.lat - , m = Pb(k - c) - , g = Pb(i.lng - g.lng); - c = Math.sin(m / 2) * Math.sin(m / 2) + Math.cos(Pb(c)) * Math.cos(Pb(k)) * Math.sin(g / 2) * Math.sin(g / 2); - b.wH = 6371E3 * 2 * Math.atan2(Math.sqrt(c), Math.sqrt(1 - c)) - } - c = new P("ondataload"); - c.data = a; - b.dispatchEvent(c); - b.dispatchEvent(new P("onposition_changed")); - b.dispatchEvent(new P("onlinks_changed")); - b.dispatchEvent(new P("oncopyright_changed"), { - copyright: a.copyright - }); - a.bm && b.j.closeControl ? z.D.show(b.WR) : z.D.U(b.WR) - } - } else - b.Za = b.ul, - b.Lb = b.vl, - b.dispatchEvent(new P("onnoresult")) - } - var b = this.P - , c = this; - b.addEventListener("id_changed", function() { - c.ep(b.Xb(), a) - }); - b.addEventListener("iid_changed", function() { - c.Tg(ec.el + "qt=idata&iid=" + b.CA + "&fn=", function(b) { - if (b && b.result && 0 == b.result.error) { - var b = b.content[0].interinfo - , f = {}; - f.bm = b.BreakID; - for (var g = b.Defaultfloor, i = s, k = 0; k < b.Floors.length; k++) - if (b.Floors[k].Floor == g) { - i = b.Floors[k]; - break - } - f.id = i.StartID || i.Points[0].PID; - c.ep(f.id, a, f) - } - }) - }); - b.addEventListener("position_changed_inner", function() { - c.kj(b.ga(), a) - }) - }, - ep: function(a, b) { - this.xd.getPanoramaById.push(arguments) - }, - kj: function(a, b, c) { - this.xd.getPanoramaByLocation.push(arguments) - }, - lE: function(a, b, c, e) { - this.xd.getVisiblePOIs.push(arguments) - }, - Kx: function(a, b) { - this.xd.getRecommendPanosById.push(arguments) - }, - Jx: function(a) { - this.xd.getPanoramaVersions.push(arguments) - }, - nC: function(a, b) { - this.xd.checkPanoSupportByCityCode.push(arguments) - }, - Ix: function(a, b) { - this.xd.getPanoramaByPOIId.push(arguments) - }, - CL: function(a) { - this.xd.getCopyrightProviders.push(arguments) - } - }); - var ne = ec.prototype; - T(ne, { - getPanoramaById: ne.ep, - getPanoramaByLocation: ne.kj, - getPanoramaByPOIId: ne.Ix - }); - function dc(a) { - Mc.call(this); - "api" == (a || {}).of ? Ra(Aa) : Ra(Ba) - } - dc.OG = B.vg("pano", "tile/"); - dc.prototype = new Mc; - dc.prototype.getTilesUrl = function(a, b) { - var c = dc.OG[(a.x + a.y) % dc.OG.length] + "?udt=20150114&qt=tile&styles=pl&x=" + a.x + "&y=" + a.y + "&z=" + b; - z.ca.ia && 6 >= z.ca.ia && (c += "&color_dep=32"); - return c - } - ; - dc.prototype.zt = ca(q); - oe.Wd = new S; - function oe() {} - z.extend(oe, { - OW: function(a, b, c) { - c = z.lang.Nc(c); - b = { - data: b - }; - "position_changed" == a && (b.data = oe.Wd.xj(new Q(b.data.mercatorX,b.data.mercatorY))); - c.dispatchEvent(new P("on" + a), b) - } - }); - var pe = oe; - T(pe, { - dispatchFlashEvent: pe.OW - }); - var qe = { - KP: 50 - }; - qe.Ou = B.vg("pano")[0]; - qe.Mu = { - width: 220, - height: 60 - }; - z.extend(qe, { - tM: function(a, b, c, e) { - if (!b || !c || !c.lngLat || !c.panoInstance) - e(); - else { - this.jo === l && (this.jo = new ec(s,{ - of: "api" - })); - var f = this; - this.jo.nC(b, function(b) { - b ? f.jo.kj(c.lngLat, qe.KP, function(b) { - if (b && b.id) { - var g = b.id - , m = b.rh - , b = b.th - , n = ec.Wd.kh(c.lngLat) - , o = f.AS(n, { - x: m, - y: b - }) - , m = f.PL(g, o, 0, qe.Mu.width, qe.Mu.height); - a.content = f.BS(a.content, m, c.titleTip, c.beforeDomId); - a.addEventListener("open", function() { - ia.M(z.Fc("infoWndPano"), "click", function() { - c.panoInstance.vc(g); - c.panoInstance.show(); - c.panoInstance.Pc({ - heading: o, - pitch: 0 - }) - }) - }) - } - e() - }) : e() - }) - } - }, - BS: function(a, b, c, e) { - var c = c || "", f; - !e || !a.split(e)[0] ? (e = a, - a = "") : (e = a.split(e)[0], - f = e.lastIndexOf("<"), - e = a.substring(0, f), - a = a.substring(f)); - f = []; - var g = qe.Mu.width - , i = qe.Mu.height; - f.push(e); - f.push("
    "); - f.push("" + c + "\u5916\u666f"); - f.push("
    \u8fdb\u5165\u5168\u666f>>"); - f.push("
    "); - f.push(a); - return f.join("") - }, - AS: function(a, b) { - var c = 90 - 180 * Math.atan2(a.y - b.y, a.x - b.x) / Math.PI; - 0 > c && (c += 360); - return c - }, - PL: function(a, b, c, e, f) { - var g = { - panoId: a, - panoHeading: b || 0, - panoPitch: c || 0, - width: e, - height: f - }; - return (qe.Ou + "?qt=pr3d&fovy=75&quality=80&panoid={panoId}&heading={panoHeading}&pitch={panoPitch}&width={width}&height={height}").replace(/\{(.*?)\}/g, function(a, b) { - return g[b] - }) - } - }); - var te = document, ue = Math, ve = te.createElement("div").style, we; - a: { - for (var xe = ["t", "webkitT", "MozT", "msT", "OT"], ye, ze = 0, Ae = xe.length; ze < Ae; ze++) - if (ye = xe[ze] + "ransform", - ye in ve) { - we = xe[ze].substr(0, xe[ze].length - 1); - break a - } - we = t - } - var Be = we ? "-" + we.toLowerCase() + "-" : "" - , De = Ce("transform") - , Ee = Ce("transitionProperty") - , Fe = Ce("transitionDuration") - , Ge = Ce("transformOrigin") - , He = Ce("transitionTimingFunction") - , Ie = Ce("transitionDelay") - , Sd = /android/gi.test(navigator.appVersion) - , Je = /iphone|ipad/gi.test(navigator.appVersion) - , Ke = /hp-tablet/gi.test(navigator.appVersion) - , Le = Ce("perspective")in ve - , Me = "ontouchstart"in window && !Ke - , Ne = we !== t - , Oe = Ce("transition")in ve - , Pe = "onorientationchange"in window ? "orientationchange" : "resize" - , Qe = Me ? "touchstart" : "mousedown" - , Re = Me ? "touchmove" : "mousemove" - , Se = Me ? "touchend" : "mouseup" - , Te = Me ? "touchcancel" : "mouseup" - , Ue = we === t ? t : { - "": "transitionend", - webkit: "webkitTransitionEnd", - Moz: "transitionend", - O: "otransitionend", - ms: "MSTransitionEnd" - }[we] - , Ve = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(a) { - return setTimeout(a, 1) - } - , We = window.cancelRequestAnimationFrame || window.U5 || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || clearTimeout - , Xe = Le ? " translateZ(0)" : ""; - function Ye(a, b) { - var c = this, e; - c.zn = "object" == typeof a ? a : te.getElementById(a); - c.zn.style.overflow = "hidden"; - c.Nb = c.zn.children[0]; - c.options = { - kp: q, - xn: q, - x: 0, - y: 0, - Go: q, - LV: t, - iy: q, - OE: q, - Yk: q, - wi: t, - n0: 0, - Pw: t, - Mx: q, - ii: q, - xi: q, - AD: Sd, - Qx: Je, - kX: Je && Le, - xF: "", - zoom: t, - $k: 1, - aq: 4, - QW: 2, - qP: "scroll", - iu: t, - Uy: 1, - CN: s, - uN: function(a) { - a.preventDefault() - }, - FN: s, - tN: s, - EN: s, - sN: s, - oy: s, - GN: s, - xN: s, - zp: s, - HN: s, - yp: s - }; - for (e in b) - c.options[e] = b[e]; - c.x = c.options.x; - c.y = c.options.y; - c.options.Yk = Ne && c.options.Yk; - c.options.ii = c.options.kp && c.options.ii; - c.options.xi = c.options.xn && c.options.xi; - c.options.zoom = c.options.Yk && c.options.zoom; - c.options.wi = Oe && c.options.wi; - c.options.zoom && Sd && (Xe = ""); - c.Nb.style[Ee] = c.options.Yk ? Be + "transform" : "top left"; - c.Nb.style[Fe] = "0"; - c.Nb.style[Ge] = "0 0"; - c.options.wi && (c.Nb.style[He] = "cubic-bezier(0.33,0.66,0.66,1)"); - c.options.Yk ? c.Nb.style[De] = "translate(" + c.x + "px," + c.y + "px)" + Xe : c.Nb.style.cssText += ";position:absolute;top:" + c.y + "px;left:" + c.x + "px"; - c.options.wi && (c.options.AD = q); - c.refresh(); - c.ba(Pe, window); - c.ba(Qe); - !Me && "none" != c.options.qP && (c.ba("DOMMouseScroll"), - c.ba("mousewheel")); - c.options.Pw && (c.XV = setInterval(function() { - c.PQ() - }, 500)); - this.options.Mx && (Event.prototype.stopImmediatePropagation || (document.body.removeEventListener = function(a, b, c) { - var e = Node.prototype.removeEventListener; - a === "click" ? e.call(document.body, a, b.iM || b, c) : e.call(document.body, a, b, c) - } - , - document.body.addEventListener = function(a, b, c) { - var e = Node.prototype.addEventListener; - a === "click" ? e.call(document.body, a, b.iM || (b.iM = function(a) { - a.RZ || b(a) - } - ), c) : e.call(document.body, a, b, c) - } - ), - c.ba("click", document.body, q)) - } - Ye.prototype = { - enabled: q, - x: 0, - y: 0, - yj: [], - scale: 1, - HC: 0, - IC: 0, - We: [], - wf: [], - fC: s, - cz: 0, - handleEvent: function(a) { - switch (a.type) { - case Qe: - if (!Me && 0 !== a.button) - break; - this.aw(a); - break; - case Re: - this.zT(a); - break; - case Se: - case Te: - this.lv(a); - break; - case Pe: - this.zB(); - break; - case "DOMMouseScroll": - case "mousewheel": - this.eV(a); - break; - case Ue: - this.$U(a); - break; - case "click": - this.$Q(a) - } - }, - PQ: function() { - !this.oh && (!this.al && !(this.Yl || this.Ky == this.Nb.offsetWidth * this.scale && this.Ip == this.Nb.offsetHeight * this.scale)) && this.refresh() - }, - Sv: function(a) { - var b; - this[a + "Scrollbar"] ? (this[a + "ScrollbarWrapper"] || (b = te.createElement("div"), - this.options.xF ? b.className = this.options.xF + a.toUpperCase() : b.style.cssText = "position:absolute;z-index:100;" + ("h" == a ? "height:7px;bottom:1px;left:2px;right:" + (this.xi ? "7" : "2") + "px" : "width:7px;bottom:" + (this.ii ? "7" : "2") + "px;top:2px;right:1px"), - b.style.cssText += ";pointer-events:none;" + Be + "transition-property:opacity;" + Be + "transition-duration:" + (this.options.kX ? "350ms" : "0") + ";overflow:hidden;opacity:" + (this.options.Qx ? "0" : "1"), - this.zn.appendChild(b), - this[a + "ScrollbarWrapper"] = b, - b = te.createElement("div"), - this.options.xF || (b.style.cssText = "position:absolute;z-index:100;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);" + Be + "background-clip:padding-box;" + Be + "box-sizing:border-box;" + ("h" == a ? "height:100%" : "width:100%") + ";" + Be + "border-radius:3px;border-radius:3px"), - b.style.cssText += ";pointer-events:none;" + Be + "transition-property:" + Be + "transform;" + Be + "transition-timing-function:cubic-bezier(0.33,0.66,0.66,1);" + Be + "transition-duration:0;" + Be + "transform: translate(0,0)" + Xe, - this.options.wi && (b.style.cssText += ";" + Be + "transition-timing-function:cubic-bezier(0.33,0.66,0.66,1)"), - this[a + "ScrollbarWrapper"].appendChild(b), - this[a + "ScrollbarIndicator"] = b), - "h" == a ? (this.fM = this.gM.clientWidth, - this.yY = ue.max(ue.round(this.fM * this.fM / this.Ky), 8), - this.xY.style.width = this.yY + "px") : (this.iP = this.jP.clientHeight, - this.L0 = ue.max(ue.round(this.iP * this.iP / this.Ip), 8), - this.K0.style.height = this.L0 + "px"), - this.AB(a, q)) : this[a + "ScrollbarWrapper"] && (Ne && (this[a + "ScrollbarIndicator"].style[De] = ""), - this[a + "ScrollbarWrapper"].parentNode.removeChild(this[a + "ScrollbarWrapper"]), - this[a + "ScrollbarWrapper"] = s, - this[a + "ScrollbarIndicator"] = s) - }, - zB: function() { - var a = this; - setTimeout(function() { - a.refresh() - }, Sd ? 200 : 0) - }, - Ar: function(a, b) { - this.al || (a = this.kp ? a : 0, - b = this.xn ? b : 0, - this.options.Yk ? this.Nb.style[De] = "translate(" + a + "px," + b + "px) scale(" + this.scale + ")" + Xe : (a = ue.round(a), - b = ue.round(b), - this.Nb.style.left = a + "px", - this.Nb.style.top = b + "px"), - this.x = a, - this.y = b, - this.AB("h"), - this.AB("v")) - }, - AB: function(a, b) { - var c = "h" == a ? this.x : this.y; - this[a + "Scrollbar"] && (c *= this[a + "ScrollbarProp"], - 0 > c ? (this.options.AD || (c = this[a + "ScrollbarIndicatorSize"] + ue.round(3 * c), - 8 > c && (c = 8), - this[a + "ScrollbarIndicator"].style["h" == a ? "width" : "height"] = c + "px"), - c = 0) : c > this[a + "ScrollbarMaxScroll"] && (this.options.AD ? c = this[a + "ScrollbarMaxScroll"] : (c = this[a + "ScrollbarIndicatorSize"] - ue.round(3 * (c - this[a + "ScrollbarMaxScroll"])), - 8 > c && (c = 8), - this[a + "ScrollbarIndicator"].style["h" == a ? "width" : "height"] = c + "px", - c = this[a + "ScrollbarMaxScroll"] + (this[a + "ScrollbarIndicatorSize"] - c))), - this[a + "ScrollbarWrapper"].style[Ie] = "0", - this[a + "ScrollbarWrapper"].style.opacity = b && this.options.Qx ? "0" : "1", - this[a + "ScrollbarIndicator"].style[De] = "translate(" + ("h" == a ? c + "px,0)" : "0," + c + "px)") + Xe) - }, - $Q: function(a) { - if (a.XR === q) - return this.YB = a.target, - this.sx = Date.now(), - q; - if (this.YB && this.sx) { - if (600 < Date.now() - this.sx) - return this.sx = this.YB = s, - q - } else { - for (var b = a.target; b != this.Nb && b != document.body; ) - b = b.parentNode; - if (b == document.body) - return q - } - for (b = a.target; 1 != b.nodeType; ) - b = b.parentNode; - b = b.tagName.toLowerCase(); - if ("select" != b && "input" != b && "textarea" != b) - return a.stopImmediatePropagation ? a.stopImmediatePropagation() : a.RZ = q, - a.stopPropagation(), - a.preventDefault(), - this.sx = this.YB = s, - t - }, - aw: function(a) { - var b = Me ? a.touches[0] : a, c, e; - if (this.enabled) { - this.options.uN && this.options.uN.call(this, a); - (this.options.wi || this.options.zoom) && this.FJ(0); - this.al = this.Yl = this.oh = t; - this.RC = this.QC = this.vw = this.uw = this.XC = this.WC = 0; - this.options.zoom && (Me && 1 < a.touches.length) && (e = ue.abs(a.touches[0].pageX - a.touches[1].pageX), - c = ue.abs(a.touches[0].pageY - a.touches[1].pageY), - this.p0 = ue.sqrt(e * e + c * c), - this.qy = ue.abs(a.touches[0].pageX + a.touches[1].pageX - 2 * this.iG) / 2 - this.x, - this.ty = ue.abs(a.touches[0].pageY + a.touches[1].pageY - 2 * this.jG) / 2 - this.y, - this.options.zp && this.options.zp.call(this, a)); - if (this.options.iy && (this.options.Yk ? (c = getComputedStyle(this.Nb, s)[De].replace(/[^0-9\-.,]/g, "").split(","), - e = +(c[12] || c[4]), - c = +(c[13] || c[5])) : (e = +getComputedStyle(this.Nb, s).left.replace(/[^0-9-]/g, ""), - c = +getComputedStyle(this.Nb, s).top.replace(/[^0-9-]/g, "")), - e != this.x || c != this.y)) - this.options.wi ? this.$d(Ue) : We(this.fC), - this.yj = [], - this.Ar(e, c), - this.options.oy && this.options.oy.call(this); - this.ww = this.x; - this.xw = this.y; - this.lu = this.x; - this.mu = this.y; - this.rh = b.pageX; - this.th = b.pageY; - this.startTime = a.timeStamp || Date.now(); - this.options.FN && this.options.FN.call(this, a); - this.ba(Re, window); - this.ba(Se, window); - this.ba(Te, window) - } - }, - zT: function(a) { - var b = Me ? a.touches[0] : a - , c = b.pageX - this.rh - , e = b.pageY - this.th - , f = this.x + c - , g = this.y + e - , i = a.timeStamp || Date.now(); - this.options.tN && this.options.tN.call(this, a); - if (this.options.zoom && Me && 1 < a.touches.length) - f = ue.abs(a.touches[0].pageX - a.touches[1].pageX), - g = ue.abs(a.touches[0].pageY - a.touches[1].pageY), - this.o0 = ue.sqrt(f * f + g * g), - this.al = q, - b = 1 / this.p0 * this.o0 * this.scale, - b < this.options.$k ? b = 0.5 * this.options.$k * Math.pow(2, b / this.options.$k) : b > this.options.aq && (b = 2 * this.options.aq * Math.pow(0.5, this.options.aq / b)), - this.rp = b / this.scale, - f = this.qy - this.qy * this.rp + this.x, - g = this.ty - this.ty * this.rp + this.y, - this.Nb.style[De] = "translate(" + f + "px," + g + "px) scale(" + b + ")" + Xe, - this.options.HN && this.options.HN.call(this, a); - else { - this.rh = b.pageX; - this.th = b.pageY; - if (0 < f || f < this.he) - f = this.options.Go ? this.x + c / 2 : 0 <= f || 0 <= this.he ? 0 : this.he; - if (g > this.sf || g < this.qd) - g = this.options.Go ? this.y + e / 2 : g >= this.sf || 0 <= this.qd ? this.sf : this.qd; - this.WC += c; - this.XC += e; - this.uw = ue.abs(this.WC); - this.vw = ue.abs(this.XC); - 6 > this.uw && 6 > this.vw || (this.options.OE && (this.uw > this.vw + 5 ? (g = this.y, - e = 0) : this.vw > this.uw + 5 && (f = this.x, - c = 0)), - this.oh = q, - this.Ar(f, g), - this.QC = 0 < c ? -1 : 0 > c ? 1 : 0, - this.RC = 0 < e ? -1 : 0 > e ? 1 : 0, - 300 < i - this.startTime && (this.startTime = i, - this.lu = this.x, - this.mu = this.y), - this.options.EN && this.options.EN.call(this, a)) - } - }, - lv: function(a) { - if (!(Me && 0 !== a.touches.length)) { - var b = this, c = Me ? a.changedTouches[0] : a, e, f, g = { - Ba: 0, - time: 0 - }, i = { - Ba: 0, - time: 0 - }, k = (a.timeStamp || Date.now()) - b.startTime; - e = b.x; - f = b.y; - b.$d(Re, window); - b.$d(Se, window); - b.$d(Te, window); - b.options.sN && b.options.sN.call(b, a); - if (b.al) - e = b.scale * b.rp, - e = Math.max(b.options.$k, e), - e = Math.min(b.options.aq, e), - b.rp = e / b.scale, - b.scale = e, - b.x = b.qy - b.qy * b.rp + b.x, - b.y = b.ty - b.ty * b.rp + b.y, - b.Nb.style[Fe] = "200ms", - b.Nb.style[De] = "translate(" + b.x + "px," + b.y + "px) scale(" + b.scale + ")" + Xe, - b.al = t, - b.refresh(), - b.options.yp && b.options.yp.call(b, a); - else { - if (b.oh) { - if (300 > k && b.options.iy) { - g = e ? b.BI(e - b.lu, k, -b.x, b.Ky - b.Cu + b.x, b.options.Go ? b.Cu : 0) : g; - i = f ? b.BI(f - b.mu, k, -b.y, 0 > b.qd ? b.Ip - b.An + b.y - b.sf : 0, b.options.Go ? b.An : 0) : i; - e = b.x + g.Ba; - f = b.y + i.Ba; - if (0 < b.x && 0 < e || b.x < b.he && e < b.he) - g = { - Ba: 0, - time: 0 - }; - if (b.y > b.sf && f > b.sf || b.y < b.qd && f < b.qd) - i = { - Ba: 0, - time: 0 - } - } - g.Ba || i.Ba ? (c = ue.max(ue.max(g.time, i.time), 10), - b.options.iu && (g = e - b.ww, - i = f - b.xw, - ue.abs(g) < b.options.Uy && ue.abs(i) < b.options.Uy ? b.scrollTo(b.ww, b.xw, 200) : (g = b.vJ(e, f), - e = g.x, - f = g.y, - c = ue.max(g.time, c))), - b.scrollTo(ue.round(e), ue.round(f), c)) : b.options.iu ? (g = e - b.ww, - i = f - b.xw, - ue.abs(g) < b.options.Uy && ue.abs(i) < b.options.Uy ? b.scrollTo(b.ww, b.xw, 200) : (g = b.vJ(b.x, b.y), - (g.x != b.x || g.y != b.y) && b.scrollTo(g.x, g.y, g.time))) : b.lo(200) - } else { - if (Me) - if (b.VK && b.options.zoom) - clearTimeout(b.VK), - b.VK = s, - b.options.zp && b.options.zp.call(b, a), - b.zoom(b.rh, b.th, 1 == b.scale ? b.options.QW : 1), - b.options.yp && setTimeout(function() { - b.options.yp.call(b, a) - }, 200); - else if (this.options.Mx) { - for (e = c.target; 1 != e.nodeType; ) - e = e.parentNode; - f = e.tagName.toLowerCase(); - "select" != f && "input" != f && "textarea" != f ? (f = te.createEvent("MouseEvents"), - f.initMouseEvent("click", q, q, a.view, 1, c.screenX, c.screenY, c.clientX, c.clientY, a.ctrlKey, a.altKey, a.shiftKey, a.metaKey, 0, s), - f.XR = q, - e.dispatchEvent(f)) : e.focus() - } - b.lo(400) - } - b.options.GN && b.options.GN.call(b, a) - } - } - }, - lo: function(a) { - var b = 0 <= this.x ? 0 : this.x < this.he ? this.he : this.x - , c = this.y >= this.sf || 0 < this.qd ? this.sf : this.y < this.qd ? this.qd : this.y; - if (b == this.x && c == this.y) { - if (this.oh && (this.oh = t, - this.options.oy && this.options.oy.call(this)), - this.ii && this.options.Qx && ("webkit" == we && (this.gM.style[Ie] = "300ms"), - this.gM.style.opacity = "0"), - this.xi && this.options.Qx) - "webkit" == we && (this.jP.style[Ie] = "300ms"), - this.jP.style.opacity = "0" - } else - this.scrollTo(b, c, a || 0) - }, - eV: function(a) { - var b = this, c, e; - if ("wheelDeltaX"in a) - c = a.wheelDeltaX / 12, - e = a.wheelDeltaY / 12; - else if ("wheelDelta"in a) - c = e = a.wheelDelta / 12; - else if ("detail"in a) - c = e = 3 * -a.detail; - else - return; - if ("zoom" == b.options.qP) { - if (e = b.scale * Math.pow(2, 1 / 3 * (e ? e / Math.abs(e) : 0)), - e < b.options.$k && (e = b.options.$k), - e > b.options.aq && (e = b.options.aq), - e != b.scale) - !b.cz && b.options.zp && b.options.zp.call(b, a), - b.cz++, - b.zoom(a.pageX, a.pageY, e, 400), - setTimeout(function() { - b.cz--; - !b.cz && b.options.yp && b.options.yp.call(b, a) - }, 400) - } else - c = b.x + c, - e = b.y + e, - 0 < c ? c = 0 : c < b.he && (c = b.he), - e > b.sf ? e = b.sf : e < b.qd && (e = b.qd), - 0 > b.qd && b.scrollTo(c, e, 0) - }, - $U: function(a) { - a.target == this.Nb && (this.$d(Ue), - this.MB()) - }, - MB: function() { - var a = this, b = a.x, c = a.y, e = Date.now(), f, g, i; - a.Yl || (a.yj.length ? (f = a.yj.shift(), - f.x == b && f.y == c && (f.time = 0), - a.Yl = q, - a.oh = q, - a.options.wi) ? (a.FJ(f.time), - a.Ar(f.x, f.y), - a.Yl = t, - f.time ? a.ba(Ue) : a.lo(0)) : (i = function() { - var k = Date.now(), m; - if (k >= e + f.time) { - a.Ar(f.x, f.y); - a.Yl = t; - a.options.zZ && a.options.zZ.call(a); - a.MB() - } else { - k = (k - e) / f.time - 1; - g = ue.sqrt(1 - k * k); - k = (f.x - b) * g + b; - m = (f.y - c) * g + c; - a.Ar(k, m); - if (a.Yl) - a.fC = Ve(i) - } - } - , - i()) : a.lo(400)) - }, - FJ: function(a) { - a += "ms"; - this.Nb.style[Fe] = a; - this.ii && (this.xY.style[Fe] = a); - this.xi && (this.K0.style[Fe] = a) - }, - BI: function(a, b, c, e, f) { - var b = ue.abs(a) / b - , g = b * b / 0.0012; - 0 < a && g > c ? (c += f / (6 / (6.0E-4 * (g / b))), - b = b * c / g, - g = c) : 0 > a && g > e && (e += f / (6 / (6.0E-4 * (g / b))), - b = b * e / g, - g = e); - return { - Ba: g * (0 > a ? -1 : 1), - time: ue.round(b / 6.0E-4) - } - }, - Zj: function(a) { - for (var b = -a.offsetLeft, c = -a.offsetTop; a = a.offsetParent; ) - b -= a.offsetLeft, - c -= a.offsetTop; - a != this.zn && (b *= this.scale, - c *= this.scale); - return { - left: b, - top: c - } - }, - vJ: function(a, b) { - var c, e, f; - f = this.We.length - 1; - c = 0; - for (e = this.We.length; c < e; c++) - if (a >= this.We[c]) { - f = c; - break - } - f == this.HC && (0 < f && 0 > this.QC) && f--; - a = this.We[f]; - e = (e = ue.abs(a - this.We[this.HC])) ? 500 * (ue.abs(this.x - a) / e) : 0; - this.HC = f; - f = this.wf.length - 1; - for (c = 0; c < f; c++) - if (b >= this.wf[c]) { - f = c; - break - } - f == this.IC && (0 < f && 0 > this.RC) && f--; - b = this.wf[f]; - c = (c = ue.abs(b - this.wf[this.IC])) ? 500 * (ue.abs(this.y - b) / c) : 0; - this.IC = f; - f = ue.round(ue.max(e, c)) || 200; - return { - x: a, - y: b, - time: f - } - }, - ba: function(a, b, c) { - (b || this.Nb).addEventListener(a, this, !!c) - }, - $d: function(a, b, c) { - (b || this.Nb).removeEventListener(a, this, !!c) - }, - NC: ga(2), - refresh: function() { - var a, b, c, e = 0; - b = 0; - this.scale < this.options.$k && (this.scale = this.options.$k); - this.Cu = this.zn.clientWidth || 1; - this.An = this.zn.clientHeight || 1; - this.sf = -this.options.n0 || 0; - this.Ky = ue.round(this.Nb.offsetWidth * this.scale); - this.Ip = ue.round((this.Nb.offsetHeight + this.sf) * this.scale); - this.he = this.Cu - this.Ky; - this.qd = this.An - this.Ip + this.sf; - this.RC = this.QC = 0; - this.options.CN && this.options.CN.call(this); - this.kp = this.options.kp && 0 > this.he; - this.xn = this.options.xn && (!this.options.LV && !this.kp || this.Ip > this.An); - this.ii = this.kp && this.options.ii; - this.xi = this.xn && this.options.xi && this.Ip > this.An; - a = this.Zj(this.zn); - this.iG = -a.left; - this.jG = -a.top; - if ("string" == typeof this.options.iu) { - this.We = []; - this.wf = []; - c = this.Nb.querySelectorAll(this.options.iu); - a = 0; - for (b = c.length; a < b; a++) - e = this.Zj(c[a]), - e.left += this.iG, - e.top += this.jG, - this.We[a] = e.left < this.he ? this.he : e.left * this.scale, - this.wf[a] = e.top < this.qd ? this.qd : e.top * this.scale - } else if (this.options.iu) { - for (this.We = []; e >= this.he; ) - this.We[b] = e, - e -= this.Cu, - b++; - this.he % this.Cu && (this.We[this.We.length] = this.he - this.We[this.We.length - 1] + this.We[this.We.length - 1]); - b = e = 0; - for (this.wf = []; e >= this.qd; ) - this.wf[b] = e, - e -= this.An, - b++; - this.qd % this.An && (this.wf[this.wf.length] = this.qd - this.wf[this.wf.length - 1] + this.wf[this.wf.length - 1]) - } - this.Sv("h"); - this.Sv("v"); - this.al || (this.Nb.style[Fe] = "0", - this.lo(400)) - }, - scrollTo: function(a, b, c, e) { - var f = a; - this.stop(); - f.length || (f = [{ - x: a, - y: b, - time: c, - TZ: e - }]); - a = 0; - for (b = f.length; a < b; a++) - f[a].TZ && (f[a].x = this.x - f[a].x, - f[a].y = this.y - f[a].y), - this.yj.push({ - x: f[a].x, - y: f[a].y, - time: f[a].time || 0 - }); - this.MB() - }, - disable: function() { - this.stop(); - this.lo(0); - this.enabled = t; - this.$d(Re, window); - this.$d(Se, window); - this.$d(Te, window) - }, - enable: function() { - this.enabled = q - }, - stop: function() { - this.options.wi ? this.$d(Ue) : We(this.fC); - this.yj = []; - this.Yl = this.oh = t - }, - zoom: function(a, b, c, e) { - var f = c / this.scale; - this.options.Yk && (this.al = q, - e = e === l ? 200 : e, - a = a - this.iG - this.x, - b = b - this.jG - this.y, - this.x = a - a * f + this.x, - this.y = b - b * f + this.y, - this.scale = c, - this.refresh(), - this.x = 0 < this.x ? 0 : this.x < this.he ? this.he : this.x, - this.y = this.y > this.sf ? this.sf : this.y < this.qd ? this.qd : this.y, - this.Nb.style[Fe] = e + "ms", - this.Nb.style[De] = "translate(" + this.x + "px," + this.y + "px) scale(" + c + ")" + Xe, - this.al = t) - } - }; - function Ce(a) { - if ("" === we) - return a; - a = a.charAt(0).toUpperCase() + a.substr(1); - return we + a - } - ve = s; - function Ze(a) { - this.j = { - anchor: Yb, - offset: new O(0,0), - maxWidth: "100%", - imageHeight: 80 - }; - var a = a || {}, b; - for (b in a) - this.j[b] = a[b]; - this.Ll = new ec(s,{ - of: "api" - }); - this.bk = []; - this.P = s; - this.ig = { - height: this.j.imageHeight, - width: this.j.imageHeight * $e - }; - this.Rc = this.BB = this.bm = this.Zc = s - } - var af = [0, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 5, 6, 6, 7, 8, 8, 8, 9, 10] - , bf = "\u5176\u4ed6 \u6b63\u95e8 \u623f\u578b \u8bbe\u65bd \u6b63\u95e8 \u9910\u996e\u8bbe\u65bd \u5176\u4ed6\u8bbe\u65bd \u6b63\u95e8 \u8bbe\u65bd \u89c2\u5f71\u5385 \u5176\u4ed6\u8bbe\u65bd".split(" "); - B.Tm(function(a) { - var b = s; - a.addEventListener("position_changed", function() { - a.j.visible && a.j.albumsControl === q && (b ? b.Ey(a.Xb()) : (b = new Ze(a.j.albumsControlOptions), - b.na(a))) - }); - a.addEventListener("albums_visible_changed", function() { - a.j.albumsControl === q ? (b ? b.Ey(a.Xb()) : (b = new Ze(a.j.albumsControlOptions), - b.na(a)), - b.show()) : b.U() - }); - a.addEventListener("albums_options_changed", function() { - b && b.Qk(a.j.albumsControlOptions) - }); - a.addEventListener("visible_changed", function() { - b && (a.kE() ? a.j.albumsControl === q && (b.C.style.visibility = "visible") : b.C.style.visibility = "hidden") - }) - }); - var $e = 1.8; - H() && ($e = 1); - z.extend(Ze.prototype, { - Qk: function(a) { - for (var b in a) - this.j[b] = a[b]; - a = this.j.imageHeight + "px"; - this.uc(this.j.anchor); - this.C.style.width = isNaN(Number(this.j.maxWidth)) === q ? this.j.maxWidth : this.j.maxWidth + "px"; - this.C.style.height = a; - this.gk.style.height = a; - this.Rh.style.height = a; - this.ig = { - height: this.j.imageHeight, - width: this.j.imageHeight * $e - }; - this.fk.style.height = this.ig.height - 6 + "px"; - this.fk.style.width = this.ig.width - 6 + "px"; - this.Ey(this.P.Xb(), q) - }, - na: function(a) { - this.P = a; - this.ls(); - this.yQ(); - this.OY(); - this.Ey(a.Xb()) - }, - ls: function() { - var a = this.j.imageHeight + "px"; - this.C = L("div"); - var b = this.C.style; - b.cssText = "background:rgb(37,37,37);background:rgba(37,37,37,0.9);"; - b.position = "absolute"; - b.zIndex = "2000"; - b.width = isNaN(Number(this.j.maxWidth)) === q ? this.j.maxWidth : this.j.maxWidth + "px"; - b.padding = "8px 0"; - b.visibility = "hidden"; - b.height = a; - this.gk = L("div"); - b = this.gk.style; - b.position = "absolute"; - b.overflow = "hidden"; - b.width = "100%"; - b.height = a; - this.Rh = L("div"); - b = this.Rh.style; - b.height = a; - this.gk.appendChild(this.Rh); - this.C.appendChild(this.gk); - this.P.C.appendChild(this.C); - this.fk = L("div", { - "class": "pano_photo_item_seleted" - }); - this.fk.style.height = this.ig.height - 6 + "px"; - this.fk.style.width = this.ig.width - 6 + "px"; - this.uc(this.j.anchor) - }, - RH: function(a) { - for (var b = this.bk, c = b.length - 1; 0 <= c; c--) - if (b[c].panoId == a) - return c; - return -1 - }, - Ey: function(a, b) { - if (b || !this.bk[this.Zc] || !(this.bk[this.Zc].panoId == a && 3 !== this.bk[this.Zc].recoType)) { - var c = this - , e = this.RH(a); - !b && -1 !== e && this.bk[e] && 3 !== this.bk[e].recoType ? this.Mp(e) : this.dY(function(a) { - for (var b = {}, e, k, m = t, n = [], o = 0, p = a.length; o < p; o++) - e = a[o].catlog, - k = a[o].floor, - l !== e && ("" === e && l !== k ? (m = q, - b[k] || (b[k] = []), - b[k].push(a[o])) : (b[af[e]] || (b[af[e]] = []), - b[af[e]].push(a[o]))); - for (var v in b) - m ? n.push({ - data: v + "F", - index: v - }) : n.push({ - data: bf[v], - index: v - }); - c.jH = b; - c.Ji = n; - c.Il(a); - 0 == a.length ? c.U() : c.show() - }) - } - }, - vW: function() { - if (!this.Gi) { - var a = this.SX(this.Ji) - , b = L("div"); - b.style.cssText = ["width:" + 134 * this.Ji.length + "px;", "overflow:hidden;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;"].join(""); - b.innerHTML = a; - a = L("div"); - a.appendChild(b); - a.style.cssText = "position:absolute;top:-25px;background:rgb(37,37,37);background:rgba(37,37,37,0.9);border-bottom:1px solid #4e596a;width:100%;line-height:25px;height:25px;overflow:scroll;outline:0"; - new Ye(a,{ - Go: t, - iy: q, - ii: t, - xi: t, - xn: t, - OE: q, - Pw: q, - Mx: q - }); - this.C.appendChild(a); - for (var c = this, e = b.getElementsByTagName("span"), f = 0, g = e.length; f < g; f++) - b = e[f], - z.M(b, "click", function() { - if (this.getAttribute("dataindex")) { - c.Il(c.jH[this.getAttribute("dataindex")]); - for (var a = 0, b = e.length; a < b; a++) - e[a].style.color = "#FFFFFF"; - this.style.color = "#3383FF" - } - }); - this.Gi = a - } - }, - sW: function() { - if (this.Gi) - a = this.AL(this.Ji), - this.OQ.innerHTML = a; - else { - var a = this.AL(this.Ji) - , b = L("ul") - , c = this; - b.style.cssText = "list-style: none;padding:0px;margin:0px;display:block;width:60px;position:absolute;top:7px"; - b.innerHTML = a; - z.M(b, "click", function(a) { - if (a = (a.srcElement || a.target).getAttribute("dataindex")) { - c.Il(c.jH[a]); - for (var e = b.getElementsByTagName("li"), f = 0, g = e.length; f < g; f++) - e[f].childNodes[0].getAttribute("dataindex") === a ? z.D.Ua(e[f], "pano_catlogLiActive") : z.D.Pb(e[f], "pano_catlogLiActive") - } - }); - var a = L("div") - , e = L("a") - , f = L("span") - , g = L("a") - , i = L("span") - , k = ["background:url(" + G.qa + "panorama/catlog_icon.png) no-repeat;", "display:block;width:10px;height:7px;margin:0 auto;"].join(""); - f.style.cssText = k + "background-position:-18px 0;"; - e.style.cssText = "background:#1C1C1C;display:block;position:absolute;width:58px;"; - i.style.cssText = k + "background-position:0 0;"; - g.style.cssText = "background:#1C1C1C;display:block;position:absolute;width:58px;"; - g.style.top = this.j.imageHeight - 7 + "px"; - a.style.cssText = "position:absolute;top:0px;left:0px;width:60px;"; - e.appendChild(f); - g.appendChild(i); - z.M(e, "mouseover", function() { - var a = parseInt(b.style.top, 10); - 7 !== a && (f.style.backgroundPosition = "-27px 0"); - new tb({ - Ic: 60, - kc: ub.Ks, - duration: 300, - va: function(c) { - b.style.top = a + (7 - a) * c + "px" - } - }) - }); - z.M(e, "mouseout", function() { - f.style.backgroundPosition = "-18px 0" - }); - z.M(g, "mouseover", function() { - var a = parseInt(b.style.top, 10) - , e = c.j.imageHeight - 14; - if (!(parseInt(b.offsetHeight, 10) < e)) { - var f = e - parseInt(b.offsetHeight, 10) + 7; - f !== a && (i.style.backgroundPosition = "-9px 0"); - new tb({ - Ic: 60, - kc: ub.Ks, - duration: 300, - va: function(c) { - b.style.top = a + (f - a) * c + "px" - } - }) - } - }); - z.M(g, "mouseout", function() { - i.style.backgroundPosition = "0 0" - }); - a.appendChild(e); - a.appendChild(g); - e = L("div"); - e.style.cssText = ["position:absolute;z-index:2001;left:20px;", "height:" + this.j.imageHeight + "px;", "width:62px;overflow:hidden;background:rgb(37,37,37);background:rgba(37,37,37,0.9);"].join(""); - e.appendChild(b); - e.appendChild(a); - this.Gi = e; - this.OQ = b; - this.C.appendChild(e) - } - }, - tW: function() { - if (this.Ji && !(0 >= this.Ji.length)) { - var a = L("div"); - a.innerHTML = this.hA; - a.style.cssText = "position:absolute;background:#252525"; - this.C.appendChild(a); - this.Os = a; - this.Rc.jg.style.left = this.ig.width + 8 + "px"; - this.Gi && (this.Gi.style.left = parseInt(this.Gi.style.left, 10) + this.ig.width + 8 + "px"); - var b = this; - z.M(a, "click", function() { - b.P.vc(b.gX) - }) - } - }, - Il: function(a) { - this.bk = a; - this.j.showCatalog && (0 < this.Ji.length ? (Ua() ? this.sW() : this.vW(), - this.Rc.offsetLeft = 60) : (this.Os && (this.C.removeChild(this.Os), - this.Os = s, - this.Rc.jg.style.left = "0px"), - this.Gi && (this.C.removeChild(this.Gi), - this.Gi = s), - this.Rc.offsetLeft = 0)); - var b = this.LX(a); - Ua() && (this.Ji && 0 < this.Ji.length && this.j.showExit && this.hA) && (this.Rc.offsetLeft += this.ig.width + 8, - this.Os ? this.Os.innerHTML = this.hA : this.tW()); - this.Rh.innerHTML = b; - this.Rh.style.width = (this.ig.width + 8) * a.length + 8 + "px"; - a = this.C.offsetWidth; - b = this.Rh.offsetWidth; - this.Rc.Vs && (b += this.Rc.Vs()); - b < a - 2 * this.Rc.Ai - this.Rc.offsetLeft ? this.C.style.width = b + this.Rc.offsetLeft + "px" : (this.C.style.width = isNaN(Number(this.j.maxWidth)) === q ? this.j.maxWidth : this.j.maxWidth + "px", - b < this.C.offsetWidth - 2 * this.Rc.Ai - this.Rc.offsetLeft && (this.C.style.width = b + this.Rc.offsetLeft + "px")); - this.Rc.refresh(); - this.BB = this.Rh.children; - this.Rh.appendChild(this.fk); - this.fk.style.left = "-100000px"; - a = this.RH(this.P.Xb(), this.Y1); - -1 !== a && this.Mp(a) - }, - SX: function(a) { - for (var b = "", c, e = 0, f = a.length; e < f; e++) - c = '
    ' + a[e].data + "
    ", - b += c; - return b - }, - AL: function(a) { - for (var b = "", c, e = 0, f = a.length; e < f; e++) - c = '
  • ' + a[e].data + "
  • ", - b += c; - return b - }, - LX: function(a) { - for (var b, c, e, f, g = [], i = this.ig.height, k = this.ig.width, m = 0; m < a.length; m++) - b = a[m], - recoType = b.recoType, - e = b.panoId, - f = b.name, - c = b.heading, - b = b.pitch, - c = qe.PL(e, c, b, 198, 108), - b = '' + f + '' + f + "", - 3 === recoType ? Ua() ? (this.hA = b, - this.gX = e, - a.splice(m, 1), - m--) : (b = '' + f + '
    ', - g.push(b)) : g.push(b); - return g.join("") - }, - dY: function(a) { - var b = this - , c = this.P.Xb(); - c && this.Ll.Kx(c, function(e) { - b.P.Xb() === c && a(e) - }) - }, - uc: function(a) { - if (!Wa(a) || isNaN(a) || a < Wb || 3 < a) - a = this.defaultAnchor; - var b = this.C - , c = this.j.offset.width - , e = this.j.offset.height; - b.style.left = b.style.top = b.style.right = b.style.bottom = "auto"; - switch (a) { - case Wb: - b.style.top = e + "px"; - b.style.left = c + "px"; - break; - case Xb: - b.style.top = e + "px"; - b.style.right = c + "px"; - break; - case Yb: - b.style.bottom = e + "px"; - b.style.left = c + "px"; - break; - case 3: - b.style.bottom = e + "px", - b.style.right = c + "px" - } - }, - yQ: function() { - this.wQ() - }, - wQ: function() { - var a = this; - z.M(this.C, "touchstart", function(a) { - a.stopPropagation() - }); - z.M(this.gk, "click", function(b) { - if ((b = (b.srcElement || b.target).getAttribute("data-index")) && b != a.Zc) - a.Mp(b), - a.P.vc(a.bk[b].panoId) - }); - z.M(this.Rh, "mouseover", function(b) { - b = (b.srcElement || b.target).getAttribute("data-index"); - b !== s && a.BK(b, q) - }); - this.P.addEventListener("size_changed", function() { - isNaN(Number(a.j.maxWidth)) && a.Qk({ - maxWidth: a.j.maxWidth - }) - }) - }, - Mp: function(a) { - this.fk.style.left = this.BB[a].offsetLeft + 8 + "px"; - this.fk.setAttribute("data-index", this.BB[a].getAttribute("data-index")); - this.Zc = a; - this.BK(a) - }, - BK: function(a, b) { - var c = this.ig.width + 8 - , e = 0; - this.Rc.Vs && (e = this.Rc.Vs() / 2); - var f = this.gk.offsetWidth - 2 * e - , g = this.Rh.offsetLeft || this.Rc.x - , g = g - e - , i = -a * c; - i > g && this.Rc.scrollTo(i + e); - c = i - c; - g -= f; - c < g && (!b || b && 8 < i - g) && this.Rc.scrollTo(c + f + e) - }, - OY: function() { - this.Rc = H() ? new Ye(this.gk,{ - Go: t, - iy: q, - ii: t, - xi: t, - xn: t, - OE: q, - Pw: q, - Mx: q - }) : new cf(this.gk) - }, - U: function() { - this.C.style.visibility = "hidden" - }, - show: function() { - this.C.style.visibility = "visible" - } - }); - function cf(a) { - this.C = a; - this.Vg = a.children[0]; - this.Pr = s; - this.Ai = 20; - this.offsetLeft = 0; - this.na() - } - cf.prototype = { - na: function() { - this.Vg.style.position = "relative"; - this.refresh(); - this.ls(); - this.$l() - }, - refresh: function() { - this.ho = this.C.offsetWidth - this.Vs(); - this.aB = -(this.Vg.offsetWidth - this.ho - this.Ai); - this.Ev = this.Ai + this.offsetLeft; - this.Vg.style.left = this.Ev + "px"; - this.Vg.children[0] && (this.Pr = this.Vg.children[0].offsetWidth); - this.jg && (this.jg.children[0].style.marginTop = this.Hr.children[0].style.marginTop = this.jg.offsetHeight / 2 - this.jg.children[0].offsetHeight / 2 + "px") - }, - Vs: function() { - return 2 * this.Ai - }, - ls: function() { - this.Tv = L("div"); - this.Tv.innerHTML = ''; - this.jg = this.Tv.children[0]; - this.Hr = this.Tv.children[1]; - this.C.appendChild(this.Tv); - this.jg.children[0].style.marginTop = this.Hr.children[0].style.marginTop = this.jg.offsetHeight / 2 - this.jg.children[0].offsetHeight / 2 + "px" - }, - $l: function() { - var a = this; - z.M(this.jg, "click", function() { - a.scrollTo(a.Vg.offsetLeft + a.ho) - }); - z.M(this.Hr, "click", function() { - a.scrollTo(a.Vg.offsetLeft - a.ho) - }) - }, - aV: function() { - z.D.Pb(this.jg, "pano_arrow_disable"); - z.D.Pb(this.Hr, "pano_arrow_disable"); - var a = this.Vg.offsetLeft; - a >= this.Ev && z.D.Ua(this.jg, "pano_arrow_disable"); - a - this.ho <= this.aB && z.D.Ua(this.Hr, "pano_arrow_disable") - }, - scrollTo: function(a) { - a = a < this.Vg.offsetLeft ? Math.ceil((a - this.Ai - this.ho) / this.Pr) * this.Pr + this.ho + this.Ai - 8 : Math.ceil((a - this.Ai) / this.Pr) * this.Pr + this.Ai; - a < this.aB ? a = this.aB : a > this.Ev && (a = this.Ev); - var b = this.Vg.offsetLeft - , c = this; - new tb({ - Ic: 60, - kc: ub.Ks, - duration: 300, - va: function(e) { - c.Vg.style.left = b + (a - b) * e + "px" - }, - finish: function() { - c.aV() - } - }) - } - }; - B.Map = Ka; - B.Hotspot = ib; - B.MapType = id; - B.Point = J; - B.Pixel = Q; - B.Size = O; - B.Bounds = fb; - B.TileLayer = Mc; - B.Projection = jc; - B.MercatorProjection = S; - B.PerspectiveProjection = hb; - B.Copyright = function(a, b, c) { - this.id = a; - this.bb = b; - this.content = c - } - ; - B.Overlay = mc; - B.Label = uc; - B.GroundOverlay = vc; - B.PointCollection = zc; - B.Marker = U; - B.CanvasLayer = Cc; - B.Icon = qc; - B.IconSequence = sc; - B.Symbol = rc; - B.Polyline = Gc; - B.Polygon = Fc; - B.InfoWindow = tc; - B.Circle = Hc; - B.Control = Vb; - B.NavigationControl = jb; - B.GeolocationControl = Zb; - B.OverviewMapControl = lb; - B.CopyrightControl = $b; - B.ScaleControl = kb; - B.MapTypeControl = mb; - B.CityListControl = ac; - B.PanoramaControl = cc; - B.TrafficLayer = Vc; - B.CustomLayer = nb; - B.ContextMenu = fc; - B.MenuItem = ic; - B.LocalSearch = cb; - B.TransitRoute = Kd; - B.DrivingRoute = Nd; - B.WalkingRoute = Od; - B.RidingRoute = Pd; - B.Autocomplete = Zd; - B.RouteSearch = Td; - B.Geocoder = Ud; - B.LocalCity = Wd; - B.Geolocation = Geolocation; - B.Convertor = lc; - B.BusLineSearch = Yd; - B.Boundary = Xd; - B.VectorCloudLayer = Tc; - B.VectorTrafficLayer = Uc; - B.Panorama = Oa; - B.PanoramaLabel = ee; - B.PanoramaService = ec; - B.PanoramaCoverageLayer = dc; - B.PanoramaFlashInterface = oe; - function T(a, b) { - for (var c in b) - a[c] = b[c] - } - T(window, { - BMap: B, - _jsload2: function(a, b) { - ia.Wy.ZY && ia.Wy.set(a, b); - K.WV(a, b) - }, - BMAP_API_VERSION: "2.0" - }); - var X = Ka.prototype; - T(X, { - getBounds: X.ve, - getCenter: X.Ka, - getMapType: X.oa, - getSize: X.cb, - setSize: X.Ce, - getViewport: X.ht, - getZoom: X.fa, - centerAndZoom: X.Fd, - panTo: X.qi, - panBy: X.Ag, - setCenter: X.Zf, - setCurrentCity: X.DF, - setMapType: X.Dg, - setViewport: X.yh, - setZoom: X.Qc, - highResolutionEnabled: X.Sx, - zoomTo: X.Gg, - zoomIn: X.kG, - zoomOut: X.lG, - addHotspot: X.Cw, - removeHotspot: X.VZ, - clearHotspots: X.dm, - checkResize: X.ZV, - addControl: X.Aw, - removeControl: X.VN, - getContainer: X.La, - addContextMenu: X.yo, - removeContextMenu: X.Cp, - addOverlay: X.Ga, - removeOverlay: X.Qb, - clearOverlays: X.yK, - openInfoWindow: X.pc, - closeInfoWindow: X.Yc, - pointToOverlayPixel: X.Xe, - overlayPixelToPoint: X.JN, - getInfoWindow: X.hh, - getOverlays: X.Hx, - getPanes: function() { - return { - floatPane: this.Yd.BD, - markerMouseTarget: this.Yd.RE, - floatShadow: this.Yd.sL, - labelPane: this.Yd.KE, - markerPane: this.Yd.fN, - markerShadow: this.Yd.gN, - mapPane: this.Yd.Et, - vertexPane: this.Yd.nP - } - }, - addTileLayer: X.Oe, - removeTileLayer: X.Yf, - pixelToPoint: X.xb, - pointToPixel: X.$b, - setFeatureStyle: X.Lp, - selectBaseElement: X.j5, - setMapStyle: X.Zt, - enable3DBuilding: X.Ro, - disable3DBuilding: X.KW, - getPanorama: X.tm, - initIndoorLayer: X.PY, - setNormalMapDisplay: X.D_ - }); - var df = id.prototype; - T(df, { - getTileLayer: df.oY, - getMinZoom: df.bp, - getMaxZoom: df.sm, - getProjection: df.wm, - getTextColor: df.zm, - getTips: df.gt - }); - T(window, { - BMAP_NORMAL_MAP: La, - BMAP_PERSPECTIVE_MAP: Qa, - BMAP_SATELLITE_MAP: Ya, - BMAP_HYBRID_MAP: Sa - }); - var ef = S.prototype; - T(ef, { - lngLatToPoint: ef.kh, - pointToLngLat: ef.xj - }); - var ff = hb.prototype; - T(ff, { - lngLatToPoint: ff.kh, - pointToLngLat: ff.xj - }); - var gf = fb.prototype; - T(gf, { - equals: gf.pb, - containsPoint: gf.js, - containsBounds: gf.kW, - intersects: gf.ot, - extend: gf.extend, - getCenter: gf.Ka, - isEmpty: gf.tj, - getSouthWest: gf.Ve, - getNorthEast: gf.Rf, - toSpan: gf.YF - }); - var hf = mc.prototype; - T(hf, { - isVisible: hf.jh, - show: hf.show, - hide: hf.U - }); - mc.getZIndex = mc.Ck; - var jf = gb.prototype; - T(jf, { - openInfoWindow: jf.pc, - closeInfoWindow: jf.Yc, - enableMassClear: jf.gj, - disableMassClear: jf.MW, - show: jf.show, - hide: jf.U, - getMap: jf.Dx, - addContextMenu: jf.yo, - removeContextMenu: jf.Cp - }); - var kf = U.prototype; - T(kf, { - setIcon: kf.Rb, - getIcon: kf.ap, - setPosition: kf.sa, - getPosition: kf.ga, - setOffset: kf.Ze, - getOffset: kf.Sf, - getLabel: kf.VD, - setLabel: kf.dn, - setTitle: kf.Ec, - setTop: kf.ui, - enableDragging: kf.Wb, - disableDragging: kf.TC, - setZIndex: kf.Sp, - getMap: kf.Dx, - setAnimation: kf.bn, - setShadow: kf.Oy, - hide: kf.U, - setRotation: kf.Op, - getRotation: kf.TL - }); - T(window, { - BMAP_ANIMATION_DROP: 1, - BMAP_ANIMATION_BOUNCE: 2 - }); - var lf = uc.prototype; - T(lf, { - setStyle: lf.Md, - setStyles: lf.ti, - setContent: lf.dd, - setPosition: lf.sa, - getPosition: lf.ga, - setOffset: lf.Ze, - getOffset: lf.Sf, - setTitle: lf.Ec, - setZIndex: lf.Sp, - getMap: lf.Dx, - getContent: lf.xk - }); - var mf = qc.prototype; - T(mf, { - setImageUrl: mf.mO, - setSize: mf.Ce, - setAnchor: mf.uc, - setImageOffset: mf.Yt, - setImageSize: mf.w_, - setInfoWindowAnchor: mf.z_, - setPrintImageUrl: mf.K_ - }); - var nf = tc.prototype; - T(nf, { - redraw: nf.je, - setTitle: nf.Ec, - setContent: nf.dd, - getContent: nf.xk, - getPosition: nf.ga, - enableMaximize: nf.dh, - disableMaximize: nf.kx, - isOpen: nf.Xa, - setMaxContent: nf.$t, - maximize: nf.hy, - enableAutoPan: nf.Ls - }); - var of = oc.prototype; - T(of, { - getPath: of.Ue, - setPath: of.ke, - setPositionAt: of.gn, - getStrokeColor: of.jY, - setStrokeWeight: of.Rp, - getStrokeWeight: of.WL, - setStrokeOpacity: of.Pp, - getStrokeOpacity: of.kY, - setFillOpacity: of.Xt, - getFillOpacity: of.HX, - setStrokeStyle: of.Qp, - getStrokeStyle: of.VL, - getFillColor: of.GX, - getBounds: of.ve, - enableEditing: of.mf, - disableEditing: of.LW, - getEditing: of.DX - }); - var pf = Hc.prototype; - T(pf, { - setCenter: pf.Zf, - getCenter: pf.Ka, - getRadius: pf.RL, - setRadius: pf.xf - }); - var qf = Fc.prototype; - T(qf, { - getPath: qf.Ue, - setPath: qf.ke, - setPositionAt: qf.gn - }); - var rf = ib.prototype; - T(rf, { - getPosition: rf.ga, - setPosition: rf.sa, - getText: rf.eE, - setText: rf.cu - }); - J.prototype.equals = J.prototype.pb; - Q.prototype.equals = Q.prototype.pb; - O.prototype.equals = O.prototype.pb; - T(window, { - BMAP_ANCHOR_TOP_LEFT: Wb, - BMAP_ANCHOR_TOP_RIGHT: Xb, - BMAP_ANCHOR_BOTTOM_LEFT: Yb, - BMAP_ANCHOR_BOTTOM_RIGHT: 3 - }); - var sf = Vb.prototype; - T(sf, { - setAnchor: sf.uc, - getAnchor: sf.HD, - setOffset: sf.Ze, - getOffset: sf.Sf, - show: sf.show, - hide: sf.U, - isVisible: sf.jh, - toString: sf.toString - }); - var tf = jb.prototype; - T(tf, { - getType: tf.ip, - setType: tf.hn - }); - T(window, { - BMAP_NAVIGATION_CONTROL_LARGE: 0, - BMAP_NAVIGATION_CONTROL_SMALL: 1, - BMAP_NAVIGATION_CONTROL_PAN: 2, - BMAP_NAVIGATION_CONTROL_ZOOM: 3 - }); - var uf = lb.prototype; - T(uf, { - changeView: uf.se, - setSize: uf.Ce, - getSize: uf.cb - }); - var vf = kb.prototype; - T(vf, { - getUnit: vf.sY, - setUnit: vf.LF - }); - T(window, { - BMAP_UNIT_METRIC: "metric", - BMAP_UNIT_IMPERIAL: "us" - }); - var wf = $b.prototype; - T(wf, { - addCopyright: wf.Bw, - removeCopyright: wf.qF, - getCopyright: wf.pm, - getCopyrightCollection: wf.PD - }); - T(window, { - BMAP_MAPTYPE_CONTROL_HORIZONTAL: bc, - BMAP_MAPTYPE_CONTROL_DROPDOWN: 1, - BMAP_MAPTYPE_CONTROL_MAP: 2 - }); - var xf = Mc.prototype; - T(xf, { - getMapType: xf.oa, - getCopyright: xf.pm, - isTransparentPng: xf.zt - }); - var yf = fc.prototype; - T(yf, { - addItem: yf.Dw, - addSeparator: yf.bC, - removeSeparator: yf.sF - }); - var zf = ic.prototype; - T(zf, { - setText: zf.cu - }); - var Af = W.prototype; - T(Af, { - getStatus: Af.xm, - setSearchCompleteCallback: Af.JF, - getPageCapacity: Af.qf, - setPageCapacity: Af.Np, - setLocation: Af.fn, - disableFirstResultSelection: Af.UC, - enableFirstResultSelection: Af.oD, - gotoPage: Af.Am, - searchNearby: Af.Jp, - searchInBounds: Af.an, - search: Af.search - }); - T(window, { - BMAP_STATUS_SUCCESS: 0, - BMAP_STATUS_CITY_LIST: 1, - BMAP_STATUS_UNKNOWN_LOCATION: sd, - BMAP_STATUS_UNKNOWN_ROUTE: 3, - BMAP_STATUS_INVALID_KEY: 4, - BMAP_STATUS_INVALID_REQUEST: 5, - BMAP_STATUS_PERMISSION_DENIED: td, - BMAP_STATUS_SERVICE_UNAVAILABLE: 7, - BMAP_STATUS_TIMEOUT: ud - }); - T(window, { - BMAP_POI_TYPE_NORMAL: 0, - BMAP_POI_TYPE_BUSSTOP: 1, - BMAP_POI_TYPE_BUSLINE: 2, - BMAP_POI_TYPE_SUBSTOP: 3, - BMAP_POI_TYPE_SUBLINE: 4 - }); - T(window, { - BMAP_TRANSIT_POLICY_RECOMMEND: 0, - BMAP_TRANSIT_POLICY_LEAST_TIME: 4, - BMAP_TRANSIT_POLICY_LEAST_TRANSFER: 1, - BMAP_TRANSIT_POLICY_LEAST_WALKING: 2, - BMAP_TRANSIT_POLICY_AVOID_SUBWAYS: 3, - BMAP_TRANSIT_POLICY_FIRST_SUBWAYS: 5, - BMAP_LINE_TYPE_BUS: 0, - BMAP_LINE_TYPE_SUBWAY: 1, - BMAP_LINE_TYPE_FERRY: 2, - BMAP_LINE_TYPE_TRAIN: 3, - BMAP_LINE_TYPE_AIRPLANE: 4, - BMAP_LINE_TYPE_COACH: 5 - }); - T(window, { - BMAP_TRANSIT_TYPE_POLICY_TRAIN: 0, - BMAP_TRANSIT_TYPE_POLICY_AIRPLANE: 1, - BMAP_TRANSIT_TYPE_POLICY_COACH: 2 - }); - T(window, { - BMAP_INTERCITY_POLICY_LEAST_TIME: 0, - BMAP_INTERCITY_POLICY_EARLY_START: 1, - BMAP_INTERCITY_POLICY_CHEAP_PRICE: 2 - }); - T(window, { - BMAP_TRANSIT_TYPE_IN_CITY: 0, - BMAP_TRANSIT_TYPE_CROSS_CITY: 1 - }); - T(window, { - BMAP_TRANSIT_PLAN_TYPE_ROUTE: 0, - BMAP_TRANSIT_PLAN_TYPE_LINE: 1 - }); - var Bf = Jd.prototype; - T(Bf, { - clearResults: Bf.Pe - }); - Ld = Kd.prototype; - T(Ld, { - setPolicy: Ld.bu, - toString: Ld.toString, - setPageCapacity: Ld.Np, - setIntercityPolicy: Ld.oO, - setTransitTypePolicy: Ld.xO - }); - T(window, { - BMAP_DRIVING_POLICY_DEFAULT: 0, - BMAP_DRIVING_POLICY_AVOID_HIGHWAYS: 3, - BMAP_DRIVING_POLICY_AVOID_CONGESTION: 5, - BMAP_DRIVING_POLICY_FIRST_HIGHWAYS: 4 - }); - T(window, { - BMAP_MODE_DRIVING: "driving", - BMAP_MODE_TRANSIT: "transit", - BMAP_MODE_WALKING: "walking", - BMAP_MODE_NAVIGATION: "navigation" - }); - var Cf = Td.prototype; - T(Cf, { - routeCall: Cf.gO - }); - T(window, { - BMAP_HIGHLIGHT_STEP: 1, - BMAP_HIGHLIGHT_ROUTE: 2 - }); - T(window, { - BMAP_ROUTE_TYPE_DRIVING: wd, - BMAP_ROUTE_TYPE_WALKING: vd, - BMAP_ROUTE_TYPE_RIDING: xd - }); - T(window, { - BMAP_ROUTE_STATUS_NORMAL: yd, - BMAP_ROUTE_STATUS_EMPTY: 1, - BMAP_ROUTE_STATUS_ADDRESS: 2 - }); - var Df = Nd.prototype; - T(Df, { - setPolicy: Df.bu - }); - var Ef = Zd.prototype; - T(Ef, { - show: Ef.show, - hide: Ef.U, - setTypes: Ef.KF, - setLocation: Ef.fn, - search: Ef.search, - setInputValue: Ef.Ly - }); - T(nb.prototype, {}); - var Ff = Xd.prototype; - T(Ff, { - get: Ff.get - }); - T(dc.prototype, {}); - T(db.prototype, {}); - T(window, { - BMAP_POINT_DENSITY_HIGH: 200, - BMAP_POINT_DENSITY_MEDIUM: Yc, - BMAP_POINT_DENSITY_LOW: 50 - }); - T(window, { - BMAP_POINT_SHAPE_STAR: 1, - BMAP_POINT_SHAPE_WATERDROP: 2, - BMAP_POINT_SHAPE_CIRCLE: wc, - BMAP_POINT_SHAPE_SQUARE: 4, - BMAP_POINT_SHAPE_RHOMBUS: 5 - }); - T(window, { - BMAP_POINT_SIZE_TINY: 1, - BMAP_POINT_SIZE_SMALLER: 2, - BMAP_POINT_SIZE_SMALL: 3, - BMAP_POINT_SIZE_NORMAL: xc, - BMAP_POINT_SIZE_BIG: 5, - BMAP_POINT_SIZE_BIGGER: 6, - BMAP_POINT_SIZE_HUGE: 7 - }); - T(window, { - BMap_Symbol_SHAPE_CAMERA: 11, - BMap_Symbol_SHAPE_WARNING: 12, - BMap_Symbol_SHAPE_SMILE: 13, - BMap_Symbol_SHAPE_CLOCK: 14, - BMap_Symbol_SHAPE_POINT: 9, - BMap_Symbol_SHAPE_PLANE: 10, - BMap_Symbol_SHAPE_CIRCLE: 1, - BMap_Symbol_SHAPE_RECTANGLE: 2, - BMap_Symbol_SHAPE_RHOMBUS: 3, - BMap_Symbol_SHAPE_STAR: 4, - BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW: 5, - BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW: 6, - BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW: 7, - BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW: 8 - }); - T(window, { - BMAP_CONTEXT_MENU_ICON_ZOOMIN: gc, - BMAP_CONTEXT_MENU_ICON_ZOOMOUT: hc - }); - T(window, { - BMAP_SYS_DRAWER: Ja, - BMAP_SVG_DRAWER: 1, - BMAP_VML_DRAWER: 2, - BMAP_CANVAS_DRAWER: 3, - BMAP_SVG_DRAWER_FIRST: 4 - }); - B.vV(); - B.Q0(); -} -)() diff --git a/static/BMap/js/map_city.js b/static/BMap/js/map_city.js deleted file mode 100644 index 97cc86d..0000000 --- a/static/BMap/js/map_city.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 离线地图城市坐标 - * 文本文件必须以UTF-8编码存储,建议用Notepad++编辑 - * 格式:城市名称 经度 纬度 - */ -var offlinemap_cities = [ - ['北京', 116.427265, 39.918698] - ,['上海', 121.472724, 31.239761] - ,['武汉', 114.28398, 30.601327] - ,['成都', 104.070606, 30.59138] - ,['广州', 113.270404, 23.159763] - ,['重庆', 106.595635, 29.619598] -]; - - -/* 城市数据映射 - * - */ -var offlinemap_cityobj = new Object(); -for(var i=0; i'); - //加载扩展函数 - // document.write(''); - //加载城市坐标 - // document.write(''); -})(); -/////////////////////////////////////////////////////////////////// diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls1d3.gif b/static/BMap/images/mapctrls1d3.gif deleted file mode 100644 index 522c6f8..0000000 --- a/static/BMap/images/mapctrls1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls2d0.png b/static/BMap/images/mapctrls2d0.png deleted file mode 100644 index fc6b518..0000000 --- a/static/BMap/images/mapctrls2d0.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/marker_red_sprite.png b/static/BMap/images/marker_red_sprite.png deleted file mode 100644 index 38a5900..0000000 --- a/static/BMap/images/marker_red_sprite.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/openhand.cur b/static/BMap/images/openhand.cur deleted file mode 100644 index cb444f9..0000000 --- a/static/BMap/images/openhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.jpg b/static/BMap/images/simulator.jpg deleted file mode 100644 index 7eccb40..0000000 --- a/static/BMap/images/simulator.jpg +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.png b/static/BMap/images/simulator.png deleted file mode 100644 index 981b8d7..0000000 --- a/static/BMap/images/simulator.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/st-close.png b/static/BMap/images/st-close.png deleted file mode 100644 index b516fa2..0000000 --- a/static/BMap/images/st-close.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/well-gas.svg b/static/BMap/images/well-gas.svg deleted file mode 100644 index 50cdd83..0000000 --- a/static/BMap/images/well-gas.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-heat.svg b/static/BMap/images/well-heat.svg deleted file mode 100644 index baee123..0000000 --- a/static/BMap/images/well-heat.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-power.svg b/static/BMap/images/well-power.svg deleted file mode 100644 index e731bcd..0000000 --- a/static/BMap/images/well-power.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-rain.svg b/static/BMap/images/well-rain.svg deleted file mode 100644 index f2ef906..0000000 --- a/static/BMap/images/well-rain.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-sewage.svg b/static/BMap/images/well-sewage.svg deleted file mode 100644 index a9a1662..0000000 --- a/static/BMap/images/well-sewage.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/js/apiv1.3.min.js b/static/BMap/js/apiv1.3.min.js deleted file mode 100644 index 63c0ac1..0000000 --- a/static/BMap/js/apiv1.3.min.js +++ /dev/null @@ -1,6424 +0,0 @@ -window.BMAP_AUTHENTIC_KEY = ""; -(function() { - var b2, a8 = b2 = a8 || { - version : "1.3.4" - }; - a8.guid = "$BAIDU$"; - window[a8.guid] = window[a8.guid] || {}; - a8.object = a8.object || {}; - a8.extend = a8.object.extend = function(cM, T) { - for ( var cL in T) { - if (T.hasOwnProperty(cL)) { - cM[cL] = T[cL] - } - } - return cM - }; - a8.dom = a8.dom || {}; - a8.dom.g = function(T) { - if ("string" == typeof T || T instanceof String) { - return document.getElementById(T) - } else { - if (T && T.nodeName && (T.nodeType == 1 || T.nodeType == 9)) { - return T - } - } - return null - }; - a8.g = a8.G = a8.dom.g; - a8.dom.hide = function(T) { - T = a8.dom.g(T); - T.style.display = "none"; - return T - }; - a8.hide = a8.dom.hide; - a8.lang = a8.lang || {}; - a8.lang.isString = function(T) { - return "[object String]" == Object.prototype.toString.call(T) - }; - a8.isString = a8.lang.isString; - a8.dom._g = function(T) { - if (a8.lang.isString(T)) { - return document.getElementById(T) - } - return T - }; - a8._g = a8.dom._g; - a8.dom.contains = function(T, cL) { - var cM = a8.dom._g; - T = cM(T); - cL = cM(cL); - return T.contains ? T != cL && T.contains(cL) : !!(T - .compareDocumentPosition(cL) & 16) - }; - a8.browser = a8.browser || {}; - if (/msie (\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.ie = a8.ie = document.documentMode || +RegExp["\x241"] - } - a8.dom._NAME_ATTRS = (function() { - var T = { - cellpadding : "cellPadding", - cellspacing : "cellSpacing", - colspan : "colSpan", - rowspan : "rowSpan", - valign : "vAlign", - usemap : "useMap", - frameborder : "frameBorder" - }; - if (a8.browser.ie < 8) { - T["for"] = "htmlFor"; - T["class"] = "className" - } else { - T.htmlFor = "for"; - T.className = "class" - } - return T - })(); - a8.dom.setAttr = function(cL, T, cM) { - cL = a8.dom.g(cL); - if ("style" == T) { - cL.style.cssText = cM - } else { - T = a8.dom._NAME_ATTRS[T] || T; - cL.setAttribute(T, cM) - } - return cL - }; - a8.setAttr = a8.dom.setAttr; - a8.dom.setAttrs = function(cM, T) { - cM = a8.dom.g(cM); - for ( var cL in T) { - a8.dom.setAttr(cM, cL, T[cL]) - } - return cM - }; - a8.setAttrs = a8.dom.setAttrs; - a8.string = a8.string || {}; - (function() { - var T = new RegExp( - "(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+\x24)", "g"); - a8.string.trim = function(cL) { - return String(cL).replace(T, "") - } - })(); - a8.trim = a8.string.trim; - a8.string.format = function(cM, T) { - cM = String(cM); - var cL = Array.prototype.slice.call(arguments, 1), cN = Object.prototype.toString; - if (cL.length) { - cL = cL.length == 1 ? (T !== null - && (/\[object Array\]|\[object Object\]/.test(cN.call(T))) ? T - : cL) - : cL; - return cM.replace(/#\{(.+?)\}/g, function(cO, cQ) { - var cP = cL[cQ]; - if ("[object Function]" == cN.call(cP)) { - cP = cP(cQ) - } - return ("undefined" == typeof cP ? "" : cP) - }) - } - return cM - }; - a8.format = a8.string.format; - a8.dom.removeClass = function(cP, cQ) { - cP = a8.dom.g(cP); - var cN = cP.className.split(/\s+/), cR = cQ.split(/\s+/), cL, T = cR.length, cM, cO = 0; - for (; cO < T; ++cO) { - for (cM = 0, cL = cN.length; cM < cL; ++cM) { - if (cN[cM] == cR[cO]) { - cN.splice(cM, 1); - break - } - } - } - cP.className = cN.join(" "); - return cP - }; - a8.removeClass = a8.dom.removeClass; - a8.dom.insertHTML = function(cN, T, cM) { - cN = a8.dom.g(cN); - var cL, cO; - if (cN.insertAdjacentHTML) { - cN.insertAdjacentHTML(T, cM) - } else { - cL = cN.ownerDocument.createRange(); - T = T.toUpperCase(); - if (T == "AFTERBEGIN" || T == "BEFOREEND") { - cL.selectNodeContents(cN); - cL.collapse(T == "AFTERBEGIN") - } else { - cO = T == "BEFOREBEGIN"; - cL[cO ? "setStartBefore" : "setEndAfter"](cN); - cL.collapse(cO) - } - cL.insertNode(cL.createContextualFragment(cM)) - } - return cN - }; - a8.insertHTML = a8.dom.insertHTML; - a8.dom.show = function(T) { - T = a8.dom.g(T); - T.style.display = ""; - return T - }; - a8.show = a8.dom.show; - a8.dom.getDocument = function(T) { - T = a8.dom.g(T); - return T.nodeType == 9 ? T : T.ownerDocument || T.document - }; - a8.dom.addClass = function(cP, cQ) { - cP = a8.dom.g(cP); - var cL = cQ.split(/\s+/), T = cP.className, cO = " " + T + " ", cN = 0, cM = cL.length; - for (; cN < cM; cN++) { - if (cO.indexOf(" " + cL[cN] + " ") < 0) { - T += " " + cL[cN] - } - } - cP.className = T; - return cP - }; - a8.addClass = a8.dom.addClass; - a8.dom._styleFixer = a8.dom._styleFixer || {}; - a8.dom._styleFilter = a8.dom._styleFilter || []; - a8.dom._styleFilter.filter = function(cL, cO, cP) { - for ( var T = 0, cN = a8.dom._styleFilter, cM; cM = cN[T]; T++) { - if (cM = cM[cP]) { - cO = cM(cL, cO) - } - } - return cO - }; - a8.string.toCamelCase = function(T) { - if (T.indexOf("-") < 0 && T.indexOf("_") < 0) { - return T - } - return T.replace(/[-_][^-_]/g, function(cL) { - return cL.charAt(1).toUpperCase() - }) - }; - a8.dom.getStyle = function(cM, cL) { - var cP = a8.dom; - cM = cP.g(cM); - cL = a8.string.toCamelCase(cL); - var cO = cM.style[cL]; - if (!cO) { - var T = cP._styleFixer[cL], cN = cM.currentStyle - || (a8.browser.ie ? cM.style : getComputedStyle(cM, null)); - cO = T && T.get ? T.get(cM, cN) : cN[T || cL] - } - if (T = cP._styleFilter) { - cO = T.filter(cL, cO, "get") - } - return cO - }; - a8.getStyle = a8.dom.getStyle; - if (/opera\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.opera = +RegExp["\x241"] - } - a8.browser.isWebkit = /webkit/i.test(navigator.userAgent); - a8.browser.isGecko = /gecko/i.test(navigator.userAgent) - && !/like gecko/i.test(navigator.userAgent); - a8.browser.isStrict = document.compatMode == "CSS1Compat"; - a8.dom.getPosition = function(T) { - T = a8.dom.g(T); - var cT = a8.dom.getDocument(T), cN = a8.browser, cQ = a8.dom.getStyle, cM = cN.isGecko > 0 - && cT.getBoxObjectFor - && cQ(T, "position") == "absolute" - && (T.style.top === "" || T.style.left === ""), cR = { - left : 0, - top : 0 - }, cP = (cN.ie && !cN.isStrict) ? cT.body : cT.documentElement, cU, cL; - if (T == cP) { - return cR - } - if (T.getBoundingClientRect) { - cL = T.getBoundingClientRect(); - cR.left = Math.floor(cL.left) - + Math.max(cT.documentElement.scrollLeft, - cT.body.scrollLeft); - cR.top = Math.floor(cL.top) - + Math.max(cT.documentElement.scrollTop, cT.body.scrollTop); - cR.left -= cT.documentElement.clientLeft; - cR.top -= cT.documentElement.clientTop; - var cS = cT.body, cV = parseInt(cQ(cS, "borderLeftWidth")), cO = parseInt(cQ( - cS, "borderTopWidth")); - if (cN.ie && !cN.isStrict) { - cR.left -= isNaN(cV) ? 2 : cV; - cR.top -= isNaN(cO) ? 2 : cO - } - } else { - cU = T; - do { - cR.left += cU.offsetLeft; - cR.top += cU.offsetTop; - if (cN.isWebkit > 0 && cQ(cU, "position") == "fixed") { - cR.left += cT.body.scrollLeft; - cR.top += cT.body.scrollTop; - break - } - cU = cU.offsetParent - } while (cU && cU != T); - if (cN.opera > 0 - || (cN.isWebkit > 0 && cQ(T, "position") == "absolute")) { - cR.top -= cT.body.offsetTop - } - cU = T.offsetParent; - while (cU && cU != cT.body) { - cR.left -= cU.scrollLeft; - if (!cN.opera || cU.tagName != "TR") { - cR.top -= cU.scrollTop - } - cU = cU.offsetParent - } - } - return cR - }; - if (/firefox\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.firefox = +RegExp["\x241"] - } - (function() { - var T = navigator.userAgent; - if (/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(T) - && !/chrome/i.test(T)) { - a8.browser.safari = +(RegExp["\x241"] || RegExp["\x242"]) - } - })(); - if (/chrome\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.chrome = +RegExp["\x241"] - } - a8.array = a8.array || {}; - a8.array.each = function(cP, cN) { - var cM, cO, cL, T = cP.length; - if ("function" == typeof cN) { - for (cL = 0; cL < T; cL++) { - cO = cP[cL]; - cM = cN.call(cP, cO, cL); - if (cM === false) { - break - } - } - } - return cP - }; - a8.each = a8.array.each; - a8.lang.guid = function() { - return "TANGRAM__" + (window[a8.guid]._counter++).toString(36) - }; - window[a8.guid]._counter = window[a8.guid]._counter || 1; - window[a8.guid]._instances = window[a8.guid]._instances || {}; - a8.lang.isFunction = function(T) { - return "[object Function]" == Object.prototype.toString.call(T) - }; - a8.lang.Class = function(T) { - this.guid = T || a8.lang.guid(); - window[a8.guid]._instances[this.guid] = this - }; - window[a8.guid]._instances = window[a8.guid]._instances || {}; - a8.lang.Class.prototype.dispose = function() { - delete window[a8.guid]._instances[this.guid]; - for ( var T in this) { - if (!a8.lang.isFunction(this[T])) { - delete this[T] - } - } - this.disposed = true - }; - a8.lang.Class.prototype.toString = function() { - return "[object " + (this._className || "Object") + "]" - }; - a8.lang.Event = function(T, cL) { - this.type = T; - this.returnValue = true; - this.target = cL || null; - this.currentTarget = null - }; - a8.lang.Class.prototype.addEventListener = function(cN, cM, cL) { - if (!a8.lang.isFunction(cM)) { - return - } - !this.__listeners && (this.__listeners = {}); - var T = this.__listeners, cO; - if (typeof cL == "string" && cL) { - if (/[^\w\-]/.test(cL)) { - throw ("nonstandard key:" + cL) - } else { - cM.hashCode = cL; - cO = cL - } - } - cN.indexOf("on") != 0 && (cN = "on" + cN); - typeof T[cN] != "object" && (T[cN] = {}); - cO = cO || a8.lang.guid(); - cM.hashCode = cO; - T[cN][cO] = cM - }; - a8.lang.Class.prototype.removeEventListener = function(cM, cL) { - if (a8.lang.isFunction(cL)) { - cL = cL.hashCode - } else { - if (!a8.lang.isString(cL)) { - return - } - } - !this.__listeners && (this.__listeners = {}); - cM.indexOf("on") != 0 && (cM = "on" + cM); - var T = this.__listeners; - if (!T[cM]) { - return - } - T[cM][cL] && delete T[cM][cL] - }; - a8.lang.Class.prototype.dispatchEvent = function(cN, T) { - if (a8.lang.isString(cN)) { - cN = new a8.lang.Event(cN) - } - !this.__listeners && (this.__listeners = {}); - T = T || {}; - for ( var cM in T) { - cN[cM] = T[cM] - } - var cM, cL = this.__listeners, cO = cN.type; - cN.target = cN.target || this; - cN.currentTarget = this; - cO.indexOf("on") != 0 && (cO = "on" + cO); - a8.lang.isFunction(this[cO]) && this[cO].apply(this, arguments); - if (typeof cL[cO] == "object") { - for (cM in cL[cO]) { - cL[cO][cM].apply(this, arguments) - } - } - return cN.returnValue - }; - a8.lang.inherits = function(cQ, cO, cN) { - var cM, cP, T = cQ.prototype, cL = new Function(); - cL.prototype = cO.prototype; - cP = cQ.prototype = new cL(); - for (cM in T) { - cP[cM] = T[cM] - } - cQ.prototype.constructor = cQ; - cQ.superClass = cO.prototype; - if ("string" == typeof cN) { - cP._className = cN - } - }; - a8.inherits = a8.lang.inherits; - a8.lang.instance = function(T) { - return window[a8.guid]._instances[T] || null - }; - a8.platform = a8.platform || {}; - a8.platform.isMacintosh = /macintosh/i.test(navigator.userAgent); - a8.platform.isWindows = /windows/i.test(navigator.userAgent); - a8.platform.isX11 = /x11/i.test(navigator.userAgent); - a8.platform.isAndroid = /android/i.test(navigator.userAgent); - a8.platform.isIpad = /ipad/i.test(navigator.userAgent); - a8.platform.isIphone = /iphone/i.test(navigator.userAgent); - a8.lang.Event.prototype.inherit = function(cM) { - var cL = this; - this.domEvent = cM = window.event || cM; - cL.clientX = cM.clientX || cM.pageX; - cL.clientY = cM.clientY || cM.pageY; - cL.offsetX = cM.offsetX || cM.layerX; - cL.offsetY = cM.offsetY || cM.layerY; - cL.screenX = cM.screenX; - cL.screenY = cM.screenY; - cL.ctrlKey = cM.ctrlKey || cM.metaKey; - cL.shiftKey = cM.shiftKey; - cL.altKey = cM.altKey; - if (cM.touches) { - cL.touches = []; - for ( var T = 0; T < cM.touches.length; T++) { - cL.touches.push( { - clientX : cM.touches[T].clientX, - clientY : cM.touches[T].clientY, - screenX : cM.touches[T].screenX, - screenY : cM.touches[T].screenY, - pageX : cM.touches[T].pageX, - pageY : cM.touches[T].pageY, - target : cM.touches[T].target, - identifier : cM.touches[T].identifier - }) - } - } - if (cM.changedTouches) { - cL.changedTouches = []; - for ( var T = 0; T < cM.changedTouches.length; T++) { - cL.changedTouches.push( { - clientX : cM.changedTouches[T].clientX, - clientY : cM.changedTouches[T].clientY, - screenX : cM.changedTouches[T].screenX, - screenY : cM.changedTouches[T].screenY, - pageX : cM.changedTouches[T].pageX, - pageY : cM.changedTouches[T].pageY, - target : cM.changedTouches[T].target, - identifier : cM.changedTouches[T].identifier - }) - } - } - if (cM.targetTouches) { - cL.targetTouches = []; - for ( var T = 0; T < cM.targetTouches.length; T++) { - cL.targetTouches.push( { - clientX : cM.targetTouches[T].clientX, - clientY : cM.targetTouches[T].clientY, - screenX : cM.targetTouches[T].screenX, - screenY : cM.targetTouches[T].screenY, - pageX : cM.targetTouches[T].pageX, - pageY : cM.targetTouches[T].pageY, - target : cM.targetTouches[T].target, - identifier : cM.targetTouches[T].identifier - }) - } - } - cL.rotation = cM.rotation; - cL.scale = cM.scale; - return cL - }; - a8.lang.decontrol = function(cL) { - var T = window[a8.guid]; - T._instances && (delete T._instances[cL]) - }; - a8.event = {}; - a8.on = a8.event.on = function(cM, cL, T) { - if (!(cM = a8.g(cM))) { - return cM - } - cL = cL.replace(/^on/, ""); - if (cM.addEventListener) { - cM.addEventListener(cL, T, false) - } else { - if (cM.attachEvent) { - cM.attachEvent("on" + cL, T) - } - } - return cM - }; - a8.un = a8.event.un = function(cM, cL, T) { - if (!(cM = a8.g(cM))) { - return cM - } - cL = cL.replace(/^on/, ""); - if (cM.removeEventListener) { - cM.removeEventListener(cL, T, false) - } else { - if (cM.detachEvent) { - cM.detachEvent("on" + cL, T) - } - } - return cM - }; - a8.dom.hasClass = function(cM, cL) { - if (!cM || !cM.className || typeof cM.className != "string") { - return false - } - var T = -1; - try { - T = cM.className == cL - || cM.className.search(new RegExp("(\\s|^)" + cL - + "(\\s|$)")) - } catch (cN) { - return false - } - return T > -1 - }; - window.BMap = window.BMap || {}; - window.BMap.version = "1.3"; - window.BMap._register = []; - window.BMap.register = function(T) { - this._register.push(T) - }; - window.BMap.apiLoad = window.BMap.apiLoad || function() { - }; - var bJ = window.BMAP_AUTHENTIC_KEY; - window.BMAP_AUTHENTIC_KEY = null; - function bz(cN, cP) { - cN = a8.g(cN); - if (!cN) { - return - } - var cO = this; - a8.lang.Class.call(cO); - cO.config = { - clickInterval : 200, - enableDragging : true, - enableKeyboard : false, - enableDblclickZoom : true, - enableContinuousZoom : false, - enableWheelZoom : false, - enableMouseDown : true, - enablePinchToZoom : true, - enableAutoResize : true, - fps : 25, - zoomerDuration : 240, - actionDuration : 450, - defaultCursor : cc.defaultCursor, - draggingCursor : cc.draggingCursor, - isOverviewMap : false, - minZoom : 1, - maxZoom : 18, - mapType : BMAP_NORMAL_MAP, - restrictBounds : false, - drawer : BMAP_SYS_DRAWER, - enableInertialDragging : false, - drawMargin : 500, - enableHighResolution : false - }; - a8.extend(cO.config, cP || {}); - if (cO.highResolutionEnabled()) { - var cR = document.querySelector("meta[name=viewport]"); - cR.content = "initial-scale=0.5, minimum-scale=0.5, maximum-scale=0.5, user-scalable=no, target-densitydpi=high-dpi" - } - cO.container = cN; - cO._setStyle(cN); - cN.unselectable = "on"; - cN.innerHTML = ""; - cN.appendChild(cO.render()); - var cL = cO.getSize(); - cO.width = cL.width; - cO.height = cL.height; - cO.offsetX = 0; - cO.offsetY = 0; - cO.platform = cN.firstChild; - cO.maskLayer = cO.platform.firstChild; - cO.maskLayer.style.width = cO.width + "px"; - cO.maskLayer.style.height = cO.height + "px"; - cO._panes = {}; - cO.centerPoint = new cd(0, 0); - cO.mercatorCenter = new cd(0, 0); - cO.zoomLevel = 1; - cO.lastLevel = 0; - cO.defaultZoomLevel = null; - cO.defaultCenter = null; - cO.currentCity = ""; - cO.cityCode = ""; - cO._hotspots = {}; - cO.currentOperation = 0; - cP = cP || {}; - var cQ = cO.mapType = cO.config.mapType; - cO.projection = cQ.getProjection(); - if (cQ === BMAP_PERSPECTIVE_MAP) { - _addStat(5002) - } - if (cQ === BMAP_SATELLITE_MAP || cQ === BMAP_HYBRID_MAP) { - _addStat(5003) - } - var T = cO.config; - T.userMinZoom = cP.minZoom; - T.userMaxZoom = cP.maxZoom; - cO._checkZoom(); - cO.temp = { - operating : false, - arrow : 0, - lastDomMoveTime : 0, - lastLoadTileTime : 0, - lastMovingTime : 0, - canKeyboard : false, - registerIndex : -1, - curSpots : [] - }; - cO.platform.style.cursor = cO.config.defaultCursor; - for ( var cM = 0; cM < BMap._register.length; cM++) { - BMap._register[cM](cO) - } - cO.temp.registerIndex = cM; - cO._bind(); - cA.load("map", function() { - cO._draw() - }); - if (bO()) { - cA.load("oppc", function() { - cO._asyncRegister() - }) - } - if (aA()) { - cA.load("opmb", function() { - cO._asyncRegister() - }) - } - cN = null - } - a8.lang.inherits(bz, a8.lang.Class, "Map"); - a8 - .extend( - bz.prototype, - { - render : function() { - var T = aa("div"); - var cN = T.style; - cN.overflow = "visible"; - cN.position = "absolute"; - cN.zIndex = "0"; - cN.top = cN.left = "0px"; - var cL = aa("div", { - "class" : "BMap_mask" - }); - var cM = cL.style; - cM.position = "absolute"; - cM.top = cM.left = "0px"; - cM.zIndex = "9"; - cM.overflow = "hidden"; - cM.WebkitUserSelect = "none"; - T.appendChild(cL); - return T - }, - _setStyle : function(cL) { - var T = cL.style; - T.overflow = "hidden"; - if (aJ(cL).position != "absolute") { - T.position = "relative"; - T.zIndex = 0 - } - T.backgroundColor = "#F3F1EC"; - T.color = "#000"; - T.textAlign = "left" - }, - _bind : function() { - var T = this; - T._watchSize = function() { - var cL = T.getSize(); - if (T.width != cL.width - || T.height != cL.height) { - var cN = new aH(T.width, T.height); - var cO = new bg("onbeforeresize"); - cO.size = cN; - T.dispatchEvent(cO); - T._updateCenterPoint( - (cL.width - T.width) / 2, - (cL.height - T.height) / 2); - T.maskLayer.style.width = (T.width = cL.width) - + "px"; - T.maskLayer.style.height = (T.height = cL.height) - + "px"; - var cM = new bg("onresize"); - cM.size = cL; - T.dispatchEvent(cM) - } - }; - if (T.config.enableAutoResize) { - T.temp.autoResizeTimer = setInterval( - T._watchSize, 80) - } - }, - _updateCenterPoint : function(cN, cL, cR, cQ) { - var cO = this.getMapType().getZoomUnits( - this.getZoom()); - var cS = this.projection; - var cP = true; - if (cR && cd.isInRange(cR)) { - this.centerPoint = new cd(cR.lng, cR.lat); - cP = false - } - var cM = (cR && cQ) ? cS.lngLatToMercator(cR, - this.currentCity) : this.mercatorCenter; - if (cM) { - this.mercatorCenter = new cd(cM.lng + cN * cO, - cM.lat - cL * cO); - var T = cS.mercatorToLngLat( - this.mercatorCenter, this.currentCity); - if (T && cP) { - this.centerPoint = T - } - } - }, - zoomTo : function(cN, cL) { - if (!aK(cN)) { - return - } - cN = this._getProperZoom(cN).zoom; - if (cN == this.zoomLevel) { - return - } - this.lastLevel = this.zoomLevel; - this.zoomLevel = cN; - var cM; - if (cL) { - cM = cL - } else { - if (this.getInfoWindow()) { - cM = this.getInfoWindow().getPosition() - } - } - if (cM) { - var T = this.pointToPixel(cM, this.lastLevel); - this._updateCenterPoint(this.width / 2 - T.x, - this.height / 2 - T.y, - this.pixelToPoint(T, this.lastLevel), - true) - } - this.dispatchEvent(new bg("onzoomstart")); - this.dispatchEvent(new bg("onzoomstartcode")) - }, - setZoom : function(T) { - this.zoomTo(T) - }, - zoomIn : function(T) { - this.zoomTo(this.zoomLevel + 1, T) - }, - zoomOut : function(T) { - this.zoomTo(this.zoomLevel - 1, T) - }, - panTo : function(T, cL) { - if (!(T instanceof cd)) { - return - } - this.mercatorCenter = this.projection - .lngLatToMercator(T, this.currentCity); - if (cd.isInRange(T)) { - this.centerPoint = new cd(T.lng, T.lat) - } else { - this.centerPoint = this.projection - .mercatorToLngLat(this.mercatorCenter, - this.currentCity) - } - }, - panBy : function(cL, T) { - cL = Math.round(cL) || 0; - T = Math.round(T) || 0; - this._updateCenterPoint(-cL, -T) - }, - addControl : function(T) { - if (T && I(T._i)) { - T._i(this); - this.dispatchEvent(new bg("onaddcontrol", T)) - } - }, - removeControl : function(T) { - if (T && I(T.remove)) { - T.remove(); - this - .dispatchEvent(new bg( - "onremovecontrol", T)) - } - }, - addContextMenu : function(T) { - if (T && I(T.initialize)) { - T.initialize(this); - this - .dispatchEvent(new bg( - "onaddcontextmenu", T)) - } - }, - removeContextMenu : function(T) { - if (T && I(T.remove)) { - this.dispatchEvent(new bg( - "onremovecontextmenu", T)); - T.remove() - } - }, - addOverlay : function(T) { - if (T && I(T._i)) { - T._i(this); - this.dispatchEvent(new bg("onaddoverlay", T)) - } - }, - removeOverlay : function(T) { - if (T && I(T.remove)) { - T.remove(); - this - .dispatchEvent(new bg( - "onremoveoverlay", T)) - } - }, - clearOverlays : function() { - this.dispatchEvent(new bg("onclearoverlays")) - }, - addTileLayer : function(T) { - if (T) { - this.dispatchEvent(new bg("onaddtilelayer", T)) - } - }, - removeTileLayer : function(T) { - if (T) { - this.dispatchEvent(new bg("onremovetilelayer", - T)) - } - }, - setMapType : function(cL) { - if (this.mapType === cL) { - return - } - var cM = new bg("onsetmaptype"); - var T = this.mapType; - cM.preMapType = T; - this.mapType = this.config.mapType = cL; - this.projection = this.mapType.getProjection(); - this._updateCenterPoint(0, 0, this.getCenter(), - true); - this._checkZoom(); - var cN = this._getProperZoom(this.getZoom()).zoom; - this.zoomTo(cN); - this.dispatchEvent(cM); - var cM = new bg("onmaptypechange"); - cM.zoomLevel = cN; - cM.mapType = cL; - this.dispatchEvent(cM); - if (cL === BMAP_SATELLITE_MAP - || cL === BMAP_HYBRID_MAP) { - _addStat(5003) - } - }, - setCenter : function(T) { - var cM = this; - if (T instanceof cd) { - cM.panTo(T, { - noAnimation : true - }) - } else { - if (b3(T)) { - var cL = this._getLocal(); - cL.setSearchCompleteCallback(function(cN) { - if (cL.getStatus() == 0 - && cL._json.result.type == 2) { - cM.setCenter(cN.getPoi(0).point); - if (BMAP_PERSPECTIVE_MAP - .getCityName(T)) { - cM.setCurrentCity(T) - } - } - }); - cL.search(T) - } - } - }, - centerAndZoom : function(T, cM) { - var cL = this; - if (b3(T)) { - var cP = cL._getLocal(); - cP - .setSearchCompleteCallback(function(cQ) { - if (cP.getStatus() == 0 - && cP._json.result.type == 2) { - var cS = cQ.getPoi(0).point; - var cR = cM - || S - .getBestLevel( - cP._json.content.level, - cL); - cL.centerAndZoom(cS, cR); - if (BMAP_PERSPECTIVE_MAP - .getCityName(T)) { - cL.setCurrentCity(T) - } - } - }); - cP.search(T); - return - } - if (!(T instanceof cd) || !cM) { - return - } - cM = cL._getProperZoom(cM).zoom; - cL.lastLevel = cL.zoomLevel || cM; - cL.zoomLevel = cM; - cL.centerPoint = new cd(T.lng, T.lat); - cL.mercatorCenter = cL.projection.lngLatToMercator( - cL.centerPoint, cL.currentCity); - cL.defaultZoomLevel = cL.defaultZoomLevel - || cL.zoomLevel; - cL.defaultCenter = cL.defaultCenter - || cL.centerPoint; - var cO = new bg("onload"); - var cN = new bg("onloadcode"); - cO.point = new cd(T.lng, T.lat); - cO.pixel = cL.pointToPixel(cL.centerPoint, - cL.zoomLevel); - cO.zoom = cM; - if (!cL.loaded) { - cL.loaded = true; - cL.dispatchEvent(cO) - } - cL.dispatchEvent(cN); - cL.dispatchEvent(new bg("onmoveend")); - if (cL.lastLevel != cL.zoomLevel) { - cL.dispatchEvent(new bg("onzoomend")) - } - }, - _getLocal : function() { - if (!this.temp.local) { - this.temp.local = new a4(1) - } - return this.temp.local - }, - reset : function() { - this.centerAndZoom(this.defaultCenter, - this.defaultZoomLevel, true) - }, - enableDragging : function() { - this.config.enableDragging = true - }, - disableDragging : function() { - this.config.enableDragging = false - }, - enableInertialDragging : function() { - this.config.enableInertialDragging = true - }, - disableInertialDragging : function() { - this.config.enableInertialDragging = false - }, - enableScrollWheelZoom : function() { - this.config.enableWheelZoom = true - }, - disableScrollWheelZoom : function() { - this.config.enableWheelZoom = false - }, - enableContinuousZoom : function() { - this.config.enableContinuousZoom = true - }, - disableContinuousZoom : function() { - this.config.enableContinuousZoom = false - }, - enableDoubleClickZoom : function() { - this.config.enableDblclickZoom = true - }, - disableDoubleClickZoom : function() { - this.config.enableDblclickZoom = false - }, - enableKeyboard : function() { - this.config.enableKeyboard = true - }, - disableKeyboard : function() { - this.config.enableKeyboard = false - }, - enablePinchToZoom : function() { - this.config.enablePinchToZoom = true - }, - disablePinchToZoom : function() { - this.config.enablePinchToZoom = false - }, - enableAutoResize : function() { - this.config.enableAutoResize = true; - this._watchSize(); - if (!this.temp.autoResizeTimer) { - this.temp.autoResizeTimer = setInterval( - this._watchSize, 80) - } - }, - disableAutoResize : function() { - this.config.enableAutoResize = false; - if (this.temp.autoResizeTimer) { - clearInterval(this.temp.autoResizeTimer); - this.temp.autoResizeTimer = null - } - }, - getSize : function() { - return new aH(this.container.clientWidth, - this.container.clientHeight) - }, - getCenter : function() { - return this.centerPoint - }, - getZoom : function() { - return this.zoomLevel - }, - checkResize : function() { - this._watchSize() - }, - _getProperZoom : function(cM) { - var cL = this.config.minZoom, T = this.config.maxZoom, cN = false; - if (cM < cL) { - cN = true; - cM = cL - } - if (cM > T) { - cN = true; - cM = T - } - return { - zoom : cM, - exceeded : cN - } - }, - getContainer : function() { - return this.container - }, - pointToPixel : function(T, cL) { - cL = cL || this.getZoom(); - return this.projection.pointToPixel(T, cL, - this.mercatorCenter, this.getSize(), - this.currentCity) - }, - pixelToPoint : function(T, cL) { - cL = cL || this.getZoom(); - return this.projection.pixelToPoint(T, cL, - this.mercatorCenter, this.getSize(), - this.currentCity) - }, - pointToOverlayPixel : function(T, cM) { - if (!T) { - return - } - var cN = new cd(T.lng, T.lat); - var cL = this.pointToPixel(cN, cM); - cL.x -= this.offsetX; - cL.y -= this.offsetY; - return cL - }, - overlayPixelToPoint : function(T, cM) { - if (!T) { - return - } - var cL = new bu(T.x, T.y); - cL.x += this.offsetX; - cL.y += this.offsetY; - return this.pixelToPoint(cL, cM) - }, - getBounds : function() { - if (!this.isLoaded()) { - return new bN() - } - var cL = arguments[0] || {}, cN = cL.margins - || [ 0, 0, 0, 0 ], T = cL.zoom || null, cO = this - .pixelToPoint( { - x : cN[3], - y : this.height - cN[2] - }, T), cM = this.pixelToPoint( { - x : this.width - cN[1], - y : cN[0] - }, T); - return new bN(cO, cM) - }, - isLoaded : function() { - return !!this.loaded - }, - _getBestLevel : function(cL, cM) { - var cP = this.getMapType(); - var cR = cM.margins || [ 10, 10, 10, 10 ], cO = cM.zoomFactor || 0, cS = cR[1] - + cR[3], cQ = cR[0] + cR[2], T = cP - .getMinZoom(), cU = cP.getMaxZoom(); - for ( var cN = cU; cN >= T; cN--) { - var cT = this.getMapType().getZoomUnits(cN); - if (cL.toSpan().lng / cT < this.width - cS - && cL.toSpan().lat / cT < this.height - - cQ) { - break - } - } - cN += cO; - if (cN < T) { - cN = T - } - if (cN > cU) { - cN = cU - } - return cN - }, - getViewport : function(cT, cL) { - var cX = { - center : this.getCenter(), - zoom : this.getZoom() - }; - if (!cT || !cT instanceof bN && cT.length == 0 - || cT instanceof bN && cT.isEmpty()) { - return cX - } - var cV = []; - if (cT instanceof bN) { - cV.push(cT.getNorthEast()); - cV.push(cT.getSouthWest()) - } else { - cV = cT.slice(0) - } - cL = cL || {}; - var cP = []; - for ( var cQ = 0, cO = cV.length; cQ < cO; cQ++) { - cP.push(this.projection.lngLatToMercator( - cV[cQ], this.currentCity)) - } - var cM = new bN(); - for ( var cQ = cP.length - 1; cQ >= 0; cQ--) { - cM.extend(cP[cQ]) - } - if (cM.isEmpty()) { - return cX - } - var T = cM.getCenter(); - var cW = this._getBestLevel(cM, cL); - if (cL.margins) { - var cS = cL.margins, cR = (cS[1] - cS[3]) / 2, cU = (cS[0] - cS[2]) / 2, cN = this - .getMapType().getZoomUnits(cW); - T.lng = T.lng + cN * cR; - T.lat = T.lat + cN * cU - } - T = this.projection.mercatorToLngLat(T, - this.currentCity); - return { - center : T, - zoom : cW - } - }, - setViewport : function(cL, cO) { - var T; - if (cL && cL.center) { - T = cL - } else { - T = this.getViewport(cL, cO) - } - cO = cO || {}; - var cM = cO.delay || 200; - if (T.zoom == this.zoomLevel - && cO.enableAnimation != false) { - var cN = this; - setTimeout(function() { - cN.panTo(T.center, { - duration : 210 - }) - }, cM) - } else { - this.centerAndZoom(T.center, T.zoom) - } - }, - getPanes : function() { - return this._panes - }, - getInfoWindow : function() { - if (this.temp.infoWin && this.temp.infoWin.isOpen()) { - return this.temp.infoWin - } - return null - }, - getDistance : function(cM, T) { - if (!cM || !T) { - return - } - var cL = 0; - cL = ba.getDistanceByLL(cM, T); - return cL - }, - getOverlays : function() { - var cN = [], cO = this._overlays, cM = this._customOverlays; - if (cO) { - for ( var cL in cO) { - if (cO[cL] instanceof Y) { - cN.push(cO[cL]) - } - } - } - if (cM) { - for ( var cL = 0, T = cM.length; cL < T; cL++) { - cN.push(cM[cL]) - } - } - return cN - }, - getMapType : function() { - return this.mapType - }, - _asyncRegister : function() { - for ( var T = this.temp.registerIndex; T < BMap._register.length; T++) { - BMap._register[T](this) - } - this.temp.registerIndex = T - }, - setCurrentCity : function(T) { - this.currentCity = BMAP_PERSPECTIVE_MAP - .getCityName(T); - this.cityCode = BMAP_PERSPECTIVE_MAP - .getCityCode(this.currentCity) - }, - setDefaultCursor : function(T) { - if (a8.browser.firefox && T.indexOf("url") == 0) { - T = T += ", -moz-grab" - } - this.config.defaultCursor = T; - if (this.platform) { - this.platform.style.cursor = this.config.defaultCursor - } - }, - getDefaultCursor : function() { - return this.config.defaultCursor - }, - setDraggingCursor : function(T) { - if (a8.browser.firefox && T.indexOf("url") == 0) { - T = T += ", -moz-grabbing" - } - this.config.draggingCursor = T - }, - getDraggingCursor : function() { - return this.config.draggingCursor - }, - highResolutionEnabled : function() { - return this.config.enableHighResolution - && window.devicePixelRatio > 1 - }, - addHotspot : function(cL) { - if (cL instanceof cm) { - this._hotspots[cL.guid] = cL; - cL.initialize(this) - } - var T = this; - cA.load("hotspot", function() { - T._asyncRegister() - }) - }, - removeHotspot : function(T) { - if (this._hotspots[T.guid]) { - delete this._hotspots[T.guid] - } - }, - clearHotspots : function() { - this._hotspots = {} - }, - _checkZoom : function() { - var cL = this.mapType.getMinZoom(); - var cM = this.mapType.getMaxZoom(); - var T = this.config; - T.minZoom = T.userMinZoom || cL; - T.maxZoom = T.userMaxZoom || cM; - if (T.minZoom < cL) { - T.minZoom = cL - } - if (T.maxZoom > cM) { - T.maxZoom = cM - } - }, - setMinZoom : function(T) { - if (T > this.config.maxZoom) { - T = this.config.maxZoom - } - this.config.userMinZoom = T; - this._updateZoom() - }, - setMaxZoom : function(T) { - if (T < this.config.minZoom) { - T = this.config.minZoom - } - this.config.userMaxZoom = T; - this._updateZoom() - }, - _updateZoom : function() { - this._checkZoom(); - var T = this.config; - if (this.zoomLevel < T.minZoom) { - this.setZoom(T.minZoom) - } else { - if (this.zoomLevel > T.maxZoom) { - this.setZoom(T.maxZoom) - } - } - var cL = new bg("onzoomspanchange"); - cL.minZoom = T.minZoom; - cL.maxZoom = T.maxZoom; - this.dispatchEvent(cL) - } - }); - window.BMAP_API_VERSION = "1.3"; - window.BMAP_COORD_LNGLAT = 0; - window.BMAP_COORD_MERCATOR = 1; - window.BMAP_SYS_DRAWER = 0; - window.BMAP_SVG_DRAWER = 1; - window.BMAP_VML_DRAWER = 2; - window.BMAP_CANVAS_DRAWER = 3; - window._addStat = function(cP, cO) { - if (!cP) { - return - } - cO = cO || {}; - var cN = ""; - for ( var cL in cO) { - cN = cN + "&" + cL + "=" + encodeURIComponent(cO[cL]) - } - var cQ = function(cR) { - if (!cR) { - return - } - _addStat._sending = true; - setTimeout(function() { - _addStat._img.src = cc.imgPath + "blank.gif?" + cR.src - }, 50) - }; - var T = function() { - var cR = _addStat._reqQueue.shift(); - if (cR) { - cQ(cR) - } - }; - var cM = (Math.random() * 100000000).toFixed(0); - if (_addStat._sending) { - _addStat._reqQueue.push( { - src : "t=" + cM + "&code=" + cP + cN - }) - } else { - cQ( { - src : "t=" + cM + "&code=" + cP + cN - }) - } - if (!_addStat._binded) { - a8.on(_addStat._img, "load", function() { - _addStat._sending = false; - T() - }); - a8.on(_addStat._img, "error", function() { - _addStat._sending = false; - T() - }); - _addStat._binded = true - } - }; - window._addStat._reqQueue = []; - window._addStat._img = new Image(); - _addStat(5000, { - v : BMap.version - }); - function g(cN) { - var T = { - duration : 1000, - fps : 30, - delay : 0, - transition : aw.linear, - onStop : function() { - } - }; - this._anis = []; - if (cN) { - for ( var cL in cN) { - T[cL] = cN[cL] - } - } - this._opts = T; - if (aK(T.delay)) { - var cM = this; - setTimeout(function() { - cM.start() - }, T.delay) - } else { - if (T.delay != g.INFINITE) { - this.start() - } - } - } - g.INFINITE = "INFINITE"; - g.prototype.start = function() { - this._beginTime = aE(); - this._endTime = this._beginTime + this._opts.duration; - this._launch() - }; - g.prototype.add = function(T) { - this._anis.push(T) - }; - g.prototype._launch = function() { - var cM = this; - var T = aE(); - if (T >= cM._endTime) { - if (I(cM._opts.render)) { - cM._opts.render(cM._opts.transition(1)) - } - if (I(cM._opts.finish)) { - cM._opts.finish() - } - if (cM._anis.length > 0) { - var cL = cM._anis[0]; - cL._anis = [].concat(cM._anis.slice(1)); - cL.start() - } - return - } - cM.schedule = cM._opts.transition((T - cM._beginTime) - / cM._opts.duration); - if (I(cM._opts.render)) { - cM._opts.render(cM.schedule) - } - if (!cM.terminative) { - cM._timer = setTimeout(function() { - cM._launch() - }, 1000 / cM._opts.fps) - } - }; - g.prototype.stop = function(cL) { - this.terminative = true; - for ( var T = 0; T < this._anis.length; T++) { - this._anis[T].stop(); - this._anis[T] = null - } - this._anis.length = 0; - if (this._timer) { - clearTimeout(this._timer); - this._timer = null - } - this._opts.onStop(this.schedule); - if (cL) { - this._endTime = this._beginTime; - this._launch() - } - }; - g.prototype.cancel = function() { - if (this._timer) { - clearTimeout(this._timer) - } - this._endTime = this._beginTime; - this.schedule = 0 - }; - g.prototype.setFinishCallback = function(T) { - if (this._anis.length > 0) { - this._anis[this._anis.length - 1]._opts.finish = T - } else { - this._opts.finish = T - } - }; - var aw = { - linear : function(T) { - return T - }, - reverse : function(T) { - return 1 - T - }, - easeInQuad : function(T) { - return T * T - }, - easeInCubic : function(T) { - return Math.pow(T, 3) - }, - easeOutQuad : function(T) { - return -(T * (T - 2)) - }, - easeOutCubic : function(T) { - return Math.pow((T - 1), 3) + 1 - }, - easeInOutQuad : function(T) { - if (T < 0.5) { - return T * T * 2 - } else { - return -2 * (T - 2) * T - 1 - } - return - }, - easeInOutCubic : function(T) { - if (T < 0.5) { - return Math.pow(T, 3) * 4 - } else { - return Math.pow(T - 1, 3) * 4 + 1 - } - }, - easeInOutSine : function(T) { - return (1 - Math.cos(Math.PI * T)) / 2 - } - }; - aw["ease-in"] = aw.easeInQuad; - aw["ease-out"] = aw.easeOutQuad; - var m = !!(window.BMAP_PROTOCOL == "https"); - var x = m ? "https://sapi.map.baidu.com/" : "http://api.map.baidu.com/"; - var cc = { - imgPath : "static/BMap/images/", //******* �Ķ�ͼƬimages·�� ******* - cityNames : { - "\u5317\u4eac" : "bj", - "\u4e0a\u6d77" : "sh", - "\u6df1\u5733" : "sz", - "\u5e7f\u5dde" : "gz" - }, - fontFamily : "arial,sans-serif" - }; - if (a8.browser.firefox) { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur),crosshair", - defaultCursor : "-moz-grab", - draggingCursor : "-moz-grabbing" - }); - if (a8.platform.isWindows) { - cc.fontFamily = "arial,simsun,sans-serif" - } - } else { - if (a8.browser.chrome || a8.browser.safari) { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur) 2 6,crosshair", - defaultCursor : "url(" + cc.imgPath - + "openhand.cur) 8 8,default", - draggingCursor : "url(" + cc.imgPath - + "closedhand.cur) 8 8,move" - }) - } else { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur),crosshair", - defaultCursor : "url(" + cc.imgPath + "openhand.cur),default", - draggingCursor : "url(" + cc.imgPath + "closedhand.cur),move" - }) - } - } - function av(cM, cL, T) { - this.id = cM; - this.bounds = cL; - this.content = T - } - var bn = { - undo : 1, - redo : 2, - zoom : 4, - drag : 8, - move : 16, - mousewheel : 32, - toolbarOperation : 64, - stdMapCtrlDrag : 128, - dblclick : 256 - }; - function bI(cM, T) { - var cL = cM.style; - cL.left = T[0] + "px"; - cL.top = T[1] + "px" - } - function cw(T) { - if (a8.browser.ie > 0) { - T.unselectable = "on" - } else { - T.style.MozUserSelect = "none" - } - } - function y(T) { - return T && T.parentNode && T.parentNode.nodeType != 11 - } - function at(cL, T) { - a8.dom.insertHTML(cL, "beforeEnd", T); - return cL.lastChild - } - function bY(T) { - var cL = { - left : 0, - top : 0 - }; - while (T && T.offsetParent) { - cL.left += T.offsetLeft; - cL.top += T.offsetTop; - T = T.offsetParent - } - return cL - } - function aP(T) { - var T = window.event || T; - T.stopPropagation ? T.stopPropagation() : T.cancelBubble = true - } - function cC(T) { - var T = window.event || T; - T.preventDefault ? T.preventDefault() : T.returnValue = false; - return false - } - function co(T) { - aP(T); - return cC(T) - } - function cG() { - var T = document.documentElement, cL = document.body; - if (T && (T.scrollTop || T.scrollLeft)) { - return [ T.scrollTop, T.scrollLeft ] - } else { - if (cL) { - return [ cL.scrollTop, cL.scrollLeft ] - } else { - return [ 0, 0 ] - } - } - } - function ct(cL, T) { - if (!cL || !T) { - return - } - return Math.round(Math.sqrt(Math.pow(cL.x - T.x, 2) - + Math.pow(cL.y - T.y, 2))) - } - function O(T, cM) { - var cL = []; - cM = cM || function(cO) { - return cO - }; - for ( var cN in T) { - cL.push(cN + "=" + cM(T[cN])) - } - return cL.join("&") - } - function aa(cL, T, cM) { - var cN = document.createElement(cL); - if (cM) { - cN = document.createElementNS(cM, cL) - } - return a8.dom.setAttrs(cN, T || {}) - } - function aJ(T) { - if (T.currentStyle) { - return T.currentStyle - } else { - if (T.ownerDocument && T.ownerDocument.defaultView) { - return T.ownerDocument.defaultView.getComputedStyle(T, null) - } - } - } - function I(T) { - return typeof T == "function" - } - function aK(T) { - return typeof T == "number" - } - function b3(T) { - return typeof T == "string" - } - function ch(T) { - return typeof T != "undefined" - } - function cJ(T) { - return typeof T == "object" - } - function aY(T) { - return "[object Array]" == Object.prototype.toString.call(T) - } - var cf = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - function bV(cN) { - var cL = ""; - var cU, cS, cQ = ""; - var cT, cR, cP, cO = ""; - var cM = 0; - var T = /[^A-Za-z0-9\+\/\=]/g; - if (!cN || T.exec(cN)) { - return cN - } - cN = cN.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - do { - cT = cf.indexOf(cN.charAt(cM++)); - cR = cf.indexOf(cN.charAt(cM++)); - cP = cf.indexOf(cN.charAt(cM++)); - cO = cf.indexOf(cN.charAt(cM++)); - cU = (cT << 2) | (cR >> 4); - cS = ((cR & 15) << 4) | (cP >> 2); - cQ = ((cP & 3) << 6) | cO; - cL = cL + String.fromCharCode(cU); - if (cP != 64) { - cL = cL + String.fromCharCode(cS) - } - if (cO != 64) { - cL = cL + String.fromCharCode(cQ) - } - cU = cS = cQ = ""; - cT = cR = cP = cO = "" - } while (cM < cN.length); - return cL - } - var bg = a8.lang.Event; - function aA() { - return !!(a8.platform.isIphone || a8.platform.isIpad || a8.platform.isAndroid) - } - function bO() { - return !!(a8.platform.isWindows || a8.platform.isMacintosh || a8.platform.isX11) - } - function aE() { - return (new Date).getTime() - } - var cx = { - request : function(cL) { - var T = aa("script", { - src : cL, - type : "text/javascript", - charset : "utf-8" - }); - if (T.addEventListener) { - T.addEventListener("load", function(cN) { - var cM = cN.target; - cM.parentNode.removeChild(cM) - }, false) - } else { - if (T.attachEvent) { - T - .attachEvent( - "onreadystatechange", - function(cN) { - var cM = window.event.srcElement; - if (cM - && (cM.readyState == "loaded" || cM.readyState == "complete")) { - cM.parentNode.removeChild(cM) - } - }) - } - } - setTimeout(function() { - document.getElementsByTagName("head")[0].appendChild(T); - T = null - }, 1) - } - }; - function cA() { - } - a8.object.extend(cA, { - Request : { - INITIAL : -1, - WAITING : 0, - COMPLETED : 1 - }, - Dependency : { - control : [], - marker : [], - poly : [ "marker" ], - infowindow : [ "marker" ], - menu : [], - oppc : [], - opmb : [], - scommon : [], - local : [ "scommon" ], - route : [ "scommon" ], - othersearch : [ "scommon" ], - autocomplete : [ "scommon" ], - buslinesearch : [ "route" ], - hotspot : [] - }, - preLoaded : {}, - Config : { - _baseUrl : "js/", //x + "getmodules?v=1.3", //******* �Ķ���Դ��map,oppc,tile,control��·�� ******* - _timeout : 5000 - }, - delayFlag : false, - Module : { - _modules : {}, - _arrMdls : [] - }, - load : function(cL, cN) { - var T = this.current(cL); - if (T._status == this.Request.COMPLETED) { - return - } else { - if (T._status == this.Request.INITIAL) { - this.combine(cL); - this.pushUniqueMdl(cL); - var cM = this; - if (cM.delayFlag == false) { - cM.delayFlag = true; - window.setTimeout(function() { - var cO = cM.Config._baseUrl + "/modules" //"&mod=" - //+ cM.Module._arrMdls.join(","); - cx.request(cO); - cM.Module._arrMdls.length = 0; - cM.delayFlag = false - }, 1) - } - T._status = this.Request.WAITING - } - T._callbacks.push(cN) - } - }, - combine : function(T) { - if (T && this.Dependency[T]) { - var cM = this.Dependency[T]; - for ( var cL = 0; cL < cM.length; cL++) { - this.combine(cM[cL]); - if (!this.Module._modules[cM[cL]]) { - this.pushUniqueMdl(cM[cL]) - } - } - } - }, - pushUniqueMdl : function(cL) { - for ( var T = 0; T < this.Module._arrMdls.length; T++) { - if (this.Module._arrMdls[T] == cL) { - return - } - } - this.Module._arrMdls.push(cL) - }, - run : function(cM, cO) { - var cL = this.current(cM); - try { - eval(cO) - } catch (cP) { - return - } - cL._status = this.Request.COMPLETED; - for ( var cN = 0, T = cL._callbacks.length; cN < T; cN++) { - cL._callbacks[cN]() - } - cL._callbacks.length = 0 - }, - check : function(cL, cM) { - var T = this; - T.timeout = setTimeout(function() { - var cN = T.Module._modules[cL]._status; - if (cN != T.Request.COMPLETED) { - T.remove(cL); - T.load(cL, cM) - } else { - clearTimeout(T.timeout) - } - }, T.Config._timeout) - }, - current : function(cL) { - var T; - if (!this.Module._modules[cL]) { - this.Module._modules[cL] = {}; - this.Module._modules[cL]._status = this.Request.INITIAL; - this.Module._modules[cL]._callbacks = [] - } - T = this.Module._modules[cL]; - return T - }, - remove : function(cL) { - var T = this.current(cL); - delete T - } - }); - window._jsload = function(T, cL) { - cA.run(T, cL) - }; - function bu(T, cL) { - this.x = T || 0; - this.y = cL || 0 - } - bu.prototype.equals = function(T) { - return T && T.x == this.x && T.y == this.y - }; - function aH(cL, T) { - this.width = cL || 0; - this.height = T || 0 - } - aH.prototype.equals = function(T) { - return T && this.width == T.width && this.height == T.height - }; - function cm(T, cL) { - if (!T) { - return - } - this._position = T; - this.guid = "spot" + (cm.guid++); - cL = cL || {}; - this._text = cL.text || ""; - this._offsets = cL.offsets ? cL.offsets.slice(0) : [ 5, 5, 5, 5 ]; - this._userData = cL.userData || null; - this._minZoom = cL.minZoom || null; - this._maxZoom = cL.maxZoom || null - } - cm.guid = 0; - a8.extend(cm.prototype, { - initialize : function(T) { - if (this._minZoom == null) { - this._minZoom = T.config.minZoom - } - if (this._maxZoom == null) { - this._maxZoom = T.config.maxZoom - } - }, - setPosition : function(T) { - if (T instanceof cd) { - this._position = T - } - }, - getPosition : function() { - return this._position - }, - setText : function(T) { - this._text = T - }, - getText : function() { - return this._text - }, - setUserData : function(T) { - this._userData = T - }, - getUserData : function() { - return this._userData - } - }); - function cp() { - this._map = null; - this._container; - this._type = "control"; - this.blockInfoWindow = true; - this._visible = true - } - a8.lang.inherits(cp, a8.lang.Class, "Control"); - a8 - .extend( - cp.prototype, - { - initialize : function(T) { - this._map = T; - if (this._container) { - T.container.appendChild(this._container); - return this._container - } - return - }, - _i : function(T) { - if (!this._container && this.initialize - && I(this.initialize)) { - this._container = this.initialize(T) - } - this._opts = this._opts || { - printable : false - }; - this._setStyle(); - this._setPosition(); - if (this._container) { - this._container._jsobj = this - } - }, - _setStyle : function() { - var cL = this._container; - if (cL) { - var T = cL.style; - T.position = "absolute"; - T.zIndex = this._cZIndex || "10"; - T.MozUserSelect = "none"; - T.WebkitTextSizeAdjust = "none"; - if (!this._opts.printable) { - a8.dom.addClass(cL, "BMap_noprint") - } - a8.on(cL, "contextmenu", co) - } - }, - remove : function() { - this._map = null; - if (!this._container) { - return - } - this._container.parentNode - && this._container.parentNode - .removeChild(this._container); - this._container._jsobj = null; - this._container = null - }, - _render : function() { - this._container = at(this._map.container, - "
    "); - if (this._visible == false) { - a8.dom.hide(this._container) - } - return this._container - }, - _setPosition : function() { - this.setAnchor(this._opts.anchor) - }, - setAnchor : function(cN) { - if (this.anchorFixed || !aK(cN) || isNaN(cN) - || cN < BMAP_ANCHOR_TOP_LEFT - || cN > BMAP_ANCHOR_BOTTOM_RIGHT) { - cN = this.defaultAnchor - } - this._opts = this._opts || { - printable : false - }; - this._opts.offset = this._opts.offset - || this.defaultOffset; - var cM = this._opts.anchor; - this._opts.anchor = cN; - if (!this._container) { - return - } - var cP = this._container; - var T = this._opts.offset.width; - var cO = this._opts.offset.height; - cP.style.left = cP.style.top = cP.style.right = cP.style.bottom = "auto"; - switch (cN) { - case BMAP_ANCHOR_TOP_LEFT: - cP.style.top = cO + "px"; - cP.style.left = T + "px"; - break; - case BMAP_ANCHOR_TOP_RIGHT: - cP.style.top = cO + "px"; - cP.style.right = T + "px"; - break; - case BMAP_ANCHOR_BOTTOM_LEFT: - cP.style.bottom = cO + "px"; - cP.style.left = T + "px"; - break; - case BMAP_ANCHOR_BOTTOM_RIGHT: - cP.style.bottom = cO + "px"; - cP.style.right = T + "px"; - break; - default: - break - } - var cL = [ "TL", "TR", "BL", "BR" ]; - a8.dom.removeClass(this._container, "anchor" - + cL[cM]); - a8.dom.addClass(this._container, "anchor" + cL[cN]) - }, - getAnchor : function() { - return this._opts.anchor - }, - setOffset : function(T) { - if (!(T instanceof aH)) { - return - } - this._opts = this._opts || { - printable : false - }; - this._opts.offset = new aH(T.width, T.height); - if (!this._container) { - return - } - this.setAnchor(this._opts.anchor) - }, - getOffset : function() { - return this._opts.offset - }, - getDom : function() { - return this._container - }, - show : function() { - if (this._visible == true) { - return - } - this._visible = true; - if (this._container) { - a8.dom.show(this._container) - } - }, - hide : function() { - if (this._visible == false) { - return - } - this._visible = false; - if (this._container) { - a8.dom.hide(this._container) - } - }, - isPrintable : function() { - return !!this._opts.printable - }, - isVisible : function() { - if (!this._container && !this._map) { - return false - } - return !!this._visible - } - }); - window.BMAP_ANCHOR_TOP_LEFT = 0; - window.BMAP_ANCHOR_TOP_RIGHT = 1; - window.BMAP_ANCHOR_BOTTOM_LEFT = 2; - window.BMAP_ANCHOR_BOTTOM_RIGHT = 3; - window.BMAP_NAVIGATION_CONTROL_LARGE = 0; - window.BMAP_NAVIGATION_CONTROL_SMALL = 1; - window.BMAP_NAVIGATION_CONTROL_PAN = 2; - window.BMAP_NAVIGATION_CONTROL_ZOOM = 3; - function L(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false, - showZoomInfo : true - }; - a8.object.extend(this._opts, T); - this.defaultAnchor = BMAP_ANCHOR_TOP_LEFT; - this.defaultOffset = new aH(10, 10); - this.setAnchor(T.anchor); - this.setType(T.type); - this._asyncLoadCode() - } - a8.lang.inherits(L, cp, "NavigationControl"); - a8.extend(L.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setType : function(T) { - if (aK(T) && T >= BMAP_NAVIGATION_CONTROL_LARGE - && T <= BMAP_NAVIGATION_CONTROL_ZOOM) { - this._opts.type = T - } else { - this._opts.type = BMAP_NAVIGATION_CONTROL_LARGE - } - }, - getType : function() { - return this._opts.type - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function am(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - a8.object.extend(this._opts, T); - this._copyrightCollection = []; - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_LEFT; - this.defaultOffset = new aH(5, 2); - this.setAnchor(T.anchor); - this._canShow = true; - this.blockInfoWindow = false; - this._asyncLoadCode() - } - a8.lang.inherits(am, cp, "CopyrightControl"); - a8.object - .extend( - am.prototype, - { - initialize : function(T) { - this._map = T; - return this._container - }, - addCopyright : function(cM) { - if (!cM || !aK(cM.id) || isNaN(cM.id)) { - return - } - var T = { - bounds : null, - content : "" - }; - for ( var cL in cM) { - T[cL] = cM[cL] - } - var cN = this.getCopyright(cM.id); - if (cN) { - for ( var cO in T) { - cN[cO] = T[cO] - } - } else { - this._copyrightCollection.push(T) - } - }, - getCopyright : function(cM) { - for ( var cL = 0, T = this._copyrightCollection.length; cL < T; cL++) { - if (this._copyrightCollection[cL].id == cM) { - return this._copyrightCollection[cL] - } - } - }, - getCopyrightCollection : function() { - return this._copyrightCollection - }, - removeCopyright : function(cM) { - for ( var cL = 0, T = this._copyrightCollection.length; cL < T; cL++) { - if (this._copyrightCollection[cL].id == cM) { - r = this._copyrightCollection.splice(cL, 1); - cL--; - T = this._copyrightCollection.length - } - } - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function cK(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - this._opts = a8.extend(a8.extend(this._opts, { - size : new aH(150, 150), - padding : 5, - isOpen : false, - zoomInterval : 4 - }), T); - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_RIGHT; - this.defaultOffset = new aH(0, 0); - this._btnWidth = 13; - this._btnHeight = 13; - this.setAnchor(T.anchor); - this.setSize(this._opts.size); - this._asyncLoadCode() - } - a8.lang.inherits(cK, cp, "OverviewMapControl"); - a8.extend(cK.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setAnchor : function(T) { - cp.prototype.setAnchor.call(this, T) - }, - changeView : function() { - this.changeView._running = true; - this._opts.isOpen = !this._opts.isOpen; - if (!this._container) { - this.changeView._running = false - } - }, - setSize : function(T) { - if (!(T instanceof aH)) { - T = new aH(150, 150) - } - T.width = T.width > 0 ? T.width : 150; - T.height = T.height > 0 ? T.height : 150; - this._opts.size = T - }, - getSize : function() { - return this._opts.size - }, - isOpen : function() { - return this._opts.isOpen - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function bK(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - this._opts = a8.object.extend(a8.object.extend(this._opts, { - color : "black", - unit : "metric" - }), T); - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_LEFT; - this.defaultOffset = new aH(81, 18); - this.setAnchor(T.anchor); - this._units = { - metric : { - name : "metric", - conv : 1, - incon : 1000, - u1 : "\u7c73", - u2 : "\u516c\u91cc" - }, - us : { - name : "us", - conv : 3.2808, - incon : 5280, - u1 : "\u82f1\u5c3a", - u2 : "\u82f1\u91cc" - } - }; - if (!this._units[this._opts.unit]) { - this._opts.unit = "metric" - } - this._scaleText = null; - this._numberArray = {}; - this._asyncLoadCode() - } - window.BMAP_UNIT_METRIC = "metric"; - window.BMAP_UNIT_IMPERIAL = "us"; - a8.lang.inherits(bK, cp, "ScaleControl"); - a8.object.extend(bK.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setColor : function(T) { - this._opts.color = T + "" - }, - getColor : function() { - return this._opts.color - }, - setUnit : function(T) { - this._opts.unit = this._units[T] && this._units[T].name - || this._opts.unit - }, - getUnit : function() { - return this._opts.unit - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - window.BMAP_MAPTYPE_CONTROL_HORIZONTAL = 0; - window.BMAP_MAPTYPE_CONTROL_DROPDOWN = 1; - function aL(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false, - mapTypes : [ BMAP_NORMAL_MAP, BMAP_SATELLITE_MAP, BMAP_HYBRID_MAP, - BMAP_PERSPECTIVE_MAP ], - type : BMAP_MAPTYPE_CONTROL_HORIZONTAL - }; - this.defaultAnchor = BMAP_ANCHOR_TOP_RIGHT; - this.defaultOffset = new aH(10, 10); - this.setAnchor(T.anchor); - this._opts = a8.extend(a8.extend(this._opts, { - offset : this.defaultOffset, - enableSwitch : true - }), T); - if (aY(T.mapTypes)) { - this._opts.mapTypes = T.mapTypes.slice(0) - } - this._asyncLoadCode() - } - a8.lang.inherits(aL, cp, "MapTypeControl"); - a8.object.extend(aL.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function cz(cL) { - a8.lang.Class.call(this); - this._opts = { - container : null, - cursor : "default" - }; - this._opts = a8.extend(this._opts, cL); - this._type = "contextmenu"; - this._map = null; - this._container; - this._shadow; - this._left = 0; - this._top = 0; - this._items = []; - this._rItems = []; - this._dividers = []; - this.curPixel = null; - this.curPoint = null; - this._isOpen = false; - var T = this; - cA.load("menu", function() { - T._draw() - }) - } - a8.lang.inherits(cz, a8.lang.Class, "ContextMenu"); - a8.object.extend(cz.prototype, { - initialize : function(cL, T) { - this._map = cL; - this._overlay = T || null - }, - remove : function() { - this._map = this._overlay = null - }, - addItem : function(cM) { - if (!cM || cM._type != "menuitem" || cM._text == "" - || cM._width <= 0) { - return - } - for ( var cL = 0, T = this._items.length; cL < T; cL++) { - if (this._items[cL] === cM) { - return - } - } - this._items.push(cM); - this._rItems.push(cM) - }, - removeItem : function(cM) { - if (!cM || cM._type != "menuitem") { - return - } - for ( var cL = 0, T = this._items.length; cL < T; cL++) { - if (this._items[cL] === cM) { - this._items[cL].remove(); - this._items.splice(cL, 1); - T-- - } - } - for ( var cL = 0, T = this._rItems.length; cL < T; cL++) { - if (this._rItems[cL] === cM) { - this._rItems[cL].remove(); - this._rItems.splice(cL, 1); - T-- - } - } - }, - addSeparator : function() { - this._items.push( { - _type : "divider", - _dIndex : this._dividers.length - }); - this._dividers.push( { - dom : null - }) - }, - removeSeparator : function(cL) { - if (!this._dividers[cL]) { - return - } - for ( var cM = 0, T = this._items.length; cM < T; cM++) { - if (this._items[cM] && this._items[cM]._type == "divider" - && this._items[cM]._dIndex == cL) { - this._items.splice(cM, 1); - T-- - } - if (this._items[cM] && this._items[cM]._type == "divider" - && this._items[cM]._dIndex > cL) { - this._items[cM]._dIndex-- - } - } - this._dividers.splice(cL, 1) - }, - getDom : function() { - return this._container - }, - show : function() { - if (this._isOpen == true) { - return - } - this._isOpen = true - }, - hide : function() { - if (this._isOpen == false) { - return - } - this._isOpen = false - }, - setCursor : function(T) { - if (!T) { - return - } - this._opts.cursor = T - }, - getItem : function(T) { - return this._rItems[T] - } - }); - function be(cM, cN, cL) { - if (!cM || !I(cN)) { - return - } - a8.lang.Class.call(this); - this._opts = { - width : 100, - id : "" - }; - cL = cL || {}; - this._opts.width = (cL.width * 1) ? cL.width : 100; - this._opts.id = cL.id ? cL.id : ""; - this._text = cM + ""; - this._callback = cN; - this._map = null; - this._type = "menuitem"; - this._contextmenu = null; - this._container = null; - this._enabled = true; - var T = this; - cA.load("menu", function() { - T._draw() - }) - } - a8.lang.inherits(be, a8.lang.Class, "MenuItem"); - a8.object.extend(be.prototype, { - initialize : function(T, cL) { - this._map = T; - this._contextmenu = cL - }, - remove : function() { - this._contextmenu = null; - this._map = null - }, - setText : function(T) { - if (!T) { - return - } - this._text = T + "" - }, - getDom : function() { - return this._container - }, - enable : function() { - this._enabled = true - }, - disable : function() { - this._enabled = false - } - }); - function bN(T, cL) { - if (T && !cL) { - cL = T - } - this._sw = this._ne = null; - this._swLng = this._swLat = null; - this._neLng = this._neLat = null; - if (T) { - this._sw = new cd(T.lng, T.lat); - this._ne = new cd(cL.lng, cL.lat); - this._swLng = T.lng; - this._swLat = T.lat; - this._neLng = cL.lng; - this._neLat = cL.lat - } - } - a8.object.extend(bN.prototype, { - isEmpty : function() { - return !this._sw || !this._ne - }, - equals : function(T) { - if (!(T instanceof bN) || this.isEmpty()) { - return false - } - return this.getSouthWest().equals(T.getSouthWest()) - && this.getNorthEast().equals(T.getNorthEast()) - }, - getSouthWest : function() { - return this._sw - }, - getNorthEast : function() { - return this._ne - }, - containsBounds : function(T) { - if (!(T instanceof bN) || this.isEmpty() || T.isEmpty()) { - return false - } - return (T._swLng > this._swLng && T._neLng < this._neLng - && T._swLat > this._swLat && T._neLat < this._neLat) - }, - getCenter : function() { - if (this.isEmpty()) { - return null - } - return new cd((this._swLng + this._neLng) / 2, - (this._swLat + this._neLat) / 2) - }, - intersects : function(cM) { - if (!(cM instanceof bN)) { - return null - } - if (Math.max(cM._swLng, cM._neLng) < Math.min(this._swLng, - this._neLng) - || Math.min(cM._swLng, cM._neLng) > Math.max(this._swLng, - this._neLng) - || Math.max(cM._swLat, cM._neLat) < Math.min(this._swLat, - this._neLat) - || Math.min(cM._swLat, cM._neLat) > Math.max(this._swLat, - this._neLat)) { - return null - } - var cO = Math.max(this._swLng, cM._swLng); - var cL = Math.min(this._neLng, cM._neLng); - var cN = Math.max(this._swLat, cM._swLat); - var T = Math.min(this._neLat, cM._neLat); - return new bN(new cd(cO, cN), new cd(cL, T)) - }, - containsPoint : function(T) { - if (!(T instanceof cd) || this.isEmpty()) { - return false - } - return (T.lng >= this._swLng && T.lng <= this._neLng - && T.lat >= this._swLat && T.lat <= this._neLat) - }, - extend : function(T) { - if (!(T instanceof cd)) { - return - } - var cL = T.lng, cM = T.lat; - if (!this._sw) { - this._sw = new cd(0, 0) - } - if (!this._ne) { - this._ne = new cd(0, 0) - } - if (!this._swLng || this._swLng > cL) { - this._sw.lng = this._swLng = cL - } - if (!this._neLng || this._neLng < cL) { - this._ne.lng = this._neLng = cL - } - if (!this._swLat || this._swLat > cM) { - this._sw.lat = this._swLat = cM - } - if (!this._neLat || this._neLat < cM) { - this._ne.lat = this._neLat = cM - } - }, - toSpan : function() { - if (this.isEmpty()) { - return new cd(0, 0) - } - return new cd(Math.abs(this._neLng - this._swLng), Math - .abs(this._neLat - this._swLat)) - } - }); - function cd(T, cL) { - if (isNaN(T)) { - T = bV(T); - T = isNaN(T) ? 0 : T - } - if (b3(T)) { - T = parseFloat(T) - } - if (isNaN(cL)) { - cL = bV(cL); - cL = isNaN(cL) ? 0 : cL - } - if (b3(cL)) { - cL = parseFloat(cL) - } - this.lng = T; - this.lat = cL - } - cd.isInRange = function(T) { - return T && T.lng <= 180 && T.lng >= -180 && T.lat <= 74 - && T.lat >= -74 - }; - cd.prototype.equals = function(T) { - return T && this.lat == T.lat && this.lng == T.lng - }; - function bd() { - } - bd.prototype.lngLatToPoint = function() { - throw "lngLatToPoint\u65b9\u6cd5\u672a\u5b9e\u73b0" - }; - bd.prototype.pointToLngLat = function() { - throw "pointToLngLat\u65b9\u6cd5\u672a\u5b9e\u73b0" - }; - function b6() { - } - a8 - .extend( - b6, - { - num : { - bj : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 6) - }, - gz : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - }, - sz : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - }, - sh : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - } - }, - correct_pts : { - bj : [ { - j : 116.305687, - w : 39.990912, - utm_x : 12947230.73, - utm_y : 4836903.65, - x : 630412, - y : 547340 - }, { - j : 116.381837, - w : 40.000198, - utm_x : 12955707.8, - utm_y : 4838247.62, - x : 667412, - y : 561832 - }, { - j : 116.430651, - w : 39.995216, - utm_x : 12961141.81, - utm_y : 4837526.55, - x : 686556, - y : 573372 - }, { - j : 116.474111, - w : 39.976323, - utm_x : 12965979.81, - utm_y : 4834792.55, - x : 697152, - y : 586816 - }, { - j : 116.280328, - w : 39.953159, - utm_x : 12944407.75, - utm_y : 4831441.53, - x : 603272, - y : 549976 - }, { - j : 116.316117, - w : 39.952496, - utm_x : 12948391.8, - utm_y : 4831345.64, - x : 618504, - y : 557872 - }, { - j : 116.350477, - w : 39.938107, - utm_x : 12952216.78, - utm_y : 4829264.65, - x : 627044, - y : 568220 - }, { - j : 116.432025, - w : 39.947158, - utm_x : 12961294.76, - utm_y : 4830573.59, - x : 666280, - y : 584016 - }, { - j : 116.46873, - w : 39.949516, - utm_x : 12965380.79, - utm_y : 4830914.63, - x : 683328, - y : 591444 - }, { - j : 116.280077, - w : 39.913823, - utm_x : 12944379.8, - utm_y : 4825753.62, - x : 586150, - y : 558552 - }, { - j : 116.308625, - w : 39.91374, - utm_x : 12947557.79, - utm_y : 4825741.62, - x : 598648, - y : 564732 - }, { - j : 116.369853, - w : 39.912979, - utm_x : 12954373.73, - utm_y : 4825631.62, - x : 624561, - y : 578039 - }, { - j : 116.433552, - w : 39.914694, - utm_x : 12961464.75, - utm_y : 4825879.53, - x : 652972, - y : 591348 - }, { - j : 116.457034, - w : 39.914273, - utm_x : 12964078.78, - utm_y : 4825818.67, - x : 663028, - y : 596444 - }, { - j : 116.490927, - w : 39.914127, - utm_x : 12967851.77, - utm_y : 4825797.57, - x : 677968, - y : 604188 - }, { - j : 116.483839, - w : 39.877198, - utm_x : 12967062.73, - utm_y : 4820460.67, - x : 658596, - y : 610312 - }, { - j : 116.405777, - w : 39.864461, - utm_x : 12958372.82, - utm_y : 4818620.62, - x : 619256, - y : 596088 - }, { - j : 116.35345, - w : 39.859774, - utm_x : 12952547.74, - utm_y : 4817943.6, - x : 594633, - y : 585851 - }, { - j : 116.403818, - w : 39.9141, - utm_x : 12958154.74, - utm_y : 4825793.66, - x : 639699, - y : 585226 - }, { - j : 116.318111, - w : 39.891101, - utm_x : 12948613.78, - utm_y : 4822469.56, - x : 592856, - y : 571480 - }, { - j : 116.413047, - w : 39.907238, - utm_x : 12959182.12, - utm_y : 4824801.76, - x : 640680, - y : 588704 - }, { - j : 116.390843, - w : 39.906113, - utm_x : 12956710.35, - utm_y : 4824639.16, - x : 630620, - y : 584108 - }, { - j : 116.446527, - w : 39.899438, - utm_x : 12962909.14, - utm_y : 4823674.4, - x : 651752, - y : 597416 - }, { - j : 116.388665, - w : 39.95527, - utm_x : 12956467.9, - utm_y : 4831746.87, - x : 650656, - y : 572800 - }, { - j : 116.398343, - w : 39.939704, - utm_x : 12957545.26, - utm_y : 4829495.6, - x : 648036, - y : 578452 - }, { - j : 116.355101, - w : 39.973581, - utm_x : 12952731.53, - utm_y : 4834395.82, - x : 643268, - y : 560944 - }, { - j : 116.380727, - w : 39.88464, - utm_x : 12955584.23, - utm_y : 4821535.94, - x : 616920, - y : 586496 - }, { - j : 116.360843, - w : 39.946452, - utm_x : 12953370.73, - utm_y : 4830471.48, - x : 635293, - y : 568765 - }, { - j : 116.340955, - w : 39.973421, - utm_x : 12951156.79, - utm_y : 4834372.67, - x : 638420, - y : 558632 - }, { - j : 116.322585, - w : 40.023941, - utm_x : 12949111.83, - utm_y : 4841684.79, - x : 652135, - y : 543802 - }, { - j : 116.356486, - w : 39.883341, - utm_x : 12952885.71, - utm_y : 4821348.24, - x : 606050, - y : 581443 - }, { - j : 116.339592, - w : 39.992259, - utm_x : 12951005.06, - utm_y : 4837098.59, - x : 645664, - y : 554400 - }, { - j : 116.3778, - w : 39.86392, - utm_x : 12955258.4, - utm_y : 4818542.48, - x : 606848, - y : 590328 - }, { - j : 116.377354, - w : 39.964124, - utm_x : 12955208.75, - utm_y : 4833027.64, - x : 649911, - y : 568581 - }, { - j : 116.361837, - w : 39.963897, - utm_x : 12953481.39, - utm_y : 4832994.8, - x : 643286, - y : 565175 - }, { - j : 116.441397, - w : 39.939403, - utm_x : 12962338.06, - utm_y : 4829452.07, - x : 666772, - y : 587728 - }, { - j : 116.359176, - w : 40.006631, - utm_x : 12953185.16, - utm_y : 4839178.78, - x : 660440, - y : 555411 - } ], - sz : [ { - w : 22.498861, - utm_x : 12677279.029193671, - utm_y : 2555027.9501714734, - j : 113.880696, - y : 1104472, - x : 947240 - }, { - w : 22.500706, - utm_x : 12683920.978881944, - utm_y : 2555248.973138607, - j : 113.940361, - y : 1122320, - x : 974864 - }, { - w : 22.576848, - utm_x : 12675897.984563945, - utm_y : 2564373.058056766, - j : 113.86829, - y : 1074048, - x : 979136 - }, { - w : 22.55689, - utm_x : 12680064.05051775, - utm_y : 2561981.0013635466, - j : 113.905714, - y : 1092484, - x : 986240 - }, { - w : 22.58066, - utm_x : 12678671.98513852, - utm_y : 2564829.983373251, - j : 113.893209, - y : 1080528, - x : 992088 - }, { - w : 22.595751, - utm_x : 12678298.949465925, - utm_y : 2566638.9913895614, - j : 113.889858, - y : 1074484, - x : 997960 - }, { - w : 22.557499, - utm_x : 12684523.001238672, - utm_y : 2562053.9875916084, - j : 113.945769, - y : 1104696, - x : 1004564 - }, { - w : 22.648419, - utm_x : 12676422.97299485, - utm_y : 2572954.0513219936, - j : 113.873006, - y : 1051384, - x : 1015916 - }, { - w : 22.562664, - utm_x : 12690460.958807131, - utm_y : 2562673.0054078405, - j : 113.99911, - y : 1119860, - x : 1030228 - }, { - w : 22.646618, - utm_x : 12683008.037804369, - utm_y : 2572738.0652955617, - j : 113.93216, - y : 1070324, - x : 1041496 - }, { - w : 22.571091, - utm_x : 12695789.992135335, - utm_y : 2563683.019582462, - j : 114.046981, - y : 1131924, - x : 1055628 - }, { - w : 22.704467, - utm_x : 12682276.994753957, - utm_y : 2579677.075645295, - j : 113.925593, - y : 1048536, - x : 1066348 - }, { - w : 22.547152, - utm_x : 12702917.96800879, - utm_y : 2560813.9850610085, - j : 114.111012, - y : 1160352, - x : 1072596 - }, { - w : 22.546192, - utm_x : 12704502.952164687, - utm_y : 2560698.9417545213, - j : 114.12525, - y : 1165256, - x : 1078452 - }, { - w : 22.5714, - utm_x : 12702350.00978689, - utm_y : 2563720.0558210905, - j : 114.10591, - y : 1150556, - x : 1081960 - }, { - w : 22.555004, - utm_x : 12704883.001041513, - utm_y : 2561754.9738317807, - j : 114.128664, - y : 1163304, - x : 1084172 - }, { - w : 22.551925, - utm_x : 12706255.028694374, - utm_y : 2561385.978019464, - j : 114.140989, - y : 1168216, - x : 1088116 - }, { - w : 22.693756, - utm_x : 12690318.02302569, - utm_y : 2578392.0635360866, - j : 113.997826, - y : 1075100, - x : 1092860 - }, { - w : 22.573769, - utm_x : 12705731.042149788, - utm_y : 2564004.003107545, - j : 114.136282, - y : 1159404, - x : 1096572 - }, { - w : 22.583238, - utm_x : 12706369.021093281, - utm_y : 2565139.002548978, - j : 114.142013, - y : 1157896, - x : 1103632 - }, { - w : 22.605844, - utm_x : 12704694.980375737, - utm_y : 2567848.984570506, - j : 114.126975, - y : 1145540, - x : 1107972 - }, { - w : 22.637228, - utm_x : 12702545.043656897, - utm_y : 2571612.010208761, - j : 114.107662, - y : 1128764, - x : 1114460 - }, { - w : 22.62496, - utm_x : 12707132.013185183, - utm_y : 2570140.9407190788, - j : 114.148867, - y : 1145732, - x : 1127028 - }, { - w : 22.644524, - utm_x : 12707016.01701364, - utm_y : 2572486.9446672536, - j : 114.147825, - y : 1138800, - x : 1135876 - }, { - w : 22.640188, - utm_x : 12711515.0431873, - utm_y : 2571966.966986786, - j : 114.18824, - y : 1152692, - x : 1151836 - }, { - w : 22.59807, - utm_x : 12720011.039168343, - utm_y : 2566916.995355996, - j : 114.26456, - y : 1191212, - x : 1165180 - }, { - w : 22.668221, - utm_x : 12714081.987256048, - utm_y : 2575329.007304823, - j : 114.211299, - y : 1150576, - x : 1175404 - }, { - w : 22.702591, - utm_x : 12717292.031020584, - utm_y : 2579452.0022288463, - j : 114.240135, - y : 1148204, - x : 1204600 - }, { - w : 22.731786, - utm_x : 12717795.9798388, - utm_y : 2582955.0308636553, - j : 114.244662, - y : 1139532, - x : 1220540 - }, { - w : 22.727494, - utm_x : 12720675.957721734, - utm_y : 2582439.9980541077, - j : 114.270533, - y : 1148992, - x : 1230084 - }, { - w : 22.716335, - utm_x : 12725500.040345404, - utm_y : 2581101.0132384477, - j : 114.313868, - y : 1166316, - x : 1244102 - } ], - gz : [ { - j : 113.335098, - w : 23.147289, - utm_x : 12616542.68, - utm_y : 2632892.7, - x : 1129109, - y : 1073920 - }, { - j : 113.320932, - w : 23.146956, - utm_x : 12614965.71, - utm_y : 2632852.62, - x : 1125620, - y : 1071640 - }, { - j : 113.321435, - w : 23.140119, - utm_x : 12615021.7, - utm_y : 2632029.65, - x : 1124032, - y : 1072882 - }, { - j : 113.321471, - w : 23.119165, - utm_x : 12615025.71, - utm_y : 2629507.68, - x : 1118932, - y : 1076530 - }, { - j : 113.340201, - w : 23.118616, - utm_x : 12617110.75, - utm_y : 2629441.61, - x : 1123238, - y : 1079667 - }, { - j : 113.358068, - w : 23.116323, - utm_x : 12619099.71, - utm_y : 2629165.66, - x : 1126968, - y : 1083116 - }, { - j : 113.357529, - w : 23.131271, - utm_x : 12619039.71, - utm_y : 2630964.68, - x : 1130508, - y : 1080440 - }, { - j : 113.365811, - w : 23.150595, - utm_x : 12619961.67, - utm_y : 2633290.66, - x : 1137205, - y : 1078567 - }, { - j : 113.294145, - w : 23.118467, - utm_x : 12611983.76, - utm_y : 2629423.68, - x : 1112245, - y : 1072043 - }, { - j : 113.28615, - w : 23.121525, - utm_x : 12611093.75, - utm_y : 2629791.7, - x : 1110993, - y : 1070197 - }, { - j : 113.307152, - w : 23.055497, - utm_x : 12613431.71, - utm_y : 2621847.21, - x : 1100144, - y : 1085123 - }, { - j : 113.333445, - w : 23.052687, - utm_x : 12616358.66, - utm_y : 2621509.2, - x : 1105784, - y : 1089948 - }, { - j : 113.347476, - w : 23.048755, - utm_x : 12617920.6, - utm_y : 2621036.24, - x : 1108099, - y : 1093064 - }, { - j : 113.385774, - w : 23.036574, - utm_x : 12622183.96, - utm_y : 2619571.12, - x : 1113850, - y : 1101834 - }, { - j : 113.364185, - w : 22.89798, - utm_x : 12619780.66, - utm_y : 2602910.64, - x : 1073186, - y : 1123374 - }, { - j : 113.404577, - w : 22.906481, - utm_x : 12624277.13, - utm_y : 2603932.06, - x : 1084888, - y : 1128692 - }, { - j : 113.430856, - w : 22.913156, - utm_x : 12627202.52, - utm_y : 2604734.12, - x : 1092892, - y : 1131761 - }, { - j : 113.384554, - w : 22.933021, - utm_x : 12622048.15, - utm_y : 2607121.32, - x : 1086975, - y : 1120403 - }, { - j : 113.263566, - w : 23.146333, - utm_x : 12608579.68, - utm_y : 2632777.63, - x : 1111742, - y : 1062098 - }, { - j : 113.239213, - w : 23.152996, - utm_x : 12605868.69, - utm_y : 2633579.69, - x : 1107616, - y : 1056740 - }, { - j : 113.253865, - w : 23.131628, - utm_x : 12607499.76, - utm_y : 2631007.65, - x : 1105912, - y : 1062966 - }, { - j : 113.240767, - w : 23.088434, - utm_x : 12606041.68, - utm_y : 2625809.7, - x : 1092270, - y : 1068184 - }, { - j : 113.279628, - w : 23.088284, - utm_x : 12610367.72, - utm_y : 2625791.65, - x : 1101412, - y : 1074883 - }, { - j : 113.462271, - w : 23.107058, - utm_x : 12630699.66, - utm_y : 2628050.7, - x : 1148752, - y : 1101736 - }, { - j : 113.401618, - w : 23.052957, - utm_x : 12623947.73, - utm_y : 2621541.68, - x : 1121925, - y : 1101535 - }, { - j : 113.422504, - w : 23.05905, - utm_x : 12626272.77, - utm_y : 2622274.61, - x : 1128470, - y : 1104049 - }, { - j : 113.362506, - w : 23.107149, - utm_x : 12619593.75, - utm_y : 2628061.65, - x : 1125835, - y : 1085505 - }, { - j : 113.419629, - w : 23.143176, - utm_x : 12625952.73, - utm_y : 2632397.61, - x : 1148133, - y : 1089052 - }, { - j : 113.23315, - w : 23.062251, - utm_x : 12605193.75, - utm_y : 2622659.67, - x : 1084184, - y : 1071368 - }, { - j : 113.314525, - w : 23.101412, - utm_x : 12614252.48, - utm_y : 2627371.29, - x : 1113011, - y : 1078426 - }, { - j : 113.307947, - w : 23.131369, - utm_x : 12613520.21, - utm_y : 2630976.47, - x : 1118622, - y : 1072198 - } ], - sh : [ { - j : 121.524411, - w : 31.245875, - utm_x : 13528182.75, - utm_y : 3642354.51, - x : 1086581, - y : 1065728 - }, { - j : 121.419229, - w : 31.244887, - utm_x : 13516473.81, - utm_y : 3642226.51, - x : 1032616, - y : 1029148 - }, { - j : 121.405637, - w : 31.237871, - utm_x : 13514960.74, - utm_y : 3641317.54, - x : 1022724, - y : 1027244 - }, { - j : 121.415348, - w : 31.222879, - utm_x : 13516041.78, - utm_y : 3639375.47, - x : 1018548, - y : 1036980 - }, { - j : 121.422561, - w : 31.224261, - utm_x : 13516844.73, - utm_y : 3639554.48, - x : 1022976, - y : 1038908 - }, { - j : 121.412581, - w : 31.204148, - utm_x : 13515733.75, - utm_y : 3636949.48, - x : 1006568, - y : 1043696 - }, { - j : 121.443025, - w : 31.206202, - utm_x : 13519122.8, - utm_y : 3637215.49, - x : 1022656, - y : 1053704 - }, { - j : 121.524061, - w : 31.246917, - utm_x : 13528143.79, - utm_y : 3642489.52, - x : 1082052, - y : 1064124 - }, { - j : 121.529343, - w : 31.217769, - utm_x : 13528731.78, - utm_y : 3638713.59, - x : 1072696, - y : 1079064 - }, { - j : 121.530268, - w : 31.210341, - utm_x : 13528834.75, - utm_y : 3637751.53, - x : 1068748, - y : 1082416 - }, { - j : 121.511601, - w : 31.227303, - utm_x : 13526756.73, - utm_y : 3639948.53, - x : 1069276, - y : 1068716 - }, { - j : 121.4966, - w : 31.243614, - utm_x : 13525086.81, - utm_y : 3642061.58, - x : 1071220, - y : 1056805 - }, { - j : 121.485021, - w : 31.26138, - utm_x : 13523797.82, - utm_y : 3644363.54, - x : 1075708, - y : 1045540 - }, { - j : 121.465114, - w : 31.278803, - utm_x : 13521581.76, - utm_y : 3646621.48, - x : 1073740, - y : 1031268 - }, { - j : 121.454784, - w : 31.266566, - utm_x : 13520431.82, - utm_y : 3645035.58, - x : 1063591, - y : 1033191 - }, { - j : 121.46851, - w : 31.24951, - utm_x : 13521959.81, - utm_y : 3642825.48, - x : 1060200, - y : 1044520 - }, { - j : 121.446384, - w : 31.248422, - utm_x : 13519496.73, - utm_y : 3642684.51, - x : 1048784, - y : 1037750 - }, { - j : 121.509499, - w : 31.246469, - utm_x : 13526522.73, - utm_y : 3642431.47, - x : 1079309, - y : 1060105 - }, { - j : 121.481643, - w : 31.283943, - utm_x : 13523421.78, - utm_y : 3647287.68, - x : 1087096, - y : 1035304 - }, { - j : 121.508054, - w : 31.280609, - utm_x : 13526361.87, - utm_y : 3646855.56, - x : 1098432, - y : 1045648 - }, { - j : 121.493854, - w : 31.19121, - utm_x : 13524781.12, - utm_y : 3635274.07, - x : 1039624, - y : 1077288 - }, { - j : 121.500079, - w : 31.185541, - utm_x : 13525474.09, - utm_y : 3634540.04, - x : 1039960, - y : 1081640 - }, { - j : 121.484482, - w : 31.202846, - utm_x : 13523737.82, - utm_y : 3636780.87, - x : 1041388, - y : 1069232 - }, { - j : 121.480877, - w : 31.189587, - utm_x : 13523336.51, - utm_y : 3635063.92, - x : 1032484, - y : 1073640 - }, { - j : 121.502652, - w : 31.195209, - utm_x : 13525760.52, - utm_y : 3635791.9, - x : 1046384, - y : 1078728 - } ] - }, - getLnglatIndex : function(cN, cR, cQ) { - var cM = 0; - var cL = 0; - var cS = 10000000, cP = 1000000000; - for ( var cO = 0; cO < this.correct_pts[cN].length; cO++) { - var T = this.getDis(this.correct_pts[cN][cO].x, - this.correct_pts[cN][cO].y, cR, cQ); - if (T < cP) { - if (T < cS) { - cP = cS; - cS = T; - cL = cM; - cM = cO - } else { - sedMinDis = T; - cL = cO - } - } - } - return { - lt : cM, - rb : cL - } - }, - getOMapIndex_mm : function(cN, cS, cR) { - var cM = 0; - var cL = 0; - var cQ = 1294723000, cP = 1294723000; - for ( var cO = 0; cO < this.correct_pts[cN].length; cO++) { - var T = this.getDis( - this.correct_pts[cN][cO].utm_x, - this.correct_pts[cN][cO].utm_y, cS, cR); - if (T < cP) { - if (T < cQ) { - cP = cQ; - cQ = T; - cL = cM; - cM = cO - } else { - sedMinDis = T; - cL = cO - } - } - } - return { - lt : cM, - rb : cL - } - }, - getDis : function(T, cN, cL, cM) { - return Math.abs(T - cL) + Math.abs(cN - cM) - }, - toMap : function(cN, T, cO) { - var cL = (T - cO) * this.num[cN].num; - var cM = (T + cO) * this.num[cN].num - * this.num[cN].num2; - return { - x : cL, - y : cM - } - }, - fromMap : function(cN, T, cO) { - cO = cO / this.num[cN].num2; - var cL = (T + cO) / (this.num[cN].num * 2); - var cM = (cO - T) / (this.num[cN].num * 2); - return { - x : cL, - y : cM - } - }, - getDgPix_mm : function(cO, cT, cP) { - var cS = this.fromMap(cO, - this.correct_pts[cO][cT].x, - this.correct_pts[cO][cT].y); - var cQ = this.fromMap(cO, - this.correct_pts[cO][cP].x, - this.correct_pts[cO][cP].y); - var cY = cS.x, cL = cS.y; - var cX = cQ.x, T = cQ.y; - var cV = this.correct_pts[cO][cT].utm_x, cN = this.correct_pts[cO][cT].utm_y; - var cR = this.correct_pts[cO][cP].utm_x, cM = this.correct_pts[cO][cP].utm_y; - var cW = Math.abs((cR - cV) * 100000 / (cX - cY)); - var cU = Math.abs((cM - cN) * 100000 / (T - cL)); - return { - j : cW, - w : cU, - x : 100000 / cW, - y : 100000 / cU - } - }, - getPx_mm : function(c1, cX, cW, cO, cN) { - var cM = this.correct_pts[c1][cO]; - var T = this.correct_pts[c1][cO]; - var cU = this.getDgPix_mm(c1, cO, cN); - var cQ = this.fromMap(c1, cM.x, cM.y); - var cP = T.utm_x, c3 = T.utm_y; - var c2 = cX, cV = cW; - var c0 = cQ.x; - var cL = cQ.y; - var cS = c2 - cP, cZ = cV - c3; - var cT = cS * cU.x + c0; - var cR = -cZ * cU.y + cL; - var cY = this.toMap(c1, cT, cR); - return cY - }, - getJw_mm : function(cZ, cU, cT, cP, cO) { - var cS = this.correct_pts[cZ][cP]; - var cL = this.correct_pts[cZ][cP]; - var cV = this.getDgPix_mm(cZ, cP, cO); - var cX = this.fromMap(cZ, cU, cT); - var cN = this.fromMap(cZ, cS.x, cS.y); - var cQ = cL.utm_x, c0 = cL.utm_y; - var cY = cN.x; - var cM = cN.y; - var c1 = cX.x - cY, cW = cM - cX.y; - var cR = c1 / cV.x + cQ; - var T = cW / cV.y + c0; - return { - lng : cR, - lat : T - } - }, - getOMap_pts : function(cL, T) { - return this.getOMap_index(cL, T.lng, T.lat, T.lt, - T.rb) - }, - getMapJw_pts : function(cL, T) { - return this.getMapJw_index(cL, T.lng, - 9998336 - T.lat, T.lt, T.rb) - }, - getOMap_index : function(cQ, cP, cO, T, cN) { - if (!T || !cN) { - var cL = this.getOMapIndex_mm(cQ, cP, cO) - } else { - var cL = { - lt : T, - rb : cN - } - } - var cM = this.getPx_mm(cQ, cP, cO, cL.lt, cL.rb); - return { - x : Math.floor(cM.x), - y : 9998336 - Math.floor(cM.y), - lt : cL.lt, - rb : cL.rb - } - }, - getMapJw_index : function(cP, cM, cQ, cL, cO) { - if (!cL || !cO) { - var cN = this.getLnglatIndex(cP, cM, cQ) - } else { - var cN = { - lt : cL, - rb : cO - } - } - var T = this.getJw_mm(cP, cM, cQ, cN.lt, cN.rb); - return { - lng : T.lng, - lat : T.lat, - lt : cN.lt, - rb : cN.rb - } - } - }); - function ba() { - } - ba.prototype = new bd(); - a8.extend(ba, - { - EARTHRADIUS : 6370996.81, - MCBAND : [ 12890594.86, 8362377.87, 5591021, 3481989.83, - 1678043.12, 0 ], - LLBAND : [ 75, 60, 45, 30, 15, 0 ], - MC2LL : [ - [ 1.410526172116255e-8, 0.00000898305509648872, - -1.9939833816331, 200.9824383106796, - -187.2403703815547, 91.6087516669843, - -23.38765649603339, 2.57121317296198, - -0.03801003308653, 17337981.2 ], - [ -7.435856389565537e-9, 0.000008983055097726239, - -0.78625201886289, 96.32687599759846, - -1.85204757529826, -59.36935905485877, - 47.40033549296737, -16.50741931063887, - 2.28786674699375, 10260144.86 ], - [ -3.030883460898826e-8, 0.00000898305509983578, - 0.30071316287616, 59.74293618442277, - 7.357984074871, -25.38371002664745, - 13.45380521110908, -3.29883767235584, - 0.32710905363475, 6856817.37 ], - [ -1.981981304930552e-8, 0.000008983055099779535, - 0.03278182852591, 40.31678527705744, - 0.65659298677277, -4.44255534477492, - 0.85341911805263, 0.12923347998204, - -0.04625736007561, 4482777.06 ], - [ 3.09191371068437e-9, 0.000008983055096812155, - 0.00006995724062, 23.10934304144901, - -0.00023663490511, -0.6321817810242, - -0.00663494467273, 0.03430082397953, - -0.00466043876332, 2555164.4 ], - [ 2.890871144776878e-9, 0.000008983055095805407, - -3.068298e-8, 7.47137025468032, - -0.00000353937994, -0.02145144861037, - -0.00001234426596, 0.00010322952773, - -0.00000323890364, 826088.5 ] ], - LL2MC : [ - [ -0.0015702102444, 111320.7020616939, - 1704480524535203, -10338987376042340, - 26112667856603880, -35149669176653700, - 26595700718403920, -10725012454188240, - 1800819912950474, 82.5 ], - [ 0.0008277824516172526, 111320.7020463578, - 647795574.6671607, -4082003173.641316, - 10774905663.51142, -15171875531.51559, - 12053065338.62167, -5124939663.577472, - 913311935.9512032, 67.5 ], - [ 0.00337398766765, 111320.7020202162, - 4481351.045890365, -23393751.19931662, - 79682215.47186455, -115964993.2797253, - 97236711.15602145, -43661946.33752821, - 8477230.501135234, 52.5 ], - [ 0.00220636496208, 111320.7020209128, - 51751.86112841131, 3796837.749470245, - 992013.7397791013, -1221952.21711287, - 1340652.697009075, -620943.6990984312, - 144416.9293806241, 37.5 ], - [ -0.0003441963504368392, 111320.7020576856, - 278.2353980772752, 2485758.690035394, - 6070.750963243378, 54821.18345352118, - 9540.606633304236, -2710.55326746645, - 1405.483844121726, 22.5 ], - [ -0.0003218135878613132, 111320.7020701615, - 0.00369383431289, 823725.6402795718, - 0.46104986909093, 2351.343141331292, - 1.58060784298199, 8.77738589078284, - 0.37238884252424, 7.45 ] ], - getDistanceByMC : function(cP, cN) { - if (!cP || !cN) { - return 0 - } - var cL, cO, T, cM; - cP = this.convertMC2LL(cP); - if (!cP) { - return 0 - } - cL = this.toRadians(cP.lng); - cO = this.toRadians(cP.lat); - cN = this.convertMC2LL(cN); - if (!cN) { - return 0 - } - T = this.toRadians(cN.lng); - cM = this.toRadians(cN.lat); - return this.getDistance(cL, T, cO, cM) - }, - getDistanceByLL : function(cP, cN) { - if (!cP || !cN) { - return 0 - } - cP.lng = this.getLoop(cP.lng, -180, 180); - cP.lat = this.getRange(cP.lat, -74, 74); - cN.lng = this.getLoop(cN.lng, -180, 180); - cN.lat = this.getRange(cN.lat, -74, 74); - var cL, T, cO, cM; - cL = this.toRadians(cP.lng); - cO = this.toRadians(cP.lat); - T = this.toRadians(cN.lng); - cM = this.toRadians(cN.lat); - return this.getDistance(cL, T, cO, cM) - }, - convertMC2LL : function(cL) { - var cM, cO; - cM = new cd(Math.abs(cL.lng), Math.abs(cL.lat)); - for ( var cN = 0; cN < this.MCBAND.length; cN++) { - if (cM.lat >= this.MCBAND[cN]) { - cO = this.MC2LL[cN]; - break - } - } - var T = this.convertor(cL, cO); - var cL = new cd(T.lng.toFixed(6), T.lat.toFixed(6)); - return cL - }, - convertLL2MC : function(T) { - var cL, cN; - T.lng = this.getLoop(T.lng, -180, 180); - T.lat = this.getRange(T.lat, -74, 74); - cL = new cd(T.lng, T.lat); - for ( var cM = 0; cM < this.LLBAND.length; cM++) { - if (cL.lat >= this.LLBAND[cM]) { - cN = this.LL2MC[cM]; - break - } - } - if (!cN) { - for ( var cM = this.LLBAND.length - 1; cM >= 0; cM--) { - if (cL.lat <= -this.LLBAND[cM]) { - cN = this.LL2MC[cM]; - break - } - } - } - var cO = this.convertor(T, cN); - var T = new cd(cO.lng.toFixed(2), cO.lat.toFixed(2)); - return T - }, - convertor : function(cM, cN) { - if (!cM || !cN) { - return - } - var T = cN[0] + cN[1] * Math.abs(cM.lng); - var cL = Math.abs(cM.lat) / cN[9]; - var cO = cN[2] + cN[3] * cL + cN[4] * cL * cL + cN[5] * cL - * cL * cL + cN[6] * cL * cL * cL * cL + cN[7] * cL - * cL * cL * cL * cL + cN[8] * cL * cL * cL * cL - * cL * cL; - T *= (cM.lng < 0 ? -1 : 1); - cO *= (cM.lat < 0 ? -1 : 1); - return new cd(T, cO) - }, - getDistance : function(cL, T, cN, cM) { - return this.EARTHRADIUS - * Math.acos((Math.sin(cN) * Math.sin(cM) + Math - .cos(cN) - * Math.cos(cM) * Math.cos(T - cL))) - }, - toRadians : function(T) { - return Math.PI * T / 180 - }, - toDegrees : function(T) { - return (180 * T) / Math.PI - }, - getRange : function(cM, cL, T) { - if (cL != null) { - cM = Math.max(cM, cL) - } - if (T != null) { - cM = Math.min(cM, T) - } - return cM - }, - getLoop : function(cM, cL, T) { - while (cM > T) { - cM -= T - cL - } - while (cM < cL) { - cM += T - cL - } - return cM - } - }); - a8.extend(ba.prototype, { - lngLatToMercator : function(T) { - return ba.convertLL2MC(T) - }, - lngLatToPoint : function(T) { - var cL = ba.convertLL2MC(T); - return new bu(cL.lng, cL.lat) - }, - mercatorToLngLat : function(T) { - return ba.convertMC2LL(T) - }, - pointToLngLat : function(T) { - var cL = new cd(T.x, T.y); - return ba.convertMC2LL(cL) - }, - pointToPixel : function(cL, cP, cO, cN, cQ) { - if (!cL) { - return - } - cL = this.lngLatToMercator(cL, cQ); - var cM = this.getZoomUnits(cP); - var T = Math.round((cL.lng - cO.lng) / cM + cN.width / 2); - var cR = Math.round((cO.lat - cL.lat) / cM + cN.height / 2); - return new bu(T, cR) - }, - pixelToPoint : function(T, cS, cO, cM, cL) { - if (!T) { - return - } - var cR = this.getZoomUnits(cS); - var cP = cO.lng + cR * (T.x - cM.width / 2); - var cN = cO.lat - cR * (T.y - cM.height / 2); - var cQ = new cd(cP, cN); - return this.mercatorToLngLat(cQ, cL) - }, - getZoomUnits : function(T) { - return Math.pow(2, (18 - T)) - } - }); - function cE() { - } - cE.prototype = new ba(); - a8.extend(cE.prototype, { - lngLatToMercator : function(cL, T) { - return this._convert2DTo3D(T, ba.convertLL2MC(cL)) - }, - mercatorToLngLat : function(cL, T) { - return ba.convertMC2LL(this._convert3DTo2D(T, cL)) - }, - lngLatToPoint : function(cM, T) { - var cL = this._convert2DTo3D(T, ba.convertLL2MC(cM)); - return new bu(cL.lng, cL.lat) - }, - pointToLngLat : function(cL, T) { - var cM = new cd(cL.x, cL.y); - return ba.convertMC2LL(this._convert3DTo2D(T, cM)) - }, - _convert2DTo3D : function(cM, T) { - var cL = b6.getOMap_pts(cM || "bj", T); - return new cd(cL.x, cL.y) - }, - _convert3DTo2D : function(cM, T) { - var cL = b6.getMapJw_pts(cM || "bj", T); - return new cd(cL.lng, cL.lat) - }, - getZoomUnits : function(T) { - return Math.pow(2, (20 - T)) - } - }); - function bG() { - this._type = "overlay" - } - a8.lang.inherits(bG, a8.lang.Class, "Overlay"); - bG.getZIndex = function(T) { - T = T * 1; - if (!T) { - return 0 - } - return (T * -100000) << 1 - }; - a8.extend(bG.prototype, { - _i : function(T) { - if (!this.domElement && I(this.initialize)) { - this.domElement = this.initialize(T); - if (this.domElement) { - this.domElement.style.WebkitUserSelect = "none" - } - } - this.draw() - }, - initialize : function(T) { - throw "initialize\u65b9\u6cd5\u672a\u5b9e\u73b0" - }, - draw : function() { - throw "draw\u65b9\u6cd5\u672a\u5b9e\u73b0" - }, - remove : function() { - if (this.domElement && this.domElement.parentNode) { - this.domElement.parentNode.removeChild(this.domElement) - } - this.domElement = null; - this.dispatchEvent(new bg("onremove")) - }, - hide : function() { - if (this.domElement) { - a8.dom.hide(this.domElement) - } - }, - show : function() { - if (this.domElement) { - a8.dom.show(this.domElement) - } - }, - isVisible : function() { - if (!this.domElement) { - return false - } - if (this.domElement.style.display == "none" - || this.domElement.style.visibility == "hidden") { - return false - } - return true - } - }); - BMap.register(function(cM) { - var T = cM.temp; - T.overlayDiv = cM.overlayDiv = cL(cM.platform, 200); - cM._panes.floatPane = cL(T.overlayDiv, 800); - cM._panes.markerMouseTarget = cL(T.overlayDiv, 700); - cM._panes.floatShadow = cL(T.overlayDiv, 600); - cM._panes.labelPane = cL(T.overlayDiv, 500); - cM._panes.markerPane = cL(T.overlayDiv, 400); - cM._panes.markerShadow = cL(T.overlayDiv, 300); - cM._panes.mapPane = cL(T.overlayDiv, 200); - function cL(cN, cQ) { - var cP = aa("div"), cO = cP.style; - cO.position = "absolute"; - cO.top = cO.left = cO.width = cO.height = "0"; - cO.zIndex = cQ; - cN.appendChild(cP); - return cP - } - }); - function Y() { - a8.lang.Class.call(this); - bG.call(this); - this.map = null; - this._visible = true; - this.infoWindow = null; - this._dblclickTime = 0 - } - a8.lang.inherits(Y, bG, "OverlayInternal"); - a8.extend(Y.prototype, { - initialize : function(T) { - this.map = T; - a8.lang.Class.call(this, this.guid); - return null - }, - getMap : function() { - return this.map - }, - draw : function() { - }, - remove : function() { - this.map = null; - a8.lang.decontrol(this.guid); - bG.prototype.remove.call(this) - }, - hide : function() { - if (this._visible == false) { - return - } - this._visible = false - }, - show : function() { - if (this._visible == true) { - return - } - this._visible = true - }, - isVisible : function() { - if (!this.domElement) { - return false - } - return !!this._visible - }, - getContainer : function() { - return this.domElement - }, - setConfig : function(cL) { - cL = cL || {}; - for ( var T in cL) { - this._config[T] = cL[T] - } - }, - setZIndex : function(T) { - this.zIndex = T - }, - enableMassClear : function() { - this._config.enableMassClear = true - }, - disableMassClear : function() { - this._config.enableMassClear = false - }, - addContextMenu : function(T) { - this._menu = T - }, - removeContextMenu : function(T) { - this._menu = null - } - }); - function cs() { - this.map = null; - this._overlays = {}; - this._customOverlays = [] - } - BMap - .register(function(cL) { - var T = new cs(); - T.map = cL; - cL._overlays = T._overlays; - cL._customOverlays = T._customOverlays; - cL.addEventListener("load", function(cM) { - T.draw(cM) - }); - cL.addEventListener("moveend", function(cM) { - T.draw(cM) - }); - if (a8.browser.ie && a8.browser.ie < 8 - || document.compatMode == "BackCompat") { - cL.addEventListener("zoomend", function(cM) { - setTimeout(function() { - T.draw(cM) - }, 20) - }) - } else { - cL.addEventListener("zoomend", function(cM) { - T.draw(cM) - }) - } - cL.addEventListener("maptypechange", function(cM) { - T.draw(cM) - }); - cL - .addEventListener( - "addoverlay", - function(cQ) { - var cN = cQ.target; - if (cN instanceof Y) { - if (!T._overlays[cN.guid]) { - T._overlays[cN.guid] = cN - } - } else { - var cP = false; - for ( var cO = 0, cM = T._customOverlays.length; cO < cM; cO++) { - if (T._customOverlays[cO] === cN) { - cP = true; - break - } - } - if (!cP) { - T._customOverlays.push(cN) - } - } - }); - cL - .addEventListener( - "removeoverlay", - function(cP) { - var cN = cP.target; - if (cN instanceof Y) { - delete T._overlays[cN.guid] - } else { - for ( var cO = 0, cM = T._customOverlays.length; cO < cM; cO++) { - if (T._customOverlays[cO] === cN) { - T._customOverlays.splice(cO, 1); - break - } - } - } - }); - cL - .addEventListener( - "clearoverlays", - function(cP) { - this.closeInfoWindow(); - for ( var cO in T._overlays) { - if (T._overlays[cO]._config.enableMassClear) { - T._overlays[cO].remove(); - delete T._overlays[cO] - } - } - for ( var cN = 0, cM = T._customOverlays.length; cN < cM; cN++) { - if (T._customOverlays[cN].enableMassClear != false) { - T._customOverlays[cN].remove(); - T._customOverlays[cN] = null; - T._customOverlays.splice(cN, 1); - cN--; - cM-- - } - } - }); - cL.addEventListener("infowindowopen", function(cN) { - var cM = this.infoWindow; - if (cM) { - a8.dom.hide(cM.popDom); - a8.dom.hide(cM.shadowDom) - } - }); - cL.addEventListener("movestart", function() { - if (this.getInfoWindow()) { - this.getInfoWindow()._setOverflow() - } - }); - cL.addEventListener("moveend", function() { - if (this.getInfoWindow()) { - this.getInfoWindow()._resetOverflow() - } - }) - }); - cs.prototype.draw = function(cM) { - for ( var cL in this._overlays) { - this._overlays[cL].draw() - } - a8.array.each(this._customOverlays, function(cN) { - cN.draw() - }); - if (this.map.temp.infoWin) { - this.map.temp.infoWin.setPosition() - } - if (BMap.DrawerSelector) { - var T = BMap.DrawerSelector.getDrawer(this.map); - T.setPalette() - } - }; - function cF(T) { - Y.call(this); - this._config = { - strokeColor : "#3a6bdb", - strokeWeight : 5, - strokeOpacity : 0.65, - strokeStyle : "solid", - enableMassClear : true, - getParseTolerance : null, - getParseCacheIndex : null, - enableEditing : false, - mouseOverTolerance : 15, - use3DCoords : false, - clickable : true - }; - T = T || {}; - this.setConfig(T); - if (this._config.strokeWeight <= 0) { - this._config.strokeWeight = 5 - } - if (this._config.strokeOpacity < 0 || this._config.strokeOpacity > 1) { - this._config.strokeOpacity = 0.65 - } - if (this._config.fillOpacity < 0 || this._config.fillOpacity > 1) { - this._config.fillOpacity = 0.65 - } - if (this._config.strokeStyle != "solid" - && this._config.strokeStyle != "dashed") { - this._config.strokeStyle = "solid" - } - if (ch(T.enableClicking)) { - this._config.clickable = T.enableClicking - } - this.domElement = null; - this._bounds = new BMap.Bounds(0, 0, 0, 0); - this._parseCache = []; - this.vertexMarkers = []; - this._temp = {} - } - a8.lang.inherits(cF, Y, "Graph"); - cF.getGraphPoints = function(cL) { - var T = []; - if (!cL) { - return T - } - if (b3(cL)) { - var cM = cL.split(";"); - a8.array.each(cM, function(cO) { - var cN = cO.split(","); - T.push(new cd(cN[0], cN[1])) - }) - } - if (cL.constructor == Array && cL.length > 0) { - T = cL - } - return T - }; - cF.parseTolerance = [ 0.09, 0.005, 0.0001, 0.00001 ]; - a8.extend(cF.prototype, { - initialize : function(T) { - this.map = T; - return null - }, - draw : function() { - return; - if (!this.domElement) { - return - } - if (this._drawer) { - this._drawer.setPath(this.domElement, this - ._getDisplayPixels(this.points)) - } - }, - setPath : function(T) { - this._parseCache.length = 0; - this.points = cF.getGraphPoints(T).slice(0); - this._calcBounds() - }, - _calcBounds : function() { - if (!this.points) { - return - } - var T = this; - T._bounds = new bN(); - a8.array.each(this.points, function(cL) { - T._bounds.extend(cL) - }) - }, - getPath : function() { - return this.points - }, - setPositionAt : function(cL, T) { - if (!T || !this.points[cL]) { - return - } - this._parseCache.length = 0; - this.points[cL] = new cd(T.lng, T.lat); - this._calcBounds() - }, - setStrokeColor : function(T) { - this._config.strokeColor = T - }, - getStrokeColor : function() { - return this._config.strokeColor - }, - setStrokeWeight : function(T) { - if (T > 0) { - this._config.strokeWeight = T - } - }, - getStrokeWeight : function() { - return this._config.strokeWeight - }, - setStrokeOpacity : function(T) { - if (!T || T > 1 || T < 0) { - return - } - this._config.strokeOpacity = T - }, - getStrokeOpacity : function() { - return this._config.strokeOpacity - }, - setFillOpacity : function(T) { - if (T > 1 || T < 0) { - return - } - this._config.fillOpacity = T - }, - getFillOpacity : function() { - return this._config.fillOpacity - }, - setStrokeStyle : function(T) { - if (T != "solid" && T != "dashed") { - return - } - this._config.strokeStyle = T - }, - getStrokeStyle : function() { - return this._config.strokeStyle - }, - setFillColor : function(T) { - this._config.fillColor = T || "" - }, - getFillColor : function() { - return this._config.fillColor - }, - getBounds : function() { - return this._bounds - }, - remove : function() { - if (this.map) { - this.map.removeEventListener("onmousemove", - this._graphMouseEvent) - } - Y.prototype.remove.call(this); - this._parseCache.length = 0 - }, - enableEditing : function() { - this._config.enableEditing = true - }, - disableEditing : function() { - this._config.enableEditing = false - } - }); - function n(T) { - Y.call(this); - this.map = null; - this.domElement = null; - this._config = { - width : 0, - height : 0, - offset : new aH(0, 0), - opacity : 1, - background : "transparent", - lineStroke : 1, - lineColor : "#000", - lineStyle : "solid", - point : null - }; - this.setConfig(T); - this.point = this._config.point - } - a8.lang.inherits(n, Y, "Division"); - a8 - .extend( - n.prototype, - { - _addDom : function() { - var T = this._config; - var cM = this.content; - var cL = [ '
    '); - cL.push(cM); - cL.push("
    "); - this.domElement = at( - this.map.getPanes().markerMouseTarget, cL - .join("")) - }, - initialize : function(T) { - this.map = T; - this._addDom(); - if (this.domElement) { - a8.on(this.domElement, "mousedown", - function(cL) { - aP(cL) - }) - } - return this.domElement - }, - draw : function() { - var T = this.map - .pointToOverlayPixel(this._config.point); - this._config.offset = new aH( - -Math.round(this._config.width / 2) - - Math - .round(this._config.lineStroke), - -Math.round(this._config.height / 2) - - Math - .round(this._config.lineStroke)); - this.domElement.style.left = T.x - + this._config.offset.width + "px"; - this.domElement.style.top = T.y - + this._config.offset.height + "px" - }, - getPosition : function() { - return this._config.point - }, - _getPixel : function(T) { - return this.map.pointToPixel(this.getPosition()) - }, - setPosition : function(T) { - this._config.point = T; - this.draw() - }, - setDimension : function(T, cL) { - this._config.width = Math.round(T); - this._config.height = Math.round(cL); - if (this.domElement) { - this.domElement.style.width = this._config.width - + "px"; - this.domElement.style.height = this._config.height - + "px"; - this.draw() - } - } - }); - function M(cL, cM, cN) { - if (!cL || !cM) { - return - } - this.imageUrl = cL; - this.size = cM; - var T = new aH(Math.floor(cM.width / 2), Math.floor(cM.height / 2)); - var cO = { - anchor : T, - imageOffset : new aH(0, 0) - }; - cN = cN || {}; - a8.extend(cO, cN); - this.anchor = cO.anchor; - this.imageOffset = cO.imageOffset; - this.infoWindowAnchor = cN.infoWindowAnchor || this.anchor; - this.printImageUrl = cN.printImageUrl || "" - } - var bD = M.prototype; - bD.setImageUrl = function(T) { - if (!T) { - return - } - this.imageUrl = T - }; - bD.setPrintImageUrl = function(T) { - if (!T) { - return - } - this.printImageUrl = T - }; - bD.setSize = function(T) { - if (!T) { - return - } - this.size = new aH(T.width, T.height) - }; - bD.setAnchor = function(T) { - if (!T) { - return - } - this.anchor = new aH(T.width, T.height) - }; - bD.setImageOffset = function(T) { - if (!T) { - return - } - this.imageOffset = new aH(T.width, T.height) - }; - bD.setInfoWindowAnchor = function(T) { - if (!T) { - return - } - this.infoWindowAnchor = new aH(T.width, T.height) - }; - bD.toString = function() { - return "Icon" - }; - function bP(cM, cL) { - a8.lang.Class.call(this); - this.content = cM; - this.map = null; - this._config = { - width : 0, - height : 0, - maxWidth : 600, - offset : new aH(0, 0), - title : "", - maxContent : "", - enableMaximize : false, - enableAutoPan : true, - enableCloseOnClick : true, - margin : [ 10, 10, 40, 10 ], - collisions : [ [ 10, 10 ], [ 10, 10 ], [ 10, 10 ], [ 10, 10 ] ], - ifMaxScene : false, - onClosing : function() { - return true - } - }; - a8.extend(this._config, cL || {}); - if (this._config.width != 0) { - if (this._config.width < 220) { - this._config.width = 220 - } - if (this._config.width > 730) { - this._config.width = 730 - } - } - if (this._config.height != 0) { - if (this._config.height < 60) { - this._config.height = 60 - } - if (this._config.height > 650) { - this._config.height = 650 - } - } - if (this._config.maxWidth != 0) { - if (this._config.maxWidth < 220) { - this._config.maxWidth = 220 - } - if (this._config.maxWidth > 730) { - this._config.maxWidth = 730 - } - } - this.isWinMax = false; - this.IMG_PATH = cc.imgPath; - this.overlay = null; - var T = this; - cA.load("infowindow", function() { - T._draw() - }) - } - a8.lang.inherits(bP, a8.lang.Class, "InfoWindow"); - a8.extend(bP.prototype, { - setWidth : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 220) { - T = 220 - } - if (T > 730) { - T = 730 - } - } - this._config.width = T - }, - setHeight : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 60) { - T = 60 - } - if (T > 650) { - T = 650 - } - } - this._config.height = T - }, - setMaxWidth : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 220) { - T = 220 - } - if (T > 730) { - T = 730 - } - } - this._config.maxWidth = T - }, - setTitle : function(T) { - this._config.title = T - }, - getTitle : function() { - return this._config.title - }, - setContent : function(T) { - this.content = T - }, - getContent : function() { - return this.content - }, - setMaxContent : function(T) { - this._config.maxContent = T + "" - }, - redraw : function() { - }, - enableAutoPan : function() { - this._config.enableAutoPan = true - }, - disableAutoPan : function() { - this._config.enableAutoPan = false - }, - enableCloseOnClick : function() { - this._config.enableCloseOnClick = true - }, - disableCloseOnClick : function() { - this._config.enableCloseOnClick = false - }, - enableMaximize : function() { - this._config.enableMaximize = true - }, - disableMaximize : function() { - this._config.enableMaximize = false - }, - show : function() { - this._visible = true - }, - hide : function() { - this._visible = false - }, - close : function() { - this.hide() - }, - maximize : function() { - this.isWinMax = true - }, - restore : function() { - this.isWinMax = false - }, - isVisible : function() { - return this.isOpen() - }, - isOpen : function() { - return false - }, - getPosition : function() { - if (this.overlay && this.overlay.getPosition) { - return this.overlay.getPosition() - } - }, - getOffset : function() { - return this._config.offset - } - }); - bz.prototype.openInfoWindow = function(cN, T) { - if (!(cN instanceof bP) || !(T instanceof cd)) { - return - } - var cL = this.temp; - if (!cL.marker) { - var cM = new M(cc.imgPath + "blank.gif", { - width : 1, - height : 1 - }); - cL.marker = new ad(T, { - icon : cM, - width : 1, - height : 1, - offset : new aH(0, 0), - infoWindowOffset : new aH(0, 0), - clickable : false - }); - cL.marker._fromMap = 1 - } else { - cL.marker.setPosition(T) - } - this.addOverlay(cL.marker); - cL.marker.openInfoWindow(cN) - }; - bz.prototype.closeInfoWindow = function() { - var T = this.temp.infoWin || this.temp._infoWin; - if (T && T.overlay) { - T.overlay.closeInfoWindow() - } - }; - Y.prototype.openInfoWindow = function(T) { - if (this.map) { - this.map.closeInfoWindow(); - T._visible = true; - this.map.temp._infoWin = T; - T.overlay = this; - a8.lang.Class.call(T, T.guid) - } - }; - Y.prototype.closeInfoWindow = function() { - if (this.map && this.map.temp._infoWin) { - this.map.temp._infoWin._visible = false; - a8.lang.decontrol(this.map.temp._infoWin.guid); - this.map.temp._infoWin = null - } - }; - function ag(cM, cL) { - Y.call(this); - this.content = cM; - this.map = null; - this.domElement = null; - this._config = { - width : 0, - offset : new aH(0, 0), - styles : { - backgroundColor : "#fff", - border : "1px solid #f00", - padding : "1px", - whiteSpace : "nowrap", - font : "12px " + cc.fontFamily, - zIndex : "80", - MozUserSelect : "none" - }, - position : null, - enableMassClear : true, - clickable : true - }; - cL = cL || {}; - this.setConfig(cL); - if (this._config.width < 0) { - this._config.width = 0 - } - if (ch(cL.enableClicking)) { - this._config.clickable = cL.enableClicking - } - this.point = this._config.position; - var T = this; - cA.load("marker", function() { - T._draw() - }) - } - a8.lang.inherits(ag, Y, "Label"); - a8.extend(ag.prototype, { - getPosition : function() { - if (this._marker) { - return this._marker.getPosition() - } - return this.point - }, - setPosition : function(T) { - if (T instanceof cd && !this.getMarker()) { - this.point = this._config.position = new cd(T.lng, T.lat) - } - }, - setContent : function(T) { - this.content = T - }, - setOpacity : function(T) { - if (T >= 0 && T <= 1) { - this._config.opacity = T - } - }, - setOffset : function(T) { - if (!(T instanceof aH)) { - return - } - this._config.offset = new aH(T.width, T.height) - }, - getOffset : function() { - return this._config.offset - }, - setStyle : function(T) { - T = T || {}; - this._config.styles = a8.extend(this._config.styles, T) - }, - setStyles : function(T) { - return this.setStyle(T) - }, - setTitle : function(T) { - this._config.title = T || "" - }, - getTitle : function() { - return this._config.title - }, - setMarker : function(T) { - this._marker = T; - if (T) { - this.point = this._config.position = T.getPosition() - } else { - this.point = this._config.position = null - } - }, - getMarker : function() { - return this._marker || null - } - }); - window.BMAP_ANIMATION_DROP = 1; - window.BMAP_ANIMATION_BOUNCE = 2; - var au = new M(cc.imgPath + "marker_red_sprite.png", new aH(19, 25), { - anchor : new aH(10, 25), - infoWindowAnchor : new aH(10, 0) - }); - var ar = new M(cc.imgPath + "marker_red_sprite.png", new aH(20, 11), { - anchor : new aH(6, 11), - imageOffset : new aH(-19, -13) - }); - function ad(T, cM) { - Y.call(this); - cM = cM || {}; - this.point = T; - this.map = null; - this._animation = null; - this._config = { - offset : new aH(0, 0), - icon : au, - shadow : ar, - title : "", - label : null, - baseZIndex : 0, - clickable : true, - zIndexFixed : false, - isTop : false, - enableMassClear : true, - enableDragging : false, - raiseOnDrag : false, - restrictDraggingArea : false, - draggingCursor : cc.draggingCursor - }; - this.setConfig(cM); - if (cM.icon && !cM.shadow) { - this._config.shadow = null - } - if (ch(cM.enableClicking)) { - this._config.clickable = cM.enableClicking - } - var cL = this; - cA.load("marker", function() { - cL._draw() - }) - } - ad.TOP_ZINDEX = bG.getZIndex(-90) + 1000000; - ad.DRAG_ZINDEX = ad.TOP_ZINDEX + 1000000; - a8.lang.inherits(ad, Y, "Marker"); - a8.extend(ad.prototype, { - setIcon : function(T) { - if (T instanceof M) { - this._config.icon = T - } - }, - getIcon : function() { - return this._config.icon - }, - setShadow : function(T) { - if (T instanceof M) { - this._config.shadow = T - } - }, - getShadow : function() { - return this._config.shadow - }, - setLabel : function(T) { - this._config.label = T || null - }, - getLabel : function() { - return this._config.label - }, - enableDragging : function() { - this._config.enableDragging = true - }, - disableDragging : function() { - this._config.enableDragging = false - }, - getPosition : function() { - return this.point - }, - setPosition : function(T) { - if (T instanceof cd) { - this.point = new cd(T.lng, T.lat) - } - }, - setTop : function(cL, T) { - this._config.isTop = !!cL; - if (cL) { - this._addi = T || 0 - } - }, - setTitle : function(T) { - this._config.title = T + "" - }, - getTitle : function() { - return this._config.title - }, - setOffset : function(T) { - if (T instanceof aH) { - this._config.offset = T - } - }, - getOffset : function() { - return this._config.offset - }, - setAnimation : function(T) { - this._animation = T - } - }); - function cn(T, cM) { - cF.call(this, cM); - cM = cM || {}; - this._config.fillOpacity = cM.fillOpacity ? cM.fillOpacity : 0.65; - if (cM.fillColor == "") { - this._config.fillColor = "" - } else { - this._config.fillColor = cM.fillColor ? cM.fillColor : "#fff" - } - this.setPath(T); - var cL = this; - cA.load("poly", function() { - cL._draw() - }) - } - a8.lang.inherits(cn, cF, "Polygon"); - a8.extend(cn.prototype, { - setPath : function(cL, T) { - this._userPoints = cF.getGraphPoints(cL).slice(0); - var cM = cF.getGraphPoints(cL).slice(0); - if (cM.length > 1 && !cM[0].equals(cM[cM.length - 1])) { - cM.push(new cd(cM[0].lng, cM[0].lat)) - } - cF.prototype.setPath.call(this, cM, T) - }, - setPositionAt : function(cL, T) { - if (!this._userPoints[cL]) { - return - } - this._userPoints[cL] = new cd(T.lng, T.lat); - this.points[cL] = new cd(T.lng, T.lat); - if (cL == 0 - && !this.points[0] - .equals(this.points[this.points.length - 1])) { - this.points[this.points.length - 1] = new cd(T.lng, T.lat) - } - this._calcBounds() - }, - getPath : function() { - var T = this._userPoints; - if (T.length == 0) { - T = this.points - } - return T - } - }); - function f(T, cM) { - cF.call(this, cM); - this.setPath(T); - var cL = this; - cA.load("poly", function() { - cL._draw() - }) - } - a8.lang.inherits(f, cF, "Polyline"); - function a(cL, T, cM) { - this.point = cL; - this.radius = Math.abs(T); - cn.call(this, [], cM) - } - a.parseTolerance = [ 0.01, 0.0001, 0.00001, 0.000004 ]; - a8.lang.inherits(a, cn, "Circle"); - a8 - .extend( - a.prototype, - { - initialize : function(T) { - this.map = T; - this.points = this._getPerimeterPoints(this.point, - this.radius); - this._calcBounds(); - return null - }, - getCenter : function() { - return this.point - }, - setCenter : function(T, cL) { - if (!T) { - return - } - this.point = T - }, - getRadius : function() { - return this.radius - }, - setRadius : function(T) { - this.radius = Math.abs(T) - }, - _getPerimeterPoints : function(T, cS) { - if (!T || !cS || !this.map) { - return [] - } - var cL = this.map; - var cP = T.lng, cN = T.lat; - var cZ = []; - var cU = cS / 6378800, cR = (Math.PI / 180) * cN, cX = (Math.PI / 180) - * cP; - for ( var cQ = 0; cQ < 360; cQ += 9) { - var cO = (Math.PI / 180) * cQ, cV = Math - .asin(Math.sin(cR) * Math.cos(cU) - + Math.cos(cR) * Math.sin(cU) - * Math.cos(cO)), cT = Math - .atan2(Math.sin(cO) * Math.sin(cU) - * Math.cos(cR), Math.cos(cU) - - Math.sin(cR) * Math.sin(cV)), cW = ((cX - - cT + Math.PI) % (2 * Math.PI)) - - Math.PI, cY = new cd(cW - * (180 / Math.PI), cV * (180 / Math.PI)); - cZ.push(cY) - } - var cM = cZ[0]; - cZ.push(new cd(cM.lng, cM.lat)); - return cZ - } - }); - function bR(T) { - this.map = T; - this.mapTypeLayers = []; - this.tileLayers = []; - this.bufferNumber = 300; - this.realBufferNumber = 0; - this.mapTiles = {}; - this.bufferTiles = {}; - this.numLoading = 0; - this._mapTypeLayerContainer = this._createDiv(1); - this._normalLayerContainer = this._createDiv(2); - T.platform.appendChild(this._mapTypeLayerContainer); - T.platform.appendChild(this._normalLayerContainer) - } - BMap.register(function(cL) { - var T = new bR(cL); - T.initialize() - }); - a8.extend(bR.prototype, { - initialize : function() { - var T = this, cL = T.map; - cL.addEventListener("loadcode", function() { - T.loadTiles() - }); - cL.addEventListener("addtilelayer", function(cM) { - T.addTileLayer(cM) - }); - cL.addEventListener("removetilelayer", function(cM) { - T.removeTileLayer(cM) - }); - cL.addEventListener("setmaptype", function(cM) { - T.setMapType(cM) - }); - cL.addEventListener("zoomstartcode", function(cM) { - T._zoom(cM) - }) - }, - loadTiles : function() { - var T = this; - if (a8.browser.ie) { - try { - document.execCommand("BackgroundImageCache", false, true) - } catch (cL) { - } - } - if (!this.loaded) { - T.initMapTypeTiles() - } - T.moveGridTiles(); - if (!this.loaded) { - this.loaded = true; - cA.load("tile", function() { - T._asyncLoadTiles() - }) - } - }, - initMapTypeTiles : function() { - var cL = this.map.getMapType(); - var cM = cL.getTileLayers(); - for ( var T = 0; T < cM.length; T++) { - var cN = new p(); - a8.extend(cN, cM[T]); - this.mapTypeLayers.push(cN); - cN.initialize(this.map, this._mapTypeLayerContainer) - } - }, - _createDiv : function(cL) { - var T = aa("div"); - T.style.position = "absolute"; - T.style.left = T.style.top = "0"; - T.style.zIndex = cL; - return T - }, - showTile : function(cP, cO, cS) { - var cV = this; - cV.centerPos = cO; - var cR = this.map.getMapType(); - var cM = cV.getTileName(cP, cS); - var cZ = cR.getTileSize(); - var cN = (cP[0] * cZ) + cO[0]; - var cY = 0; - if (cR === BMAP_PERSPECTIVE_MAP && cV.map.getZoom() == 15) { - cY = 0.5 - } - var cL = (cY - 1 - cP[1]) * cZ + cO[1]; - var cT = [ cN, cL ]; - var cU = this.mapTiles[cM]; - if (cU && cU.img) { - bI(cU.img, cT); - if (cU.loaded) { - this._checkTilesLoaded() - } else { - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }) - } - return - } - cU = this.bufferTiles[cM]; - if (cU && cU.img) { - cS.tilesDiv.insertBefore(cU.img, cS.tilesDiv.lastChild); - this.mapTiles[cM] = cU; - bI(cU.img, cT); - if (cU.loaded) { - this._checkTilesLoaded() - } else { - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }) - } - return - } - var cX = 256 * Math.pow(2, (cR.getMaxZoom() - cP[2])); - var cW = new cd(cP[0] * cX, cP[1] * cX); - var cQ = new bu(cP[0], cP[1]); - var T = cS.getTilesUrl(cQ, cP[2]); - cU = new bU(this, T, cT, cP, cS); - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }); - cU._load(); - this.mapTiles[cM] = cU - }, - _checkTilesLoaded : function() { - this.numLoading--; - var T = this; - if (this.numLoading == 0) { - if (this._checkLoadedTimer) { - clearTimeout(this._checkLoadedTimer); - this._checkLoadedTimer = null - } - this._checkLoadedTimer = setTimeout(function() { - if (T.numLoading == 0) { - T.map.dispatchEvent(new bg("ontilesloaded")) - } - T._checkLoadedTimer = null - }, 80) - } - }, - getTileName : function(T, cL) { - if (this.map.getMapType() === BMAP_PERSPECTIVE_MAP) { - return "TILE-" + cL.guid + "-" + this.map.cityCode + "-" + T[0] - + "-" + T[1] + "-" + T[2] - } else { - return "TILE-" + cL.guid + "-" + T[0] + "-" + T[1] + "-" + T[2] - } - }, - hideTile : function(cL) { - var T = cL.img; - if (T) { - J(T); - if (y(T)) { - T.parentNode.removeChild(T) - } - } - delete this.mapTiles[cL.name]; - if (!cL.loaded) { - J(T); - T = null; - cL._callCbks(); - cL.img = null; - cL.mgr = null - } - }, - moveGridTiles : function() { - var da = this.mapTypeLayers; - var cW = da.concat(this.tileLayers); - var c2 = cW.length; - for ( var c4 = 0; c4 < c2; c4++) { - var cP = cW[c4]; - if (cP.baseLayer) { - this.tilesDiv = cP.tilesDiv - } - var dg = this.map; - var dc = dg.getMapType(); - var dh = dc.getProjection(); - var c3 = dg.zoomLevel; - var c6 = dg.mercatorCenter; - this.mapCenterPoint = c6; - var cU = dc.getZoomUnits(c3); - var cX = dc.getZoomFactor(c3); - var cV = Math.ceil(c6.lng / cX); - var cQ = Math.ceil(c6.lat / cX); - var c1 = dc.getTileSize(); - var cO = [ cV, cQ, (c6.lng - cV * cX) / cX * c1, - (c6.lat - cQ * cX) / cX * c1 ]; - var db = cO[0] - Math.ceil((dg.width / 2 - cO[2]) / c1); - var cN = cO[1] - Math.ceil((dg.height / 2 - cO[3]) / c1); - var c7 = cO[0] + Math.ceil((dg.width / 2 + cO[2]) / c1); - var cZ = 0; - if (dc === BMAP_PERSPECTIVE_MAP && dg.getZoom() == 15) { - cZ = 1 - } - var cY = cO[1] + Math.ceil((dg.height / 2 + cO[3]) / c1) + cZ; - this.areaCenter = new cd(c6.lng, c6.lat); - var cM = this.mapTiles; - var cT = -this.areaCenter.lng / cU; - var cS = this.areaCenter.lat / cU; - var de = [ Math.round(cT), Math.round(cS) ]; - var cL = dg.getZoom(); - for ( var df in cM) { - var di = cM[df]; - var dd = di.info; - if (dd[2] != cL - || (dd[2] == cL && (db > dd[0] || c7 <= dd[0] - || cN > dd[1] || cY <= dd[1]))) { - this.hideTile(di) - } - } - var cR = -dg.offsetX + dg.width / 2; - var c0 = -dg.offsetY + dg.height / 2; - cP.tilesDiv.style.left = Math.round(cT + cR) - de[0] + "px"; - cP.tilesDiv.style.top = Math.round(cS + c0) - de[1] + "px"; - var T = []; - for ( var c9 = db; c9 < c7; c9++) { - for ( var c8 = cN; c8 < cY; c8++) { - T.push( [ c9, c8 ]) - } - } - T.sort((function(dj) { - return function(dk, dl) { - return ((0.4 * Math.abs(dk[0] - dj[0]) + 0.6 * Math - .abs(dk[1] - dj[1])) - (0.4 * Math.abs(dl[0] - - dj[0]) + 0.6 * Math.abs(dl[1] - dj[1]))) - } - })( [ cO[0] - 1, cO[1] - 1 ])); - this.numLoading += T.length; - for ( var c9 = 0, c5 = T.length; c9 < c5; c9++) { - this.showTile( [ T[c9][0], T[c9][1], cL ], de, cP) - } - } - return - }, - addTileLayer : function(cN) { - var cM = this; - var T = cN.target; - for ( var cL = 0; cL < cM.tileLayers.length; cL++) { - if (cM.tileLayers[cL] == T) { - return - } - } - T.initialize(this.map, this._normalLayerContainer); - cM.tileLayers.push(T) - }, - removeTileLayer : function(cO) { - var cN = this; - var cL = cO.target; - for ( var cM = 0, T = cN.tileLayers.length; cM < T; cM++) { - if (cL == cN.tileLayers[cM]) { - cN.tileLayers.splice(cM, 1) - } - } - cL.remove() - }, - setMapType : function() { - var cM = this; - var cN = this.mapTypeLayers; - for ( var cL = 0, T = cN.length; cL < T; cL++) { - cN[cL].remove() - } - delete this.tilesDiv; - this.mapTypeLayers = []; - this.bufferTiles = this.mapTiles = {}; - this.initMapTypeTiles(); - this.moveGridTiles() - }, - _zoom : function() { - var T = this; - if (T.zoomsDiv) { - a8.dom.hide(T.zoomsDiv) - } - setTimeout(function() { - T.moveGridTiles(); - T.map.dispatchEvent(new bg("onzoomend")) - }, 10) - } - }); - function bU(cR, T, cO, cL, cN) { - this.mgr = cR; - this.position = cO; - this._cbks = []; - this.name = cR.getTileName(cL, cN); - this.info = cL; - this._transparentPng = cN.isTransparentPng(); - var cS = aa("img"); - cw(cS); - cS.galleryImg = false; - var cQ = cS.style; - var cM = cR.map.getMapType(); - cQ.position = "absolute"; - cQ.border = "none"; - cQ.width = cM.getTileSize() + "px"; - cQ.height = cM.getTileSize() + "px"; - cQ.left = cO[0] + "px"; - cQ.top = cO[1] + "px"; - this.img = cS; - this.src = T; - if (E) { - this.img.style.opacity = 0 - } - var cP = this; - this.img.onload = function(cY) { - cP.loaded = true; - if (!cP.mgr) { - return - } - var cU = cP.mgr; - var cT = cU.bufferTiles; - if (!cT[cP.name]) { - cU.realBufferNumber++; - cT[cP.name] = cP - } - if (cP.img && !y(cP.img)) { - if (cN.tilesDiv) { - cN.tilesDiv.appendChild(cP.img); - if (a8.browser.ie <= 6 && a8.browser.ie > 0 - && cP._transparentPng) { - cP.img.style.cssText += ';filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + cP.src + '",sizingMethod=scale);' - } - } - } - var cW = cU.realBufferNumber - cU.bufferNumber; - for ( var cX in cT) { - if (cW <= 0) { - break - } - if (!cU.mapTiles[cX]) { - cT[cX].mgr = null; - var cV = cT[cX].img; - if (cV && cV.parentNode) { - cV.parentNode.removeChild(cV); - J(cV) - } - cV = null; - cT[cX].img = null; - delete cT[cX]; - cU.realBufferNumber--; - cW-- - } - } - if (E) { - new g( { - fps : 20, - duration : 200, - render : function(cZ) { - if (cP.img && cP.img.style) { - cP.img.style.opacity = cZ * 1 - } - }, - finish : function() { - if (cP.img && cP.img.style) { - delete cP.img.style.opacity - } - } - }) - } - cP._callCbks() - }; - this.img.onerror = function() { - var cU = cP.img, cV = cP.img.getAttribute("isError") || 0; - if (m && cV < 5) { - cV++; - cU.setAttribute("isError", cV); - cU.src = T + "&t=" + new Date().getTime() - } else { - cP._callCbks(); - if (!cP.mgr) { - return - } - var cT = cP.mgr; - var cW = cT.map.getMapType(); - if (cW.getErrorImageUrl()) { - cP.error = true; - cP.img.src = cW.getErrorImageUrl(); - if (cP.img && !y(cP.img)) { - cN.tilesDiv.appendChild(cP.img) - } - } - } - }; - cS = null - } - bU.prototype._addLoadCbk = function(T) { - this._cbks.push(T) - }; - bU.prototype._load = function() { - if (a8.browser.ie > 0 && a8.browser.ie <= 6 && this._transparentPng) { - this.img.src = cc.imgPath + "blank.gif" - } else { - this.img.src = this.src - } - }; - bU.prototype._callCbks = function() { - var cL = this; - for ( var T = 0; T < cL._cbks.length; T++) { - cL._cbks[T]() - } - cL._cbks.length = 0 - }; - function J(cN) { - if (!cN) { - return - } - cN.onload = cN.onerror = null; - var cL = cN.attributes, cM, T, cO; - if (cL) { - T = cL.length; - for (cM = 0; cM < T; cM += 1) { - cO = cL[cM].name; - if (I(cN[cO])) { - cN[cO] = null - } - } - } - cL = cN.children; - if (cL) { - T = cL.length; - for (cM = 0; cM < T; cM += 1) { - J(cN.children[cM]) - } - } - } - var E = (!a8.browser.ie || a8.browser.ie > 8); - function p(T) { - this.opts = T || {}; - this.copyright = this.opts.copyright || null; - this.transparentPng = this.opts.transparentPng || false; - this.baseLayer = this.opts.baseLayer || false; - this.zIndex = this.opts.zIndex || 0; - this.guid = p._guid++ - } - p._guid = 0; - a8.lang.inherits(p, a8.lang.Class, "TileLayer"); - a8.extend(p.prototype, { - initialize : function(cM, T) { - if (this.baseLayer) { - this.zIndex = -100 - } - this.map = cM; - if (!this.tilesDiv) { - var cN = aa("div"); - var cL = cN.style; - if (!a8.platform.isAndroid) { - T.style.WebkitBackfaceVisibility = "hidden" - } - cL.position = "absolute"; - cL.zIndex = this.zIndex; - cL.left = Math.ceil(-cM.offsetX + cM.width / 2) + "px"; - cL.top = Math.ceil(-cM.offsetY + cM.height / 2) + "px"; - T.appendChild(cN); - this.tilesDiv = cN - } - }, - remove : function() { - if (this.tilesDiv && this.tilesDiv.parentNode) { - this.tilesDiv.innerHTML = ""; - this.tilesDiv.parentNode.removeChild(this.tilesDiv) - } - delete this.tilesDiv - }, - isTransparentPng : function() { - return this.transparentPng - }, - getTilesUrl : function(cL, cM) { - var T = ""; - if (this.opts.tileUrlTemplate) { - T = this.opts.tileUrlTemplate.replace(/\{X\}/, cL.x); - T = T.replace(/\{Y\}/, cL.y); - T = T.replace(/\{Z\}/, cM) - } - return T - }, - getCopyright : function() { - return this.copyright - }, - getMapType : function() { - return this.mapType || BMAP_NORMAL_MAP - } - }); - function aC(T) { - p.call(this, T); - this._opts = {}; - T = T || {}; - this._opts = a8.object.extend(this._opts, T); - if (this._opts.predictDate) { - if (this._opts.predictDate.weekday < 1 - || this._opts.predictDate.weekday > 7) { - this._opts.predictDate = 1 - } - if (this._opts.predictDate.hour < 0 - || this._opts.predictDate.hour > 23) { - this._opts.predictDate.hour = 0 - } - } - this._tileUrl = "http://its.map.baidu.com:8002/traffic/" - } - aC.prototype = new p(); - aC.prototype.initialize = function(cL, T) { - p.prototype.initialize.call(this, cL, T); - this._map = cL - }; - aC.prototype.isTransparentPng = function() { - return true - }; - aC.prototype.getTilesUrl = function(cQ, cL) { - var cR = ""; - if (this._opts.predictDate) { - cR = "HistoryService?day=" + (this._opts.predictDate.weekday - 1) - + "&hour=" + this._opts.predictDate.hour + "&t=" - + new Date().getTime() + "&" - } else { - cR = "TrafficTileService?time=" + new Date().getTime() + "&" - } - var cM = this._map, cS = cQ.x, cN = cQ.y, cP = Math.floor(cS / 200), cO = Math - .floor(cN / 200), T = this._tileUrl + cR + "level=" + cL - + "&x=" + cS + "&y=" + cN; - return T.replace(/-(\d+)/gi, "M$1") - }; - function cu(T, cL, cM) { - this._name = T; - this._layers = cL instanceof p ? [ cL ] : cL.slice(0); - this._opts = { - tips : "", - labelText : "", - minZoom : 1, - maxZoom : 19, - tileSize : 256, - textColor : "black", - errorImageUrl : "", - projection : new ba() - }; - if (this._layers.length == 1) { - this._layers[0].baseLayer = true - } - a8.extend(this._opts, cM || {}) - } - a8.extend(cu.prototype, { - getName : function() { - return this._name - }, - getTips : function() { - return this._opts.tips - }, - getLabelText : function() { - return this._opts.labelText - }, - getTileLayer : function() { - return this._layers[0] - }, - getTileLayers : function() { - return this._layers - }, - getTileSize : function() { - return this._opts.tileSize - }, - getMinZoom : function() { - return this._opts.minZoom - }, - getMaxZoom : function() { - return this._opts.maxZoom - }, - getTextColor : function() { - return this._opts.textColor - }, - getProjection : function() { - return this._opts.projection - }, - getErrorImageUrl : function() { - return this._opts.errorImageUrl - }, - getZoomUnits : function(T) { - return Math.pow(2, (18 - T)) - }, - getZoomFactor : function(T) { - return this.getZoomUnits(T) * 256 - } - }); - var b7 = [ "http://shangetu0.map.bdimg.com/it/", - "http://shangetu1.map.bdimg.com/it/", - "http://shangetu2.map.bdimg.com/it/", - "http://shangetu3.map.bdimg.com/it/", - "http://shangetu4.map.bdimg.com/it/" ]; - var j = [ "http://online0.map.bdimg.com/tile/", - "http://online1.map.bdimg.com/tile/", - "http://online2.map.bdimg.com/tile/", - "http://online3.map.bdimg.com/tile/", - "http://online4.map.bdimg.com/tile/" ]; - if (m) { - b7 = [ x + "it/" ] - } - var aT = new p(); - aT.getTilesUrl = function(cM, cP) { - var cQ = cM.x; - var cN = cM.y; -// var T = "20130712"; -// var cO = "pl"; -// if (this.map.highResolutionEnabled()) { -// cO = "ph" -// } -// var cL = j[Math.abs(cQ + cN) % j.length] + "?qt=tile&x=" -// + (cQ + "").replace(/-/gi, "M") + "&y=" -// + (cN + "").replace(/-/gi, "M") + "&z=" + cP + "&styles=" + cO -// + (a8.browser.ie == 6 ? "&color_dep=32&colors=50" : "") -// + "&udt=" + T; -// if (m) { -// cL = b7[Math.abs(cQ + cN) % b7.length] + "u=x=" + cQ + ";y=" + cN -// + ";z=" + cP + ";v=017;type=web&fm=44" -// } - cL = "static/BMap/maptile/" + cP + "/" + cQ + "/" + cN + ".jpg"; - return cL.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_NORMAL_MAP = new cu("\u5730\u56fe", aT, { - tips : "\u663e\u793a\u666e\u901a\u5730\u56fe" - }); - var bs = new p(); - bs.tileUrls = [ "http://d0.map.baidu.com/resource/mappic/", - "http://d1.map.baidu.com/resource/mappic/", - "http://d2.map.baidu.com/resource/mappic/", - "http://d3.map.baidu.com/resource/mappic/" ]; - bs.getTilesUrl = function(T, cM) { - var cO = T.x; - var cL = T.y; - var cN = Math.pow(2, (20 - cM)) * 256; - cL = Math.round((9998336 - cN * (cL)) / cN) - 1; - url = this.tileUrls[Math.abs(cO + cL) % this.tileUrls.length] - + this.map.currentCity + "/" + this.map.cityCode + "/3/lv" - + (21 - cM) + "/" + cO + "," + cL + ".jpg"; - return url - }; - window.BMAP_PERSPECTIVE_MAP = new cu("\u4e09\u7ef4", bs, { - tips : "\u663e\u793a\u4e09\u7ef4\u5730\u56fe", - minZoom : 15, - maxZoom : 20, - textColor : "white", - projection : new cE() - }); - BMAP_PERSPECTIVE_MAP.getZoomUnits = function(T) { - return Math.pow(2, (20 - T)) - }; - BMAP_PERSPECTIVE_MAP.getCityName = function(T) { - if (!T) { - return "" - } - var cL = cc.cityNames; - for ( var cM in cL) { - if (T.search(cM) > -1) { - return cL[cM] - } - } - return "" - }; - BMAP_PERSPECTIVE_MAP.getCityCode = function(T) { - return ( { - bj : 2, - gz : 1, - sz : 14, - sh : 4 - })[T] - }; - var bQ = new p( { - baseLayer : true - }); - bQ.getTilesUrl = function(cL, cN) { - var cO = cL.x; - var cM = cL.y; - var T = b7[Math.abs(cO + cM) % b7.length] + "u=x=" + cO + ";y=" + cM - + ";z=" + cN + ";v=009;type=sate&fm=46"; - return T.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_SATELLITE_MAP = new cu("\u536b\u661f", bQ, { - tips : "\u663e\u793a\u536b\u661f\u5f71\u50cf", - minZoom : 1, - maxZoom : 19, - textColor : "white" - }); - var o = new p( { - transparentPng : true - }); - o.getTilesUrl = function(cM, cO) { - var cP = cM.x; - var cN = cM.y; - var T = "20130617"; - var cL = j[Math.abs(cP + cN) % j.length] + "?qt=tile&x=" - + (cP + "").replace(/-/gi, "M") + "&y=" - + (cN + "").replace(/-/gi, "M") + "&z=" + cO + "&styles=sl" - + (a8.browser.ie == 6 ? "&color_dep=32&colors=50" : "") - + "&udt=" + T; - return cL.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_HYBRID_MAP = new cu( - "\u6df7\u5408", - [ bQ, o ], - { - tips : "\u663e\u793a\u5e26\u6709\u8857\u9053\u7684\u536b\u661f\u5f71\u50cf", - labelText : "\u8def\u7f51", - minZoom : 1, - maxZoom : 19, - textColor : "white" - }); - window.BMAP_POI_TYPE_NORMAL = 0; - window.BMAP_POI_TYPE_BUSSTOP = 1; - window.BMAP_POI_TYPE_BUSLINE = 2; - window.BMAP_POI_TYPE_SUBSTOP = 3; - window.BMAP_POI_TYPE_SUBLINE = 4; - var H = 0; - var bh = 1; - var an = {}; - function w(cL, T) { - a8.lang.Class.call(this); - this._loc = {}; - this.setLocation(cL); - this._opts = { - renderOptions : { - panel : null, - map : null, - autoViewport : true - }, - onSearchComplete : function() { - }, - onMarkersSet : function() { - }, - onInfoHtmlSet : function() { - }, - onResultsHtmlSet : function() { - }, - onGetBusListComplete : function() { - }, - onGetBusLineComplete : function() { - }, - onBusListHtmlSet : function() { - }, - onBusLineHtmlSet : function() { - }, - onPolylinesSet : function() { - }, - reqFrom : "" - }; - a8.extend(this._opts, T); - if (typeof T != "undefined" && typeof T.renderOptions != "undefined" - && typeof T.renderOptions.autoViewport != "undefined") { - this._opts.renderOptions.autoViewport = T.renderOptions.autoViewport - } else { - this._opts.renderOptions.autoViewport = true - } - this._opts.renderOptions.panel = a8.G(this._opts.renderOptions.panel) - } - a8.inherits(w, a8.lang.Class); - a8.extend(w.prototype, { - getResults : function() { - if (!this._isMultiKey) { - return this._results - } else { - return this._arrResults - } - }, - enableAutoViewport : function() { - this._opts.renderOptions.autoViewport = true - }, - disableAutoViewport : function() { - this._opts.renderOptions.autoViewport = false - }, - setLocation : function(T) { - if (!T) { - return - } - this._loc.src = T - }, - setSearchCompleteCallback : function(T) { - this._opts.onSearchComplete = T || function() { - } - }, - setMarkersSetCallback : function(T) { - this._opts.onMarkersSet = T || function() { - } - }, - setPolylinesSetCallback : function(T) { - this._opts.onPolylinesSet = T || function() { - } - }, - setInfoHtmlSetCallback : function(T) { - this._opts.onInfoHtmlSet = T || function() { - } - }, - setResultsHtmlSetCallback : function(T) { - this._opts.onResultsHtmlSet = T || function() { - } - }, - getStatus : function() { - return this._status - } - }); - var bb = { - REQ_BASE_URL : x, - request : function(cQ, cN, cL, cS, cM) { - return; - var cO = (Math.random() * 100000).toFixed(0); - BMap._rd["_cbk" + cO] = function(cT) { - cL = cL || {}; - cQ && cQ(cT, cL); - delete BMap._rd["_cbk" + cO] - }; - cS = cS || ""; - var cR; - if (cL && cL.useEncodeURI) { - cR = O(cN, encodeURI) - } else { - cR = O(cN, encodeURIComponent) - } - var cP = this, T = cP.REQ_BASE_URL + cS + "?" + cR - + "&ie=utf-8&oue=1&fromproduct=jsapi"; - if (!cM) { - T += "&res=api" - } - T += "&callback=BMap._rd._cbk" + cO; - cx.request(T) - } - }; - BMap._rd = {}; - var S = {}; - S.removeHtml = function(T) { - return T.replace(/<\/?b>/g, "") - }; - S.parseGeoExtReg1 = function(T) { - return T - .replace( - /([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g, - "$1,$2;") - }; - S.parseGeoExtReg2 = function(cL, T) { - var cM = new RegExp( - "(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){" - + T + "}", "ig"); - return cL.replace(cM, "$1") - }; - window.BMAP_STATUS_SUCCESS = 0; - window.BMAP_STATUS_CITY_LIST = 1; - window.BMAP_STATUS_UNKNOWN_LOCATION = 2; - window.BMAP_STATUS_UNKNOWN_ROUTE = 3; - window.BMAP_STATUS_INVALID_KEY = 4; - window.BMAP_STATUS_INVALID_REQUEST = 5; - window.BMAP_STATUS_PERMISSION_DENIED = 6; - window.BMAP_STATUS_SERVICE_UNAVAILABLE = 7; - window.BMAP_STATUS_TIMEOUT = 8; - window.BMAP_ROUTE_TYPE_WALKING = 2; - window.BMAP_ROUTE_TYPE_DRIVING = 3; - var cv = "cur"; - var c = "cen"; - var cj = "s"; - var Q = "con"; - var al = "bd"; - var cb = "nb"; - var F = "bt"; - var bM = "nav"; - var bv = "walk"; - var bA = "gc"; - var d = "rgc"; - var U = "dec"; - var aQ = "bse"; - var e = "nse"; - var G = "bl"; - var bf = "bsl"; - var aG = "bda"; - var ai = "sa"; - var a1 = "nba"; - var ci = "drag"; - var b4 = "ext"; - var s = 2; - var a5 = 4; - var bt = 7; - var X = 11; - var aN = 12; - var bi = 14; - var a2 = 15; - var cy = 18; - var u = 20; - var R = 21; - var ap = 26; - var bE = 28; - var z = 31; - var bq = 35; - var bC = 44; - var ax = 45; - var ae = 46; - var bS = 47; - var a0 = -1; - var ab = 0; - var cq = 1; - var a6 = 2; - var B = 3; - var cI = "http://map.baidu.com/"; - BMap.I = window.Instance = a8.lang.instance; - var a4 = function(cM, cL) { - w.call(this, cM, cL); - cL = cL || {}; - cL.renderOptions = cL.renderOptions || {}; - this.setPageCapacity(cL.pageCapacity); - if (typeof cL.renderOptions.selectFirstResult != "undefined" - && !cL.renderOptions.selectFirstResult) { - this.disableFirstResultSelection() - } else { - this.enableFirstResultSelection() - } - this._overlays = []; - this._arrPois = []; - this._curIndex = -1; - this._queryList = []; - var T = this; - cA.load("local", function() { - T._check() - }) - }; - a8.inherits(a4, w, "LocalSearch"); - a4.DEFAULT_PAGE_CAPACITY = 10; - a4.MIN_PAGE_CAPACITY = 1; - a4.MAX_PAGE_CAPACITY = 100; - a4.DEFAULT_RADIUS = 2000; - a4.MAX_RADIUS = 100000; - a8.extend(a4.prototype, { - search : function(T) { - this._queryList.push( { - method : "search", - arguments : [ T ] - }) - }, - searchInBounds : function(T, cL) { - this._queryList.push( { - method : "searchInBounds", - arguments : [ T, cL ] - }) - }, - searchNearby : function(cM, cL, T) { - this._queryList.push( { - method : "searchNearby", - arguments : [ cM, cL, T ] - }) - }, - clearResults : function() { - delete this._json; - delete this._status; - delete this._results; - delete this._ud; - this._curIndex = -1; - this._setStatus(); - if (this._opts.renderOptions.panel) { - this._opts.renderOptions.panel.innerHTML = "" - } - }, - gotoPage : function() { - }, - enableFirstResultSelection : function() { - this._opts.renderOptions.selectFirstResult = true - }, - disableFirstResultSelection : function() { - this._opts.renderOptions.selectFirstResult = false - }, - setPageCapacity : function(T) { - if (typeof T == "number" && !isNaN(T)) { - this._opts.pageCapacity = T < 1 ? a4.DEFAULT_PAGE_CAPACITY - : (T > a4.MAX_PAGE_CAPACITY ? a4.DEFAULT_PAGE_CAPACITY - : T) - } else { - this._opts.pageCapacity = a4.DEFAULT_PAGE_CAPACITY - } - }, - getPageCapacity : function() { - return this._opts.pageCapacity - }, - toString : function() { - return "LocalSearch" - } - }); - var b5 = function(cL, T) { - w.call(this, cL, T) - }; - a8.inherits(b5, w, "BaseRoute"); - a8.extend(b5.prototype, { - clearResults : function() { - } - }); - window.BMAP_TRANSIT_POLICY_LEAST_TIME = 0; - window.BMAP_TRANSIT_POLICY_LEAST_TRANSFER = 2; - window.BMAP_TRANSIT_POLICY_LEAST_WALKING = 3; - window.BMAP_TRANSIT_POLICY_AVOID_SUBWAYS = 4; - window.BMAP_LINE_TYPE_BUS = 0; - window.BMAP_LINE_TYPE_SUBWAY = 1; - window.BMAP_LINE_TYPE_FERRY = 2; - function aU(cM, cL) { - b5.call(this, cM, cL); - cL = cL || {}; - this.setPolicy(cL.policy); - this.setPageCapacity(cL.pageCapacity); - this.QUERY_TYPE = F; - this.RETURN_TYPE = bi; - this.ROUTE_TYPE = bh; - this._overlays = []; - this._curIndex = -1; - this._queryList = []; - var T = this; - cA.load("route", function() { - T._asyncSearch() - }) - } - aU.MAX_PAGE_CAPACITY = 100; - aU.LINE_TYPE_MAPPING = [ 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 1 ]; - a8.inherits(aU, b5, "TransitRoute"); - a8.extend(aU.prototype, { - setPolicy : function(T) { - if (T >= BMAP_TRANSIT_POLICY_LEAST_TIME - && T <= BMAP_TRANSIT_POLICY_AVOID_SUBWAYS) { - this._opts.policy = T - } else { - this._opts.policy = BMAP_TRANSIT_POLICY_LEAST_TIME - } - }, - _internalSearch : function(cL, T) { - this._queryList.push( { - method : "_internalSearch", - arguments : [ cL, T ] - }) - }, - search : function(cL, T) { - this._queryList.push( { - method : "search", - arguments : [ cL, T ] - }) - }, - setPageCapacity : function(T) { - if (typeof T == "string") { - T = parseInt(T); - if (isNaN(T)) { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY; - return - } - } - if (typeof T != "number") { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY; - return - } - if (T >= 1 && T <= aU.MAX_PAGE_CAPACITY) { - this._opts.pageCapacity = Math.round(T) - } else { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY - } - }, - toString : function() { - return "TransitRoute" - }, - _shortTitle : function(T) { - return T.replace(/\(.*\)/, "") - } - }); - window.BMAP_HIGHLIGHT_STEP = 1; - window.BMAP_HIGHLIGHT_ROUTE = 2; - var bl = function(T, cN) { - b5.call(this, T, cN); - this._overlays = []; - this._curIndex = -1; - this._queryList = []; - var cM = this; - var cL = this._opts.renderOptions; - if (cL.highlightMode != BMAP_HIGHLIGHT_STEP - && cL.highlightMode != BMAP_HIGHLIGHT_ROUTE) { - cL.highlightMode = BMAP_HIGHLIGHT_STEP - } - this._enableDragging = this._opts.renderOptions.enableDragging ? true - : false; - cA.load("route", function() { - cM._asyncSearch() - }) - }; - bl.ROAD_TYPE = [ "", "\u73af\u5c9b", "\u65e0\u5c5e\u6027\u9053\u8def", - "\u4e3b\u8def", "\u9ad8\u901f\u8fde\u63a5\u8def", - "\u4ea4\u53c9\u70b9\u5185\u8def\u6bb5", "\u8fde\u63a5\u9053\u8def", - "\u505c\u8f66\u573a\u5185\u90e8\u9053\u8def", - "\u670d\u52a1\u533a\u5185\u90e8\u9053\u8def", "\u6865", - "\u6b65\u884c\u8857", "\u8f85\u8def", "\u531d\u9053", - "\u5168\u5c01\u95ed\u9053\u8def", - "\u672a\u5b9a\u4e49\u4ea4\u901a\u533a\u57df", - "POI\u8fde\u63a5\u8def", "\u96a7\u9053", "\u6b65\u884c\u9053", - "\u516c\u4ea4\u4e13\u7528\u9053", "\u63d0\u524d\u53f3\u8f6c\u9053" ]; - a8.inherits(bl, b5, "DWRoute"); - a8.extend(bl.prototype, { - search : function(cL, T) { - this._queryList.push( { - method : "search", - arguments : [ cL, T ] - }) - } - }); - window.BMAP_DRIVING_POLICY_LEAST_TIME = 0; - window.BMAP_DRIVING_POLICY_LEAST_DISTANCE = 1; - window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS = 2; - function q(T, cL) { - bl.call(this, T, cL); - cL = cL || {}; - this.setPolicy(cL.policy); - this.QUERY_TYPE = bM; - this.RETURN_TYPE = u; - this.ROUTE_TYPE = BMAP_ROUTE_TYPE_DRIVING - } - a8.inherits(q, bl, "DrivingRoute"); - a8.extend(q.prototype, { - setPolicy : function(T) { - if (T >= BMAP_DRIVING_POLICY_LEAST_TIME - && T <= BMAP_DRIVING_POLICY_AVOID_HIGHWAYS) { - this._opts.policy = T - } else { - this._opts.policy = BMAP_DRIVING_POLICY_LEAST_TIME - } - } - }); - function cD(T, cL) { - bl.call(this, T, cL); - this.QUERY_TYPE = bv; - this.RETURN_TYPE = z; - this.ROUTE_TYPE = BMAP_ROUTE_TYPE_WALKING; - this._enableDragging = false - } - a8.inherits(cD, bl, "WalkingRoute"); - function aX(cL) { - this._opts = {}; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(aX, a8.lang.Class, "Geocoder"); - a8.extend(aX.prototype, { - getPoint : function(T, cM, cL) { - this._queryList.push( { - method : "getPoint", - arguments : [ T, cM, cL ] - }) - }, - getLocation : function(T, cM, cL) { - this._queryList.push( { - method : "getLocation", - arguments : [ T, cM, cL ] - }) - }, - toString : function() { - return "Geocoder" - } - }); - function ak(cL) { - this._opts = {}; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.extend(ak.prototype, { - getCurrentPosition : function(cL, T) { - this._queryList.push( { - method : "getCurrentPosition", - arguments : [ cL, T ] - }) - }, - getStatus : function() { - return this._status - } - }); - function b9(cL) { - this._opts = { - renderOptions : { - map : null - } - }; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(b9, a8.lang.Class, "LocalCity"); - a8.extend(b9.prototype, { - get : function(T) { - this._queryList.push( { - method : "get", - arguments : [ T ] - }) - }, - toString : function() { - return "LocalCity" - } - }); - function V() { - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(V, a8.lang.Class, "Boundary"); - a8.extend(V.prototype, { - get : function(cL, T) { - this._queryList.push( { - method : "get", - arguments : [ cL, T ] - }) - }, - toString : function() { - return "Boundary" - } - }); - function bm(cM, cL) { - w.call(this, cM, cL); - this.QUERY_TYPE_BUSLIST = G; - this.RETURN_TYPE_BUSLIST = a2; - this.QUERY_TYPE_BUSLINE = bf; - this.RETURN_TYPE_BUSLINE = cy; - this._queryList = []; - var T = this; - cA.load("buslinesearch", function() { - T._asyncSearch() - }) - } - bm._iconOpen = cc.imgPath + "iw_plus.gif"; - bm._iconClose = cc.imgPath + "iw_minus.gif"; - bm._stopUrl = cc.imgPath + "stop_icon.png"; - a8.inherits(bm, w); - a8.extend(bm.prototype, { - getBusList : function(T) { - this._queryList.push( { - method : "getBusList", - arguments : [ T ] - }) - }, - getBusLine : function(T) { - this._queryList.push( { - method : "getBusLine", - arguments : [ T ] - }) - }, - setGetBusListCompleteCallback : function(T) { - this._opts.onGetBusListComplete = T || function() { - } - }, - setGetBusLineCompleteCallback : function(T) { - this._opts.onGetBusLineComplete = T || function() { - } - }, - setBusListHtmlSetCallback : function(T) { - this._opts.onBusListHtmlSet = T || function() { - } - }, - setBusLineHtmlSetCallback : function(T) { - this._opts.onBusLineHtmlSet = T || function() { - } - }, - setPolylinesSetCallback : function(T) { - this._opts.onPolylinesSet = T || function() { - } - } - }); - function by(cL) { - w.call(this, cL); - cL = cL || {}; - this._options = { - input : null, - types : [], - onSearchComplete : function() { - } - }; - a8.extend(this._options, cL); - this._loc.src = cL.location || "\u5168\u56fd"; - this._word = ""; - this._show = false; - this._suggestion = null; - this._inputValue = ""; - this._initialize(); - _addStat(5011); - var T = this; - cA.load("autocomplete", function() { - T._asyncSearch() - }) - } - a8.inherits(by, w, "Autocomplete"); - a8.extend(by.prototype, { - _initialize : function() { - }, - show : function() { - this._show = true - }, - hide : function() { - this._show = false - }, - setTypes : function(T) { - this._options.types = T - }, - setLocation : function(T) { - this._loc.src = T - }, - search : function(T) { - this._word = T - }, - setInputValue : function(T) { - this._inputValue = T - } - }); - function aj(T, cL) { - window.BMap[T] = cL - } - aj("Map", bz); - aj("Hotspot", cm); - aj("MapType", cu); - aj("Point", cd); - aj("Pixel", bu); - aj("Size", aH); - aj("Bounds", bN); - aj("TileLayer", p); - aj("Projection", bd); - aj("MercatorProjection", ba); - aj("PerspectiveProjection", cE); - aj("Copyright", av); - aj("Overlay", bG); - aj("Label", ag); - aj("Marker", ad); - aj("Icon", M); - aj("Polyline", f); - aj("Polygon", cn); - aj("InfoWindow", bP); - aj("Circle", a); - aj("Control", cp); - aj("NavigationControl", L); - aj("OverviewMapControl", cK); - aj("CopyrightControl", am); - aj("ScaleControl", bK); - aj("MapTypeControl", aL); - aj("TrafficLayer", aC); - aj("ContextMenu", cz); - aj("MenuItem", be); - aj("LocalSearch", a4); - aj("TransitRoute", aU); - aj("DrivingRoute", q); - aj("WalkingRoute", cD); - aj("Autocomplete", by); - aj("Geocoder", aX); - aj("LocalCity", b9); - aj("Geolocation", ak); - aj("BusLineSearch", bm); - aj("Boundary", V); - window.BMap.apiLoad(); -})(); diff --git a/static/BMap/js/bmap_offline_api_v3.0_min.js b/static/BMap/js/bmap_offline_api_v3.0_min.js deleted file mode 100644 index 878b4e9..0000000 --- a/static/BMap/js/bmap_offline_api_v3.0_min.js +++ /dev/null @@ -1,9809 +0,0 @@ -window.TILE_VERSION = { - "ditu": { - "normal": { - "version": "088", - "updateDate": "20180829" - }, - "satellite": { - "version": "009", - "updateDate": "20180829" - }, - "normalTraffic": { - "version": "081", - "updateDate": "20180829" - }, - "satelliteTraffic": { - "version": "083", - "updateDate": "20180829" - }, - "mapJS": { - "version": "104", - "updateDate": "20180829" - }, - "satelliteStreet": { - "version": "083", - "updateDate": "20180829" - }, - "panoClick": { - "version": "1033", - "updateDate": "20180816" - }, - "panoUdt": { - "version": "20180816", - "updateDate": "20180816" - }, - "panoSwfAPI": { - "version": "20150123", - "updateDate": "20150123" - }, - "panoSwfPlace": { - "version": "20141112", - "updateDate": "20141112" - }, - "earthVector": { - "version": "001", - "updateDate": "20180829" - } - }, - "webapp": { - "high_normal": { - "version": "001", - "updateDate": "20180829" - }, - "lower_normal": { - "version": "002", - "updateDate": "20180829" - } - }, - "api_for_mobile": { - "vector": { - "version": "002", - "updateDate": "20180829" - }, - "vectorIcon": { - "version": "002", - "updateDate": "20180829" - } - } -}; -window.BMAP_AUTHENTIC_KEY = ""; -var bmapcfg = { - 'imgext' : '.jpg', //瓦片图的后缀 ------ 根据需要修改,一般是 .png .jpg - 'tiles_dir' : 'static/BMap/maptile/', //普通瓦片图的地址,为空默认在 offlinemap/tiles/ 目录 - 'tiles_hybrid': '', //卫星瓦片图的地址,为空默认在 offlinemap/tiles_hybrid/ 目录 - 'tiles_self' : '', //自定义图层的地址,为空默认在 offlinemap/tiles_self/ 目录 - 'home':'static/BMap/' -}; -(function() { - function aa(a) { - throw a; - } - var l = void 0 - , q = !0 - , s = null - , t = !1; - function u() { - return function() {} - } - function ba(a) { - return function(b) { - this[a] = b - } - } - function w(a) { - return function() { - return this[a] - } - } - function ca(a) { - return function() { - return a - } - } - var da, ea = []; - function ga(a) { - return function() { - return ea[a].apply(this, arguments) - } - } - function ha(a, b) { - return ea[a] = b - } - var ia, z = ia = z || { - version: "1.3.4" - }; - z.aa = "$BAIDU$"; - window[z.aa] = window[z.aa] || {}; - z.object = z.object || {}; - z.extend = z.object.extend = function(a, b) { - for (var c in b) - b.hasOwnProperty(c) && (a[c] = b[c]); - return a - } - ; - z.D = z.D || {}; - z.D.$ = function(a) { - return "string" == typeof a || a instanceof String ? document.getElementById(a) : a && a.nodeName && (1 == a.nodeType || 9 == a.nodeType) ? a : s - } - ; - z.$ = z.Fc = z.D.$; - z.D.U = function(a) { - a = z.D.$(a); - if (a === s) - return a; - a.style.display = "none"; - return a - } - ; - z.U = z.D.U; - z.lang = z.lang || {}; - z.lang.wg = function(a) { - return "[object String]" == Object.prototype.toString.call(a) - } - ; - z.wg = z.lang.wg; - z.D.Oj = function(a) { - return z.lang.wg(a) ? document.getElementById(a) : a - } - ; - z.Oj = z.D.Oj; - z.D.getElementsByClassName = function(a, b) { - var c; - if (a.getElementsByClassName) - c = a.getElementsByClassName(b); - else { - var e = a; - e == s && (e = document); - c = []; - var e = e.getElementsByTagName("*"), f = e.length, g = RegExp("(^|\\s)" + b + "(\\s|$)"), i, k; - for (k = i = 0; i < f; i++) - g.test(e[i].className) && (c[k] = e[i], - k++) - } - return c - } - ; - z.getElementsByClassName = z.D.getElementsByClassName; - z.D.contains = function(a, b) { - var c = z.D.Oj - , a = c(a) - , b = c(b); - return a.contains ? a != b && a.contains(b) : !!(a.compareDocumentPosition(b) & 16) - } - ; - z.ca = z.ca || {}; - /msie (\d+\.\d)/i.test(navigator.userAgent) && (z.ca.ia = z.ia = document.documentMode || +RegExp.$1); - var ja = { - cellpadding: "cellPadding", - cellspacing: "cellSpacing", - colspan: "colSpan", - rowspan: "rowSpan", - valign: "vAlign", - usemap: "useMap", - frameborder: "frameBorder" - }; - 8 > z.ca.ia ? (ja["for"] = "htmlFor", - ja["class"] = "className") : (ja.htmlFor = "for", - ja.className = "class"); - z.D.RG = ja; - z.D.BF = function(a, b, c) { - a = z.D.$(a); - if (a === s) - return a; - if ("style" == b) - a.style.cssText = c; - else { - b = z.D.RG[b] || b; - a.setAttribute(b, c) - } - return a - } - ; - z.BF = z.D.BF; - z.D.CF = function(a, b) { - a = z.D.$(a); - if (a === s) - return a; - for (var c in b) - z.D.BF(a, c, b[c]); - return a - } - ; - z.CF = z.D.CF; - z.Wk = z.Wk || {}; - (function() { - var a = RegExp("(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+$)", "g"); - z.Wk.trim = function(b) { - return ("" + b).replace(a, "") - } - } - )(); - z.trim = z.Wk.trim; - z.Wk.Wo = function(a, b) { - var a = "" + a - , c = Array.prototype.slice.call(arguments, 1) - , e = Object.prototype.toString; - if (c.length) { - c = c.length == 1 ? b !== s && /\[object Array\]|\[object Object\]/.test(e.call(b)) ? b : c : c; - return a.replace(/#\{(.+?)\}/g, function(a, b) { - var i = c[b]; - "[object Function]" == e.call(i) && (i = i(b)); - return "undefined" == typeof i ? "" : i - }) - } - return a - } - ; - z.Wo = z.Wk.Wo; - z.D.Pb = function(a, b) { - a = z.D.$(a); - if (a === s) - return a; - for (var c = a.className.split(/\s+/), e = b.split(/\s+/), f, g = e.length, i, k = 0; k < g; ++k) { - i = 0; - for (f = c.length; i < f; ++i) - if (c[i] == e[k]) { - c.splice(i, 1); - break - } - } - a.className = c.join(" "); - return a - } - ; - z.Pb = z.D.Pb; - z.D.Vx = function(a, b, c) { - a = z.D.$(a); - if (a === s) - return a; - var e; - if (a.insertAdjacentHTML) - a.insertAdjacentHTML(b, c); - else { - e = a.ownerDocument.createRange(); - b = b.toUpperCase(); - if (b == "AFTERBEGIN" || b == "BEFOREEND") { - e.selectNodeContents(a); - e.collapse(b == "AFTERBEGIN") - } else { - b = b == "BEFOREBEGIN"; - e[b ? "setStartBefore" : "setEndAfter"](a); - e.collapse(b) - } - e.insertNode(e.createContextualFragment(c)) - } - return a - } - ; - z.Vx = z.D.Vx; - z.D.show = function(a) { - a = z.D.$(a); - if (a === s) - return a; - a.style.display = ""; - return a - } - ; - z.show = z.D.show; - z.D.QD = function(a) { - a = z.D.$(a); - return a === s ? a : a.nodeType == 9 ? a : a.ownerDocument || a.document - } - ; - z.D.Ua = function(a, b) { - a = z.D.$(a); - if (a === s) - return a; - for (var c = b.split(/\s+/), e = a.className, f = " " + e + " ", g = 0, i = c.length; g < i; g++) - f.indexOf(" " + c[g] + " ") < 0 && (e = e + (" " + c[g])); - a.className = e; - return a - } - ; - z.Ua = z.D.Ua; - z.D.PB = z.D.PB || {}; - z.D.Ol = z.D.Ol || []; - z.D.Ol.filter = function(a, b, c) { - for (var e = 0, f = z.D.Ol, g; g = f[e]; e++) - if (g = g[c]) - b = g(a, b); - return b - } - ; - z.Wk.RO = function(a) { - return a.indexOf("-") < 0 && a.indexOf("_") < 0 ? a : a.replace(/[-_][^-_]/g, function(a) { - return a.charAt(1).toUpperCase() - }) - } - ; - z.D.m0 = function(a) { - z.D.it(a, "expand") ? z.D.Pb(a, "expand") : z.D.Ua(a, "expand") - } - ; - z.D.it = function(a) { - if (arguments.length <= 0 || typeof a === "function") - return this; - if (this.size() <= 0) - return t; - var a = a.replace(/^\s+/g, "").replace(/\s+$/g, "").replace(/\s+/g, " "), b = a.split(" "), c; - z.forEach(this, function(a) { - for (var a = a.className, f = 0; f < b.length; f++) - if (!~(" " + a + " ").indexOf(" " + b[f] + " ")) { - c = t; - return - } - c !== t && (c = q) - }); - return c - } - ; - z.D.oj = function(a, b) { - var c = z.D - , a = c.$(a); - if (a === s) - return a; - var b = z.Wk.RO(b) - , e = a.style[b]; - if (!e) - var f = c.PB[b] - , e = a.currentStyle || (z.ca.ia ? a.style : getComputedStyle(a, s)) - , e = f && f.get ? f.get(a, e) : e[f || b]; - if (f = c.Ol) - e = f.filter(b, e, "get"); - return e - } - ; - z.oj = z.D.oj; - /opera\/(\d+\.\d)/i.test(navigator.userAgent) && (z.ca.opera = +RegExp.$1); - z.ca.HM = /webkit/i.test(navigator.userAgent); - z.ca.VY = /gecko/i.test(navigator.userAgent) && !/like gecko/i.test(navigator.userAgent); - z.ca.DE = "CSS1Compat" == document.compatMode; - z.D.ga = function(a) { - a = z.D.$(a); - if (a === s) - return a; - var b = z.D.QD(a) - , c = z.ca - , e = z.D.oj; - c.VY > 0 && b.getBoxObjectFor && e(a, "position"); - var f = { - left: 0, - top: 0 - }, g; - if (a == (c.ia && !c.DE ? b.body : b.documentElement)) - return f; - if (a.getBoundingClientRect) { - a = a.getBoundingClientRect(); - f.left = Math.floor(a.left) + Math.max(b.documentElement.scrollLeft, b.body.scrollLeft); - f.top = Math.floor(a.top) + Math.max(b.documentElement.scrollTop, b.body.scrollTop); - f.left = f.left - b.documentElement.clientLeft; - f.top = f.top - b.documentElement.clientTop; - a = b.body; - b = parseInt(e(a, "borderLeftWidth")); - e = parseInt(e(a, "borderTopWidth")); - if (c.ia && !c.DE) { - f.left = f.left - (isNaN(b) ? 2 : b); - f.top = f.top - (isNaN(e) ? 2 : e) - } - } else { - g = a; - do { - f.left = f.left + g.offsetLeft; - f.top = f.top + g.offsetTop; - if (c.HM > 0 && e(g, "position") == "fixed") { - f.left = f.left + b.body.scrollLeft; - f.top = f.top + b.body.scrollTop; - break - } - g = g.offsetParent - } while (g && g != a);if (c.opera > 0 || c.HM > 0 && e(a, "position") == "absolute") - f.top = f.top - b.body.offsetTop; - for (g = a.offsetParent; g && g != b.body; ) { - f.left = f.left - g.scrollLeft; - if (!c.opera || g.tagName != "TR") - f.top = f.top - g.scrollTop; - g = g.offsetParent - } - } - return f - } - ; - /firefox\/(\d+\.\d)/i.test(navigator.userAgent) && (z.ca.Te = +RegExp.$1); - /BIDUBrowser/i.test(navigator.userAgent) && (z.ca.n2 = q); - var ka = navigator.userAgent; - /(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(ka) && !/chrome/i.test(ka) && (z.ca.Iy = +(RegExp.$1 || RegExp.$2)); - /chrome\/(\d+\.\d)/i.test(navigator.userAgent) && (z.ca.Qw = +RegExp.$1); - z.mc = z.mc || {}; - z.mc.Fb = function(a, b) { - var c, e, f = a.length; - if ("function" == typeof b) - for (e = 0; e < f; e++) { - c = a[e]; - c = b.call(a, c, e); - if (c === t) - break - } - return a - } - ; - z.Fb = z.mc.Fb; - z.lang.aa = function() { - return "TANGRAM__" + (window[z.aa]._counter++).toString(36) - } - ; - window[z.aa]._counter = window[z.aa]._counter || 1; - window[z.aa]._instances = window[z.aa]._instances || {}; - z.lang.wt = function(a) { - return "[object Function]" == Object.prototype.toString.call(a) - } - ; - z.lang.Ca = function(a) { - this.aa = a || z.lang.aa(); - window[z.aa]._instances[this.aa] = this - } - ; - window[z.aa]._instances = window[z.aa]._instances || {}; - z.lang.Ca.prototype.ci = ga(0); - z.lang.Ca.prototype.toString = function() { - return "[object " + (this.UQ || "Object") + "]" - } - ; - z.lang.Ju = function(a, b) { - this.type = a; - this.returnValue = q; - this.target = b || s; - this.currentTarget = s - } - ; - z.lang.Ca.prototype.addEventListener = function(a, b, c) { - if (z.lang.wt(b)) { - !b.fl && (b.fl = {}); - !this.Ci && (this.Ci = {}); - var e = this.Ci, f; - if (typeof c == "string" && c) { - /[^\w\-]/.test(c) && aa("nonstandard key:" + c); - f = b.Nx = c - } - a.indexOf("on") != 0 && (a = "on" + a); - typeof e[a] != "object" && (e[a] = {}); - typeof b.fl[a] != "object" && (b.fl[a] = {}); - f = f || z.lang.aa(); - b.fl[a].Nx = f; - e[a][f] = b - } - } - ; - z.lang.Ca.prototype.removeEventListener = function(a, b) { - a.indexOf("on") != 0 && (a = "on" + a); - if (z.lang.wt(b)) { - if (!b.fl || !b.fl[a]) - return; - b = b.fl[a].Nx - } else if (!z.lang.wg(b)) - return; - !this.Ci && (this.Ci = {}); - var c = this.Ci; - c[a] && c[a][b] && delete c[a][b] - } - ; - z.lang.Ca.prototype.dispatchEvent = function(a, b) { - z.lang.wg(a) && (a = new z.lang.Ju(a)); - !this.Ci && (this.Ci = {}); - var b = b || {}, c; - for (c in b) - a[c] = b[c]; - var e = this.Ci - , f = a.type; - a.target = a.target || this; - a.currentTarget = this; - f.indexOf("on") != 0 && (f = "on" + f); - z.lang.wt(this[f]) && this[f].apply(this, arguments); - if (typeof e[f] == "object") - for (c in e[f]) - e[f][c].apply(this, arguments); - return a.returnValue - } - ; - z.lang.ta = function(a, b, c) { - var e, f, g = a.prototype; - f = new Function; - f.prototype = b.prototype; - f = a.prototype = new f; - for (e in g) - f[e] = g[e]; - a.prototype.constructor = a; - a.b0 = b.prototype; - if ("string" == typeof c) - f.UQ = c - } - ; - z.ta = z.lang.ta; - z.lang.Nc = function(a) { - return window[z.aa]._instances[a] || s - } - ; - z.platform = z.platform || {}; - z.platform.AM = /macintosh/i.test(navigator.userAgent); - z.platform.h4 = /MicroMessenger/i.test(navigator.userAgent); - z.platform.IM = /windows/i.test(navigator.userAgent); - z.platform.cZ = /x11/i.test(navigator.userAgent); - z.platform.Jm = /android/i.test(navigator.userAgent); - /android (\d+\.\d)/i.test(navigator.userAgent) && (z.platform.dK = z.dK = RegExp.$1); - z.platform.XY = /ipad/i.test(navigator.userAgent); - z.platform.zE = /iphone/i.test(navigator.userAgent); - function la(a, b) { - a.domEvent = b = window.event || b; - a.clientX = b.clientX || b.pageX; - a.clientY = b.clientY || b.pageY; - a.offsetX = b.offsetX || b.layerX; - a.offsetY = b.offsetY || b.layerY; - a.screenX = b.screenX; - a.screenY = b.screenY; - a.ctrlKey = b.ctrlKey || b.metaKey; - a.shiftKey = b.shiftKey; - a.altKey = b.altKey; - if (b.touches) { - a.touches = []; - for (var c = 0; c < b.touches.length; c++) - a.touches.push({ - clientX: b.touches[c].clientX, - clientY: b.touches[c].clientY, - screenX: b.touches[c].screenX, - screenY: b.touches[c].screenY, - pageX: b.touches[c].pageX, - pageY: b.touches[c].pageY, - target: b.touches[c].target, - identifier: b.touches[c].identifier - }) - } - if (b.changedTouches) { - a.changedTouches = []; - for (c = 0; c < b.changedTouches.length; c++) - a.changedTouches.push({ - clientX: b.changedTouches[c].clientX, - clientY: b.changedTouches[c].clientY, - screenX: b.changedTouches[c].screenX, - screenY: b.changedTouches[c].screenY, - pageX: b.changedTouches[c].pageX, - pageY: b.changedTouches[c].pageY, - target: b.changedTouches[c].target, - identifier: b.changedTouches[c].identifier - }) - } - if (b.targetTouches) { - a.targetTouches = []; - for (c = 0; c < b.targetTouches.length; c++) - a.targetTouches.push({ - clientX: b.targetTouches[c].clientX, - clientY: b.targetTouches[c].clientY, - screenX: b.targetTouches[c].screenX, - screenY: b.targetTouches[c].screenY, - pageX: b.targetTouches[c].pageX, - pageY: b.targetTouches[c].pageY, - target: b.targetTouches[c].target, - identifier: b.targetTouches[c].identifier - }) - } - a.rotation = b.rotation; - a.scale = b.scale; - return a - } - z.lang.hx = function(a) { - var b = window[z.aa]; - b.eT && delete b.eT[a] - } - ; - z.event = {}; - z.M = z.event.M = function(a, b, c) { - if (!(a = z.$(a))) - return a; - b = b.replace(/^on/, ""); - a.addEventListener ? a.addEventListener(b, c, t) : a.attachEvent && a.attachEvent("on" + b, c); - return a - } - ; - z.ed = z.event.ed = function(a, b, c) { - if (!(a = z.$(a))) - return a; - b = b.replace(/^on/, ""); - a.removeEventListener ? a.removeEventListener(b, c, t) : a.detachEvent && a.detachEvent("on" + b, c); - return a - } - ; - z.D.it = function(a, b) { - if (!a || !a.className || typeof a.className != "string") - return t; - var c = -1; - try { - c = a.className == b || a.className.search(RegExp("(\\s|^)" + b + "(\\s|$)")) - } catch (e) { - return t - } - return c > -1 - } - ; - z.iL = function() { - function a(a) { - document.addEventListener && (this.element = a, - this.lL = this.Dk ? "touchstart" : "mousedown", - this.xD = this.Dk ? "touchmove" : "mousemove", - this.wD = this.Dk ? "touchend" : "mouseup", - this.oh = t, - this.mu = this.lu = 0, - this.element.addEventListener(this.lL, this, t), - ia.M(this.element, "mousedown", u()), - this.handleEvent(s)) - } - a.prototype = { - Dk: "ontouchstart"in window || "createTouch"in document, - start: function(a) { - ma(a); - this.oh = t; - this.lu = this.Dk ? a.touches[0].clientX : a.clientX; - this.mu = this.Dk ? a.touches[0].clientY : a.clientY; - this.element.addEventListener(this.xD, this, t); - this.element.addEventListener(this.wD, this, t) - }, - move: function(a) { - na(a); - var c = this.Dk ? a.touches[0].clientY : a.clientY; - if (10 < Math.abs((this.Dk ? a.touches[0].clientX : a.clientX) - this.lu) || 10 < Math.abs(c - this.mu)) - this.oh = q - }, - end: function(a) { - na(a); - this.oh || (a = document.createEvent("Event"), - a.initEvent("tap", t, q), - this.element.dispatchEvent(a)); - this.element.removeEventListener(this.xD, this, t); - this.element.removeEventListener(this.wD, this, t) - }, - handleEvent: function(a) { - if (a) - switch (a.type) { - case this.lL: - this.start(a); - break; - case this.xD: - this.move(a); - break; - case this.wD: - this.end(a) - } - } - }; - return function(b) { - return new a(b) - } - }(); - var B = window.BMap || {}; - B.version = "3.0"; - B.gV = 0.34 > Math.random(); - 0 <= B.version.indexOf("#") && (B.version = "3.0"); - B.Fr = []; - B.Ye = function(a) { - this.Fr.push(a) - } - ; - B.ur = []; - B.Tm = function(a) { - this.ur.push(a) - } - ; - B.vV = B.apiLoad || u(); - B.Q0 = B.verify || function() { - B.version && B.version >= 1.5 && oa(B.Wc + "?qt=verify&ak=" + qa, function(a) { - if (a && a.error !== 0) { - if (typeof map !== "undefined") { - map.La().innerHTML = ""; - map.Ci = {} - } - B = s; - var b = "\u767e\u5ea6\u672a\u6388\u6743\u4f7f\u7528\u5730\u56feAPI\uff0c\u53ef\u80fd\u662f\u56e0\u4e3a\u60a8\u63d0\u4f9b\u7684\u5bc6\u94a5\u4e0d\u662f\u6709\u6548\u7684\u767e\u5ea6LBS\u5f00\u653e\u5e73\u53f0\u5bc6\u94a5\uff0c\u6216\u6b64\u5bc6\u94a5\u672a\u5bf9\u672c\u5e94\u7528\u7684\u767e\u5ea6\u5730\u56feJavaScriptAPI\u6388\u6743\u3002\u60a8\u53ef\u4ee5\u8bbf\u95ee\u5982\u4e0b\u7f51\u5740\u4e86\u89e3\u5982\u4f55\u83b7\u53d6\u6709\u6548\u7684\u5bc6\u94a5\uff1ahttp://lbsyun.baidu.com/apiconsole/key#\u3002"; - switch (a.error) { - case 101: - b = "\u5f00\u53d1\u8005\u7981\u7528\u4e86\u8be5ak\u7684jsapi\u670d\u52a1\u6743\u9650\u3002\u60a8\u53ef\u4ee5\u8bbf\u95ee\u5982\u4e0b\u7f51\u5740\u4e86\u89e3\u5982\u4f55\u83b7\u53d6\u6709\u6548\u7684\u5bc6\u94a5\uff1ahttp://lbsyun.baidu.com/apiconsole/key#\u3002"; - break; - case 102: - b = "\u5f00\u53d1\u8005Referer\u4e0d\u6b63\u786e\u3002\u60a8\u53ef\u4ee5\u8bbf\u95ee\u5982\u4e0b\u7f51\u5740\u4e86\u89e3\u5982\u4f55\u83b7\u53d6\u6709\u6548\u7684\u5bc6\u94a5\uff1ahttp://lbsyun.baidu.com/apiconsole/key#\u3002" - } - alert(b) - } - }) - } - ; - var qa = window.BMAP_AUTHENTIC_KEY; - window.BMAP_AUTHENTIC_KEY = s; - var ra = window.BMap_loadScriptTime - , sa = (new Date).getTime() - , ta = s - , ua = q - , va = 5042 - , xa = 5002 - , ya = 5003 - , za = "load_mapclick" - , Aa = 5038 - , Ba = 5041 - , Ca = 5047 - , Da = 5036 - , Ea = 5039 - , Fa = 5037 - , Ga = 5040 - , Ha = 5011 - , Ia = 7E3; - var Ja = 0; - function Ka(a, b) { - if (a = z.$(a)) { - var c = this; - z.lang.Ca.call(c); - b = b || {}; - c.K = { - tC: 200, - Wb: q, - px: t, - nD: q, - To: q, - Uo: b.enableWheelZoom || t, - gL: q, - pD: q, - Ns: q, - nx: q, - tD: q, - Ro: b.enable3DBuilding || t, - Ic: 25, - b1: 240, - iV: 450, - Vb: G.Vb, - Hd: G.Hd, - Yx: !!b.Yx, - gc: Math.round(b.minZoom) || 1, - Yb: Math.round(b.maxZoom) || 19, - Hb: b.mapType || La, - e5: t, - cL: b.drawer || Ja, - ox: q, - lx: 500, - aX: b.enableHighResolution !== t, - fj: b.enableMapClick !== t, - devicePixelRatio: b.devicePixelRatio || window.devicePixelRatio || 1, - fG: 99, - ye: b.mapStyle || s, - jZ: b.logoControl === t ? t : q, - DV: [], - Kw: b.beforeClickIcon || s, - Ms: t, - qN: q - }; - c.K.ye && (this.LY(c.K.ye.controls), - this.sM(c.K.ye.geotableId)); - c.K.ye && c.K.ye.styleId && c.O3(c.K.ye.styleId); - c.K.fm = { - dark: { - backColor: "#2D2D2D", - textColor: "#bfbfbf", - iconUrl: "dicons" - }, - normal: { - backColor: "#F3F1EC", - textColor: "#c61b1b", - iconUrl: "icons" - }, - light: { - backColor: "#EBF8FC", - textColor: "#017fb4", - iconUrl: "licons" - } - }; - b.enableAutoResize && (c.K.nx = b.enableAutoResize); - b.enableStreetEntrance === t && (c.K.tD = b.enableStreetEntrance); - b.enableDeepZoom === t && (c.K.gL = b.enableDeepZoom); - var e = c.K.DV; - if (H()) - for (var f = 0, g = e.length; f < g; f++) - if (z.ca[e[f]]) { - c.K.devicePixelRatio = 1; - break - } - e = -1 < navigator.userAgent.toLowerCase().indexOf("android"); - f = -1 < navigator.userAgent.toLowerCase().indexOf("mqqbrowser"); - if (-1 < navigator.userAgent.toLowerCase().indexOf("UCBrowser") || e && f) - c.K.fG = 99; - c.Wa = a; - c.IB(a); - a.unselectable = "on"; - a.innerHTML = ""; - a.appendChild(c.va()); - b.size && this.Ce(b.size); - e = c.cb(); - c.width = e.width; - c.height = e.height; - c.offsetX = 0; - c.offsetY = 0; - c.platform = a.firstChild; - c.ze = c.platform.firstChild; - c.ze.style.width = c.width + "px"; - c.ze.style.height = c.height + "px"; - c.Yd = {}; - c.re = new J(0,0); - c.fc = new J(0,0); - c.Oa = 3; - c.Oc = 0; - c.LC = s; - c.KC = s; - c.Ub = ""; - c.Rw = ""; - c.Jh = {}; - c.Jh.custom = {}; - c.Sa = 0; - b.useWebGL === t && Na(t); - c.P = new Oa(a,{ - of: "api", - jT: q - }); - c.P.U(); - c.P.GF(c); - b = b || {}; - e = c.Hb = c.K.Hb; - c.cd = e.wm(); - e === Qa && Ra(xa); - e === Sa && Ra(ya); - e = c.K; - e.hP = Math.round(b.minZoom); - e.gP = Math.round(b.maxZoom); - c.bv(); - c.R = { - Jc: t, - nc: 0, - Bt: 0, - MM: 0, - l4: 0, - lC: t, - pF: -1, - Qe: [] - }; - c.platform.style.cursor = c.K.Vb; - for (f = 0; f < B.Fr.length; f++) - B.Fr[f](c); - c.R.pF = f; - c.ba(); - K.load("map", function() { - c.ib() - }); - c.K.fj && (setTimeout(function() { - Ra(za) - }, 1E3), - K.load("mapclick", function() { - window.MPC_Mgr = window.MPC_Mgr || {}; - window.MPC_Mgr[c.aa] = new Ta(c) - }, q)); - Ua() && K.load("oppc", function() { - c.Dz() - }); - H() && K.load("opmb", function() { - c.Dz() - }); - a = s; - c.WB = [] - } - } - z.lang.ta(Ka, z.lang.Ca, "Map"); - z.extend(Ka.prototype, { - va: function() { - var a = L("div") - , b = a.style; - b.overflow = "visible"; - b.position = "absolute"; - b.zIndex = "0"; - b.top = b.left = "0px"; - var b = L("div", { - "class": "BMap_mask" - }) - , c = b.style; - c.position = "absolute"; - c.top = c.left = "0px"; - c.zIndex = "9"; - c.overflow = "hidden"; - c.WebkitUserSelect = "none"; - a.appendChild(b); - return a - }, - IB: function(a) { - var b = a.style; - b.overflow = "hidden"; - "absolute" !== Va(a).position && (b.position = "relative", - b.zIndex = 0); - b.backgroundColor = "#F3F1EC"; - b.color = "#000"; - b.textAlign = "left" - }, - ba: function() { - var a = this; - a.as = function() { - var b = a.cb(); - if (a.width !== b.width || a.height !== b.height) { - var c = new O(a.width,a.height) - , e = new P("onbeforeresize"); - e.size = c; - a.dispatchEvent(e); - a.ik((b.width - a.width) / 2, (b.height - a.height) / 2); - a.ze.style.width = (a.width = b.width) + "px"; - a.ze.style.height = (a.height = b.height) + "px"; - c = new P("onresize"); - c.size = b; - a.dispatchEvent(c) - } - } - ; - a.K.nx && (a.R.es = setInterval(a.as, 80)) - }, - ik: function(a, b, c, e) { - var f = this.oa().dc(this.fa()) - , g = this.cd - , i = q; - c && J.yM(c) && (this.re = new J(c.lng,c.lat), - i = t); - if (c = c && e ? g.vj(c, this.Ub) : this.fc) - if (this.fc = new J(c.lng + a * f,c.lat - b * f), - (a = g.nh(this.fc, this.Ub)) && i) - this.re = a - }, - Gg: function(a, b) { - if (Wa(a) && (this.bv(), - this.dispatchEvent(new P("onzoomstart")), - a = this.Yn(a).zoom, - a !== this.Oa)) { - this.Oc = this.Oa; - this.Oa = a; - var c; - b ? c = b : this.hh() && (c = this.hh().ga()); - c && (c = this.$b(c, this.Oc), - this.ik(this.width / 2 - c.x, this.height / 2 - c.y, this.xb(c, this.Oc), q)); - this.dispatchEvent(new P("onzoomstartcode")) - } - }, - Qc: function(a) { - this.Gg(a) - }, - kG: function(a) { - this.Gg(this.Oa + 1, a) - }, - lG: function(a) { - this.Gg(this.Oa - 1, a) - }, - qi: function(a) { - a instanceof J && (this.fc = this.cd.vj(a, this.Ub), - this.re = J.yM(a) ? new J(a.lng,a.lat) : this.cd.nh(this.fc, this.Ub)) - }, - Ag: function(a, b) { - a = Math.round(a) || 0; - b = Math.round(b) || 0; - this.ik(-a, -b) - }, - Aw: function(a) { - a && Xa(a.He) && (a.He(this), - this.dispatchEvent(new P("onaddcontrol",a))) - }, - VN: function(a) { - a && Xa(a.remove) && (a.remove(), - this.dispatchEvent(new P("onremovecontrol",a))) - }, - yo: function(a) { - a && Xa(a.na) && (a.na(this), - this.dispatchEvent(new P("onaddcontextmenu",a))) - }, - Cp: function(a) { - a && Xa(a.remove) && (this.dispatchEvent(new P("onremovecontextmenu",a)), - a.remove()) - }, - Ga: function(a) { - a && Xa(a.He) && (a.He(this), - this.dispatchEvent(new P("onaddoverlay",a))) - }, - Qb: function(a) { - a && Xa(a.remove) && (a.remove(), - this.dispatchEvent(new P("onremoveoverlay",a))) - }, - yK: function() { - this.dispatchEvent(new P("onclearoverlays")) - }, - Oe: function(a) { - a && this.dispatchEvent(new P("onaddtilelayer",a)) - }, - Yf: function(a) { - a && this.dispatchEvent(new P("onremovetilelayer",a)) - }, - Dg: function(a) { - if (this.Hb !== a) { - var b = new P("onsetmaptype"); - b.V4 = this.Hb; - this.Hb = this.K.Hb = a; - this.cd = this.Hb.wm(); - this.ik(0, 0, this.Ka(), q); - this.bv(); - var c = this.Yn(this.fa()).zoom; - this.Gg(c); - this.dispatchEvent(b); - b = new P("onmaptypechange"); - b.Oa = c; - b.Hb = a; - this.dispatchEvent(b); - (a === Ya || a === Sa) && Ra(ya) - } - }, - Zf: function(a) { - var b = this; - if (a instanceof J) - b.qi(a, { - noAnimation: q - }); - else if ($a(a)) - if (b.Hb === Qa) { - var c = G.pC[a]; - c && (pt = c.k, - b.Zf(pt)) - } else { - var e = this.WH(); - e.JF(function(c) { - 0 === e.xm() && 2 === e.Ia.result.type && (b.Zf(c.Ak(0).point), - Qa.wk(a) && b.DF(a)) - }); - e.search(a, { - log: "center" - }) - } - }, - Fd: function(a, b) { - "[object Undefined]" !== Object.prototype.toString.call(b) && (b = parseInt(b)); - B.Fn("cus.fire", "time", { - z_loadscripttime: sa - ra - }); - var c = this; - if ($a(a)) - if (c.Hb === Qa) { - var e = G.pC[a]; - e && (pt = e.k, - c.Fd(pt, b)) - } else { - var f = c.WH(); - f.JF(function(e) { - if (0 === f.xm() && (2 === f.Ia.result.type || 11 === f.Ia.result.type)) { - var e = e.Ak(0).point - , g = b || ab.tx(f.Ia.content.level, c); - c.Fd(e, g); - Qa.wk(a) && c.DF(a) - } - }); - f.search(a, { - log: "center" - }) - } - else if (a instanceof J && b) { - b = c.Yn(b).zoom; - c.Oc = c.Oa || b; - c.Oa = b; - e = c.re; - c.re = new J(a.lng,a.lat); - c.fc = c.cd.vj(c.re, c.Ub); - c.LC = c.LC || c.Oa; - c.KC = c.KC || c.re; - var g = new P("onload") - , i = new P("onloadcode"); - g.point = new J(a.lng,a.lat); - g.pixel = c.$b(c.re, c.Oa); - g.zoom = b; - c.loaded || (c.loaded = q, - c.dispatchEvent(g), - ta || (ta = bb())); - c.dispatchEvent(i); - g = new P("onmoveend"); - g.mv = "centerAndZoom"; - e.pb(c.re) || c.dispatchEvent(g); - c.dispatchEvent(new P("onmoveend")); - c.Oc !== c.Oa && (e = new P("onzoomend"), - e.mv = "centerAndZoom", - c.dispatchEvent(e)); - c.K.Ro && c.Ro() - } - }, - WH: function() { - this.R.YM || (this.R.YM = new cb(1)); - return this.R.YM - }, - reset: function() { - this.Fd(this.KC, this.LC, q) - }, - enableDragging: function() { - this.K.Wb = q - }, - disableDragging: function() { - this.K.Wb = t - }, - enableInertialDragging: function() { - this.K.ox = q - }, - disableInertialDragging: function() { - this.K.ox = t - }, - enableScrollWheelZoom: function() { - this.K.Uo = q - }, - disableScrollWheelZoom: function() { - this.K.Uo = t - }, - enableContinuousZoom: function() { - this.K.To = q - }, - disableContinuousZoom: function() { - this.K.To = t - }, - enableDoubleClickZoom: function() { - this.K.nD = q - }, - disableDoubleClickZoom: function() { - this.K.nD = t - }, - enableKeyboard: function() { - this.K.px = q - }, - disableKeyboard: function() { - this.K.px = t - }, - enablePinchToZoom: function() { - this.K.Ns = q - }, - disablePinchToZoom: function() { - this.K.Ns = t - }, - enableAutoResize: function() { - this.K.nx = q; - this.as(); - this.R.es || (this.R.es = setInterval(this.as, 80)) - }, - disableAutoResize: function() { - this.K.nx = t; - this.R.es && (clearInterval(this.R.es), - this.R.es = s) - }, - Ro: function() { - this.K.Ro = q; - this.Nn || (this.Nn = new db({ - pL: q - }), - this.Oe(this.Nn)) - }, - KW: function() { - this.K.Ro = t; - this.Nn && (this.Yf(this.Nn), - this.Nn = s, - delete this.Nn) - }, - cb: function() { - return this.xs && this.xs instanceof O ? new O(this.xs.width,this.xs.height) : new O(this.Wa.clientWidth,this.Wa.clientHeight) - }, - Ce: function(a) { - a && a instanceof O ? (this.xs = a, - this.Wa.style.width = a.width + "px", - this.Wa.style.height = a.height + "px") : this.xs = s - }, - Ka: w("re"), - fa: w("Oa"), - ZV: function() { - this.as() - }, - Yn: function(a) { - var b = this.K.gc - , c = this.K.Yb - , e = t - , a = Math.round(a); - a < b && (e = q, - a = b); - a > c && (e = q, - a = c); - return { - zoom: a, - yD: e - } - }, - La: w("Wa"), - $b: function(a, b) { - b = b || this.fa(); - return this.cd.$b(a, b, this.fc, this.cb(), this.Ub) - }, - xb: function(a, b) { - b = b || this.fa(); - return this.cd.xb(a, b, this.fc, this.cb(), this.Ub) - }, - Xe: function(a, b) { - if (a) { - var c = this.$b(new J(a.lng,a.lat), b); - c.x -= this.offsetX; - c.y -= this.offsetY; - return c - } - }, - JN: function(a, b) { - if (a) { - var c = new Q(a.x,a.y); - c.x += this.offsetX; - c.y += this.offsetY; - return this.xb(c, b) - } - }, - pointToPixelFor3D: function(a, b) { - var c = map.Ub; - this.Hb === Qa && c && eb.EK(a, this, b) - }, - P4: function(a, b) { - var c = map.Ub; - this.Hb === Qa && c && eb.DK(a, this, b) - }, - Q4: function(a, b) { - var c = this - , e = map.Ub; - c.Hb === Qa && e && eb.EK(a, c, function(a) { - a.x -= c.offsetX; - a.y -= c.offsetY; - b && b(a) - }) - }, - L4: function(a, b) { - var c = map.Ub; - this.Hb === Qa && c && (a.x += this.offsetX, - a.y += this.offsetY, - eb.DK(a, this, b)) - }, - ve: function(a) { - if (!this.Xx()) - return new fb; - var b = a || {} - , a = b.margins || [0, 0, 0, 0] - , c = b.zoom || s - , b = this.xb({ - x: a[3], - y: this.height - a[2] - }, c) - , a = this.xb({ - x: this.width - a[1], - y: a[0] - }, c); - return new fb(b,a) - }, - Xx: function() { - return !!this.loaded - }, - nS: function(a, b) { - for (var c = this.oa(), e = b.margins || [10, 10, 10, 10], f = b.zoomFactor || 0, g = e[1] + e[3], e = e[0] + e[2], i = c.bp(), k = c = c.sm(); k >= i; k--) { - var m = this.oa().dc(k); - if (a.YF().lng / m < this.width - g && a.YF().lat / m < this.height - e) - break - } - k += f; - k < i && (k = i); - k > c && (k = c); - return k - }, - ht: function(a, b) { - var c = { - center: this.Ka(), - zoom: this.fa() - }; - if (!a || !a instanceof fb && 0 === a.length || a instanceof fb && a.tj()) - return c; - var e = []; - a instanceof fb ? (e.push(a.Rf()), - e.push(a.Ve())) : e = a.slice(0); - for (var b = b || {}, f = [], g = 0, i = e.length; g < i; g++) - f.push(this.cd.vj(e[g], this.Ub)); - e = new fb; - for (g = f.length - 1; 0 <= g; g--) - e.extend(f[g]); - if (e.tj()) - return c; - c = e.Ka(); - f = this.nS(e, b); - b.margins && (e = b.margins, - g = (e[1] - e[3]) / 2, - e = (e[0] - e[2]) / 2, - i = this.oa().dc(f), - b.offset && (g = b.offset.width, - e = b.offset.height), - c.lng += i * g, - c.lat += i * e); - c = this.cd.nh(c, this.Ub); - return { - center: c, - zoom: f - } - }, - yh: function(a, b) { - var c; - c = a && a.center ? a : this.ht(a, b); - var b = b || {} - , e = b.delay || 200; - if (c.zoom === this.Oa && b.enableAnimation !== t) { - var f = this; - setTimeout(function() { - f.qi(c.center, { - duration: 210 - }) - }, e) - } else - this.Fd(c.center, c.zoom) - }, - Tf: w("Yd"), - hh: function() { - return this.R.qb && this.R.qb.Xa() ? this.R.qb : s - }, - getDistance: function(a, b) { - if (a && b) { - if (a.pb(b)) - return 0; - var c = 0 - , c = S.$o(a, b); - if (c === s || c === l) - c = 0; - return c - } - }, - Hx: function() { - var a = [] - , b = this.ya - , c = this.Ee; - if (b) - for (var e in b) - b[e]instanceof gb && a.push(b[e]); - if (c) { - e = 0; - for (b = c.length; e < b; e++) - a.push(c[e]) - } - return a - }, - oa: w("Hb"), - Dz: function() { - for (var a = this.R.pF; a < B.Fr.length; a++) - B.Fr[a](this); - this.R.pF = a - }, - DF: function(a) { - //修改 setCurrentCity - //i_setCurrentCity(this, a); - this.Ub = Qa.wk(a); - this.Rw = Qa.BL(this.Ub); - this.Hb === Qa && this.cd instanceof hb && (this.cd.$i = this.Ub) - }, - setDefaultCursor: function(a) { - this.K.Vb = a; - this.platform && (this.platform.style.cursor = this.K.Vb) - }, - getDefaultCursor: function() { - return this.K.Vb - }, - setDraggingCursor: function(a) { - this.K.Hd = a - }, - getDraggingCursor: function() { - return this.K.Hd - }, - Sx: function() { - return this.K.aX && 1.5 <= this.K.devicePixelRatio - }, - Cw: function(a, b) { - b ? this.Jh[b] || (this.Jh[b] = {}) : b = "custom"; - a.tag = b; - a instanceof ib && (this.Jh[b][a.aa] = a, - a.na(this)); - var c = this; - K.load("hotspot", function() { - c.Dz() - }, q) - }, - VZ: function(a, b) { - b || (b = "custom"); - this.Jh[b][a.aa] && delete this.Jh[b][a.aa] - }, - dm: function(a) { - a || (a = "custom"); - this.Jh[a] = {} - }, - bv: function() { - var a = this.Hb.bp() - , b = this.Hb.sm() - , c = this.K; - c.gc = c.hP || a; - c.Yb = c.gP || b; - c.gc < a && (c.gc = a); - c.Yb > b && (c.Yb = b) - }, - setMinZoom: function(a) { - a = Math.round(a); - a > this.K.Yb && (a = this.K.Yb); - this.K.hP = a; - this.HJ() - }, - setMaxZoom: function(a) { - a = Math.round(a); - a < this.K.gc && (a = this.K.gc); - this.K.gP = a; - this.HJ() - }, - HJ: function() { - this.bv(); - var a = this.K; - this.Oa < a.gc ? this.Qc(a.gc) : this.Oa > a.Yb && this.Qc(a.Yb); - var b = new P("onzoomspanchange"); - b.gc = a.gc; - b.Yb = a.Yb; - this.dispatchEvent(b) - }, - Q3: w("WB"), - getKey: function() { - return qa - }, - Zt: function(a) { - var b = this; - window.MPC_Mgr && window.MPC_Mgr[b.aa] && window.MPC_Mgr[b.aa].close(); - b.K.fj = t; - B.Fn("cus.fire", "count", "z_setmapstylecount"); - if (a) { - b = this; - a.styleJson && (a.styleStr = b.Z_(a.styleJson)); - H() && z.ca.Iy ? setTimeout(function() { - b.K.ye = a; - b.dispatchEvent(new P("onsetcustomstyles",a)) - }, 50) : (this.K.ye = a, - this.dispatchEvent(new P("onsetcustomstyles",a)), - this.sM(b.K.ye.geotableId)); - var c = { - style: a.style - }; - a.features && 0 < a.features.length && (c.features = q); - a.styleJson && 0 < a.styleJson.length && (c.styleJson = q); - Ra(5050, c); - a.style && (c = b.K.fm[a.style] ? b.K.fm[a.style].backColor : b.K.fm.normal.backColor) && (this.La().style.backgroundColor = c) - } - }, - LY: function(a) { - this.controls || (this.controls = { - navigationControl: new jb, - scaleControl: new kb, - overviewMapControl: new lb, - mapTypeControl: new mb - }); - var b = this, c; - for (c in this.controls) - b.VN(b.controls[c]); - a = a || []; - z.mc.Fb(a, function(a) { - b.Aw(b.controls[a]) - }) - }, - sM: function(a) { - a ? this.vs && this.vs.Cf === a || (this.Yf(this.vs), - this.vs = new nb({ - geotableId: a - }), - this.Oe(this.vs)) : this.Yf(this.vs) - }, - Sb: function() { - var a = this.fa() >= this.K.fG && this.oa() === La && 18 >= this.fa() - , b = t; - try { - document.createElement("canvas").getContext("2d"), - b = q - } catch (c) { - b = t - } - return a && b - }, - getCurrentCity: function() { - return { - name: this.$g, - code: this.fs - } - }, - tm: function() { - this.P.co(); - return this.P - }, - PY: function(a) { - B.alog("cus.fire", "count", "z_loadindoormapcount"); - La.setMaxZoom(a.maxZoom || 19); - var b = new P("oninitindoorlayer"); - b.vf = a; - this.dispatchEvent(b); - this.K.Ms = t - }, - D_: function(a) { - this.K.qN = a; - this.Va.Jb.parentElement.style.display = a ? "block" : "none" - }, - setPanorama: function(a) { - this.P = a; - this.P.GF(this) - }, - Z_: function(a) { - for (var b = { - featureType: "t", - elementType: "e", - visibility: "v", - color: "c", - lightness: "l", - saturation: "s", - weight: "w", - zoom: "z", - hue: "h" - }, c = { - all: "all", - geometry: "g", - "geometry.fill": "g.f", - "geometry.stroke": "g.s", - labels: "l", - "labels.text.fill": "l.t.f", - "labels.text.stroke": "l.t.s", - "lables.text": "l.t", - "labels.icon": "l.i" - }, e = [], f = 0, g; g = a[f]; f++) { - var i = g.stylers; - delete g.stylers; - z.extend(g, i); - var i = [], k; - for (k in b) - if (g[k]) - if ("elementType" === k) - i.push(b[k] + ":" + c[g[k]]); - else { - switch (g[k]) { - case "poilabel": - g[k] = "poi"; - break; - case "districtlabel": - g[k] = "label" - } - i.push(b[k] + ":" + g[k]) - } - 2 < i.length && e.push(i.join("|")) - } - return e.join(",") - } - }); - function Ra(a, b) { - if (a) { - var b = b || {}, c = "", e; - for (e in b) - c = c + "&" + e + "=" + encodeURIComponent(b[e]); - var f = function(a) { - a && (ob = q, - setTimeout(function() { - pb.src = B.Wc + "images/blank.gif?" + a.src - }, 50)) - } - , g = function() { - var a = qb.shift(); - a && f(a) - }; - e = (1E8 * Math.random()).toFixed(0); - ob ? qb.push({ - src: "product=jsapi&sub_product=jsapi&v=" + B.version + "&sub_product_v=" + B.version + "&t=" + e + "&code=" + a + "&da_src=" + a + c - }) : f({ - src: "product=jsapi&sub_product=jsapi&v=" + B.version + "&sub_product_v=" + B.version + "&t=" + e + "&code=" + a + "&da_src=" + a + c - }); - rb || (z.M(pb, "load", function() { - ob = t; - g() - }), - z.M(pb, "error", function() { - ob = t; - g() - }), - rb = q) - } - } - var ob, rb, qb = [], pb = new Image; - Ra(5E3, { - device_pixel_ratio: window.devicePixelRatio, - platform: navigator.platform - }); - B.mM = { - TILE_BASE_URLS: ["gss0.bdstatic.com/5bwHcj7lABFU8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFV8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFS8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFT8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFY8t_jkk_Z1zRvfdw6buu"], - TILE_ONLINE_URLS: ["gss0.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlRMgBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlRcgBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlRsgBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlQ1gBo1vgoIiO_jowehsv"], - TIlE_PERSPECT_URLS: ["gss0.bdstatic.com/-OR1cTe9KgQFm2e88IuM_a", "gss0.bdstatic.com/-ON1cTe9KgQFm2e88IuM_a", "gss0.bdstatic.com/-OZ1cTe9KgQFm2e88IuM_a", "gss0.bdstatic.com/-OV1cTe9KgQFm2e88IuM_a"], - geolocControl: "gsp0.baidu.com/8LkJsjOpB1gCo2Kml5_Y_D3", - TILES_YUN_HOST: ["gsp0.baidu.com/-eR1bSahKgkFkRGko9WTAnF6hhy", "gsp0.baidu.com/-eN1bSahKgkFkRGko9WTAnF6hhy", "gsp0.baidu.com/-eZ1bSahKgkFkRGko9WTAnF6hhy", "gsp0.baidu.com/-eV1bSahKgkFkRGko9WTAnF6hhy"], - traffic: "gsp0.baidu.com/7_AZsjOpB1gCo2Kml5_Y_DAcsMJiwa", - iw_pano: "gss0.bdstatic.com/5LUZemba_QUU8t7mm9GUKT-xh_", - message: "gsp0.baidu.com/7vo0bSba2gU2pMbgoY3K", - baidumap: "gsp0.baidu.com/80MWsjip0QIZ8tyhnq", - wuxian: "gsp0.baidu.com/6a1OdTeaKgQFm2e88IuM_a", - pano: ["gss0.bdstatic.com/5LUZemba_QUU8t7mm9GUKT-xh_", "gss0.bdstatic.com/5LUZemfa_QUU8t7mm9GUKT-xh_", "gss0.bdstatic.com/5LUZemja_QUU8t7mm9GUKT-xh_"], - main_domain_nocdn: { - baidu: "gsp0.baidu.com/9_Q4sjOpB1gCo2Kml5_Y_D3", - other: "api.map.baidu.com" - }, - main_domain_cdn: { - baidu: ["gss0.bdstatic.com/9_Q4vHSd2RZ3otebn9fN2DJv", "gss0.baidu.com/9_Q4vXSd2RZ3otebn9fN2DJv", "gss0.bdstatic.com/9_Q4vnSd2RZ3otebn9fN2DJv"], - other: ["api.map.baidu.com"], - webmap: ["gss0.baidu.com/6b1IcTe9R1gBo1vgoIiO_jowehsv"] - }, - map_click: "gsp0.baidu.com/80MWbzKh2wt3n2qy8IqW0jdnxx1xbK", - vector_traffic: "gss0.bdstatic.com/8aZ1cTe9KgQIm2_p8IuM_a" - }; - B.DY = { - TILE_BASE_URLS: ["shangetu0.map.bdimg.com", "shangetu1.map.bdimg.com", "shangetu2.map.bdimg.com", "shangetu3.map.bdimg.com", "shangetu4.map.bdimg.com"], - TILE_ONLINE_URLS: ["online0.map.bdimg.com", "online1.map.bdimg.com", "online2.map.bdimg.com", "online3.map.bdimg.com", "online4.map.bdimg.com"], - TIlE_PERSPECT_URLS: ["d0.map.baidu.com", "d1.map.baidu.com", "d2.map.baidu.com", "d3.map.baidu.com"], - geolocControl: "loc.map.baidu.com", - TILES_YUN_HOST: ["g0.api.map.baidu.com", "g1.api.map.baidu.com", "g2.api.map.baidu.com", "g3.api.map.baidu.com"], - traffic: "its.map.baidu.com:8002", - iw_pano: "pcsv0.map.bdimg.com", - message: "j.map.baidu.com", - baidumap: "map.baidu.com", - wuxian: "wuxian.baidu.com", - pano: ["pcsv0.map.bdimg.com", "pcsv1.map.bdimg.com", "pcsv2.map.bdimg.com"], - main_domain_nocdn: { - baidu: "api.map.baidu.com" - }, - main_domain_cdn: { - baidu: ["api0.map.bdimg.com", "api1.map.bdimg.com", "api2.map.bdimg.com"], - webmap: ["webmap0.map.bdimg.com"] - }, - map_click: "mapclick.map.baidu.com", - vector_traffic: "or.map.bdimg.com" - }; - B.F0 = { - "0": { - proto: "http://", - domain: B.DY - }, - 1: { - proto: "https://", - domain: B.mM - }, - 2: { - proto: "https://", - domain: B.mM - } - }; - window.BMAP_PROTOCOL && "https" === window.BMAP_PROTOCOL && (window.HOST_TYPE = 2); - B.xu = window.HOST_TYPE || "0"; - B.url = B.F0[B.xu]; - B.vp = B.url.proto + B.url.domain.baidumap + "/"; - //B.vp =bmapcfg.home; //修改,本地工具资源引用(离线路径) - B.Wc = B.url.proto + ("2" == B.xu ? B.url.domain.main_domain_nocdn.other : B.url.domain.main_domain_nocdn.baidu) + "/"; - //B.Wc =bmapcfg.home; //修改,本地工具资源引用(离线路径) - //B.ka=B.url.proto+("2"==B.xu?B.url.domain.main_domain_cdn.other[0]:B.url.domain.main_domain_cdn.baidu[0])+"/"; - B.ka = bmapcfg.home; //修改,本地工具资源引用(离线路径) - B.Yi = B.url.proto + B.url.domain.main_domain_cdn.webmap[0] + "/"; - //B.Yi =bmapcfg.home; //修改,本地工具资源引用(离线路径) - B.vg = function(a, b) { - var c, e, b = b || ""; - switch (a) { - case "main_domain_nocdn": - c = B.Wc + b; - break; - case "main_domain_cdn": - c = B.ka + b; - break; - default: - e = B.url.domain[a], - "[object Array]" == Object.prototype.toString.call(e) ? (c = [], - z.mc.Fb(e, function(a, e) { - c[e] = B.url.proto + a + "/" + b - })) : c = B.url.proto + B.url.domain[a] + "/" + b - } - return c - } - ; - function tb(a) { - var b = { - duration: 1E3, - Ic: 30, - No: 0, - kc: ub.UM, - Kt: u() - }; - this.dg = []; - if (a) - for (var c in a) - b[c] = a[c]; - this.j = b; - if (Wa(b.No)) { - var e = this; - setTimeout(function() { - e.start() - }, b.No) - } else - b.No != vb && this.start() - } - var vb = "INFINITE"; - tb.prototype.start = function() { - this.Uu = bb(); - this.gA = this.Uu + this.j.duration; - wb(this) - } - ; - tb.prototype.add = function(a) { - this.dg.push(a) - } - ; - function wb(a) { - var b = bb(); - b >= a.gA ? (Xa(a.j.va) && a.j.va(a.j.kc(1)), - Xa(a.j.finish) && a.j.finish(), - 0 < a.dg.length && (b = a.dg[0], - b.dg = [].concat(a.dg.slice(1)), - b.start())) : (a.Jy = a.j.kc((b - a.Uu) / a.j.duration), - Xa(a.j.va) && a.j.va(a.Jy), - a.TF || (a.Yr = setTimeout(function() { - wb(a) - }, 1E3 / a.j.Ic))) - } - tb.prototype.stop = function(a) { - this.TF = q; - for (var b = 0; b < this.dg.length; b++) - this.dg[b].stop(), - this.dg[b] = s; - this.dg.length = 0; - this.Yr && (clearTimeout(this.Yr), - this.Yr = s); - this.j.Kt(this.Jy); - a && (this.gA = this.Uu, - wb(this)) - } - ; - tb.prototype.cancel = ga(1); - var ub = { - UM: function(a) { - return a - }, - reverse: function(a) { - return 1 - a - }, - iD: function(a) { - return a * a - }, - hD: function(a) { - return Math.pow(a, 3) - }, - Ks: function(a) { - return -(a * (a - 2)) - }, - eL: function(a) { - return Math.pow(a - 1, 3) + 1 - }, - dL: function(a) { - return 0.5 > a ? 2 * a * a : -2 * (a - 2) * a - 1 - }, - R2: function(a) { - return 0.5 > a ? 4 * Math.pow(a, 3) : 4 * Math.pow(a - 1, 3) + 1 - }, - S2: function(a) { - return (1 - Math.cos(Math.PI * a)) / 2 - } - }; - ub["ease-in"] = ub.iD; - ub["ease-out"] = ub.Ks; - var G = { - oG: 34, - pG: 21, - qG: new O(21,32), - wP: new O(10,32), - vP: new O(24,36), - uP: new O(12,36), - mG: new O(13,1), - qa: B.ka + "images/", - a4: "http://api0.map.bdimg.com/images/", - nG: B.ka + "images/markers_new.png", - sP: 24, - tP: 73, - pC: { - "\u5317\u4eac": { - yy: "bj", - k: new J(116.403874,39.914889) - }, - "\u4e0a\u6d77": { - yy: "sh", - k: new J(121.487899,31.249162) - }, - "\u6df1\u5733": { - yy: "sz", - k: new J(114.025974,22.546054) - }, - "\u5e7f\u5dde": { - yy: "gz", - k: new J(113.30765,23.120049) - } - }, - fontFamily: "arial,sans-serif" - }; - z.ca.Te ? (z.extend(G, { - TK: "url(" + G.qa + "ruler.cur),crosshair", - Vb: "-moz-grab", - Hd: "-moz-grabbing" - }), - z.platform.IM && (G.fontFamily = "arial,simsun,sans-serif")) : z.ca.Qw || z.ca.Iy ? z.extend(G, { - TK: "url(" + G.qa + "ruler.cur) 2 6,crosshair", - Vb: "url(" + G.qa + "openhand.cur) 8 8,default", - Hd: "url(" + G.qa + "closedhand.cur) 8 8,move" - }) : z.extend(G, { - TK: "url(" + G.qa + "ruler.cur),crosshair", - Vb: "url(" + G.qa + "openhand.cur),default", - Hd: "url(" + G.qa + "closedhand.cur),move" - }); - function xb(a, b) { - var c = a.style; - c.left = b[0] + "px"; - c.top = b[1] + "px" - } - function yb(a) { - 0 < z.ca.ia ? a.unselectable = "on" : a.style.MozUserSelect = "none" - } - function zb(a) { - return a && a.parentNode && 11 !== a.parentNode.nodeType - } - function Ab(a, b) { - z.D.Vx(a, "beforeEnd", b); - return a.lastChild - } - function Bb(a) { - for (var b = { - left: 0, - top: 0 - }; a && a.offsetParent; ) - b.left += a.offsetLeft, - b.top += a.offsetTop, - a = a.offsetParent; - return b - } - function ma(a) { - a = window.event || a; - a.stopPropagation ? a.stopPropagation() : a.cancelBubble = q - } - function Cb(a) { - a = window.event || a; - a.preventDefault ? a.preventDefault() : a.returnValue = t; - return t - } - function na(a) { - ma(a); - return Cb(a) - } - function Eb() { - var a = document.documentElement - , b = document.body; - return a && (a.scrollTop || a.scrollLeft) ? [a.scrollTop, a.scrollLeft] : b ? [b.scrollTop, b.scrollLeft] : [0, 0] - } - function Fb(a, b) { - if (a && b) - return Math.round(Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2))) - } - function Gb(a, b) { - var c = [], b = b || function(a) { - return a - } - , e; - for (e in a) - c.push(e + "=" + b(a[e])); - return c.join("&") - } - function L(a, b, c) { - var e = document.createElement(a); - c && (e = document.createElementNS(c, a)); - return z.D.CF(e, b || {}) - } - function Va(a) { - if (a.currentStyle) - return a.currentStyle; - if (a.ownerDocument && a.ownerDocument.defaultView) - return a.ownerDocument.defaultView.getComputedStyle(a, s) - } - function Xa(a) { - return "function" === typeof a - } - function Wa(a) { - return "number" === typeof a - } - function $a(a) { - return "string" == typeof a - } - function Hb(a) { - return "undefined" != typeof a - } - function Ib(a) { - return "object" == typeof a - } - var Jb = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - function Kb(a) { - for (var b = "", c = 0; c < a.length; c++) { - var e = a.charCodeAt(c) << 1 - , f = e = e.toString(2); - 8 > e.length && (f = "00000000" + e, - f = f.substr(e.length, 8)); - b += f - } - a = 5 - b.length % 5; - e = []; - for (c = 0; c < a; c++) - e[c] = "0"; - b = e.join("") + b; - f = []; - for (c = 0; c < b.length / 5; c++) - e = b.substr(5 * c, 5), - f.push(String.fromCharCode(parseInt(e, 2) + 50)); - return f.join("") + a.toString() - } - function Lb(a) { - var b = "", c, e, f = "", g, i = "", k = 0; - g = /[^A-Za-z0-9\+\/\=]/g; - if (!a || g.exec(a)) - return a; - a = a.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - do - c = Jb.indexOf(a.charAt(k++)), - e = Jb.indexOf(a.charAt(k++)), - g = Jb.indexOf(a.charAt(k++)), - i = Jb.indexOf(a.charAt(k++)), - c = c << 2 | e >> 4, - e = (e & 15) << 4 | g >> 2, - f = (g & 3) << 6 | i, - b += String.fromCharCode(c), - 64 != g && (b += String.fromCharCode(e)), - 64 != i && (b += String.fromCharCode(f)); - while (k < a.length);return b - } - var P = z.lang.Ju; - function H() { - return !(!z.platform.zE && !z.platform.XY && !z.platform.Jm) - } - function Ua() { - return !(!z.platform.IM && !z.platform.AM && !z.platform.cZ) - } - function bb() { - return (new Date).getTime() - } - function Mb() { - var a = document.body.appendChild(L("div")); - a.innerHTML = ''; - var b = a.firstChild; - if (!b.style) - return t; - b.style.behavior = "url(#default#VML)"; - b = b ? "object" === typeof b.adj : q; - a.parentNode.removeChild(a); - return b - } - function Nb() { - return !!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Shape", "1.1") - } - function Ob() { - return !!L("canvas").getContext - } - function Pb(a) { - return a * Math.PI / 180 - } - B.iZ = function() { - var a = q - , b = q - , c = q - , e = q - , f = 0 - , g = 0 - , i = 0 - , k = 0; - return { - eR: function() { - f += 1; - a && (a = t, - setTimeout(function() { - Ra(5054, { - pic: f - }); - a = q; - f = 0 - }, 1E4)) - }, - v1: function() { - g += 1; - b && (b = t, - setTimeout(function() { - Ra(5055, { - move: g - }); - b = q; - g = 0 - }, 1E4)) - }, - x1: function() { - i += 1; - c && (c = t, - setTimeout(function() { - Ra(5056, { - zoom: i - }); - c = q; - i = 0 - }, 1E4)) - }, - w1: function(a) { - k += a; - e && (e = t, - setTimeout(function() { - Ra(5057, { - tile: k - }); - e = q; - k = 0 - }, 5E3)) - } - } - }(); - B.iq = { - DG: "#83a1ff", - kq: "#808080" - }; - function Qb(a, b, c) { - b.Om || (b.Om = [], - b.handle = {}); - b.Om.push({ - filter: c, - nm: a - }); - b.addEventListener || (b.addEventListener = function(a, c) { - b.attachEvent("on" + a, c) - } - ); - b.handle.click || (b.addEventListener("click", function(a) { - for (var c = a.target || a.srcElement; c != b; ) { - Rb(b.Om, function(b, i) { - RegExp(i.filter).test(c.getAttribute("filter")) && i.nm.call(c, a, c.getAttribute("filter")) - }); - c = c.parentNode - } - }, t), - b.handle.click = q) - } - function Rb(a, b) { - for (var c = 0, e = a.length; c < e; c++) - b(c, a[c]) - } - void function(a, b, c) { - void function(a, b, c) { - function i(a) { - if (!a.Mo) { - for (var c = q, e = [], g = a.ZZ, k = 0; g && k < g.length; k++) { - var m = g[k] - , n = pa[m] = pa[m] || {}; - if (n.Mo || n == a) - e.push(n.Nc); - else { - c = t; - if (!n.DW && (m = (Ma.get("alias") || {})[m] || m + ".js", - !R[m])) { - R[m] = q; - var o = b.createElement("script") - , p = b.getElementsByTagName("script")[0]; - o.async = q; - o.src = m; - p.parentNode.insertBefore(o, p) - } - n.bz = n.bz || {}; - n.bz[a.name] = a - } - } - if (c) { - a.Mo = q; - a.KK && (a.Nc = a.KK.apply(a, e)); - for (var v in a.bz) - i(a.bz[v]) - } - } - } - function k(a) { - return (a || new Date) - F - } - function m(a, b, c) { - if (a) { - "string" == typeof a && (c = b, - b = a, - a = M); - try { - a == M ? (N[b] = N[b] || [], - N[b].unshift(c)) : a.addEventListener ? a.addEventListener(b, c, t) : a.attachEvent && a.attachEvent("on" + b, c) - } catch (e) {} - } - } - function n(a, b, c) { - if (a) { - "string" == typeof a && (c = b, - b = a, - a = M); - try { - if (a == M) { - var e = N[b]; - if (e) - for (var f = e.length; f--; ) - e[f] === c && e.splice(f, 1) - } else - a.removeEventListener ? a.removeEventListener(b, c, t) : a.detachEvent && a.detachEvent("on" + b, c) - } catch (g) {} - } - } - function o(a) { - var b = N[a] - , c = 0; - if (b) { - for (var e = [], f = arguments, g = 1; g < f.length; g++) - e.push(f[g]); - for (g = b.length; g--; ) - b[g].apply(this, e) && c++; - return c - } - } - function p(a, b) { - if (a && b) { - var c = new Image(1,1), e = [], f = "img_" + +new Date, g; - for (g in b) - b[g] && e.push(g + "=" + encodeURIComponent(b[g])); - M[f] = c; - c.onload = c.onerror = function() { - M[f] = c = c.onload = c.onerror = s; - delete M[f] - } - ; - c.src = a + "?" + e.join("&") - } - } - function v() { - var a = arguments - , b = a[0]; - if (this.JK || /^(on|un|set|get|create)$/.test(b)) { - for (var b = y.prototype[b], c = [], e = 1, f = a.length; e < f; e++) - c.push(a[e]); - "function" == typeof b && b.apply(this, c) - } else - this.iK.push(a) - } - function x(a, b) { - var c = {}, e; - for (e in a) - a.hasOwnProperty(e) && (c[e] = a[e]); - for (e in b) - b.hasOwnProperty(e) && (c[e] = b[e]); - return c - } - function y(a) { - this.name = a; - this.Ps = { - protocolParameter: { - postUrl: s, - protocolParameter: s - } - }; - this.iK = []; - this.alog = M - } - function A(a) { - a = a || "default"; - if ("*" == a) { - var a = [], b; - for (b in fa) - a.push(fa[b]); - return a - } - (b = fa[a]) || (b = fa[a] = new y(a)); - return b - } - var E = c.alog; - if (!E || !E.Mo) { - var C = b.all && a.attachEvent - , F = E && E.IE || +new Date - , D = a.o4 || (+new Date).toString(36) + Math.random().toString(36).substr(2, 3) - , I = 0 - , R = {} - , M = function(a) { - var b = arguments, c, e, f, g; - if ("define" == a || "require" == a) { - for (e = 1; e < b.length; e++) - switch (typeof b[e]) { - case "string": - c = b[e]; - break; - case "object": - f = b[e]; - break; - case "function": - g = b[e] - } - "require" == a && (c && !f && (f = [c]), - c = s); - c = !c ? "#" + I++ : c; - e = pa[c] = pa[c] || {}; - e.Mo || (e.name = c, - e.ZZ = f, - e.KK = g, - "define" == a && (e.DW = q), - i(e)) - } else - "function" == typeof a ? a(M) : ("" + a).replace(/^(?:([\w$_]+)\.)?(\w+)$/, function(a, c, e) { - b[0] = e; - v.apply(M.bG(c), b) - }) - } - , N = {} - , fa = {} - , pa = { - i2: { - name: "alog", - Mo: q, - Nc: M - } - }; - y.prototype.start = y.prototype.create = function(a) { - if (!this.JK) { - "object" == typeof a && this.set(a); - this.JK = new Date; - for (this.Qs("create", this); a = this.iK.shift(); ) - v.apply(this, a) - } - } - ; - y.prototype.send = function(a, b) { - var c = x({ - ts: k().toString(36), - t: a, - sid: D - }, this.Ps); - if ("object" == typeof b) - c = x(c, b); - else { - var e = arguments; - switch (a) { - case "pageview": - e[1] && (c.page = e[1]); - e[2] && (c.title = e[2]); - break; - case "event": - e[1] && (c.eventCategory = e[1]); - e[2] && (c.eventAction = e[2]); - e[3] && (c.eventLabel = e[3]); - e[4] && (c.eventValue = e[4]); - break; - case "timing": - e[1] && (c.timingCategory = e[1]); - e[2] && (c.timingVar = e[2]); - e[3] && (c.timingValue = e[3]); - e[4] && (c.timingLabel = e[4]); - break; - case "exception": - e[1] && (c.exDescription = e[1]); - e[2] && (c.exFatal = e[2]); - break; - default: - return - } - } - this.Qs("send", c); - var f; - if (e = this.Ps.protocolParameter) { - var g = {}; - for (f in c) - e[f] !== s && (g[e[f] || f] = c[f]); - f = g - } else - f = c; - p(this.Ps.postUrl, f) - } - ; - y.prototype.set = function(a, b) { - if ("string" == typeof a) - "protocolParameter" == a && (b = x({ - postUrl: s, - protocolParameter: s - }, b)), - this.Ps[a] = b; - else if ("object" == typeof a) - for (var c in a) - this.set(c, a[c]) - } - ; - y.prototype.get = function(a, b) { - var c = this.Ps[a]; - "function" == typeof b && b(c); - return c - } - ; - y.prototype.Qs = function(a, b) { - return M.Qs(this.name + "." + a, b) - } - ; - y.prototype.M = function(a, b) { - M.M(this.name + "." + a, b) - } - ; - y.prototype.ed = function(a, b) { - M.ed(this.name + "." + a, b) - } - ; - M.name = "alog"; - M.BO = D; - M.Mo = q; - M.timestamp = k; - M.ed = n; - M.M = m; - M.Qs = o; - M.bG = A; - M("init"); - var wa = y.prototype; - T(wa, { - start: wa.start, - create: wa.create, - send: wa.send, - set: wa.set, - get: wa.get, - on: wa.M, - un: wa.ed, - fire: wa.Qs - }); - var Ma = A(); - Ma.set("protocolParameter", { - h2: s - }); - if (E) { - wa = [].concat(E.wb || [], E.Wm || []); - E.wb = E.Wm = s; - for (var sb in M) - M.hasOwnProperty(sb) && (E[sb] = M[sb]); - M.wb = M.Wm = { - push: function(a) { - M.apply(M, a) - } - }; - for (E = 0; E < wa.length; E++) - M.apply(M, wa[E]) - } - c.alog = M; - C && m(b, "mouseup", function(a) { - a = a.target || a.srcElement; - 1 == a.nodeType && /^ajavascript:/i.test(a.tagName + a.href) - }); - var Za = t; - a.onerror = function(a, b, e, f) { - var i = q; - !b && /^script error/i.test(a) && (Za ? i = t : Za = q); - i && c.alog("exception.send", "exception", { - Ht: a, - HE: b, - Dt: e, - hs: f - }); - return t - } - ; - c.alog("exception.on", "catch", function(a) { - c.alog("exception.send", "exception", { - Ht: a.Ht, - HE: a.path, - Dt: a.Dt, - method: a.method, - rL: "catch" - }) - }) - } - }(a, b, c); - void function(a, b, c) { - var i = "18_3"; - H() && (i = "18_4"); - var k = "http://static.tieba.baidu.com"; - "https:" === a.location.protocol && (k = "https://gsp0.baidu.com/5aAHeD3nKhI2p27j8IqW0jdnxx1xbK"); - var m = Math.random - , k = k + "/tb/pms/img/st.gif" - , n = { - wh: "0.1" - } - , o = { - wh: "0.1" - } - , p = { - wh: "0.1" - } - , v = { - wh: "0" - }; - if (n && n.wh && m() < n.wh) { - var x = c.alog.bG("monkey"), y, n = a.screen, A = b.referrer; - x.set("ver", 5); - x.set("pid", 241); - n && x.set("px", n.width + "*" + n.height); - x.set("ref", A); - c.alog("monkey.on", "create", function() { - y = c.alog.timestamp; - x.set("protocolParameter", { - reports: s - }) - }); - c.alog("monkey.on", "send", function(a) { - "pageview" == a.t && (a.cmd = "open"); - a.now && (a.ts = y(a.now).toString(36), - a.now = "") - }); - c.alog("monkey.create", { - page: i, - pid: "241", - p: "18", - dv: 6, - postUrl: k, - reports: { - refer: 1 - } - }); - c.alog("monkey.send", "pageview", { - now: +new Date - }) - } - if (o && o.wh && m() < o.wh) { - var E = t; - a.onerror = function(a, b, e, f) { - var i = q; - !b && /^script error/i.test(a) && (E ? i = t : E = q); - i && c.alog("exception.send", "exception", { - Ht: a, - HE: b, - Dt: e, - hs: f - }); - return t - } - ; - c.alog("exception.on", "catch", function(a) { - c.alog("exception.send", "exception", { - Ht: a.Ht, - HE: a.path, - Dt: a.Dt, - method: a.method, - rL: "catch" - }) - }); - c.alog("exception.create", { - postUrl: k, - dv: 7, - page: i, - pid: "170", - p: "18" - }) - } - p && (p.wh && m() < p.wh) && (c.alog("cus.on", "time", function(a) { - var b = {}, e = t, f; - if ("[object Object]" === a.toString()) { - for (var i in a) - "page" == i ? b.page = a[i] : (f = parseInt(a[i]), - 0 < f && /^z_/.test(i) && (e = q, - b[i] = f)); - e && c.alog("cus.send", "time", b) - } - }), - c.alog("cus.on", "count", function(a) { - var b = {} - , e = t; - "string" === typeof a && (a = [a]); - if (a instanceof Array) - for (var f = 0; f < a.length; f++) - /^z_/.test(a[f]) ? (e = q, - b[a[f]] = 1) : /^page:/.test(a[f]) && (b.page = a[f].substring(5)); - e && c.alog("cus.send", "count", b) - }), - c.alog("cus.create", { - dv: 3, - postUrl: k, - page: i, - p: "18" - })); - if (v && v.wh && m() < v.wh) { - var C = ["Moz", "O", "ms", "Webkit"] - , F = ["-webkit-", "-moz-", "-o-", "-ms-"] - , D = function() { - return typeof b.createElement !== "function" ? b.createElement(arguments[0]) : b.createElement.apply(b, arguments) - } - , I = D("dpFeatureTest").style - , R = function(a) { - return M(a, l, l) - } - , M = function(a, b, c) { - var e = a.charAt(0).toUpperCase() + a.slice(1) - , f = (a + " " + C.join(e + " ") + e).split(" "); - if (typeof b === "string" || typeof b === "undefined") - return N(f, b); - f = (a + " " + C.join(e + " ") + e).split(" "); - a: { - var a = f, g; - for (g in a) - if (a[g]in b) { - if (c === t) { - b = a[g]; - break a - } - g = b[a[g]]; - b = typeof g === "function" ? fnBind(g, c || b) : g; - break a - } - b = t - } - return b - } - , N = function(a, b) { - var c, e, f; - e = a.length; - for (c = 0; c < e; c++) { - f = a[c]; - ~("" + f).indexOf("-") && (f = fa(f)); - if (I[f] !== l) - return b == "pfx" ? f : q - } - return t - } - , fa = function(a) { - return a.replace(/([a-z])-([a-z])/g, function(a, b, c) { - return b + c.toUpperCase() - }).replace(/^-/, "") - } - , pa = function(a, b, c) { - if (a.indexOf("@") === 0) - return atRule(a); - a.indexOf("-") != -1 && (a = fa(a)); - return !b ? M(a, "pfx") : M(a, b, c) - } - , wa = function() { - var a = D("canvas"); - return !(!a.getContext || !a.getContext("2d")) - } - , Ma = function() { - var a = D("div"); - return "draggable"in a || "ondragstart"in a && "ondrop"in a - } - , sb = function() { - try { - localStorage.setItem("localStorage", "localStorage"); - localStorage.removeItem("localStorage"); - return q - } catch (a) { - return t - } - } - , Za = function() { - return "content"in b.createElement("template") - } - , Pa = function() { - return "createShadowRoot"in b.createElement("a") - } - , oi = function() { - return "registerElement"in b - } - , pi = function() { - return "import"in b.createElement("link") - } - , qi = function() { - return "getItems"in b - } - , ri = function() { - return "EventSource"in window - } - , re = function(a, b) { - var c = new Image; - c.onload = function() { - b(a, c.width > 0 && c.height > 0) - } - ; - c.onerror = function() { - b(a, t) - } - ; - c.src = "data:image/webp;base64," + { - r4: "UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA", - q4: "UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==", - alpha: "UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==", - kk: "UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA" - }[a] - } - , se = function(a, b) { - return Tb.ei["WebP-" + a] = b - } - , si = function() { - return "openDatabase"in a - } - , ti = function() { - return "performance"in a && "timing"in a.performance - } - , ui = function() { - return "performance"in a && "mark"in a.performance - } - , vi = function() { - return !(!Array.prototype || !Array.prototype.every || !Array.prototype.filter || !Array.prototype.forEach || !Array.prototype.indexOf || !Array.prototype.lastIndexOf || !Array.prototype.map || !Array.prototype.some || !Array.prototype.reduce || !Array.prototype.reduceRight || !Array.isArray) - } - , wi = function() { - return "Promise"in a && "cast"in a.lq && "resolve"in a.lq && "reject"in a.lq && "all"in a.lq && "race"in a.lq && function() { - var b; - new a.lq(function(a) { - b = a - } - ); - return typeof b === "function" - }() - } - , xi = function() { - var b = !!a.i1 - , c = a.XMLHttpRequest && "withCredentials"in new XMLHttpRequest; - return !!a.l1 && b && c - } - , yi = function() { - return "geolocation"in navigator - } - , zi = function() { - var b = D("canvas") - , c = "probablySupportsContext"in b ? "probablySupportsContext" : "supportsContext"; - return c in b ? b[c]("webgl") || b[c]("experimental-webgl") : "WebGLRenderingContext"in a - } - , Ai = function() { - return !!b.createElementNS && !!b.createElementNS("http://www.w3.org/2000/svg", "svg").A2 - } - , Bi = function() { - return !!a.s1 - } - , Ci = function() { - return "WebSocket"in a && a.p1.f1 === 2 - } - , Di = function() { - return !!b.createElement("video").canPlayType - } - , Ei = function() { - return !!b.createElement("audio").canPlayType - } - , Fi = function() { - return !!(a.history && "pushState"in a.history) - } - , Gi = function() { - return !(!a.g1 || !a.h1) - } - , Hi = function() { - return "postMessage"in window - } - , Ii = function() { - return !!a.webkitNotifications || "Notification"in a && "permission"in a.PP && "requestPermission"in a.PP - } - , Ji = function() { - for (var b = ["webkit", "moz", "o", "ms"], c = a.requestAnimationFrame, f = 0; f < b.length && !c; ++f) - c = a[b[f] + "RequestAnimationFrame"]; - return !!c - } - , Ki = function() { - return "JSON"in a && "parse"in JSON && "stringify"in JSON - } - , Li = function() { - return !(!pa("exitFullscreen", b, t) && !pa("cancelFullScreen", b, t)) - } - , Mi = function() { - return !!pa("Intl", a) - } - , Ni = function() { - return R("flexBasis") - } - , Oi = function() { - return !!R("perspective") - } - , Pi = function() { - return R("shapeOutside") - } - , Qi = function() { - var a = D("div"); - a.style.cssText = F.join("filter:blur(2px); "); - return !!a.style.length && (b.documentMode === l || b.documentMode > 9) - } - , Ri = function() { - return "XMLHttpRequest"in a && "withCredentials"in new XMLHttpRequest - } - , Si = function() { - return D("progress").max !== l - } - , Ti = function() { - return D("meter").max !== l - } - , Ui = function() { - return "sendBeacon"in navigator - } - , Vi = function() { - return R("borderRadius") - } - , Wi = function() { - return R("boxShadow") - } - , Xi = function() { - var a = D("div").style; - a.cssText = F.join("opacity:.55;"); - return /^0.55$/.test(a.opacity) - } - , Yi = function() { - return N(["textShadow"], l) - } - , Zi = function() { - return R("animationName") - } - , $i = function() { - return R("transition") - } - , aj = function() { - return navigator.userAgent.indexOf("Android 2.") === -1 && R("transform") - } - , Tb = { - ei: {}, - pa: function(a, b, c) { - this.ei[a] = b.apply(this, [].slice.call(arguments, 2)) - }, - Ed: function(a, b) { - a.apply(this, [].slice.call(arguments, 1)) - }, - f_: function() { - this.pa("bdrs", Vi); - this.pa("bxsd", Wi); - this.pa("opat", Xi); - this.pa("txsd", Yi); - this.pa("anim", Zi); - this.pa("trsi", $i); - this.pa("trfm", aj); - this.pa("flex", Ni); - this.pa("3dtr", Oi); - this.pa("shpe", Pi); - this.pa("fltr", Qi); - this.pa("cavs", wa); - this.pa("dgdp", Ma); - this.pa("locs", sb); - this.pa("wctem", Za); - this.pa("wcsdd", Pa); - this.pa("wccse", oi); - this.pa("wchti", pi); - this.Ed(re, "lossy", se); - this.Ed(re, "lossless", se); - this.Ed(re, "alpha", se); - this.Ed(re, "animation", se); - this.pa("wsql", si); - this.pa("natm", ti); - this.pa("ustm", ui); - this.pa("arra", vi); - this.pa("prms", wi); - this.pa("xhr2", xi); - this.pa("wbgl", zi); - this.pa("geol", yi); - this.pa("svg", Ai); - this.pa("work", Bi); - this.pa("wbsk", Ci); - this.pa("vido", Di); - this.pa("audo", Ei); - this.pa("hsty", Fi); - this.pa("file", Gi); - this.pa("psmg", Hi); - this.pa("wknf", Ii); - this.pa("rqaf", Ji); - this.pa("json", Ki); - this.pa("flsc", Li); - this.pa("i18n", Mi); - this.pa("cors", Ri); - this.pa("prog", Si); - this.pa("metr", Ti); - this.pa("becn", Ui); - this.pa("mcrd", qi); - this.pa("esrc", ri) - } - } - , x = c.alog.bG("feature"); - x.M("commit", function() { - Tb.f_(); - var a = setInterval(function() { - if ("WebP-lossy"in Tb.ei && "WebP-lossless"in Tb.ei && "WebP-alpha"in Tb.ei && "WebP-animation"in Tb.ei) { - for (var b in Tb.ei) - Tb.ei[b] = Tb.ei[b] ? "y" : "n"; - x.send("feature", Tb.ei); - clearInterval(a) - } - }, 500) - }); - c.alog("feature.create", { - P2: 4, - R4: k, - page: i, - wb: "18" - }); - c.alog("feature.fire", "commit") - } - }(a, b, c) - }(window, document, B); - B.Fn = B.alog || u(); - B.alog("cus.fire", "count", "z_loadscriptcount"); - "https:" === location.protocol && B.alog("cus.fire", "count", "z_httpscount"); - function Sb(a) { - var b = window.TILE_VERSION - , c = "20170927"; - b && b.ditu && (b = b.ditu, - b[a] && b[a].updateDate && (c = b[a].updateDate)); - return c - } - ;function oa(a, b) { - if (/^http/.test(a)) return;//修改 屏蔽ak验证,若调用外部资源直接返回 - - if (b) { - var c = (1E5 * Math.random()).toFixed(0); - B._rd["_cbk" + c] = function(a) { - b && b(a); - delete B._rd["_cbk" + c] - } - ; - a += "&callback=BMap._rd._cbk" + c - } - var e = L("script", { - type: "text/javascript" - }); - e.charset = "utf-8"; - e.src = a; - e.addEventListener ? e.addEventListener("load", function(a) { - a = a.target; - a.parentNode.removeChild(a) - }, t) : e.attachEvent && e.attachEvent("onreadystatechange", function() { - var a = window.event.srcElement; - a && ("loaded" == a.readyState || "complete" == a.readyState) && a.parentNode.removeChild(a) - }); - setTimeout(function() { - document.getElementsByTagName("head")[0].appendChild(e); - e = s - }, 1) - } - ;var Ub = { //修改,这里是所有的模块,用到时自动加载(在线),离线的话要先下载下来放到本地,如http://api0.map.bdimg.com/getmodules?v=3.0&mod=模块1,模块2 - //模块命名格式是map_dbwcej,直接拼接起来 - map: "dbwcej", - common: "wkrfcz", - style: "fkofpc", - tile: "ok3b3m", - vectordrawlib: "4pdipq", - newvectordrawlib: "wbnuee", - groundoverlay: "ekozhc", - pointcollection: "feabuc", - marker: "00uyqy", - symbol: "cq3a5n", - canvablepath: "dia5aw", - vmlcontext: "phwtog", - markeranimation: "rfnmxu", - poly: "r52vuo", - draw: "jb4osz", - drawbysvg: "vxyn51", - drawbyvml: "whxmqq", - drawbycanvas: "ufwkvb", - infowindow: "wtflsn", - oppc: "10riq5", - opmb: "2c1ejz", - menu: "152mop", - control: "hlzh1t", - navictrl: "h32mnb", - geoctrl: "xprajs", - copyrightctrl: "gmc2ps", - citylistcontrol: "ms3ahy", - scommon: "oadc3d", - local: "k0pcpi", - route: "v4yyam", - othersearch: "pwg4ey", - mapclick: "e40viw", - buslinesearch: "vxmb31", - hotspot: "vuwxs4", - autocomplete: "punr3o", - coordtrans: "lmf5kv", - coordtransutils: "d33qf1", - convertor: "d0ze2w", - clayer: "0hwrfx", - pservice: "j5tlrp", - pcommon: "yqek4k", - panorama: "jbqj24", - panoramaflash: "dm4xq2", - vector: "2hrruc" - }; - z.Wy = function() { - function a(a) { - return e && !!c[b + a + "_" + Ub[a]] - } - var b = "BMap_" - , c = window.localStorage - , e = "localStorage"in window && c !== s && c !== l; - return { - ZY: e, - set: function(a, g) { - if (e) { - for (var i = b + a + "_", k = c.length, m; k--; ) - m = c.key(k), - -1 < m.indexOf(i) && c.removeItem(m); - try { - c.setItem(b + a + "_" + Ub[a], g) - } catch (n) { - c.clear() - } - } - }, - get: function(f) { - return e && a(f) ? c.getItem(b + f + "_" + Ub[f]) : t - }, - uK: a - } - }(); - function K() {} - z.object.extend(K, { - Cj: { - EG: -1, - cQ: 0, - cq: 1 - }, - GL: function() { - var a = "canvablepath" - , b = B.gV ? "newvectordrawlib" : "vectordrawlib"; - if (!H() || !Ob()) - Nb() || (Mb() ? a = "vmlcontext" : Ob()); - return { - tile: [b, "style"], - control: [], - marker: ["symbol"], - symbol: ["canvablepath", "common"], - canvablepath: "canvablepath" === a ? [] : [a], - vmlcontext: [], - style: [], - poly: ["marker", "drawbycanvas", "drawbysvg", "drawbyvml"], - drawbysvg: ["draw"], - drawbyvml: ["draw"], - drawbycanvas: ["draw"], - infowindow: ["common", "marker"], - menu: [], - oppc: [], - opmb: [], - scommon: [], - local: ["scommon"], - route: ["scommon"], - othersearch: ["scommon"], - autocomplete: ["scommon"], - citylistcontrol: ["autocomplete"], - mapclick: ["scommon"], - buslinesearch: ["route"], - hotspot: [], - coordtransutils: ["coordtrans"], - convertor: [], - clayer: ["tile"], - pservice: [], - pcommon: ["style", "pservice"], - panorama: ["pcommon"], - panoramaflash: ["pcommon"] - } - }, - U4: {}, - wG: { - tQ: B.ka + "getmodules?v=3.0", - WU: 5E3 - }, - MC: t, - Rd: { - xl: {}, - Hn: [], - cw: [] - }, - load: function(a, b, c) { - var e = this.kb(a); - if (e.Me == this.Cj.cq) - c && b(); - else { - if (e.Me == this.Cj.EG) { - this.AK(a); - this.SN(a); - var f = this; - f.MC == t && (f.MC = q, - setTimeout(function() { - for (var a = [], b = 0, c = f.Rd.Hn.length; b < c; b++) { - var e = f.Rd.Hn[b] - , n = ""; - ia.Wy.uK(e) ? n = ia.Wy.get(e) : (n = "", - a.push(e + "_" + Ub[e])); - f.Rd.cw.push({ - jN: e, - ZE: n - }) - } - f.MC = t; - f.Rd.Hn.length = 0; - //0 == a.length ? f.kL() : oa(f.wG.tQ + "&mod=" + a.join(",")) - // 修改 加载本地模块文件,在 modules 目录下 - console.log(a); //打印所需模块 - if( a.length > 0 ){ - for(i=0; i"); - this.Qa == t && z.D.U(this.C); - return this.C - }, - Nr: function() { - this.uc(this.j.anchor) - }, - uc: function(a) { - if (this.j2 || !Wa(a) || isNaN(a) || a < Wb || 3 < a) - a = this.defaultAnchor; - this.j = this.j || { - Cg: t - }; - this.j.za = this.j.za || this.defaultOffset; - var b = this.j.anchor; - this.j.anchor = a; - if (this.C) { - var c = this.C - , e = this.j.za.width - , f = this.j.za.height; - c.style.left = c.style.top = c.style.right = c.style.bottom = "auto"; - switch (a) { - case Wb: - c.style.top = f + "px"; - c.style.left = e + "px"; - break; - case Xb: - c.style.top = f + "px"; - c.style.right = e + "px"; - break; - case Yb: - c.style.bottom = f + "px"; - c.style.left = e + "px"; - break; - case 3: - c.style.bottom = f + "px", - c.style.right = e + "px" - } - c = ["TL", "TR", "BL", "BR"]; - z.D.Pb(this.C, "anchor" + c[b]); - z.D.Ua(this.C, "anchor" + c[a]) - } - }, - HD: function() { - return this.j.anchor - }, - getContainer: w("C"), - Ze: function(a) { - a instanceof O && (this.j = this.j || { - Cg: t - }, - this.j.za = new O(a.width,a.height), - this.C && this.uc(this.j.anchor)) - }, - Sf: function() { - return this.j.za - }, - Jd: w("C"), - show: function() { - this.Qa != q && (this.Qa = q, - this.C && z.D.show(this.C)) - }, - U: function() { - this.Qa != t && (this.Qa = t, - this.C && z.D.U(this.C)) - }, - isPrintable: function() { - return !!this.j.Cg - }, - jh: function() { - return !this.C && !this.B ? t : !!this.Qa - } - }); - var Wb = 0 - , Xb = 1 - , Yb = 2; - function jb(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - OF: a.showZoomInfo || q, - anchor: a.anchor, - za: a.offset, - type: a.type, - $W: a.enableGeolocation || t - }; - this.defaultAnchor = H() ? 3 : Wb; - this.defaultOffset = new O(10,10); - this.uc(a.anchor); - this.hn(a.type); - this.De() - } - z.lang.ta(jb, Vb, "NavigationControl"); - z.extend(jb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - hn: function(a) { - this.j.type = Wa(a) && 0 <= a && 3 >= a ? a : 0 - }, - ip: function() { - return this.j.type - }, - De: function() { - var a = this; - K.load("navictrl", function() { - a.zf() - }) - } - }); - function Zb(a) { - Vb.call(this); - a = a || {}; - this.j = { - anchor: a.anchor || Yb, - za: a.offset || new O(10,30), - O_: a.showAddressBar !== t, - U2: a.enableAutoLocation || t, - bN: a.locationIcon || s - }; - var b = this; - this.Hz = 1200; - b.I0 = []; - this.pe = []; - K.load("geoctrl", function() { - (function e() { - if (0 !== b.pe.length) { - var a = b.pe.shift(); - b[a.method].apply(b, a.arguments); - e() - } - } - )(); - b.sQ() - }); - Ra(Ia) - } - z.lang.ta(Zb, Vb, "GeolocationControl"); - z.extend(Zb.prototype, { - location: function() { - this.pe.push({ - method: "location", - arguments: arguments - }) - }, - getAddressComponent: ca(s) - }); - function $b(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - anchor: a.anchor, - za: a.offset - }; - this.cc = []; - this.defaultAnchor = Yb; - this.defaultOffset = new O(5,2); - this.uc(a.anchor); - this.nK = t; - this.De() - } - z.lang.ta($b, Vb, "CopyrightControl"); - z.object.extend($b.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - Bw: function(a) { - if (a && Wa(a.id) && !isNaN(a.id)) { - var b = { - bounds: s, - content: "" - }, c; - for (c in a) - b[c] = a[c]; - if (a = this.pm(a.id)) - for (var e in b) - a[e] = b[e]; - else - this.cc.push(b) - } - }, - pm: function(a) { - for (var b = 0, c = this.cc.length; b < c; b++) - if (this.cc[b].id == a) - return this.cc[b] - }, - PD: w("cc"), - qF: function(a) { - for (var b = 0, c = this.cc.length; b < c; b++) - this.cc[b].id == a && (r = this.cc.splice(b, 1), - b--, - c = this.cc.length) - }, - De: function() { - var a = this; - K.load("copyrightctrl", function() { - a.zf() - }) - } - }); - function lb(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - size: a.size || new O(150,150), - padding: 5, - Xa: a.isOpen === q ? q : t, - $0: 4, - za: a.offset, - anchor: a.anchor - }; - this.defaultAnchor = 3; - this.defaultOffset = new O(0,0); - this.Bq = this.Cq = 13; - this.uc(a.anchor); - this.Ce(this.j.size); - this.De() - } - z.lang.ta(lb, Vb, "OverviewMapControl"); - z.extend(lb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - uc: function(a) { - Vb.prototype.uc.call(this, a) - }, - se: function() { - this.se.mo = q; - this.j.Xa = !this.j.Xa; - this.C || (this.se.mo = t) - }, - Ce: function(a) { - a instanceof O || (a = new O(150,150)); - a.width = 0 < a.width ? a.width : 150; - a.height = 0 < a.height ? a.height : 150; - this.j.size = a - }, - cb: function() { - return this.j.size - }, - Xa: function() { - return this.j.Xa - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }) - } - }); - function ac(a) { - Vb.call(this); - a = a || {}; - this.defaultAnchor = Wb; - this.TV = a.canCheckSize === t ? t : q; - this.$i = ""; - this.defaultOffset = new O(10,10); - this.onChangeBefore = []; - this.onChangeAfter = []; - this.onChangeSuccess = []; - this.j = { - Cg: t, - za: a.offset || this.defaultOffset, - anchor: a.anchor || this.defaultAnchor, - expand: !!a.expand - }; - a.onChangeBefore && Xa(a.onChangeBefore) && this.onChangeBefore.push(a.onChangeBefore); - a.onChangeAfter && Xa(a.onChangeAfter) && this.onChangeAfter.push(a.onChangeAfter); - a.onChangeSuccess && Xa(a.onChangeSuccess) && this.onChangeSuccess.push(a.onChangeSuccess); - this.uc(a.anchor); - this.De() - } - z.lang.ta(ac, Vb, "CityListControl"); - z.object.extend(ac.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - De: function() { - var a = this; - K.load("citylistcontrol", function() { - a.zf() - }, q) - } - }); - function kb(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - color: "black", - fd: "metric", - za: a.offset - }; - this.defaultAnchor = Yb; - this.defaultOffset = new O(81,18); - this.uc(a.anchor); - this.Uh = { - metric: { - name: "metric", - CK: 1, - rM: 1E3, - bP: "\u7c73", - cP: "\u516c\u91cc" - }, - us: { - name: "us", - CK: 3.2808, - rM: 5280, - bP: "\u82f1\u5c3a", - cP: "\u82f1\u91cc" - } - }; - this.Uh[this.j.fd] || (this.j.fd = "metric"); - this.gJ = s; - this.GI = {}; - this.De() - } - z.lang.ta(kb, Vb, "ScaleControl"); - z.object.extend(kb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - Pk: function(a) { - this.j.color = a + "" - }, - n3: function() { - return this.j.color - }, - LF: function(a) { - this.j.fd = this.Uh[a] && this.Uh[a].name || this.j.fd - }, - sY: function() { - return this.j.fd - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }) - } - }); - var bc = 0; - function mb(a) { - Vb.call(this); - a = a || {}; - this.defaultAnchor = Xb; - this.defaultOffset = new O(10,10); - this.j = { - Cg: t, - mh: [La, Ya, Sa, Qa], - BW: ["B_DIMENSIONAL_MAP", "B_SATELLITE_MAP", "B_NORMAL_MAP"], - type: a.type || bc, - za: a.offset || this.defaultOffset, - dX: q - }; - this.uc(a.anchor); - "[object Array]" == Object.prototype.toString.call(a.mapTypes) && (this.j.mh = a.mapTypes.slice(0)); - this.De() - } - z.lang.ta(mb, Vb, "MapTypeControl"); - z.object.extend(mb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - Xy: function(a) { - this.B.ao = a - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }, q) - } - }); - function cc(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - za: a.offset, - anchor: a.anchor - }; - this.Ni = t; - this.hw = s; - this.QI = new dc({ - of: "api" - }); - this.RI = new ec(s,{ - of: "api" - }); - this.defaultAnchor = Xb; - this.defaultOffset = new O(10,10); - this.uc(a.anchor); - this.De(); - Ra(va) - } - z.lang.ta(cc, Vb, "PanoramaControl"); - z.extend(cc.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }) - } - }); - function fc(a) { - z.lang.Ca.call(this); - this.j = { - Wa: s, - cursor: "default" - }; - this.j = z.extend(this.j, a); - this.Mb = "contextmenu"; - this.B = s; - this.xa = []; - this.Kf = []; - this.Fe = []; - this.fx = this.qs = s; - this.Kh = t; - var b = this; - K.load("menu", function() { - b.ib() - }) - } - z.lang.ta(fc, z.lang.Ca, "ContextMenu"); - z.object.extend(fc.prototype, { - na: function(a, b) { - this.B = a; - this.Cl = b || s - }, - remove: function() { - this.B = this.Cl = s - }, - Dw: function(a) { - if (a && !("menuitem" != a.Mb || "" == a.Wg || 0 >= a.Vi)) { - for (var b = 0, c = this.xa.length; b < c; b++) - if (this.xa[b] === a) - return; - this.xa.push(a); - this.Kf.push(a) - } - }, - removeItem: function(a) { - if (a && "menuitem" == a.Mb) { - for (var b = 0, c = this.xa.length; b < c; b++) - this.xa[b] === a && (this.xa[b].remove(), - this.xa.splice(b, 1), - c--); - b = 0; - for (c = this.Kf.length; b < c; b++) - this.Kf[b] === a && (this.Kf[b].remove(), - this.Kf.splice(b, 1), - c--) - } - }, - bC: function() { - this.xa.push({ - Mb: "divider", - Lj: this.Fe.length - }); - this.Fe.push({ - D: s - }) - }, - sF: function(a) { - if (this.Fe[a]) { - for (var b = 0, c = this.xa.length; b < c; b++) - this.xa[b] && ("divider" == this.xa[b].Mb && this.xa[b].Lj == a) && (this.xa.splice(b, 1), - c--), - this.xa[b] && ("divider" == this.xa[b].Mb && this.xa[b].Lj > a) && this.xa[b].Lj--; - this.Fe.splice(a, 1) - } - }, - Jd: w("C"), - show: function() { - this.Kh != q && (this.Kh = q) - }, - U: function() { - this.Kh != t && (this.Kh = t) - }, - t_: function(a) { - a && (this.j.cursor = a) - }, - getItem: function(a) { - return this.Kf[a] - } - }); - var gc = G.qa + "menu_zoom_in.png" - , hc = G.qa + "menu_zoom_out.png"; - function ic(a, b, c) { - if (a && Xa(b)) { - z.lang.Ca.call(this); - this.j = { - width: 100, - id: "", - Dm: "" - }; - c = c || {}; - this.j.width = 1 * c.width ? c.width : 100; - this.j.id = c.id ? c.id : ""; - this.j.Dm = c.iconUrl ? c.iconUrl : ""; - this.Wg = a + ""; - this.Kz = b; - this.B = s; - this.Mb = "menuitem"; - this.Ur = this.yv = this.C = this.Eh = s; - this.Ih = q; - var e = this; - K.load("menu", function() { - e.ib() - }) - } - } - z.lang.ta(ic, z.lang.Ca, "MenuItem"); - z.object.extend(ic.prototype, { - na: function(a, b) { - this.B = a; - this.Eh = b - }, - remove: function() { - this.B = this.Eh = s - }, - cu: function(a) { - a && (this.Wg = a + "") - }, - Rb: function(a) { - a && (this.j.Dm = a) - }, - Jd: w("C"), - enable: function() { - this.Ih = q - }, - disable: function() { - this.Ih = t - } - }); - function fb(a, b) { - a && !b && (b = a); - this.Ie = this.Xd = this.Ne = this.Zd = this.Pl = this.Al = s; - a && (this.Pl = new J(a.lng,a.lat), - this.Al = new J(b.lng,b.lat), - this.Ne = a.lng, - this.Zd = a.lat, - this.Ie = b.lng, - this.Xd = b.lat) - } - z.object.extend(fb.prototype, { - tj: function() { - return !this.Pl || !this.Al - }, - pb: function(a) { - return !(a instanceof fb) || this.tj() ? t : this.Ve().pb(a.Ve()) && this.Rf().pb(a.Rf()) - }, - Ve: w("Pl"), - Rf: w("Al"), - kW: function(a) { - return !(a instanceof fb) || this.tj() || a.tj() ? t : a.Ne > this.Ne && a.Ie < this.Ie && a.Zd > this.Zd && a.Xd < this.Xd - }, - Ka: function() { - return this.tj() ? s : new J((this.Ne + this.Ie) / 2,(this.Zd + this.Xd) / 2) - }, - ot: function(a) { - if (!(a instanceof fb) || Math.max(a.Ne, a.Ie) < Math.min(this.Ne, this.Ie) || Math.min(a.Ne, a.Ie) > Math.max(this.Ne, this.Ie) || Math.max(a.Zd, a.Xd) < Math.min(this.Zd, this.Xd) || Math.min(a.Zd, a.Xd) > Math.max(this.Zd, this.Xd)) - return s; - var b = Math.max(this.Ne, a.Ne) - , c = Math.min(this.Ie, a.Ie) - , e = Math.max(this.Zd, a.Zd) - , a = Math.min(this.Xd, a.Xd); - return new fb(new J(b,e),new J(c,a)) - }, - js: function(a) { - return !(a instanceof J) || this.tj() ? t : a.lng >= this.Ne && a.lng <= this.Ie && a.lat >= this.Zd && a.lat <= this.Xd - }, - extend: function(a) { - if (a instanceof J) { - var b = a.lng - , a = a.lat; - this.Pl || (this.Pl = new J(0,0)); - this.Al || (this.Al = new J(0,0)); - if (!this.Ne || this.Ne > b) - this.Pl.lng = this.Ne = b; - if (!this.Ie || this.Ie < b) - this.Al.lng = this.Ie = b; - if (!this.Zd || this.Zd > a) - this.Pl.lat = this.Zd = a; - if (!this.Xd || this.Xd < a) - this.Al.lat = this.Xd = a - } - }, - YF: function() { - return this.tj() ? new J(0,0) : new J(Math.abs(this.Ie - this.Ne),Math.abs(this.Xd - this.Zd)) - } - }); - function J(a, b) { - isNaN(a) && (a = Lb(a), - a = isNaN(a) ? 0 : a); - $a(a) && (a = parseFloat(a)); - isNaN(b) && (b = Lb(b), - b = isNaN(b) ? 0 : b); - $a(b) && (b = parseFloat(b)); - this.lng = a; - this.lat = b - } - J.yM = function(a) { - return a && 180 >= a.lng && -180 <= a.lng && 74 >= a.lat && -74 <= a.lat - } - ; - J.prototype.pb = function(a) { - return a && this.lat == a.lat && this.lng == a.lng - } - ; - function jc() {} - jc.prototype.kh = function() { - aa("lngLatToPoint\u65b9\u6cd5\u672a\u5b9e\u73b0") - } - ; - jc.prototype.xj = function() { - aa("pointToLngLat\u65b9\u6cd5\u672a\u5b9e\u73b0") - } - ; - function kc() {} - ;var eb = { - EK: function(a, b, c) { - K.load("coordtransutils", function() { - eb.AV(a, b, c) - }, q) - }, - DK: function(a, b, c) { - K.load("coordtransutils", function() { - eb.zV(a, b, c) - }, q) - } - }; - function lc() { - this.Pa = []; - var a = this; - K.load("convertor", function() { - a.qQ() - }) - } - z.ta(lc, z.lang.Ca, "Convertor"); - z.extend(lc.prototype, { - translate: function(a, b, c, e) { - this.Pa.push({ - method: "translate", - arguments: [a, b, c, e] - }) - } - }); - T(lc.prototype, { - translate: lc.prototype.translate - }); - function S() {} - S.prototype = new jc; - z.extend(S, { - GP: 6370996.81, - IG: [1.289059486E7, 8362377.87, 5591021, 3481989.83, 1678043.12, 0], - Nu: [75, 60, 45, 30, 15, 0], - MP: [[1.410526172116255E-8, 8.98305509648872E-6, -1.9939833816331, 200.9824383106796, -187.2403703815547, 91.6087516669843, -23.38765649603339, 2.57121317296198, -0.03801003308653, 1.73379812E7], [-7.435856389565537E-9, 8.983055097726239E-6, -0.78625201886289, 96.32687599759846, -1.85204757529826, -59.36935905485877, 47.40033549296737, -16.50741931063887, 2.28786674699375, 1.026014486E7], [-3.030883460898826E-8, 8.98305509983578E-6, 0.30071316287616, 59.74293618442277, 7.357984074871, -25.38371002664745, 13.45380521110908, -3.29883767235584, 0.32710905363475, 6856817.37], [-1.981981304930552E-8, 8.983055099779535E-6, 0.03278182852591, 40.31678527705744, 0.65659298677277, -4.44255534477492, 0.85341911805263, 0.12923347998204, -0.04625736007561, 4482777.06], [3.09191371068437E-9, 8.983055096812155E-6, 6.995724062E-5, 23.10934304144901, -2.3663490511E-4, -0.6321817810242, -0.00663494467273, 0.03430082397953, -0.00466043876332, 2555164.4], [2.890871144776878E-9, 8.983055095805407E-6, -3.068298E-8, 7.47137025468032, -3.53937994E-6, -0.02145144861037, -1.234426596E-5, 1.0322952773E-4, -3.23890364E-6, 826088.5]], - FG: [[-0.0015702102444, 111320.7020616939, 1704480524535203, -10338987376042340, 26112667856603880, -35149669176653700, 26595700718403920, -10725012454188240, 1800819912950474, 82.5], [8.277824516172526E-4, 111320.7020463578, 6.477955746671607E8, -4.082003173641316E9, 1.077490566351142E10, -1.517187553151559E10, 1.205306533862167E10, -5.124939663577472E9, 9.133119359512032E8, 67.5], [0.00337398766765, 111320.7020202162, 4481351.045890365, -2.339375119931662E7, 7.968221547186455E7, -1.159649932797253E8, 9.723671115602145E7, -4.366194633752821E7, 8477230.501135234, 52.5], [0.00220636496208, 111320.7020209128, 51751.86112841131, 3796837.749470245, 992013.7397791013, -1221952.21711287, 1340652.697009075, -620943.6990984312, 144416.9293806241, 37.5], [-3.441963504368392E-4, 111320.7020576856, 278.2353980772752, 2485758.690035394, 6070.750963243378, 54821.18345352118, 9540.606633304236, -2710.55326746645, 1405.483844121726, 22.5], [-3.218135878613132E-4, 111320.7020701615, 0.00369383431289, 823725.6402795718, 0.46104986909093, 2351.343141331292, 1.58060784298199, 8.77738589078284, 0.37238884252424, 7.45]], - t3: function(a, b) { - if (!a || !b) - return 0; - var c, e, a = this.Tb(a); - if (!a) - return 0; - c = this.Xk(a.lng); - e = this.Xk(a.lat); - b = this.Tb(b); - return !b ? 0 : this.pf(c, this.Xk(b.lng), e, this.Xk(b.lat)) - }, - $o: function(a, b) { - if (!a || !b) - return 0; - a.lng = this.WD(a.lng, -180, 180); - a.lat = this.aE(a.lat, -74, 74); - b.lng = this.WD(b.lng, -180, 180); - b.lat = this.aE(b.lat, -74, 74); - return this.pf(this.Xk(a.lng), this.Xk(b.lng), this.Xk(a.lat), this.Xk(b.lat)) - }, - Tb: function(a) { - if (a === s || a === l) - return new J(0,0); - var b, c; - b = new J(Math.abs(a.lng),Math.abs(a.lat)); - for (var e = 0; e < this.IG.length; e++) - if (b.lat >= this.IG[e]) { - c = this.MP[e]; - break - } - a = this.FK(a, c); - return a = new J(a.lng.toFixed(6),a.lat.toFixed(6)) - }, - Eb: function(a) { - if (a === s || a === l || 180 < a.lng || -180 > a.lng || 90 < a.lat || -90 > a.lat) - return new J(0,0); - var b, c; - a.lng = this.WD(a.lng, -180, 180); - a.lat = this.aE(a.lat, -74, 74); - b = new J(a.lng,a.lat); - for (var e = 0; e < this.Nu.length; e++) - if (b.lat >= this.Nu[e]) { - c = this.FG[e]; - break - } - if (!c) - for (e = 0; e < this.Nu.length; e++) - if (b.lat <= -this.Nu[e]) { - c = this.FG[e]; - break - } - a = this.FK(a, c); - return a = new J(a.lng.toFixed(2),a.lat.toFixed(2)) - }, - FK: function(a, b) { - if (a && b) { - var c = b[0] + b[1] * Math.abs(a.lng) - , e = Math.abs(a.lat) / b[9] - , e = b[2] + b[3] * e + b[4] * e * e + b[5] * e * e * e + b[6] * e * e * e * e + b[7] * e * e * e * e * e + b[8] * e * e * e * e * e * e - , c = c * (0 > a.lng ? -1 : 1) - , e = e * (0 > a.lat ? -1 : 1); - return new J(c,e) - } - }, - pf: function(a, b, c, e) { - return this.GP * Math.acos(Math.sin(c) * Math.sin(e) + Math.cos(c) * Math.cos(e) * Math.cos(b - a)) - }, - Xk: function(a) { - return Math.PI * a / 180 - }, - B5: function(a) { - return 180 * a / Math.PI - }, - aE: function(a, b, c) { - b != s && (a = Math.max(a, b)); - c != s && (a = Math.min(a, c)); - return a - }, - WD: function(a, b, c) { - for (; a > c; ) - a -= c - b; - for (; a < b; ) - a += c - b; - return a - } - }); - z.extend(S.prototype, { - vj: function(a) { - return S.Eb(a) - }, - kh: function(a) { - a = S.Eb(a); - return new Q(a.lng,a.lat) - }, - nh: function(a) { - return S.Tb(a) - }, - xj: function(a) { - a = new J(a.x,a.y); - return S.Tb(a) - }, - $b: function(a, b, c, e, f) { - if (a) - return a = this.vj(a, f), - b = this.dc(b), - new Q(Math.round((a.lng - c.lng) / b + e.width / 2),Math.round((c.lat - a.lat) / b + e.height / 2)) - }, - xb: function(a, b, c, e, f) { - if (a) - return b = this.dc(b), - this.nh(new J(c.lng + b * (a.x - e.width / 2),c.lat - b * (a.y - e.height / 2)), f) - }, - dc: function(a) { - return Math.pow(2, 18 - a) - } - }); - function hb() { - this.$i = "bj" - } - hb.prototype = new S; - z.extend(hb.prototype, { - vj: function(a, b) { - return this.bR(b, S.Eb(a)) - }, - nh: function(a, b) { - return S.Tb(this.cR(b, a)) - }, - lngLatToPointFor3D: function(a, b) { - var c = this - , e = S.Eb(a); - K.load("coordtrans", function() { - var a = kc.ZD(c.$i || "bj", e) - , a = new Q(a.x,a.y); - b && b(a) - }, q) - }, - pointToLngLatFor3D: function(a, b) { - var c = this - , e = new J(a.x,a.y); - K.load("coordtrans", function() { - var a = kc.XD(c.$i || "bj", e) - , a = new J(a.lng,a.lat) - , a = S.Tb(a); - b && b(a) - }, q) - }, - bR: function(a, b) { - if (K.kb("coordtrans").Me == K.Cj.cq) { - var c = kc.ZD(a || "bj", b); - return new J(c.x,c.y) - } - K.load("coordtrans", u()); - return new J(0,0) - }, - cR: function(a, b) { - if (K.kb("coordtrans").Me == K.Cj.cq) { - var c = kc.XD(a || "bj", b); - return new J(c.lng,c.lat) - } - K.load("coordtrans", u()); - return new J(0,0) - }, - dc: function(a) { - return Math.pow(2, 20 - a) - } - }); - function mc() { - this.Mb = "overlay" - } - z.lang.ta(mc, z.lang.Ca, "Overlay"); - mc.Ck = function(a) { - a *= 1; - return !a ? 0 : -1E5 * a << 1 - } - ; - z.extend(mc.prototype, { - He: function(a) { - if (!this.V && Xa(this.initialize) && (this.V = this.initialize(a))) - this.V.style.WebkitUserSelect = "none"; - this.draw() - }, - initialize: function() { - aa("initialize\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - draw: function() { - aa("draw\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - remove: function() { - this.V && this.V.parentNode && this.V.parentNode.removeChild(this.V); - this.V = s; - this.dispatchEvent(new P("onremove")) - }, - U: function() { - this.V && z.D.U(this.V) - }, - show: function() { - this.V && z.D.show(this.V) - }, - jh: function() { - return !this.V || "none" == this.V.style.display || "hidden" == this.V.style.visibility ? t : q - } - }); - B.Ye(function(a) { - function b(a, b) { - var c = L("div") - , i = c.style; - i.position = "absolute"; - i.top = i.left = i.width = i.height = "0"; - i.zIndex = b; - a.appendChild(c); - return c - } - var c = a.R; - c.rd = a.rd = b(a.platform, 200); - a.Yd.BD = b(c.rd, 800); - a.Yd.RE = b(c.rd, 700); - a.Yd.sL = b(c.rd, 600); - a.Yd.KE = b(c.rd, 500); - a.Yd.fN = b(c.rd, 400); - a.Yd.gN = b(c.rd, 300); - a.Yd.nP = b(c.rd, 201); - a.Yd.Et = b(c.rd, 200) - }); - function gb() { - z.lang.Ca.call(this); - mc.call(this); - this.map = s; - this.Qa = q; - this.zb = s; - this.vH = 0 - } - z.lang.ta(gb, mc, "OverlayInternal"); - z.extend(gb.prototype, { - initialize: function(a) { - this.map = a; - z.lang.Ca.call(this, this.aa); - return s - }, - Dx: w("map"), - draw: u(), - Ej: u(), - remove: function() { - this.map = s; - z.lang.hx(this.aa); - mc.prototype.remove.call(this) - }, - U: function() { - this.Qa !== t && (this.Qa = t) - }, - show: function() { - this.Qa !== q && (this.Qa = q) - }, - jh: function() { - return !this.V ? t : !!this.Qa - }, - La: w("V"), - lO: function(a) { - var a = a || {}, b; - for (b in a) - this.z[b] = a[b] - }, - Sp: ba("zIndex"), - gj: function() { - this.z.gj = q - }, - MW: function() { - this.z.gj = t - }, - yo: ba("lg"), - Cp: function() { - this.lg = s - } - }); - function nc() { - this.map = s; - this.ya = {}; - this.Ee = [] - } - B.Ye(function(a) { - var b = new nc; - b.map = a; - a.ya = b.ya; - a.Ee = b.Ee; - a.addEventListener("load", function(a) { - b.draw(a) - }); - a.addEventListener("moveend", function(a) { - b.draw(a) - }); - z.ca.ia && 8 > z.ca.ia || "BackCompat" === document.compatMode ? a.addEventListener("zoomend", function(a) { - setTimeout(function() { - b.draw(a) - }, 20) - }) : a.addEventListener("zoomend", function(a) { - b.draw(a) - }); - a.addEventListener("maptypechange", function(a) { - b.draw(a) - }); - a.addEventListener("addoverlay", function(a) { - a = a.target; - if (a instanceof gb) - b.ya[a.aa] || (b.ya[a.aa] = a); - else { - for (var e = t, f = 0, g = b.Ee.length; f < g; f++) - if (b.Ee[f] === a) { - e = q; - break - } - e || b.Ee.push(a) - } - }); - a.addEventListener("removeoverlay", function(a) { - a = a.target; - if (a instanceof gb) - delete b.ya[a.aa]; - else - for (var e = 0, f = b.Ee.length; e < f; e++) - if (b.Ee[e] === a) { - b.Ee.splice(e, 1); - break - } - }); - a.addEventListener("clearoverlays", function() { - this.Yc(); - for (var a in b.ya) - b.ya[a].z.gj && (b.ya[a].remove(), - delete b.ya[a]); - a = 0; - for (var e = b.Ee.length; a < e; a++) - b.Ee[a].enableMassClear !== t && (b.Ee[a].remove(), - b.Ee[a] = s, - b.Ee.splice(a, 1), - a--, - e--) - }); - a.addEventListener("infowindowopen", function() { - var a = this.zb; - a && (z.D.U(a.Ac), - z.D.U(a.ac)) - }); - a.addEventListener("movestart", function() { - this.hh() && this.hh().mJ() - }); - a.addEventListener("moveend", function() { - this.hh() && this.hh().cJ() - }) - }); - nc.prototype.draw = function(a) { - if (B.hq) { - var b = B.hq.Ws(this.map); - "canvas" === b.Mb && b.canvas && b.XQ(b.canvas.getContext("2d")) - } - for (var c in this.ya) - this.ya[c].draw(a); - z.mc.Fb(this.Ee, function(a) { - a.draw() - }); - this.map.R.qb && this.map.R.qb.sa(); - B.hq && b.IF() - } - ; - function oc(a) { - gb.call(this); - a = a || {}; - this.z = { - strokeColor: a.strokeColor || "#3a6bdb", - rc: a.strokeWeight || 5, - td: a.strokeOpacity || 0.65, - strokeStyle: a.strokeStyle || "solid", - gj: a.enableMassClear === t ? t : q, - zk: s, - um: s, - mf: a.enableEditing === q ? q : t, - kN: 5, - G0: t, - jf: a.enableClicking === t ? t : q, - ji: a.icons && 0 < a.icons.length ? a.icons : s - }; - 0 >= this.z.rc && (this.z.rc = 5); - if (0 > this.z.td || 1 < this.z.td) - this.z.td = 0.65; - if (0 > this.z.tg || 1 < this.z.tg) - this.z.tg = 0.65; - "solid" != this.z.strokeStyle && "dashed" != this.z.strokeStyle && (this.z.strokeStyle = "solid"); - this.V = s; - this.Vu = new fb(0,0); - this.gf = []; - this.tc = []; - this.Ra = {} - } - z.lang.ta(oc, gb, "Graph"); - oc.yx = function(a) { - var b = []; - if (!a) - return b; - $a(a) && z.mc.Fb(a.split(";"), function(a) { - a = a.split(","); - b.push(new J(a[0],a[1])) - }); - "[object Array]" == Object.prototype.toString.apply(a) && 0 < a.length && (b = a); - return b - } - ; - oc.eF = [0.09, 0.0050, 1.0E-4, 1.0E-5]; - z.extend(oc.prototype, { - initialize: function(a) { - this.map = a; - return s - }, - draw: u(), - Mr: function(a) { - this.gf.length = 0; - this.ja = oc.yx(a).slice(0); - this.Bh() - }, - ke: function(a) { - this.Mr(a) - }, - Bh: function() { - if (this.ja) { - var a = this; - a.Vu = new fb; - z.mc.Fb(this.ja, function(b) { - a.Vu.extend(b) - }) - } - }, - Ue: w("ja"), - gn: function(a, b) { - b && this.ja[a] && (this.gf.length = 0, - this.ja[a] = new J(b.lng,b.lat), - this.Bh()) - }, - setStrokeColor: function(a) { - this.z.strokeColor = a - }, - jY: function() { - return this.z.strokeColor - }, - Rp: function(a) { - 0 < a && (this.z.rc = a) - }, - WL: function() { - return this.z.rc - }, - Pp: function(a) { - a == l || (1 < a || 0 > a) || (this.z.td = a) - }, - kY: function() { - return this.z.td - }, - Xt: function(a) { - 1 < a || 0 > a || (this.z.tg = a) - }, - HX: function() { - return this.z.tg - }, - Qp: function(a) { - "solid" != a && "dashed" != a || (this.z.strokeStyle = a) - }, - VL: function() { - return this.z.strokeStyle - }, - setFillColor: function(a) { - this.z.fillColor = a || "" - }, - GX: function() { - return this.z.fillColor - }, - ve: w("Vu"), - remove: function() { - this.map && this.map.removeEventListener("onmousemove", this.vv); - gb.prototype.remove.call(this); - this.gf.length = 0 - }, - mf: function() { - if (!(2 > this.ja.length)) { - this.z.mf = q; - var a = this; - K.load("poly", function() { - a.Ul() - }, q) - } - }, - LW: function() { - this.z.mf = t; - var a = this; - K.load("poly", function() { - a.nk() - }, q) - }, - DX: function() { - return this.z.mf - } - }); - function pc(a) { - gb.call(this); - this.V = this.map = s; - this.z = { - width: 0, - height: 0, - za: new O(0,0), - opacity: 1, - background: "transparent", - ey: 1, - SM: "#000", - hZ: "solid", - point: s - }; - this.lO(a); - this.point = this.z.point - } - z.lang.ta(pc, gb, "Division"); - z.extend(pc.prototype, { - Ej: function() { - var a = this.z - , b = this.content - , c = ['
    '); - c.push(b); - c.push("
    "); - this.V = Ab(this.map.Tf().RE, c.join("")) - }, - initialize: function(a) { - this.map = a; - this.Ej(); - this.V && z.M(this.V, H() ? "touchstart" : "mousedown", function(a) { - ma(a) - }); - return this.V - }, - draw: function() { - var a = this.map.Xe(this.z.point); - this.z.za = new O(-Math.round(this.z.width / 2) - Math.round(this.z.ey),-Math.round(this.z.height / 2) - Math.round(this.z.ey)); - this.V.style.left = a.x + this.z.za.width + "px"; - this.V.style.top = a.y + this.z.za.height + "px" - }, - ga: function() { - return this.z.point - }, - L1: function() { - return this.map.$b(this.ga()) - }, - sa: function(a) { - this.z.point = a; - this.draw() - }, - u_: function(a, b) { - this.z.width = Math.round(a); - this.z.height = Math.round(b); - this.V && (this.V.style.width = this.z.width + "px", - this.V.style.height = this.z.height + "px", - this.draw()) - } - }); - function qc(a, b, c) { - a && b && (this.imageUrl = a, - this.size = b, - a = new O(Math.floor(b.width / 2),Math.floor(b.height / 2)), - c = c || {}, - a = c.anchor || a, - b = c.imageOffset || new O(0,0), - this.imageSize = c.imageSize, - this.anchor = a, - this.imageOffset = b, - this.infoWindowAnchor = c.infoWindowAnchor || this.anchor, - this.printImageUrl = c.printImageUrl || "") - } - z.extend(qc.prototype, { - mO: function(a) { - a && (this.imageUrl = a) - }, - K_: function(a) { - a && (this.printImageUrl = a) - }, - Ce: function(a) { - a && (this.size = new O(a.width,a.height)) - }, - uc: function(a) { - a && (this.anchor = new O(a.width,a.height)) - }, - Yt: function(a) { - a && (this.imageOffset = new O(a.width,a.height)) - }, - z_: function(a) { - a && (this.infoWindowAnchor = new O(a.width,a.height)) - }, - w_: function(a) { - a && (this.imageSize = new O(a.width,a.height)) - }, - toString: ca("Icon") - }); - function rc(a, b) { - if (a) { - b = b || {}; - this.style = { - anchor: b.anchor || new O(0,0), - fillColor: b.fillColor || "#000", - tg: b.fillOpacity || 0, - scale: b.scale || 1, - rotation: b.rotation || 0, - strokeColor: b.strokeColor || "#000", - td: b.strokeOpacity || 1, - rc: b.strokeWeight - }; - this.Mb = "number" === typeof a ? a : "UserDefined"; - this.Di = this.style.anchor; - this.rr = new O(0,0); - this.anchor = s; - this.vB = a; - var c = this; - K.load("symbol", function() { - c.Mn() - }, q) - } - } - z.extend(rc.prototype, { - setPath: ba("vB"), - setAnchor: function(a) { - this.Di = this.style.anchor = a - }, - setRotation: function(a) { - this.style.rotation = a - }, - setScale: function(a) { - this.style.scale = a - }, - setStrokeWeight: function(a) { - this.style.rc = a - }, - setStrokeColor: function(a) { - a = z.is.AC(a, this.style.td); - this.style.strokeColor = a - }, - setStrokeOpacity: function(a) { - this.style.td = a - }, - setFillOpacity: function(a) { - this.style.tg = a - }, - setFillColor: function(a) { - this.style.fillColor = a - } - }); - function sc(a, b, c, e) { - a && (this.Ov = {}, - this.qL = e ? !!e : t, - this.Vc = [], - this.c0 = a instanceof rc ? a : s, - this.WI = b === l ? q : !!(b.indexOf("%") + 1), - this.Zj = isNaN(parseFloat(b)) ? 1 : this.WI ? parseFloat(b) / 100 : parseFloat(b), - this.XI = !!(c.indexOf("%") + 1), - this.repeat = c != l ? this.XI ? parseFloat(c) / 100 : parseFloat(c) : 0) - } - ;function tc(a, b) { - z.lang.Ca.call(this); - this.content = a; - this.map = s; - b = b || {}; - this.z = { - width: b.width || 0, - height: b.height || 0, - maxWidth: b.maxWidth || 730, - za: b.offset || new O(0,0), - title: b.title || "", - SE: b.maxContent || "", - dh: b.enableMaximize || t, - Ls: b.enableAutoPan === t ? t : q, - lD: b.enableCloseOnClick === t ? t : q, - margin: b.margin || [10, 10, 40, 10], - vC: b.collisions || [[10, 10], [10, 10], [10, 10], [10, 10]], - GY: t, - AZ: b.onClosing || ca(q), - hL: t, - qD: b.enableParano === q ? q : t, - message: b.message, - sD: b.enableSearchTool === q ? q : t, - Ox: b.headerContent || "", - mD: b.enableContentScroll || t - }; - if (0 != this.z.width && (220 > this.z.width && (this.z.width = 220), - 730 < this.z.width)) - this.z.width = 730; - if (0 != this.z.height && (60 > this.z.height && (this.z.height = 60), - 650 < this.z.height)) - this.z.height = 650; - if (0 != this.z.maxWidth && (220 > this.z.maxWidth && (this.z.maxWidth = 220), - 730 < this.z.maxWidth)) - this.z.maxWidth = 730; - this.de = t; - this.yi = G.qa; - this.fb = s; - var c = this; - K.load("infowindow", function() { - c.ib() - }) - } - z.lang.ta(tc, z.lang.Ca, "InfoWindow"); - z.extend(tc.prototype, { - setWidth: function(a) { - !a && 0 != a || (isNaN(a) || 0 > a) || (0 != a && (220 > a && (a = 220), - 730 < a && (a = 730)), - this.z.width = a) - }, - setHeight: function(a) { - !a && 0 != a || (isNaN(a) || 0 > a) || (0 != a && (60 > a && (a = 60), - 650 < a && (a = 650)), - this.z.height = a) - }, - qO: function(a) { - !a && 0 != a || (isNaN(a) || 0 > a) || (0 != a && (220 > a && (a = 220), - 730 < a && (a = 730)), - this.z.maxWidth = a) - }, - Ec: function(a) { - this.z.title = a - }, - getTitle: function() { - return this.z.title - }, - dd: ba("content"), - xk: w("content"), - $t: function(a) { - this.z.SE = a + "" - }, - je: u(), - Ls: function() { - this.z.Ls = q - }, - disableAutoPan: function() { - this.z.Ls = t - }, - enableCloseOnClick: function() { - this.z.lD = q - }, - disableCloseOnClick: function() { - this.z.lD = t - }, - dh: function() { - this.z.dh = q - }, - kx: function() { - this.z.dh = t - }, - show: function() { - this.Qa = q - }, - U: function() { - this.Qa = t - }, - close: function() { - this.U() - }, - hy: function() { - this.de = q - }, - restore: function() { - this.de = t - }, - jh: function() { - return this.Xa() - }, - Xa: ca(t), - ga: function() { - if (this.fb && this.fb.ga) - return this.fb.ga() - }, - Sf: function() { - return this.z.za - } - }); - Ka.prototype.pc = function(a, b) { - if (a instanceof tc && b instanceof J) { - var c = this.R; - c.Nm ? c.Nm.sa(b) : (c.Nm = new U(b,{ - icon: new qc(G.qa + "blank.gif",{ - width: 1, - height: 1 - }), - offset: new O(0,0), - clickable: t - }), - c.Nm.bS = 1); - this.Ga(c.Nm); - c.Nm.pc(a) - } - } - ; - Ka.prototype.Yc = function() { - var a = this.R.qb || this.R.rl; - a && a.fb && a.fb.Yc() - } - ; - gb.prototype.pc = function(a) { - this.map && (this.map.Yc(), - a.Qa = q, - this.map.R.rl = a, - a.fb = this, - z.lang.Ca.call(a, a.aa)) - } - ; - gb.prototype.Yc = function() { - this.map && this.map.R.rl && (this.map.R.rl.Qa = t, - z.lang.hx(this.map.R.rl.aa), - this.map.R.rl = s) - } - ; - function uc(a, b) { - gb.call(this); - this.content = a; - this.V = this.map = s; - b = b || {}; - this.z = { - width: 0, - za: b.offset || new O(0,0), - Wp: { - backgroundColor: "#fff", - border: "1px solid #f00", - padding: "1px", - whiteSpace: "nowrap", - font: "12px " + G.fontFamily, - zIndex: "80", - MozUserSelect: "none" - }, - position: b.position || s, - gj: b.enableMassClear === t ? t : q, - jf: q - }; - 0 > this.z.width && (this.z.width = 0); - Hb(b.enableClicking) && (this.z.jf = b.enableClicking); - this.point = this.z.position; - var c = this; - K.load("marker", function() { - c.ib() - }) - } - z.lang.ta(uc, gb, "Label"); - z.extend(uc.prototype, { - ga: function() { - return this.Dv ? this.Dv.ga() : this.point - }, - sa: function(a) { - a instanceof J && !this.Ex() && (this.point = this.z.position = new J(a.lng,a.lat)) - }, - dd: ba("content"), - HF: function(a) { - 0 <= a && 1 >= a && (this.z.opacity = a) - }, - Ze: function(a) { - a instanceof O && (this.z.za = new O(a.width,a.height)) - }, - Sf: function() { - return this.z.za - }, - Md: function(a) { - a = a || {}; - this.z.Wp = z.extend(this.z.Wp, a) - }, - ti: function(a) { - return this.Md(a) - }, - Ec: function(a) { - this.z.title = a || "" - }, - getTitle: function() { - return this.z.title - }, - pO: function(a) { - this.point = (this.Dv = a) ? this.z.position = a.ga() : this.z.position = s - }, - Ex: function() { - return this.Dv || s - }, - xk: w("content") - }); - function vc(a, b) { - if (0 !== arguments.length) { - gb.apply(this, arguments); - b = b || {}; - this.z = { - bb: a, - opacity: b.opacity || 1, - Gm: b.Gm || "", - Bs: b.displayOnMinLevel || 1, - gj: b.enableMassClear === t ? t : q, - As: b.displayOnMaxLevel || 19, - X_: b.stretch || t - }; - var c = this; - K.load("groundoverlay", function() { - c.ib() - }) - } - } - z.lang.ta(vc, gb, "GroundOverlay"); - z.extend(vc.prototype, { - setBounds: function(a) { - this.z.bb = a - }, - getBounds: function() { - return this.z.bb - }, - setOpacity: function(a) { - this.z.opacity = a - }, - getOpacity: function() { - return this.z.opacity - }, - setImageURL: function(a) { - this.z.Gm = a - }, - getImageURL: function() { - return this.z.Gm - }, - setDisplayOnMinLevel: function(a) { - this.z.Bs = a - }, - getDisplayOnMinLevel: function() { - return this.z.Bs - }, - setDisplayOnMaxLevel: function(a) { - this.z.As = a - }, - getDisplayOnMaxLevel: function() { - return this.z.As - } - }); - var wc = 3 - , xc = 4; - function yc() { - var a = document.createElement("canvas"); - return !(!a.getContext || !a.getContext("2d")) - } - function zc(a, b) { - var c = this; - yc() && (a === l && aa(Error("\u6ca1\u6709\u4f20\u5165points\u6570\u636e")), - "[object Array]" !== Object.prototype.toString.call(a) && aa(Error("points\u6570\u636e\u4e0d\u662f\u6570\u7ec4")), - b = b || {}, - gb.apply(c, arguments), - c.ea = { - ja: a - }, - c.z = { - shape: b.shape || wc, - size: b.size || xc, - color: b.color || "#fa937e", - gj: q - }, - this.sB = [], - this.pe = [], - K.load("pointcollection", function() { - for (var a = 0, b; b = c.sB[a]; a++) - c[b.method].apply(c, b.arguments); - for (a = 0; b = c.pe[a]; a++) - c[b.method].apply(c, b.arguments) - })) - } - z.lang.ta(zc, gb, "PointCollection"); - z.extend(zc.prototype, { - initialize: function(a) { - this.sB && this.sB.push({ - method: "initialize", - arguments: arguments - }) - }, - setPoints: function(a) { - this.pe && this.pe.push({ - method: "setPoints", - arguments: arguments - }) - }, - setStyles: function(a) { - this.pe && this.pe.push({ - method: "setStyles", - arguments: arguments - }) - }, - clear: function() { - this.pe && this.pe.push({ - method: "clear", - arguments: arguments - }) - }, - remove: function() { - this.pe && this.pe.push({ - method: "remove", - arguments: arguments - }) - } - }); - var Ac = new qc(G.qa + "marker_red_sprite.png",new O(19,25),{ - anchor: new O(10,25), - infoWindowAnchor: new O(10,0) - }) - , Bc = new qc(G.qa + "marker_red_sprite.png",new O(20,11),{ - anchor: new O(6,11), - imageOffset: new O(-19,-13) - }); - function U(a, b) { - gb.call(this); - b = b || {}; - this.point = a; - this.yq = this.map = s; - this.z = { - za: b.offset || new O(0,0), - rj: b.icon || Ac, - Sk: Bc, - title: b.title || "", - label: s, - lK: b.baseZIndex || 0, - jf: q, - X5: t, - EE: t, - gj: b.enableMassClear === t ? t : q, - Wb: t, - UN: b.raiseOnDrag === q ? q : t, - aO: t, - Hd: b.draggingCursor || G.Hd, - rotation: b.rotation || 0 - }; - b.icon && !b.shadow && (this.z.Sk = s); - b.enableDragging && (this.z.Wb = b.enableDragging); - Hb(b.enableClicking) && (this.z.jf = b.enableClicking); - var c = this; - K.load("marker", function() { - c.ib() - }) - } - U.Qu = mc.Ck(-90) + 1E6; - U.AG = U.Qu + 1E6; - z.lang.ta(U, gb, "Marker"); - z.extend(U.prototype, { - Rb: function(a) { - if (a instanceof qc || a instanceof rc) - this.z.rj = a - }, - ap: function() { - return this.z.rj - }, - Oy: function(a) { - a instanceof qc && (this.z.Sk = a) - }, - getShadow: function() { - return this.z.Sk - }, - dn: function(a) { - this.z.label = a || s - }, - VD: function() { - return this.z.label - }, - Wb: function() { - this.z.Wb = q - }, - TC: function() { - this.z.Wb = t - }, - ga: w("point"), - sa: function(a) { - a instanceof J && (this.point = new J(a.lng,a.lat)) - }, - ui: function(a, b) { - this.z.EE = !!a; - a && (this.XG = b || 0) - }, - Ec: function(a) { - this.z.title = a + "" - }, - getTitle: function() { - return this.z.title - }, - Ze: function(a) { - a instanceof O && (this.z.za = a) - }, - Sf: function() { - return this.z.za - }, - bn: ba("yq"), - Op: function(a) { - this.z.rotation = a - }, - TL: function() { - return this.z.rotation - } - }); - function Cc(a) { - this.options = a || {}; - this.GZ = this.options.paneName || "labelPane"; - this.zIndex = this.options.zIndex || 0 - } - z.lang.ta(Cc, gb, "CanvasLayer"); - Cc.prototype.initialize = function(a) { - this.B = a; - var b = this.canvas = document.createElement("canvas") - , c = this.canvas.getContext("2d"); - b.style.cssText = "position:absolute;left:0;top:0;z-index:" + this.zIndex + ";"; - Dc(this); - Ec(c); - a.getPanes()[this.GZ].appendChild(b); - var e = this; - a.addEventListener("resize", function() { - Dc(e); - e.ib() - }); - return this.canvas - } - ; - function Dc(a) { - var b = a.B.cb() - , a = a.canvas; - a.width = b.width; - a.height = b.height; - a.style.width = a.width + "px"; - a.style.height = a.height + "px" - } - function Ec(a) { - var b = (window.devicePixelRatio || 1) / (a.CV || a.T5 || a.x4 || a.y4 || a.B4 || a.CV || 1) - , c = a.canvas.width - , e = a.canvas.height; - a.canvas.width = c * b; - a.canvas.height = e * b; - a.canvas.style.width = c + "px"; - a.canvas.style.height = e + "px"; - a.scale(b, b) - } - Cc.prototype.draw = function() { - var a = this - , b = arguments; - clearTimeout(a.j0); - a.j0 = setTimeout(function() { - a.ib.apply(a, b) - }, 15) - } - ; - da = Cc.prototype; - da.ib = function() { - var a = this.B; - this.canvas.style.left = -a.offsetX + "px"; - this.canvas.style.top = -a.offsetY + "px"; - this.dispatchEvent("draw"); - this.options.update && this.options.update.apply(this, arguments) - } - ; - da.La = w("canvas"); - da.show = function() { - this.canvas || this.B.Ga(this); - this.canvas.style.display = "block" - } - ; - da.U = function() { - this.canvas.style.display = "none" - } - ; - da.Sp = function(a) { - this.canvas.style.zIndex = a - } - ; - da.Ck = w("zIndex"); - function Fc(a, b) { - oc.call(this, b); - b = b || {}; - this.z.tg = b.fillOpacity ? b.fillOpacity : 0.65; - this.z.fillColor = "" == b.fillColor ? "" : b.fillColor ? b.fillColor : "#fff"; - this.ke(a); - var c = this; - K.load("poly", function() { - c.ib() - }) - } - z.lang.ta(Fc, oc, "Polygon"); - z.extend(Fc.prototype, { - ke: function(a, b) { - this.vo = oc.yx(a).slice(0); - var c = oc.yx(a).slice(0); - 1 < c.length && c.push(new J(c[0].lng,c[0].lat)); - oc.prototype.ke.call(this, c, b) - }, - gn: function(a, b) { - this.vo[a] && (this.vo[a] = new J(b.lng,b.lat), - this.ja[a] = new J(b.lng,b.lat), - 0 == a && !this.ja[0].pb(this.ja[this.ja.length - 1]) && (this.ja[this.ja.length - 1] = new J(b.lng,b.lat)), - this.Bh()) - }, - Ue: function() { - var a = this.vo; - 0 == a.length && (a = this.ja); - return a - } - }); - function Gc(a, b) { - oc.call(this, b); - this.Mr(a); - var c = this; - K.load("poly", function() { - c.ib() - }) - } - z.lang.ta(Gc, oc, "Polyline"); - function Hc(a, b, c) { - this.point = a; - this.wa = Math.abs(b); - Fc.call(this, [], c) - } - Hc.eF = [0.01, 1.0E-4, 1.0E-5, 4.0E-6]; - z.lang.ta(Hc, Fc, "Circle"); - z.extend(Hc.prototype, { - initialize: function(a) { - this.map = a; - this.ja = this.qv(this.point, this.wa); - this.Bh(); - return s - }, - Ka: w("point"), - Zf: function(a) { - a && (this.point = a) - }, - RL: w("wa"), - xf: function(a) { - this.wa = Math.abs(a) - }, - qv: function(a, b) { - if (!a || !b || !this.map) - return []; - for (var c = [], e = b / 6378800, f = Math.PI / 180 * a.lat, g = Math.PI / 180 * a.lng, i = 0; 360 > i; i += 9) { - var k = Math.PI / 180 * i - , m = Math.asin(Math.sin(f) * Math.cos(e) + Math.cos(f) * Math.sin(e) * Math.cos(k)) - , k = new J(((g - Math.atan2(Math.sin(k) * Math.sin(e) * Math.cos(f), Math.cos(e) - Math.sin(f) * Math.sin(m)) + Math.PI) % (2 * Math.PI) - Math.PI) * (180 / Math.PI),m * (180 / Math.PI)); - c.push(k) - } - e = c[0]; - c.push(new J(e.lng,e.lat)); - return c - } - }); - var Ic = {}; - function Jc(a) { - this.map = a; - this.Mm = []; - this.$f = []; - this.Fg = []; - this.OV = 300; - this.oF = 0; - this.yg = {}; - this.Zi = {}; - this.ph = 0; - this.yE = q; - this.MK = {}; - this.eo = this.Kj(1); - this.od = this.Kj(2); - this.Bl = this.Kj(3); - this.Ki = this.Kj(4); - a.platform.appendChild(this.eo); - a.platform.appendChild(this.od); - a.platform.appendChild(this.Bl); - a.platform.appendChild(this.Ki); - var b = 256 * Math.pow(2, 15) - , c = 3 * b - , a = S.Eb(new J(180,0)).lng - , c = c - a - , b = -3 * b - , e = S.Eb(new J(-180,0)).lng; - this.yI = a; - this.zI = e; - this.ZA = c + (e - b); - this.AI = a - e - } - B.Ye(function(a) { - var b = new Jc(a); - b.na(); - a.Va = b - }); - z.extend(Jc.prototype, { - na: function() { - var a = this - , b = a.map; - b.addEventListener("loadcode", function() { - a.up() - }); - b.addEventListener("addtilelayer", function(b) { - a.Oe(b) - }); - b.addEventListener("removetilelayer", function(b) { - a.Yf(b) - }); - b.addEventListener("setmaptype", function(b) { - a.Dg(b) - }); - b.addEventListener("zoomstartcode", function(b) { - a.Mc(b) - }); - b.addEventListener("setcustomstyles", function(b) { - a.Zt(b.target); - a.Wf(q) - }); - b.addEventListener("initindoorlayer", function(b) { - a.tE(b) - }) - }, - up: function() { - var a = this; - if (z.ca.ia) - try { - document.execCommand("BackgroundImageCache", t, q) - } catch (b) {} - this.loaded || a.Ux(); - a.Wf(); - this.loaded || (this.loaded = q, - K.load("tile", function() { - a.rQ() - })) - }, - tE: function(a) { - this.zu = new Kc(this); - this.zu.Oe(new Lc(this.map,this.zu,a.vf)) - }, - Ux: function() { - for (var a = this.map.oa().ff, b = 0; b < a.length; b++) { - var c = new Mc; - z.extend(c, a[b]); - this.Mm.push(c); - c.na(this.map, this.eo) - } - this.Zt() - }, - Kj: function(a) { - var b = L("div"); - b.style.position = "absolute"; - b.style.overflow = "visible"; - b.style.left = b.style.top = "0"; - b.style.zIndex = a; - return b - }, - Af: function() { - this.ph--; - var a = this; - this.yE && (this.map.dispatchEvent(new P("onfirsttileloaded")), - this.yE = t); - 0 == this.ph && (this.Hi && (clearTimeout(this.Hi), - this.Hi = s), - this.Hi = setTimeout(function() { - if (a.ph == 0) { - a.map.dispatchEvent(new P("ontilesloaded")); - a.yE = q - } - a.Hi = s - }, 80)) - }, - fE: function(a, b) { - return "TILE-" + b.aa + "-" + a[0] + "-" + a[1] + "-" + a[2] - }, - Rx: function(a) { - var b = a.Gb; - b && zb(b) && b.parentNode.removeChild(b); - delete this.yg[a.name]; - a.loaded || (Nc(a), - a.Gb = s, - a.Pm = s) - }, - pj: function(a, b, c) { - var e = this.map - , f = e.oa() - , g = e.Oa - , i = e.fc - , k = f.dc(g) - , m = this.DL() - , n = m[0] - , o = m[1] - , p = m[2] - , v = m[3] - , x = m[4] - , c = "undefined" != typeof c ? c : 0 - , f = f.$c() - , m = e.aa.replace(/^TANGRAM_/, ""); - for (this.hc ? this.hc.length = 0 : this.hc = []; n < p; n++) - for (var y = o; y < v; y++) { - var A = n - , E = y; - this.hc.push([A, E]); - A = m + "_" + b + "_" + A + "_" + E + "_" + g; - this.MK[A] = A - } - this.hc.sort(function(a) { - return function(b, c) { - return 0.4 * Math.abs(b[0] - a[0]) + 0.6 * Math.abs(b[1] - a[1]) - (0.4 * Math.abs(c[0] - a[0]) + 0.6 * Math.abs(c[1] - a[1])) - } - }([x[0] - 1, x[1] - 1])); - i = [Math.round(-i.lng / k), Math.round(i.lat / k)]; - n = -e.offsetY + e.height / 2; - a.style.left = -e.offsetX + e.width / 2 + "px"; - a.style.top = n + "px"; - this.Cc ? this.Cc.length = 0 : this.Cc = []; - n = 0; - for (e = a.childNodes.length; n < e; n++) - y = a.childNodes[n], - y.Sj = t, - this.Cc.push(y); - if (n = this.qh) - for (var C in n) - delete n[C]; - else - this.qh = {}; - this.Dc ? this.Dc.length = 0 : this.Dc = []; - n = 0; - for (e = this.hc.length; n < e; n++) { - C = this.hc[n][0]; - k = this.hc[n][1]; - y = 0; - for (o = this.Cc.length; y < o; y++) - if (p = this.Cc[y], - p.id == m + "_" + b + "_" + C + "_" + k + "_" + g) { - p.Sj = q; - this.qh[p.id] = p; - break - } - } - n = 0; - for (e = this.Cc.length; n < e; n++) - p = this.Cc[n], - p.Sj || this.Dc.push(p); - this.nn = []; - y = (f + c) * this.map.K.devicePixelRatio; - n = 0; - for (e = this.hc.length; n < e; n++) - C = this.hc[n][0], - k = this.hc[n][1], - v = C * f + i[0] - c / 2, - x = (-1 - k) * f + i[1] - c / 2, - A = m + "_" + b + "_" + C + "_" + k + "_" + g, - o = this.qh[A], - p = s, - o ? (p = o.style, - p.left = v + "px", - p.top = x + "px", - o.yd || this.nn.push([C, k, o])) : (0 < this.Dc.length ? (o = this.Dc.shift(), - o.getContext("2d").clearRect(-c / 2, -c / 2, y, y), - p = o.style) : (o = document.createElement("canvas"), - p = o.style, - p.position = "absolute", - p.width = f + c + "px", - p.height = f + c + "px", - this.Zx() && (p.WebkitTransform = "scale(1.001)"), - o.setAttribute("width", y), - o.setAttribute("height", y), - a.appendChild(o)), - o.id = A, - p.left = v + "px", - p.top = x + "px", - -1 < A.indexOf("bg") && (v = "#F3F1EC", - this.map.K.Eo && (v = this.map.K.Eo), - p.background = v ? v : ""), - this.nn.push([C, k, o])), - o.style.visibility = ""; - n = 0; - for (e = this.Dc.length; n < e; n++) - this.Dc[n].style.visibility = "hidden"; - return this.nn - }, - Zx: function() { - return /M040/i.test(navigator.userAgent) - }, - DL: function() { - var a = this.map - , b = a.oa() - , c = b.mE(a.Oa) - , e = a.fc - , f = Math.ceil(e.lng / c) - , g = Math.ceil(e.lat / c) - , b = b.$c() - , c = [f, g, (e.lng - f * c) / c * b, (e.lat - g * c) / c * b]; - return [c[0] - Math.ceil((a.width / 2 - c[2]) / b), c[1] - Math.ceil((a.height / 2 - c[3]) / b), c[0] + Math.ceil((a.width / 2 + c[2]) / b), c[1] + Math.ceil((a.height / 2 + c[3]) / b), c] - }, - R_: function(a, b, c, e) { - var f = this; - f.u2 = b; - var g = this.map.oa() - , i = f.fE(a, c) - , k = g.$c() - , b = [a[0] * k + b[0], (-1 - a[1]) * k + b[1]] - , m = this.yg[i]; - if (this.map.oa() !== Ya && this.map.oa() !== Sa) { - var n = this.Lw(a[0], a[2]).offsetX; - b[0] += n; - b.Q1 = n - } - m && m.Gb ? (xb(m.Gb, b), - e && (e = new Q(a[0],a[1]), - g = this.map.K.ye ? this.map.K.ye.style : "normal", - e = c.getTilesUrl(e, a[2], g), - m.loaded = t, - Oc(m, e)), - m.loaded ? this.Af() : Pc(m, function() { - f.Af() - })) : (m = this.Zi[i]) && m.Gb ? (c.Jb.insertBefore(m.Gb, c.Jb.lastChild), - this.yg[i] = m, - xb(m.Gb, b), - e && (e = new Q(a[0],a[1]), - g = this.map.K.ye ? this.map.K.ye.style : "normal", - e = c.getTilesUrl(e, a[2], g), - m.loaded = t, - Oc(m, e)), - m.loaded ? this.Af() : Pc(m, function() { - f.Af() - })) : (m = k * Math.pow(2, g.sm() - a[2]), - new J(a[0] * m,a[1] * m), - e = new Q(a[0],a[1]), - g = this.map.K.ye ? this.map.K.ye.style : "normal", - e = c.getTilesUrl(e, a[2], g), - m = new Qc(this,e,b,a,c), - Pc(m, function() { - f.Af() - }), - m.co(), - this.yg[i] = m) - }, - Af: function() { - this.ph--; - var a = this; - 0 == this.ph && (this.Hi && (clearTimeout(this.Hi), - this.Hi = s), - this.Hi = setTimeout(function() { - if (a.ph == 0) { - a.map.dispatchEvent(new P("ontilesloaded")); - if (ua) { - if (ra && sa && ta) { - var b = bb() - , c = a.map.cb(); - setTimeout(function() { - Ra(5030, { - load_script_time: sa - ra, - load_tiles_time: b - ta, - map_width: c.width, - map_height: c.height, - map_size: c.width * c.height - }) - }, 1E4); - B.Fn("cus.fire", "time", { - z_imgfirstloaded: b - ta - }) - } - ua = t - } - } - a.Hi = s - }, 80)) - }, - fE: function(a, b) { - return this.map.oa() === Qa ? "TILE-" + b.aa + "-" + this.map.Rw + "-" + a[0] + "-" + a[1] + "-" + a[2] : "TILE-" + b.aa + "-" + a[0] + "-" + a[1] + "-" + a[2] - }, - Rx: function(a) { - var b = a.Gb; - b && (Rc(b), - zb(b) && b.parentNode.removeChild(b)); - delete this.yg[a.name]; - a.loaded || (Rc(b), - Nc(a), - a.Gb = s, - a.Pm = s) - }, - Lw: function(a, b) { - for (var c = 0, e = 6 * Math.pow(2, b - 3), f = e / 2 - 1, g = -e / 2; a > f; ) - a -= e, - c -= this.ZA; - for (; a < g; ) - a += e, - c += this.ZA; - c = Math.round(c / Math.pow(2, 18 - b)); - return { - offsetX: c, - hs: a - } - }, - QV: function(a) { - for (var b = a.lng; b > this.yI; ) - b -= this.AI; - for (; b < this.zI; ) - b += this.AI; - a.lng = b; - return a - }, - RV: function(a, b) { - for (var c = 256 * Math.pow(2, 18 - b), e = Math.floor(this.yI / c), f = Math.floor(this.zI / c), c = Math.floor(this.ZA / c), g = [], i = 0; i < a.length; i++) { - var k = a[i] - , m = k[0] - , k = k[1]; - if (m >= e) { - var m = m + c - , n = "id_" + m + "_" + k + "_" + b; - a[n] || (a[n] = q, - g.push([m, k])) - } else - m <= f && (m -= c, - n = "id_" + m + "_" + k + "_" + b, - a[n] || (a[n] = q, - g.push([m, k]))) - } - for (i = 0; i < g.length; i++) - a.push(g[i]); - return a - }, - Wf: function(a) { - var b = this; - if (b.map.oa() == Qa) - K.load("coordtrans", function() { - b.map.Ub || (b.map.Ub = Qa.wk(b.map.$g), - b.map.Rw = Qa.BL(b.map.Ub)); - b.CI() - }, q); - else { - if (a && a) - for (var c in this.Zi) - delete this.Zi[c]; - b.CI(a) - } - }, - CI: function(a) { - var b = this.Mm.concat(this.$f) - , c = b.length - , e = this.map - , f = e.oa() - , g = e.fc; - this.map.oa() !== Ya && this.map.oa() !== Sa && (g = this.QV(g)); - for (var i = 0; i < c; i++) { - var k = b[i]; - if (k.gc && e.Oa < k.gc) - break; - if (k.Jw) { - var m = this.Jb = k.Jb; - if (a) { - var n = m; - if (n && n.childNodes) - for (var o = n.childNodes.length, p = o - 1; 0 <= p; p--) - o = n.childNodes[p], - n.removeChild(o), - o = s - } - if (this.map.Sb()) { - this.od.style.display = "block"; - m.style.display = "none"; - this.map.dispatchEvent(new P("vectorchanged"), { - isvector: q - }); - continue - } else - m.style.display = "block", - this.od.style.display = "none", - this.map.dispatchEvent(new P("vectorchanged"), { - isvector: t - }) - } - if (!k.pI && !(k.pp && !this.map.Sb() || k.GM && this.map.Sb())) { - e = this.map; - f = e.oa(); - m = f.wm(); - o = e.Oa; - g = e.fc; - f == Qa && g.pb(new J(0,0)) && (g = e.fc = m.vj(e.re, e.Ub)); - var v = f.dc(o) - , m = f.mE(o) - , n = Math.ceil(g.lng / m) - , x = Math.ceil(g.lat / m) - , y = f.$c() - , m = [n, x, (g.lng - n * m) / m * y, (g.lat - x * m) / m * y] - , p = m[0] - Math.ceil((e.width / 2 - m[2]) / y) - , n = m[1] - Math.ceil((e.height / 2 - m[3]) / y) - , x = m[0] + Math.ceil((e.width / 2 + m[2]) / y) - , A = 0; - f === Qa && 15 == e.fa() && (A = 1); - f = m[1] + Math.ceil((e.height / 2 + m[3]) / y) + A; - this.gK = new J(g.lng,g.lat); - var E = this.yg, y = -this.gK.lng / v, A = this.gK.lat / v, v = [Math.ceil(y), Math.ceil(A)], g = e.fa(), C; - for (C in E) { - var F = E[C] - , D = F.info; - (D[2] != g || D[2] == g && (p > D[0] || x <= D[0] || n > D[1] || f <= D[1])) && this.Rx(F) - } - E = -e.offsetX + e.width / 2; - F = -e.offsetY + e.height / 2; - k.Jb && (k.Jb.style.left = Math.ceil(y + E) - v[0] + "px", - k.Jb.style.top = Math.ceil(A + F) - v[1] + "px", - k.Jb.style.WebkitTransform = "translate3d(0,0,0)"); - y = []; - for (e.WB = []; p < x; p++) - for (A = n; A < f; A++) - y.push([p, A]), - e.WB.push({ - x: p, - y: A - }); - this.map.oa() !== Ya && this.map.oa() !== Sa && (y = this.RV(y, o)); - y.sort(function(a) { - return function(b, c) { - return 0.4 * Math.abs(b[0] - a[0]) + 0.6 * Math.abs(b[1] - a[1]) - (0.4 * Math.abs(c[0] - a[0]) + 0.6 * Math.abs(c[1] - a[1])) - } - }([m[0] - 1, m[1] - 1])); - o = y.length; - this.ph += o; - for (p = 0; p < o; p++) - this.R_([y[p][0], y[p][1], g], v, k, a) - } - } - }, - Oe: function(a) { - var b = this - , c = a.target - , a = b.map.Sb(); - if (c instanceof db) - a && !c.Im && (c.na(this.map, this.od), - c.Im = q); - else if (c.ag && this.map.Oe(c.ag), - c.pp) { - for (a = 0; a < b.Fg.length; a++) - if (b.Fg[a] == c) - return; - K.load("vector", function() { - c.na(b.map, b.od); - b.Fg.push(c) - }, q) - } else { - for (a = 0; a < b.$f.length; a++) - if (b.$f[a] == c) - return; - c.na(this.map, this.Bl); - b.$f.push(c) - } - }, - Yf: function(a) { - var a = a.target - , b = this.map.Sb(); - if (a instanceof db) - b && a.Im && (a.remove(), - a.Im = t); - else { - a.ag && this.map.Yf(a.ag); - if (a.pp) - for (var b = 0, c = this.Fg.length; b < c; b++) - a == this.Fg[b] && this.Fg.splice(b, 1); - else { - b = 0; - for (c = this.$f.length; b < c; b++) - a == this.$f[b] && this.$f.splice(b, 1) - } - a.remove() - } - }, - Dg: function() { - for (var a = this.Mm, b = 0, c = a.length; b < c; b++) - a[b].remove(); - delete this.Jb; - this.Mm = []; - this.Zi = this.yg = {}; - this.Ux(); - this.Wf() - }, - Mc: function() { - var a = this; - a.vd && z.D.U(a.vd); - setTimeout(function() { - a.Wf(); - a.map.dispatchEvent(new P("onzoomend")) - }, 10) - }, - L5: u(), - Zt: function(a) { - var b = this.map.oa(); - if (!this.map.Sb() && (a ? this.map.K.$_ = a : a = this.map.K.$_, - a)) - for (var c = s, c = "2" == B.xu ? [B.url.proto + B.url.domain.main_domain_cdn.other[0] + "/"] : [B.url.proto + B.url.domain.main_domain_cdn.baidu[0] + "/", B.url.proto + B.url.domain.main_domain_cdn.baidu[1] + "/", B.url.proto + B.url.domain.main_domain_cdn.baidu[2] + "/"], e = 0, f; f = this.Mm[e]; e++) - if (f.M_ == q) { - b.j.Yb = 18; - f.getTilesUrl = function(b, e) { - var f = b.x - , f = this.map.Va.Lw(f, e).hs - , m = b.y - , n = Sb("normal") - , o = 1; - this.map.Sx() && (o = 2); - n = "customimage/tile?&x=" + f + "&y=" + m + "&z=" + e + "&udt=" + n + "&scale=" + o + "&ak=" + qa; - n = a.styleStr ? n + ("&styles=" + encodeURIComponent(a.styleStr)) : n + ("&customid=" + a.style); - return c[Math.abs(f + m) % c.length] + n - } - ; - break - } - } - }); - function Qc(a, b, c, e, f) { - this.Pm = a; - this.position = c; - this.$u = []; - this.name = a.fE(e, f); - this.info = e; - this.GJ = f.zt(); - e = L("img"); - yb(e); - e.uL = t; - var g = e.style - , a = a.map.oa(); - g.position = "absolute"; - g.border = "none"; - g.width = a.$c() + "px"; - g.height = a.$c() + "px"; - g.left = c[0] + "px"; - g.top = c[1] + "px"; - g.maxWidth = "none"; - this.Gb = e; - this.src = b; - Sc && (this.Gb.style.opacity = 0); - var i = this; - this.Gb.onload = function() { - B.iZ.eR(); - i.loaded = q; - if (i.Pm) { - var a = i.Pm - , b = a.Zi; - if (!b[i.name]) { - a.oF++; - b[i.name] = i - } - if (i.Gb && !zb(i.Gb) && f.Jb) { - f.Jb.appendChild(i.Gb); - if (z.ca.ia <= 6 && z.ca.ia > 0 && i.GJ) - i.Gb.style.cssText = i.Gb.style.cssText + (';filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + i.src + '",sizingMethod=scale);') - } - var c = a.oF - a.OV, e; - for (e in b) { - if (c <= 0) - break; - if (!a.yg[e]) { - b[e].Pm = s; - var g = b[e].Gb; - if (g && g.parentNode) { - g.parentNode.removeChild(g); - Rc(g) - } - g = s; - b[e].Gb = s; - delete b[e]; - a.oF--; - c-- - } - } - Sc && new tb({ - Ic: 20, - duration: 200, - va: function(a) { - if (i.Gb && i.Gb.style) - i.Gb.style.opacity = a * 1 - }, - finish: function() { - i.Gb && i.Gb.style && delete i.Gb.style.opacity - } - }); - Nc(i) - } - } - ; - this.Gb.onerror = function() { - Nc(i); - if (i.Pm) { - var a = i.Pm.map.oa(); - if (a.j.vD) { - i.error = q; - i.Gb.src = a.j.vD; - i.Gb && !zb(i.Gb) && f.Jb.appendChild(i.Gb) - } - } - } - ; - e = s - } - function Pc(a, b) { - a.$u.push(b) - } - Qc.prototype.co = function() { - this.Gb.src = 0 < z.ca.ia && 6 >= z.ca.ia && this.GJ ? G.qa + "blank.gif" : "" !== this.src && this.Gb.src == this.src ? this.src + "&t = " + Date.now() : this.src - } - ; - function Nc(a) { - for (var b = 0; b < a.$u.length; b++) - a.$u[b](); - a.$u.length = 0 - } - function Rc(a) { - if (a) { - a.onload = a.onerror = s; - var b = a.attributes, c, e, f; - if (b) { - e = b.length; - for (c = 0; c < e; c += 1) - f = b[c].name, - Xa(a[f]) && (a[f] = s) - } - if (b = a.children) { - e = b.length; - for (c = 0; c < e; c += 1) - Rc(a.children[c]) - } - } - } - function Oc(a, b) { - a.src = b; - a.co() - } - var Sc = !z.ca.ia || 8 < z.ca.ia; - function Mc(a) { - this.vf = a || {}; - this.mW = this.vf.copyright || s; - this.B0 = this.vf.transparentPng || t; - this.Jw = this.vf.baseLayer || t; - this.zIndex = this.vf.zIndex || 0; - this.aa = Mc.SS++ - } - Mc.SS = 0; - z.lang.ta(Mc, z.lang.Ca, "TileLayer"); - z.extend(Mc.prototype, { - na: function(a, b) { - this.Jw && (this.zIndex = -100); - this.map = a; - if (!this.Jb) { - var c = L("div") - , e = c.style; - e.position = "absolute"; - e.overflow = "visible"; - e.zIndex = this.zIndex; - e.left = Math.ceil(-a.offsetX + a.width / 2) + "px"; - e.top = Math.ceil(-a.offsetY + a.height / 2) + "px"; - b.appendChild(c); - this.Jb = c - } - }, - remove: function() { - this.Jb && this.Jb.parentNode && (this.Jb.innerHTML = "", - this.Jb.parentNode.removeChild(this.Jb)); - delete this.Jb - }, - zt: w("B0"), - getTilesUrl: function(a, b) { - if (this.map.oa() !== Ya && this.map.oa() !== Sa) - var c = this.map.Va.Lw(a.x, b).hs; - var e = ""; - this.vf.tileUrlTemplate && (e = this.vf.tileUrlTemplate.replace(/\{X\}/, c), - e = e.replace(/\{Y\}/, a.y), - e = e.replace(/\{Z\}/, b)); - return e - }, - pm: w("mW"), - oa: function() { - return this.Hb || La - } - }); - function Tc(a, b) { - Ib(a) ? b = a || {} : (b = b || {}, - b.databoxId = a); - this.j = { - OK: b.databoxId, - eh: b.geotableId, - Wm: b.q || "", - pu: b.tags || "", - filter: b.filter || "", - Vy: b.sortby || "", - Y_: b.styleId || "", - Vl: b.ak || qa, - Gw: b.age || 36E5, - zIndex: 11, - fZ: "VectorCloudLayer", - Fk: b.hotspotName || "vector_md_" + (1E5 * Math.random()).toFixed(0), - uV: "LBS\u4e91\u9ebb\u70b9\u5c42" - }; - this.pp = q; - Mc.call(this, this.j); - this.GW = B.Wc + "geosearch/detail/"; - this.HW = B.Wc + "geosearch/v2/detail/"; - this.lp = {} - } - z.ta(Tc, Mc, "VectorCloudLayer"); - function Uc(a) { - a = a || {}; - this.j = z.extend(a, { - zIndex: 1, - fZ: "VectorTrafficLayer", - uV: "\u77e2\u91cf\u8def\u51b5\u5c42" - }); - this.pp = q; - Mc.call(this, this.j); - this.x0 = B.url.proto + B.url.domain.vector_traffic + "/gvd/?qt=lgvd&styles=pl&layers=tf"; - this.Db = { - "0": [2, 1354709503, 2, 2, 0, [], 0, 0], - 1: [2, 1354709503, 3, 2, 0, [], 0, 0], - 10: [2, -231722753, 2, 2, 0, [], 0, 0], - 11: [2, -231722753, 3, 2, 0, [], 0, 0], - 12: [2, -231722753, 4, 2, 0, [], 0, 0], - 13: [2, -231722753, 5, 2, 0, [], 0, 0], - 14: [2, -231722753, 6, 2, 0, [], 0, 0], - 15: [2, -1, 4, 0, 0, [], 0, 0], - 16: [2, -1, 5.5, 0, 0, [], 0, 0], - 17: [2, -1, 7, 0, 0, [], 0, 0], - 18: [2, -1, 8.5, 0, 0, [], 0, 0], - 19: [2, -1, 10, 0, 0, [], 0, 0], - 2: [2, 1354709503, 4, 2, 0, [], 0, 0], - 3: [2, 1354709503, 5, 2, 0, [], 0, 0], - 4: [2, 1354709503, 6, 2, 0, [], 0, 0], - 5: [2, -6350337, 2, 2, 0, [], 0, 0], - 6: [2, -6350337, 3, 2, 0, [], 0, 0], - 7: [2, -6350337, 4, 2, 0, [], 0, 0], - 8: [2, -6350337, 5, 2, 0, [], 0, 0], - 9: [2, -6350337, 6, 2, 0, [], 0, 0] - } - } - z.ta(Uc, Mc, "VectorTrafficLayer"); - function db(a) { - this.PV = [B.url.proto + B.url.domain.TILE_ONLINE_URLS[1] + "/gvd/?", B.url.proto + B.url.domain.TILE_ONLINE_URLS[2] + "/gvd/?", B.url.proto + B.url.domain.TILE_ONLINE_URLS[3] + "/gvd/?", B.url.proto + B.url.domain.TILE_ONLINE_URLS[4] + "/gvd/?"]; - this.j = { - pL: t - }; - for (var b in a) - this.j[b] = a[b]; - this.Th = this.Fh = this.Ya = this.C = this.B = s; - this.LM = 0; - var c = this; - K.load("vector", function() { - c.De() - }) - } - z.extend(db.prototype, { - na: function(a, b) { - this.B = a; - this.C = b - }, - remove: function() { - this.C = this.B = s - } - }); - function Vc(a) { - Mc.call(this, a); - this.j = a || {}; - this.GM = q; - this.ag = new Uc; - this.ag.$y = this; - if (this.j.predictDate) { - if (1 > this.j.predictDate.weekday || 7 < this.j.predictDate.weekday) - this.j.predictDate = 1; - if (0 > this.j.predictDate.hour || 23 < this.j.predictDate.hour) - this.j.predictDate.hour = 0 - } - this.VU = B.url.proto + B.url.domain.traffic + "/traffic/" - } - Vc.prototype = new Mc; - Vc.prototype.na = function(a, b) { - Mc.prototype.na.call(this, a, b); - this.B = a - } - ; - Vc.prototype.zt = ca(q); - Vc.prototype.getTilesUrl = function(a, b) { - var c = ""; - this.j.predictDate ? c = "HistoryService?day=" + (this.j.predictDate.weekday - 1) + "&hour=" + this.j.predictDate.hour + "&t=" + (new Date).getTime() + "&" : (c = "TrafficTileService?time=" + (new Date).getTime() + "&", - c += "label=web2D&v=016&"); - var c = this.VU + c + "level=" + b + "&x=" + a.x + "&y=" + a.y - , e = 1; - this.B.Sx() && (e = 2); - return (c + "&scaler=" + e).replace(/-(\d+)/gi, "M$1") - } - ; - var Wc = [B.url.proto + B.url.domain.TILES_YUN_HOST[0] + "/georender/gss", B.url.proto + B.url.domain.TILES_YUN_HOST[1] + "/georender/gss", B.url.proto + B.url.domain.TILES_YUN_HOST[2] + "/georender/gss", B.url.proto + B.url.domain.TILES_YUN_HOST[3] + "/georender/gss"] - , Xc = B.url.proto + B.url.domain.main_domain_nocdn.baidu + "/style/poi/rangestyle" - , Yc = 100; - function nb(a, b) { - Mc.call(this); - var c = this; - this.GM = q; - var e = t; - try { - document.createElement("canvas").getContext("2d"), - e = q - } catch (f) { - e = t - } - e && (this.ag = new Tc(a,b), - this.ag.$y = this); - Ib(a) ? b = a || {} : (c.Rn = a, - b = b || {}); - b.geotableId && (c.Cf = b.geotableId); - b.databoxId && (c.Rn = b.databoxId); - e = B.Wc + "geosearch"; - c.ub = { - ON: b.pointDensity || Yc, - BY: e + "/detail/", - CY: e + "/v2/detail/", - Gw: b.age || 36E5, - Wm: b.q || "", - i0: "png", - X3: [5, 5, 5, 5], - eZ: { - backgroundColor: "#FFFFD5", - borderColor: "#808080" - }, - Vl: b.ak || qa, - pu: b.tags || "", - filter: b.filter || "", - Vy: b.sortby || "", - Fk: b.hotspotName || "tile_md_" + (1E5 * Math.random()).toFixed(0), - dG: q - }; - K.load("clayer", function() { - c.Sd() - }) - } - nb.prototype = new Mc; - nb.prototype.na = function(a, b) { - Mc.prototype.na.call(this, a, b); - this.B = a - } - ; - nb.prototype.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y - , f = this.ub - , c = Wc[Math.abs(c + e) % Wc.length] + "/image?grids=" + c + "_" + e + "_" + b + "&q=" + f.Wm + "&tags=" + f.pu + "&filter=" + f.filter + "&sortby=" + f.Vy + "&ak=" + this.ub.Vl + "&age=" + f.Gw + "&page_size=" + f.ON + "&format=" + f.i0; - f.dG || (f = (1E5 * Math.random()).toFixed(0), - c += "&timeStamp=" + f); - this.Cf ? c += "&geotable_id=" + this.Cf : this.Rn && (c += "&databox_id=" + this.Rn); - return c - } - ; - nb.prototype.enableUseCache = function() { - this.ub.dG = q - } - ; - nb.prototype.disableUseCache = function() { - this.ub.dG = t - } - ; - nb.tU = /^point\(|\)$/ig; - nb.uU = /\s+/; - nb.wU = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; - var Zc = {}; - function $c(a, b) { - this.kd = a; - this.uQ = 18; - this.j = { - le: 256, - cd: new S - }; - z.extend(this.j, b || {}) - } - var ad = [0, 0, 0, 8, 7, 7, 6, 6, 5, 5, 4, 3, 3, 3, 2, 2, 1, 1, 0, 0, 0, 0] - , bd = [512, 2048, 4096, 32768, 65536, 262144, 1048576, 4194304, 8388608] - , cd = [0, 0, 0, 3, 5, 5, 7, 7, 9, 9, 10, 12, 12, 12, 15, 15, 17, 17, 19, 19, 19, 19] - , dd = [0, 0, 0, 256, 256, 512, 256, 512, 256, 512, 256, 256, 512, 1024, 256, 512, 512, 1024, 512, 1024, 2048, 4096]; - $c.prototype = { - getName: w("kd"), - $c: function(a) { - return "na" === this.kd ? dd[a] : this.j.le - }, - FL: function(a) { - return "na" === this.kd ? cd[a] : a - }, - wm: function() { - return this.j.cd - }, - dc: function(a) { - return Math.pow(2, this.uQ - a) - }, - RX: function(a) { - return "na" === this.kd ? bd[ad[a]] : this.dc(a) * this.$c(a) - } - }; - P = z.lang.Ju; - function Lc(a, b, c) { - this.B = a; - this.cV = b; - this.Cd = b.qc; - this.ub = { - h0: "na", - zIndex: 0, - OO: c.tileUrls, - AO: q - }; - this.UB = ""; - this.qT = {}; - var c = c.urlOpts || {}, e; - for (e in c) - c.hasOwnProperty(e) && (this.UB = this.UB + "&" + e + "=" + c[e]); - this.GC = []; - this.JE = 0; - this.zM = t; - a = this.ub.h0; - Zc[a] ? a = Zc[a] : (b = new $c(a,l), - a = Zc[a] = b); - this.Wr = a - } - window.VectorIndoorTileLayer = "VectorIndoorTileLayer"; - da = Lc.prototype; - da.na = function() { - var a = this.B - , b = a.Va; - if (!this.Vh) { - var c = b.Kj(this.ub.zIndex); - c.style.WebkitTransform = "translate3d(0px, 0px, 0)"; - this.Vh = c - } - b.Ki.appendChild(this.Vh); - b.b4 = c; - if (this.ub.AO) { - ed(this); - var e = this; - a.addEventListener("checkvectorclick", function(a) { - var b; - a: { - b = a.offsetX; - var c = a.offsetY - , k = e.GC.N4; - if (k) - for (var m = 0; m < k.length; m++) - for (var n = k[m], o = 0; o < n.length; o++) - if (a = n[o], - !a.f4 && a.EY && b > a.WE && b < a.TE && c > a.XE && c < a.UE) { - b = a.EY; - b = { - type: 9, - name: a.name, - uid: a.uid, - point: { - x: b.H2 + b.width / 2, - y: b.I2 + 6 - } - }; - break a - } - b = s - } - b && (a = new P("onvectorclick"), - a.Y3 = b, - a.of = "base", - this.dispatchEvent(a)) - }) - } - } - ; - function ed(a) { - var b = a.B - , c = b.Va - , e = a.Cd - , f = b.cb() - , g = f.width - , f = f.height - , i = L("canvas"); - i.style.cssText = "position: absolute;left:0;top:0;width:" + g + "px;height:" + f + "px;z-index:2;"; - i.width = g * e; - i.height = f * e; - a.by = i; - a.At = i.getContext("2d"); - a.At.scale(e, e); - a.At.textBaseline = "top"; - c.Ki.appendChild(i); - b.ZS = i - } - da.update = function(a, b) { - b = b || {}; - if (this.ub.AO && (b.Tw && this.Tw(), - b.S_)) { - var c = this.Cd - , e = this.B.cb() - , f = e.width - , e = e.height - , g = this.by - , i = g.style; - i.width = f + "px"; - i.height = e + "px"; - g.width = f * c; - g.height = e * c; - this.At.scale(c, c); - this.At.textBaseline = "top" - } - if (b.M5) { - c = this.Vh; - f = 0; - for (e = c.childNodes.length; f < e; f++) - c.childNodes[f].yd = t - } - this.NK = a; - this.up(a) - } - ; - da.up = function(a) { - this.GC = []; - var b = this.B - , c = b.fa() - , e = b.cd.vj(b.re) - , f = this.Wr.dc(c) - , e = [Math.round(-e.lng / f), Math.round(e.lat / f)] - , f = this.Wr.$c(c) - , g = b.aa.replace(/^TANGRAM_/, "") - , i = this.Wr.FL(c) - , b = this.B - , k = -b.offsetY + b.height / 2 - , m = this.Vh; - m.style.left = -b.offsetX + b.width / 2 + "px"; - m.style.top = k + "px"; - this.Cc ? this.Cc.length = 0 : this.Cc = []; - b = 0; - for (k = m.childNodes.length; b < k; b++) { - var n = m.childNodes[b]; - n.Sj = t; - this.Cc.push(n) - } - if (b = this.qh) - for (var o in b) - delete b[o]; - else - this.qh = {}; - this.Dc ? this.Dc.length = 0 : this.Dc = []; - b = 0; - for (k = a.length; b < k; b++) { - var n = a[b][0] - , p = a[b][1]; - o = 0; - for (var v = this.Cc.length; o < v; o++) { - var x = this.Cc[o]; - if (x.id === g + "_" + n + "_" + p + "_" + i + "_" + c) { - x.Sj = q; - this.qh[x.id] = x; - break - } - } - } - b = 0; - for (k = this.Cc.length; b < k; b++) - x = this.Cc[b], - x.Sj || (x.Lc = s, - delete x.Lc, - x.yd = t, - this.Dc.push(x)); - o = []; - v = f * this.Cd; - b = 0; - for (k = a.length; b < k; b++) { - var n = a[b][0] - , p = a[b][1] - , x = n * f + e[0] - , y = (-1 - p) * f + e[1] - , A = g + "_" + n + "_" + p + "_" + i + "_" + c - , E = this.qh[A] - , C = s; - if (E) - C = E.style, - C.left = x + "px", - C.top = y + "px", - C.width = f + "px", - C.height = f + "px", - E.yd ? E.MO && E.MO && this.GC.push(E.MO) : (E.NR = q, - E.Lc = s, - delete E.Lc, - o.push([n, p, E])); - else { - if (0 < this.Dc.length) { - var E = this.Dc.shift() - , F = E.getContext("2d"); - E.getAttribute("width") !== v && (E._scale = t); - E.setAttribute("width", v); - E.setAttribute("height", v); - C = E.style; - C.width = f + "px"; - C.height = f + "px"; - F.clearRect(0, 0, v, v) - } else - E = document.createElement("canvas"), - C = E.style, - C.position = "absolute", - this.ub.backgroundColor && (C.background = this.ub.backgroundColor), - C.width = f + "px", - C.height = f + "px", - E.setAttribute("width", v), - E.setAttribute("height", v), - m.appendChild(E); - E.id = A; - C.left = x + "px"; - C.top = y + "px"; - o.push([n, p, E]) - } - E.style.visibility = "" - } - b = 0; - for (k = this.Dc.length; b < k; b++) - this.Dc[b].style.visibility = "hidden"; - if (0 === o.length) - fd(this); - else { - this.JE = o.length; - this.zM = t; - c = this.Wr.FL(this.B.fa()); - for (e = 0; e < a.length; e++) - a[e][3] = c; - for (e = 0; e < o.length; e++) - a = o[e][2], - f = o[e][0], - g = o[e][1], - o[e][3] = c, - a.yd = t, - a.NR = t, - gd(this, f, g, c, a) - } - } - ; - function gd(a, b, c, e, f) { - var g = b + "_" + c + "_" + e - , i = a.qT; - if (i[g]) { - if ("loading" === i[g].status) - return - } else - i[g] = { - status: "init", - bO: 0 - }; - var k = a - , m = k.B - , n = [] - , n = "0" === B.xu ? k.ub.OO.http : k.ub.OO.https - , o = Math.abs(b + c) % n.length - , p = "x=" + b + "&y=" + c + "&z=" + e - , v = hd(a.cV) - , x = v.O0 - , v = v.C0 - , y = "_" + (0 > b ? "_" : "") + (0 > c ? "$" : "") + parseInt(Math.abs(b) + "" + Math.abs(c) + "" + e, 10).toString(36) - , p = p + a.UB + "v=" + x + "&udt=" + v + "&fn=window." + y - , x = n[o] + "&" + p - , x = n[o] + "¶m=" + window.encodeURIComponent(Kb(p)); - window[y] = function(a) { - clearTimeout(i[g].Od); - i[g] = s; - if (a) { - m.fa(); - var n; - a: { - for (n = 0; n < k.NK.length; n++) { - var o = k.NK[n]; - if (o[0] === b && o[1] === c && o[3] === e) { - n = q; - break a - } - } - n = t - } - n !== t && (n = new P("updateindoor"), - n.IndoorCanvas = [], - n.IndoorCanvas.push({ - canvasDom: f, - data: a, - canvasID: f.id, - ratio: k.Cd - }), - m.dispatchEvent(n), - k.JE--, - (0 === k.JE || k.zM === q) && fd(k), - delete window[y]) - } - } - ; - oa(x); - i[g].status = "loading"; - k = a; - i[g].Od = setTimeout(function() { - 3 > i[g].bO ? (i[g].bO++, - i[g].status = "init", - gd(k, b, c, e, f)) : i[g] = s - }, 4E3) - } - function fd(a) { - if (a.by) { - var b = a.B; - a.by.style.left = -b.offsetX + "px"; - a.by.style.top = -b.offsetY + "px"; - a = new P("updateindoorlabel"); - a.labelCanvasDom = b.ZS; - b.dispatchEvent(a) - } - } - da.Tw = function() { - var a = this.B.cb() - , b = this.Cd; - this.At.clearRect(0, 0, a.width * b, a.height * b) - } - ; - da.remove = function() { - var a = this.B.Va; - this.Vh && a.Ki.removeChild(this.Vh) - } - ; - function Kc(a) { - this.B = a.map; - this.ff = []; - this.Xr = {}; - this.qc = this.B.K.devicePixelRatio; - this.na() - } - window.VectorIndoorTileMgr = "VectorIndoorTileMgr"; - da = Kc.prototype; - da.na = function() { - var a = this - , b = this.B; - b.addEventListener("addtilelayer", function(b) { - a.Oe(b.target) - }); - b.addEventListener("removetilelayer", function(b) { - a.Yf(b.target) - }); - setTimeout(function() { - b.addEventListener("onmoveend", function(b) { - "centerAndZoom" !== b.mv && a.update() - }); - b.addEventListener("onzoomend", function(b) { - "centerAndZoom" !== b.mv && a.update({ - Tw: q - }) - }); - b.addEventListener("centerandzoom", function() { - a.update({ - Tw: q - }) - }) - }, 1); - b.addEventListener("indoor_data_refresh", u()); - b.addEventListener("onresize", function() { - a.update({ - S_: q - }) - }); - a.update() - } - ; - da.Oe = function(a) { - if (a instanceof Lc) { - for (var b = 0; b < this.ff.length; b++) - if (this.ff[b] === a) - return; - this.ff.push(a); - a.na(); - this.B.loaded && this.update() - } - } - ; - da.Yf = function(a) { - if (a instanceof Lc) { - for (var b = 0; b < this.ff.length; b++) - if (this.ff[b] === a) { - this.ff.splice(b, 1); - break - } - a.remove() - } - } - ; - da.pj = function(a) { - var b = a.getName(); - if (this.Xr[b]) - return this.Xr[b]; - var c = this.B - , e = c.fa() - , f = c.fc - , g = a.RX(e); - c.aa.replace(/^TANGRAM_/, ""); - var i = Math.ceil(f.lng / g) - , k = Math.ceil(f.lat / g) - , a = a.$c(e) - , m = [i, k, (f.lng / g - i) * a, (f.lat / g - k) * a] - , e = m[0] - Math.ceil((c.width / 2 - m[2]) / a) - , f = m[1] - Math.ceil((c.height / 2 - m[3]) / a) - , g = m[0] + Math.ceil((c.width / 2 + m[2]) / a) - , c = m[1] + Math.ceil((c.height / 2 + m[3]) / a); - this.hc ? this.hc.length = 0 : this.hc = []; - for (a = e; a < g; a++) - for (e = f; e < c; e++) - this.hc.push([a, e]); - this.hc.sort(function(a) { - return function(b, c) { - return 0.4 * Math.abs(b[0] - a[0]) + 0.6 * Math.abs(b[1] - a[1]) - (0.4 * Math.abs(c[0] - a[0]) + 0.6 * Math.abs(c[1] - a[1])) - } - }([i, k])); - this.Xr[b] = this.hc.slice(0); - return this.Xr[b] - } - ; - function hd(a) { - if (a.gG) - return a.gG; - var b = "undefined" !== typeof TVC ? TVC.K2.z4 : {}; - a.gG = { - O0: b.version ? b.version : "001", - C0: b.wn ? b.wn : "20171110" - }; - return a.gG - } - da.update = function(a) { - this.Xr = {}; - for (var b = 0; b < this.ff.length; b++) { - var c = this.ff[b] - , e = this.pj(c.Wr); - c.update(e, a) - } - } - ; - function id(a, b, c) { - this.kd = a; - this.ff = b instanceof Mc ? [b] : b.slice(0); - c = c || {}; - this.j = { - k0: c.tips || "", - LE: "", - gc: c.minZoom || 3, - Yb: c.maxZoom || 18, - W3: c.minZoom || 3, - V3: c.maxZoom || 18, - le: 256, - UF: c.textColor || "black", - vD: c.errorImageUrl || "", - bb: new fb(new J(-21364736,-16023552),new J(23855104,19431424)), - cd: c.projection || new S - }; - 1 <= this.ff.length && (this.ff[0].Jw = q); - z.extend(this.j, c) - } - z.extend(id.prototype, { - getName: w("kd"), - gt: function() { - return this.j.k0 - }, - B3: function() { - return this.j.LE - }, - oY: function() { - return this.ff[0] - }, - P3: w("ff"), - $c: function() { - return this.j.le - }, - bp: function() { - return this.j.gc - }, - sm: function() { - return this.j.Yb - }, - setMaxZoom: function(a) { - this.j.Yb = a - }, - zm: function() { - return this.j.UF - }, - wm: function() { - return this.j.cd - }, - u3: function() { - return this.j.vD - }, - $c: function() { - return this.j.le - }, - dc: function(a) { - return Math.pow(2, 18 - a) - }, - mE: function(a) { - return this.dc(a) * this.$c() - } - }); - var jd = [B.url.proto + B.url.domain.TILE_BASE_URLS[0] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[1] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[2] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[3] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[4] + "/it/"] - , kd = [B.url.proto + B.url.domain.TILE_ONLINE_URLS[0] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[1] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[2] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[3] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[4] + "/tile/"] - , ld = { - dark: "dl", - light: "ll", - normal: "pl" - } - , md = new Mc; - md.M_ = q; - md.getTilesUrl = function(a, b, c) { - var e = a.x - , a = a.y - , f = Sb("normal") - , g = 1 - , c = ld[c]; - //this.map.Sx() && (g = 2); //修改 - //e = this.map.Va.Lw(e, b).hs; - //return (kd[Math.abs(e + a) % kd.length] + "?qt=tile&x=" + (e + "").replace(/-/gi, "M") + "&y=" + (a + "").replace(/-/gi, "M") + "&z=" + b + "&styles=" + c + "&scaler=" + g + (6 == z.ca.ia ? "&color_dep=32&colors=50" : "") + "&udt=" + f).replace(/-(\d+)/gi, "M$1") - - var tdir = bmapcfg.tiles_dir.length>0?bmapcfg.tiles_dir:bmapcfg.home + "tiles"; - return tdir + "/" + b + "/" + e + "/" + a + bmapcfg.imgext; // 使用本地的瓦片 - } - ; - var La = new id("\u5730\u56fe",md,{ - tips: "\u663e\u793a\u666e\u901a\u5730\u56fe", - maxZoom: 19 - }) - , nd = new Mc; - nd.NO = [B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[0] + "/resource/mappic/", B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[1] + "/resource/mappic/", B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[2] + "/resource/mappic/", B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[3] + "/resource/mappic/"]; - nd.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y - , f = 256 * Math.pow(2, 20 - b) - , e = Math.round((9998336 - f * e) / f) - 1; - /*var tdir = bmapcfg.tiles_hybrid.length > 0 ? bmapcfg.tiles_hybrid : bmapcfg.home + "tiles_hybrid";//修改 使用本地卫星的瓦片 - tdir = tdir + "/" + b + "/" + c + "/" + e + bmapcfg.imgext; //修改 使用本地卫星的瓦片 - return tdir;*/ - return url = this.NO[Math.abs(c + e) % this.NO.length] + this.map.Ub + "/" + this.map.Rw + "/3/lv" + (21 - b) + "/" + c + "," + e + ".jpg" - } - ; - var Qa = new id("\u4e09\u7ef4",nd,{ - tips: "\u663e\u793a\u4e09\u7ef4\u5730\u56fe", - minZoom: 15, - maxZoom: 20, - textColor: "white", - projection: new hb - }); - Qa.dc = function(a) { - return Math.pow(2, 20 - a) - } - ; - Qa.wk = function(a) { - if (!a) - return ""; - var b = G.pC, c; - for (c in b) - if (-1 < a.search(c)) - return b[c].yy; - return "" - } - ; - Qa.BL = function(a) { - return { - bj: 2, - gz: 1, - sz: 14, - sh: 4 - }[a] - } - ; - var od = new Mc({ - Jw: q - }); - od.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y; - return (jd[Math.abs(c + e) % jd.length] + "u=x=" + c + ";y=" + e + ";z=" + b + ";v=009;type=sate&fm=46&udt=" + Sb("satellite")).replace(/-(\d+)/gi, "M$1") - } - ; - var Ya = new id("\u536b\u661f",od,{ - tips: "\u663e\u793a\u536b\u661f\u5f71\u50cf", - minZoom: 1, - maxZoom: 19, - textColor: "white" - }) - , pd = new Mc({ - transparentPng: q - }); - pd.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y - , f = Sb("satelliteStreet"); - return (kd[Math.abs(c + e) % kd.length] + "?qt=vtile&x=" + (c + "").replace(/-/gi, "M") + "&y=" + (e + "").replace(/-/gi, "M") + "&z=" + b + "&styles=sl" + (6 == z.ca.ia ? "&color_dep=32&colors=50" : "") + "&udt=" + f).replace(/-(\d+)/gi, "M$1") - } - ; - var Sa = new id("\u6df7\u5408",[od, pd],{ - tips: "\u663e\u793a\u5e26\u6709\u8857\u9053\u7684\u536b\u661f\u5f71\u50cf", - labelText: "\u8def\u7f51", - minZoom: 1, - maxZoom: 19, - textColor: "white" - }); - var qd = 1 - , V = {}; - window.c1 = V; - function W(a, b) { - z.lang.Ca.call(this); - this.Ad = {}; - this.fn(a); - b = b || {}; - b.la = b.renderOptions || {}; - this.j = { - la: { - Ma: b.la.panel || s, - map: b.la.map || s, - Zg: b.la.autoViewport || q, - Ut: b.la.selectFirstResult, - kt: b.la.highlightMode, - Wb: b.la.enableDragging || t - }, - py: b.onSearchComplete || u(), - BN: b.onMarkersSet || u(), - AN: b.onInfoHtmlSet || u(), - DN: b.onResultsHtmlSet || u(), - zN: b.onGetBusListComplete || u(), - yN: b.onGetBusLineComplete || u(), - wN: b.onBusListHtmlSet || u(), - vN: b.onBusLineHtmlSet || u(), - bF: b.onPolylinesSet || u(), - Dp: b.reqFrom || "" - }; - this.j.la.Zg = "undefined" != typeof b && "undefined" != typeof b.renderOptions && "undefined" != typeof b.renderOptions.autoViewport ? b.renderOptions.autoViewport : q; - this.j.la.Ma = z.Fc(this.j.la.Ma) - } - z.ta(W, z.lang.Ca); - z.extend(W.prototype, { - getResults: function() { - return this.Hc ? this.Ei : this.ha - }, - enableAutoViewport: function() { - this.j.la.Zg = q - }, - disableAutoViewport: function() { - this.j.la.Zg = t - }, - fn: function(a) { - a && (this.Ad.src = a) - }, - JF: function(a) { - this.j.py = a || u() - }, - setMarkersSetCallback: function(a) { - this.j.BN = a || u() - }, - setPolylinesSetCallback: function(a) { - this.j.bF = a || u() - }, - setInfoHtmlSetCallback: function(a) { - this.j.AN = a || u() - }, - setResultsHtmlSetCallback: function(a) { - this.j.DN = a || u() - }, - xm: w("Me") - }); - var rd = { - KG: B.Wc, - ab: function(a, b, c, e, f) { - this.SZ(b); - var g = (1E5 * Math.random()).toFixed(0); - B._rd["_cbk" + g] = function(b) { - b.result && b.result.error && 202 === b.result.error ? alert("\u8be5AK\u56e0\u4e3a\u6076\u610f\u884c\u4e3a\u5df2\u7ecf\u88ab\u7ba1\u7406\u5458\u5c01\u7981\uff01") : (c = c || {}, - a && a(b, c), - delete B._rd["_cbk" + g]) - } - ; - e = e || ""; - b = c && c.H0 ? Gb(b, encodeURI) : Gb(b, encodeURIComponent); - this.KG = c && c.jL ? c.$N ? c.$N : B.vp : B.Wc; - e = this.KG + e + "?" + b + "&ie=utf-8&oue=1&fromproduct=jsapi"; - f || (e += "&res=api"); - e = e + ("&callback=BMap._rd._cbk" + g) + ("&ak=" + qa); - oa(e) - }, - SZ: function(a) { - if (a.qt) { - var b = ""; - switch (a.qt) { - case "bt": - b = "z_qt|bt"; - break; - case "nav": - b = "z_qt|nav"; - break; - case "walk": - b = "z_qt|walk"; - break; - case "bse": - b = "z_qt|bse"; - break; - case "nse": - b = "z_qt|nse"; - break; - case "drag": - b = "z_qt|drag" - } - "" !== b && B.alog("cus.fire", "count", b) - } - } - }; - window.o1 = rd; - B._rd = {}; - var ab = {}; - window.n1 = ab; - ab.WN = function(a) { - a = a.replace(/<\/?[^>]*>/g, ""); - return a = a.replace(/[ | ]* /g, " ") - } - ; - ab.JZ = function(a) { - return a.replace(/([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g, "$1,$2;") - } - ; - ab.KZ = function(a, b) { - return a.replace(RegExp("(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){" + b + "}", "ig"), "$1") - } - ; - var sd = 2 - , td = 6 - , ud = 8 - , vd = 2 - , wd = 3 - , xd = 6 - , yd = 0 - , zd = "bt" - , Ad = "nav" - , Bd = "walk" - , Cd = "bl" - , Dd = "bsl" - , Ed = "ride" - , Fd = 15 - , Gd = 18; - B.I = window.Instance = z.lang.Nc; - function Hd(a, b, c) { - z.lang.Ca.call(this); - if (a) { - this.Wa = "object" == typeof a ? a : z.Fc(a); - this.page = 1; - this.Kd = 100; - this.hK = "pg"; - this.Xf = 4; - this.qK = b; - this.update = q; - a = { - page: 1, - $e: 100, - Kd: 100, - Xf: 4, - hK: "pg", - update: q - }; - c || (c = a); - for (var e in c) - "undefined" != typeof c[e] && (this[e] = c[e]); - this.va() - } - } - z.extend(Hd.prototype, { - va: function() { - this.na() - }, - na: function() { - this.YV(); - this.Wa.innerHTML = this.uW() - }, - YV: function() { - isNaN(parseInt(this.page)) && (this.page = 1); - isNaN(parseInt(this.Kd)) && (this.Kd = 1); - 1 > this.page && (this.page = 1); - 1 > this.Kd && (this.Kd = 1); - this.page > this.Kd && (this.page = this.Kd); - this.page = parseInt(this.page); - this.Kd = parseInt(this.Kd) - }, - G3: function() { - location.search.match(RegExp("[?&]?" + this.hK + "=([^&]*)[&$]?", "gi")); - this.page = RegExp.$1 - }, - uW: function() { - var a = [] - , b = this.page - 1 - , c = this.page + 1; - a.push('

    '); - if (!(1 > b)) { - if (this.page >= this.Xf) { - var e; - a.push('\u9996\u9875'.replace("{temp1}", "BMap.I('" + this.aa + "').toPage(1);")) - } - a.push('\u4e0a\u4e00\u9875'.replace("{temp2}", "BMap.I('" + this.aa + "').toPage(" + b + ");")) - } - if (this.page < this.Xf) - e = 0 == this.page % this.Xf ? this.page - this.Xf - 1 : this.page - this.page % this.Xf + 1, - b = e + this.Xf - 1; - else { - e = Math.floor(this.Xf / 2); - var f = this.Xf % 2 - 1 - , b = this.Kd > this.page + e ? this.page + e : this.Kd; - e = this.page - e - f - } - this.page > this.Kd - this.Xf && this.page >= this.Xf && (e = this.Kd - this.Xf + 1, - b = this.Kd); - for (f = e; f <= b; f++) - 0 < f && (f == this.page ? a.push('' + f + "") : 1 <= f && f <= this.Kd && (e = '[' + f + "]", - a.push(e.replace("{temp3}", "BMap.I('" + this.aa + "').toPage(" + f + ");")))); - c > this.Kd || a.push('\u4e0b\u4e00\u9875'.replace("{temp4}", "BMap.I('" + this.aa + "').toPage(" + c + ");")); - a.push("

    "); - return a.join("") - }, - toPage: function(a) { - a = a ? a : 1; - "function" == typeof this.qK && (this.qK(a), - this.page = a); - this.update && this.va() - } - }); - function cb(a, b) { - W.call(this, a, b); - b = b || {}; - b.renderOptions = b.renderOptions || {}; - this.Np(b.pageCapacity); - "undefined" != typeof b.renderOptions.selectFirstResult && !b.renderOptions.selectFirstResult ? this.UC() : this.oD(); - this.ya = []; - this.yf = []; - this.mb = -1; - this.Pa = []; - var c = this; - K.load("local", function() { - c.Nz() - }, q) - } - z.ta(cb, W, "LocalSearch"); - cb.fq = 10; - cb.k1 = 1; - cb.En = 100; - cb.zG = 2E3; - cb.HG = 1E5; - z.extend(cb.prototype, { - search: function(a, b) { - this.Pa.push({ - method: "search", - arguments: [a, b] - }) - }, - an: function(a, b, c) { - this.Pa.push({ - method: "searchInBounds", - arguments: [a, b, c] - }) - }, - Jp: function(a, b, c, e) { - this.Pa.push({ - method: "searchNearby", - arguments: [a, b, c, e] - }) - }, - Pe: function() { - delete this.Ia; - delete this.Me; - delete this.ha; - delete this.ua; - this.mb = -1; - this.Ta(); - this.j.la.Ma && (this.j.la.Ma.innerHTML = "") - }, - Am: u(), - oD: function() { - this.j.la.Ut = q - }, - UC: function() { - this.j.la.Ut = t - }, - Np: function(a) { - this.j.Jk = "number" == typeof a && !isNaN(a) ? 1 > a ? cb.fq : a > cb.En ? cb.fq : a : cb.fq - }, - qf: function() { - return this.j.Jk - }, - toString: ca("LocalSearch") - }); - var Id = cb.prototype; - T(Id, { - clearResults: Id.Pe, - setPageCapacity: Id.Np, - getPageCapacity: Id.qf, - gotoPage: Id.Am, - searchNearby: Id.Jp, - searchInBounds: Id.an, - search: Id.search, - enableFirstResultSelection: Id.oD, - disableFirstResultSelection: Id.UC - }); - function Jd(a, b) { - W.call(this, a, b) - } - z.ta(Jd, W, "BaseRoute"); - z.extend(Jd.prototype, { - Pe: u() - }); - function Kd(a, b) { - W.call(this, a, b); - b = b || {}; - this.bu(b.policy); - this.oO(b.intercityPolicy); - this.xO(b.transitTypePolicy); - this.Np(b.pageCapacity); - this.Ab = zd; - this.mq = qd; - this.ya = []; - this.mb = -1; - this.j.Vn = b.enableTraffic || t; - this.Pa = []; - var c = this; - K.load("route", function() { - c.Sd() - }) - } - Kd.En = 100; - Kd.HP = [0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 1]; - Kd.IP = [0, 3, 4, 0, 0, 0, 5]; - z.ta(Kd, Jd, "TransitRoute"); - z.extend(Kd.prototype, { - bu: function(a) { - this.j.ie = 0 <= a && 5 >= a ? a : 0 - }, - oO: function(a) { - this.j.Hm = 0 <= a && 2 >= a ? a : 0 - }, - xO: function(a) { - this.j.tn = 0 <= a && 2 >= a ? a : 0 - }, - NA: function(a, b) { - this.Pa.push({ - method: "_internalSearch", - arguments: [a, b] - }) - }, - search: function(a, b) { - this.Pa.push({ - method: "search", - arguments: [a, b] - }) - }, - Np: function(a) { - if ("string" === typeof a && (a = parseInt(a, 10), - isNaN(a))) { - this.j.Jk = Kd.En; - return - } - this.j.Jk = "number" !== typeof a ? Kd.En : 1 <= a && a <= Kd.En ? Math.round(a) : Kd.En - }, - toString: ca("TransitRoute"), - Z1: function(a) { - return a.replace(/\(.*\)/, "") - } - }); - var Ld = Kd.prototype; - T(Ld, { - _internalSearch: Ld.NA - }); - function Md(a, b) { - W.call(this, a, b); - this.ya = []; - this.mb = -1; - this.Pa = []; - var c = this - , e = this.j.la; - 1 !== e.kt && 2 !== e.kt && (e.kt = 1); - this.kv = this.j.la.Wb ? q : t; - K.load("route", function() { - c.Sd() - }); - this.vE && this.vE() - } - Md.WP = " \u73af\u5c9b \u65e0\u5c5e\u6027\u9053\u8def \u4e3b\u8def \u9ad8\u901f\u8fde\u63a5\u8def \u4ea4\u53c9\u70b9\u5185\u8def\u6bb5 \u8fde\u63a5\u9053\u8def \u505c\u8f66\u573a\u5185\u90e8\u9053\u8def \u670d\u52a1\u533a\u5185\u90e8\u9053\u8def \u6865 \u6b65\u884c\u8857 \u8f85\u8def \u531d\u9053 \u5168\u5c01\u95ed\u9053\u8def \u672a\u5b9a\u4e49\u4ea4\u901a\u533a\u57df POI\u8fde\u63a5\u8def \u96a7\u9053 \u6b65\u884c\u9053 \u516c\u4ea4\u4e13\u7528\u9053 \u63d0\u524d\u53f3\u8f6c\u9053".split(" "); - z.ta(Md, Jd, "DWRoute"); - z.extend(Md.prototype, { - search: function(a, b, c) { - this.Pa.push({ - method: "search", - arguments: [a, b, c] - }) - } - }); - function Nd(a, b) { - Md.call(this, a, b); - b = b || {}; - this.j.Vn = b.enableTraffic || t; - this.bu(b.policy); - this.Ab = Ad; - this.mq = wd - } - z.ta(Nd, Md, "DrivingRoute"); - Nd.prototype.bu = function(a) { - this.j.ie = 0 <= a && 5 >= a ? a : 0 - } - ; - function Od(a, b) { - Md.call(this, a, b); - this.Ab = Bd; - this.mq = vd; - this.kv = t - } - z.ta(Od, Md, "WalkingRoute"); - function Pd(a, b) { - Md.call(this, a, b); - this.Ab = Ed; - this.mq = xd; - this.kv = t - } - z.ta(Pd, Md, "RidingRoute"); - function Qd(a, b) { - z.lang.Ca.call(this); - this.Vf = []; - this.Kk = []; - this.j = b; - this.uj = a; - this.map = this.j.la.map || s; - this.hO = this.j.hO; - this.zb = s; - this.pk = 0; - this.SF = ""; - this.nf = 1; - this.uD = ""; - this.Ep = [0, 0, 0, 0, 0, 0, 0]; - this.XM = []; - this.os = [1, 1, 1, 1, 1, 1, 1]; - this.VO = [1, 1, 1, 1, 1, 1, 1]; - this.Fp = [0, 0, 0, 0, 0, 0, 0]; - this.Zm = [0, 0, 0, 0, 0, 0, 0]; - this.Ib = [{ - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }]; - this.bi = -1; - this.ru = []; - this.aG = []; - K.load("route", u()) - } - z.lang.ta(Qd, z.lang.Ca, "RouteAddr"); - var Rd = navigator.userAgent; - /ipad|iphone|ipod|iph/i.test(Rd); - var Sd = /android/i.test(Rd); - function Td(a) { - this.vf = a || {} - } - z.extend(Td.prototype, { - gO: function(a, b, c) { - var e = this; - K.load("route", function() { - e.Sd(a, b, c) - }) - } - }); - function Ud(a) { - this.j = {}; - z.extend(this.j, a); - this.Pa = []; - var b = this; - K.load("othersearch", function() { - b.Sd() - }) - } - z.ta(Ud, z.lang.Ca, "Geocoder"); - z.extend(Ud.prototype, { - vm: function(a, b, c) { - this.Pa.push({ - method: "getPoint", - arguments: [a, b, c] - }) - }, - rm: function(a, b, c) { - this.Pa.push({ - method: "getLocation", - arguments: [a, b, c] - }) - }, - toString: ca("Geocoder") - }); - var Vd = Ud.prototype; - T(Vd, { - getPoint: Vd.vm, - getLocation: Vd.rm - }); - function Geolocation(a) { - a = a || {}; - this.K = { - timeout: a.timeout || 1E4, - maximumAge: a.maximumAge || 6E5, - enableHighAccuracy: a.enableHighAccuracy || t, - zi: a.SDKLocation || t - }; - this.pe = []; - var b = this; - K.load("othersearch", function() { - for (var a = 0, e; e = b.pe[a]; a++) - b[e.method].apply(b, e.arguments) - }) - } - z.extend(Geolocation.prototype, { - getCurrentPosition: function(a, b) { - this.pe.push({ - method: "getCurrentPosition", - arguments: arguments - }) - }, - getStatus: function() { - return sd - }, - enableSDKLocation: function() { - H() && (this.K.zi = q) - }, - disableSDKLocation: function() { - this.K.zi = t - } - }); - function Wd(a) { - a = a || {}; - a.la = a.renderOptions || {}; - this.j = { - la: { - map: a.la.map || s - } - }; - this.Pa = []; - var b = this; - K.load("othersearch", function() { - b.Sd() - }) - } - z.ta(Wd, z.lang.Ca, "LocalCity"); - z.extend(Wd.prototype, { - get: function(a) { - this.Pa.push({ - method: "get", - arguments: [a] - }) - }, - toString: ca("LocalCity") - }); - function Xd() { - this.Pa = []; - var a = this; - K.load("othersearch", function() { - a.Sd() - }) - } - z.ta(Xd, z.lang.Ca, "Boundary"); - z.extend(Xd.prototype, { - get: function(a, b) { - this.Pa.push({ - method: "get", - arguments: [a, b] - }) - }, - toString: ca("Boundary") - }); - function Yd(a, b) { - W.call(this, a, b); - this.TP = Cd; - this.VP = Fd; - this.SP = Dd; - this.UP = Gd; - this.Pa = []; - var c = this; - K.load("buslinesearch", function() { - c.Sd() - }) - } - Yd.zv = G.qa + "iw_plus.gif"; - Yd.YS = G.qa + "iw_minus.gif"; - Yd.RU = G.qa + "stop_icon.png"; - z.ta(Yd, W); - z.extend(Yd.prototype, { - getBusList: function(a) { - this.Pa.push({ - method: "getBusList", - arguments: [a] - }) - }, - getBusLine: function(a) { - this.Pa.push({ - method: "getBusLine", - arguments: [a] - }) - }, - setGetBusListCompleteCallback: function(a) { - this.j.zN = a || u() - }, - setGetBusLineCompleteCallback: function(a) { - this.j.yN = a || u() - }, - setBusListHtmlSetCallback: function(a) { - this.j.wN = a || u() - }, - setBusLineHtmlSetCallback: function(a) { - this.j.vN = a || u() - }, - setPolylinesSetCallback: function(a) { - this.j.bF = a || u() - } - }); - function Zd(a) { - W.call(this, a); - a = a || {}; - this.ub = { - input: a.input || s, - gC: a.baseDom || s, - types: a.types || [], - py: a.onSearchComplete || u() - }; - this.Ad.src = a.location || "\u5168\u56fd"; - this.Wi = ""; - this.pg = s; - this.lI = ""; - this.Mi(); - Ra(Ha); - var b = this; - K.load("autocomplete", function() { - b.Sd() - }) - } - z.ta(Zd, W, "Autocomplete"); - z.extend(Zd.prototype, { - Mi: u(), - show: u(), - U: u(), - KF: function(a) { - this.ub.types = a - }, - fn: function(a) { - this.Ad.src = a - }, - search: ba("Wi"), - Ly: ba("lI") - }); - var Ta; - function Oa(a, b) { - function c() { - f.j.visible ? ("inter" === f.Ke && f.j.haveBreakId && f.j.indoorExitControl === q ? z.D.show(f.GA) : z.D.U(f.GA), - this.j.closeControl && this.Bf && this.B && this.B.La() === this.C ? z.D.show(f.Bf) : z.D.U(f.Bf), - this.j.forceCloseControl && z.D.show(f.Bf)) : (z.D.U(f.Bf), - z.D.U(f.GA)) - } - this.C = "string" == typeof a ? z.$(a) : a; - this.aa = $d++; - this.j = { - enableScrollWheelZoom: q, - panoramaRenderer: "flash", - swfSrc: B.vg("main_domain_nocdn", "res/swf/") + "APILoader.swf", - visible: q, - indoorExitControl: q, - indoorFloorControl: t, - linksControl: q, - clickOnRoad: q, - navigationControl: q, - closeControl: q, - indoorSceneSwitchControl: q, - albumsControl: t, - albumsControlOptions: {}, - copyrightControlOptions: {}, - forceCloseControl: t, - haveBreakId: t - }; - var b = b || {}, e; - for (e in b) - this.j[e] = b[e]; - b.closeControl === q && (this.j.forceCloseControl = q); - b.useWebGL === t && Na(t); - this.Da = { - heading: 0, - pitch: 0 - }; - this.bo = []; - this.Lb = this.Za = s; - this.dk = this.er(); - this.ya = []; - this.Mc = 1; - this.Ke = this.xT = this.jl = ""; - this.Je = {}; - this.Of = s; - this.Sg = []; - this.xr = []; - "cvsRender" == this.dk || Na() ? (this.Vj = 90, - this.Xj = -90) : "cssRender" == this.dk && (this.Vj = 45, - this.Xj = -45); - this.Br = t; - var f = this; - this.co = function() { - this.dk === "flashRender" ? K.load("panoramaflash", function() { - f.Mi() - }, q) : K.load("panorama", function() { - f.ib() - }, q); - b.of == "api" ? Ra(Da) : Ra(Ea); - this.co = u() - } - ; - this.j.jT !== q && (this.co(), - B.Fn("cus.fire", "count", "z_loadpanoramacount")); - this.aU(this.C); - this.addEventListener("id_changed", function() { - Ra(Ca, { - from: b.of - }) - }); - this.mQ(); - this.addEventListener("indoorexit_options_changed", c); - this.addEventListener("scene_type_changed", c); - this.addEventListener("onclose_options_changed", c); - this.addEventListener("onvisible_changed", c) - } - var ae = 4 - , be = 1 - , $d = 0; - z.lang.ta(Oa, z.lang.Ca, "Panorama"); - z.extend(Oa.prototype, { - mQ: function() { - var a = this - , b = this.Bf = L("div"); - b.className = "pano_close"; - b.style.cssText = "z-index: 1201;display: none"; - b.title = "\u9000\u51fa\u5168\u666f"; - b.onclick = function() { - a.U() - } - ; - this.C.appendChild(b); - var c = this.GA = L("a"); - c.className = "pano_pc_indoor_exit"; - c.style.cssText = "z-index: 1201;display: none"; - c.innerHTML = '\u51fa\u53e3'; - c.title = "\u9000\u51fa\u5ba4\u5185\u666f"; - c.onclick = function() { - a.Vo() - } - ; - this.C.appendChild(c); - window.ActiveXObject && !document.addEventListener && (b.style.backgroundColor = "rgb(37,37,37)", - c.style.backgroundColor = "rgb(37,37,37)") - }, - Vo: u(), - aU: function(a) { - var b, c; - b = a.style; - c = Va(a).position; - "absolute" != c && "relative" != c && (b.position = "relative", - b.zIndex = 0); - if ("absolute" === c || "relative" === c) - if (a = Va(a).zIndex, - !a || "auto" === a) - b.zIndex = 0 - }, - OX: w("bo"), - Xb: w("Za"), - pY: w("jw"), - wO: w("jw"), - ga: w("Lb"), - Ea: w("Da"), - fa: w("Mc"), - jj: w("jl"), - I3: function() { - return this.U1 || [] - }, - D3: w("xT"), - ft: w("Ke"), - Ny: function(a) { - a !== this.Ke && (this.Ke = a, - this.dispatchEvent(new P("onscene_type_changed"))) - }, - vc: function(a, b, c) { - "object" === typeof b && (c = b, - b = l); - a != this.Za && (this.ul = this.Za, - this.vl = this.Lb, - this.Za = a, - this.Ke = b || "street", - this.Lb = s, - c && c.pov && this.Pc(c.pov)) - }, - sa: function(a) { - a.pb(this.Lb) || (this.ul = this.Za, - this.vl = this.Lb, - this.Lb = a, - this.Za = s) - }, - Pc: function(a) { - a && (this.Da = a, - a = this.Da.pitch, - a > this.Vj ? a = this.Vj : a < this.Xj && (a = this.Xj), - this.Br = q, - this.Da.pitch = a) - }, - H_: function(a, b) { - this.Xj = 0 <= a ? 0 : a; - this.Vj = 0 >= b ? 0 : b - }, - Qc: function(a) { - a != this.Mc && (a > ae && (a = ae), - a < be && (a = be), - a != this.Mc && (this.Mc = a), - "cssRender" === this.dk && this.Pc(this.Da)) - }, - GB: function() { - if (this.B) - for (var a = this.B.Hx(), b = 0; b < a.length; b++) - (a[b]instanceof U || a[b]instanceof uc) && a[b].point && this.ya.push(a[b]) - }, - GF: ba("B"), - au: function(a) { - this.Of = a || "none" - }, - Qk: function(a) { - for (var b in a) { - if ("object" == typeof a[b]) - for (var c in a[b]) - this.j[b][c] = a[b][c]; - else - this.j[b] = a[b]; - a.closeControl === q && (this.j.forceCloseControl = q); - a.closeControl === t && (this.j.forceCloseControl = t); - switch (b) { - case "linksControl": - this.dispatchEvent(new P("onlinks_visible_changed")); - break; - case "clickOnRoad": - this.dispatchEvent(new P("onclickonroad_changed")); - break; - case "navigationControl": - this.dispatchEvent(new P("onnavigation_visible_changed")); - break; - case "indoorSceneSwitchControl": - this.dispatchEvent(new P("onindoor_default_switch_mode_changed")); - break; - case "albumsControl": - this.dispatchEvent(new P("onalbums_visible_changed")); - break; - case "albumsControlOptions": - this.dispatchEvent(new P("onalbums_options_changed")); - break; - case "copyrightControlOptions": - this.dispatchEvent(new P("oncopyright_options_changed")); - break; - case "closeControl": - this.dispatchEvent(new P("onclose_options_changed")); - break; - case "indoorExitControl": - this.dispatchEvent(new P("onindoorexit_options_changed")); - break; - case "indoorFloorControl": - this.dispatchEvent(new P("onindoorfloor_options_changed")) - } - } - }, - Ek: function() { - this.Dl.style.visibility = "hidden" - }, - Ry: function() { - this.Dl.style.visibility = "visible" - }, - cX: function() { - this.j.enableScrollWheelZoom = q - }, - NW: function() { - this.j.enableScrollWheelZoom = t - }, - show: function() { - this.j.visible = q - }, - U: function() { - this.j.visible = t - }, - er: function() { - return Ua() && !H() && "javascript" != this.j.panoramaRenderer ? "flashRender" : !H() && Ob() ? "cvsRender" : "cssRender" - }, - Ga: function(a) { - this.Je[a.ld] = a - }, - Qb: function(a) { - delete this.Je[a] - }, - kE: function() { - return this.j.visible - }, - fh: function() { - return new O(this.C.clientWidth,this.C.clientHeight) - }, - La: w("C"), - yL: function() { - var a = B.vg("baidumap", "?") - , b = this.Xb(); - if (b) { - var b = { - panotype: this.ft(), - heading: this.Ea().heading, - pitch: this.Ea().pitch, - pid: b, - panoid: b, - from: "api" - }, c; - for (c in b) - a += c + "=" + b[c] + "&" - } - return a.slice(0, -1) - }, - Px: function() { - this.Qk({ - copyrightControlOptions: { - logoVisible: t - } - }) - }, - NF: function() { - this.Qk({ - copyrightControlOptions: { - logoVisible: q - } - }) - }, - aC: function(a) { - function b(a, b) { - return function() { - a.xr.push({ - iN: b, - hN: arguments - }) - } - } - for (var c = a.getPanoMethodList(), e = "", f = 0, g = c.length; f < g; f++) - e = c[f], - this[e] = b(this, e); - this.Sg.push(a) - }, - rF: function(a) { - for (var b = this.Sg.length; b--; ) - this.Sg[b] === a && this.Sg.splice(b, 1) - }, - FF: u() - }); - var ce = Oa.prototype; - T(ce, { - setId: ce.vc, - setPosition: ce.sa, - setPov: ce.Pc, - setZoom: ce.Qc, - setOptions: ce.Qk, - getId: ce.Xb, - getPosition: ce.ga, - getPov: ce.Ea, - getZoom: ce.fa, - getLinks: ce.OX, - getBaiduMapUrl: ce.yL, - hideMapLogo: ce.Px, - showMapLogo: ce.NF, - enableDoubleClickZoom: ce.W2, - disableDoubleClickZoom: ce.J2, - enableScrollWheelZoom: ce.cX, - disableScrollWheelZoom: ce.NW, - show: ce.show, - hide: ce.U, - addPlugin: ce.aC, - removePlugin: ce.rF, - getVisible: ce.kE, - addOverlay: ce.Ga, - removeOverlay: ce.Qb, - getSceneType: ce.ft, - setPanoramaPOIType: ce.au, - exitInter: ce.Vo, - setInteractiveState: ce.FF - }); - T(window, { - BMAP_PANORAMA_POI_HOTEL: "hotel", - BMAP_PANORAMA_POI_CATERING: "catering", - BMAP_PANORAMA_POI_MOVIE: "movie", - BMAP_PANORAMA_POI_TRANSIT: "transit", - BMAP_PANORAMA_POI_INDOOR_SCENE: "indoor_scene", - BMAP_PANORAMA_POI_NONE: "none", - BMAP_PANORAMA_INDOOR_SCENE: "inter", - BMAP_PANORAMA_STREET_SCENE: "street" - }); - function de() { - z.lang.Ca.call(this); - this.ld = "PanoramaOverlay_" + this.aa; - this.P = s; - this.Qa = q - } - z.lang.ta(de, z.lang.Ca, "PanoramaOverlayBase"); - z.extend(de.prototype, { - E3: w("ld"), - na: function() { - aa("initialize\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - remove: function() { - aa("remove\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - Nf: function() { - aa("_setOverlayProperty\u65b9\u6cd5\u672a\u5b9e\u73b0") - } - }); - function ee(a, b) { - de.call(this); - var c = { - position: s, - altitude: 2, - displayDistance: q - }, b = b || {}, e; - for (e in b) - c[e] = b[e]; - this.Lb = c.position; - this.Ij = a; - this.xq = c.altitude; - this.zR = c.displayDistance; - this.UF = c.color; - this.kM = c.hoverColor; - this.backgroundColor = c.backgroundColor; - this.jK = c.backgroundHoverColor; - this.borderColor = c.borderColor; - this.oK = c.borderHoverColor; - this.fontSize = c.fontSize; - this.padding = c.padding; - this.pE = c.imageUrl; - this.size = c.size; - this.xe = c.image; - this.width = c.width; - this.height = c.height; - this.HY = c.imageData; - this.borderWidth = c.borderWidth - } - z.lang.ta(ee, de, "PanoramaLabel"); - z.extend(ee.prototype, { - j3: w("borderWidth"), - getImageData: w("HY"), - zm: w("UF"), - y3: w("kM"), - f3: w("backgroundColor"), - g3: w("jK"), - h3: w("borderColor"), - i3: w("oK"), - w3: w("fontSize"), - F3: w("padding"), - z3: w("pE"), - cb: w("size"), - zx: w("xe"), - sa: function(a) { - this.Lb = a; - this.Nf("position", a) - }, - ga: w("Lb"), - dd: function(a) { - this.Ij = a; - this.Nf("content", a) - }, - xk: w("Ij"), - AF: function(a) { - this.xq = a; - this.Nf("altitude", a) - }, - Yo: w("xq"), - Ea: function() { - var a = this.ga() - , b = s - , c = s; - this.P && (c = this.P.ga()); - if (a && c) - if (a.pb(c)) - b = this.P.Ea(); - else { - b = {}; - b.heading = fe(a.lng - c.lng, a.lat - c.lat) || 0; - var a = b - , c = this.Yo() - , e = this.Xn(); - a.pitch = Math.round(180 * (Math.atan(c / e) / Math.PI)) || 0 - } - return b - }, - Xn: function() { - var a = 0, b, c; - this.P && (b = this.P.ga(), - (c = this.ga()) && !c.pb(b) && (a = S.$o(b, c))); - return a - }, - U: function() { - aa("hide\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - show: function() { - aa("show\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - Nf: u() - }); - var ge = ee.prototype; - T(ge, { - setPosition: ge.sa, - getPosition: ge.ga, - setContent: ge.dd, - getContent: ge.xk, - setAltitude: ge.AF, - getAltitude: ge.Yo, - getPov: ge.Ea, - show: ge.show, - hide: ge.U - }); - function he(a, b) { - de.call(this); - var c = { - icon: "", - title: "", - panoInfo: s, - altitude: 2 - }, b = b || {}, e; - for (e in b) - c[e] = b[e]; - this.Lb = a; - this.gI = c.icon; - this.DJ = c.title; - this.xq = c.altitude; - this.OT = c.panoInfo; - this.Da = { - heading: 0, - pitch: 0 - } - } - z.lang.ta(he, de, "PanoramaMarker"); - z.extend(he.prototype, { - sa: function(a) { - this.Lb = a; - this.Nf("position", a) - }, - ga: w("Lb"), - Ec: function(a) { - this.DJ = a; - this.Nf("title", a) - }, - gp: w("DJ"), - Rb: function(a) { - this.gI = icon; - this.Nf("icon", a) - }, - ap: w("gI"), - AF: function(a) { - this.xq = a; - this.Nf("altitude", a) - }, - Yo: w("xq"), - $D: w("OT"), - Ea: function() { - var a = s; - if (this.P) { - var a = this.P.ga() - , b = this.ga() - , a = fe(b.lng - a.lng, b.lat - a.lat); - isNaN(a) && (a = 0); - a = { - heading: a, - pitch: 0 - } - } else - a = this.Da; - return a - }, - Nf: u() - }); - var ie = he.prototype; - T(ie, { - setPosition: ie.sa, - getPosition: ie.ga, - setTitle: ie.Ec, - getTitle: ie.gp, - setAltitude: ie.AF, - getAltitude: ie.Yo, - getPanoInfo: ie.$D, - getIcon: ie.ap, - setIcon: ie.Rb, - getPov: ie.Ea - }); - function fe(a, b) { - var c = 0; - if (0 !== a && 0 !== b) { - var c = 180 * (Math.atan(a / b) / Math.PI) - , e = 0; - 0 < a && 0 > b && (e = 90); - 0 > a && 0 > b && (e = 180); - 0 > a && 0 < b && (e = 270); - c = (c + 90) % 90 + e - } else - 0 === a ? c = 0 > b ? 180 : 0 : 0 === b && (c = 0 < a ? 90 : 270); - return Math.round(c) - } - function Na(a) { - if ("boolean" === typeof je) - return je; - if (a === t || !window.WebGLRenderingContext) - return je = t; - if (z.platform.Jm) { - a = 0; - try { - a = navigator.userAgent.split("Android ")[1].charAt(0) - } catch (b) {} - if (5 > a) - return je = t - } - var a = document.createElement("canvas") - , c = s; - try { - c = a.getContext("webgl") - } catch (e) { - je = t - } - return je = c === s ? t : q - } - var je; - function ke() { - if ("boolean" === typeof le) - return le; - le = q; - if (z.platform.zE) - return q; - var a = navigator.userAgent; - return -1 < a.indexOf("Chrome") || -1 < a.indexOf("SAMSUNG-GT-I9508") ? q : le = t - } - var le; - function ec(a, b) { - this.P = a || s; - var c = this; - c.P && c.ba(); - K.load("pservice", function() { - c.SQ() - }); - "api" == (b || {}).of ? Ra(Fa) : Ra(Ga); - this.xd = { - getPanoramaById: [], - getPanoramaByLocation: [], - getVisiblePOIs: [], - getRecommendPanosById: [], - getPanoramaVersions: [], - checkPanoSupportByCityCode: [], - getPanoramaByPOIId: [], - getCopyrightProviders: [] - } - } - B.Tm(function(a) { - "flashRender" !== a.er() && new ec(a,{ - of: "api" - }) - }); - z.extend(ec.prototype, { - ba: function() { - function a(a) { - if (a) { - if (a.id != b.jw) { - b.wO(a.id); - b.ea = a; - ke() || b.dispatchEvent(new P("onthumbnail_complete")); - b.Za != s && (b.vl = b._position); - for (var c in a) - if (a.hasOwnProperty(c)) - switch (b["_" + c] = a[c], - c) { - case "position": - b.Lb = a[c]; - break; - case "id": - b.Za = a[c]; - break; - case "links": - b.bo = a[c]; - break; - case "zoom": - b.Mc = a[c] - } - if (b.vl) { - var g = b.vl - , i = b._position; - c = g.lat; - var k = i.lat - , m = Pb(k - c) - , g = Pb(i.lng - g.lng); - c = Math.sin(m / 2) * Math.sin(m / 2) + Math.cos(Pb(c)) * Math.cos(Pb(k)) * Math.sin(g / 2) * Math.sin(g / 2); - b.wH = 6371E3 * 2 * Math.atan2(Math.sqrt(c), Math.sqrt(1 - c)) - } - c = new P("ondataload"); - c.data = a; - b.dispatchEvent(c); - b.dispatchEvent(new P("onposition_changed")); - b.dispatchEvent(new P("onlinks_changed")); - b.dispatchEvent(new P("oncopyright_changed"), { - copyright: a.copyright - }); - a.bm && b.j.closeControl ? z.D.show(b.WR) : z.D.U(b.WR) - } - } else - b.Za = b.ul, - b.Lb = b.vl, - b.dispatchEvent(new P("onnoresult")) - } - var b = this.P - , c = this; - b.addEventListener("id_changed", function() { - c.ep(b.Xb(), a) - }); - b.addEventListener("iid_changed", function() { - c.Tg(ec.el + "qt=idata&iid=" + b.CA + "&fn=", function(b) { - if (b && b.result && 0 == b.result.error) { - var b = b.content[0].interinfo - , f = {}; - f.bm = b.BreakID; - for (var g = b.Defaultfloor, i = s, k = 0; k < b.Floors.length; k++) - if (b.Floors[k].Floor == g) { - i = b.Floors[k]; - break - } - f.id = i.StartID || i.Points[0].PID; - c.ep(f.id, a, f) - } - }) - }); - b.addEventListener("position_changed_inner", function() { - c.kj(b.ga(), a) - }) - }, - ep: function(a, b) { - this.xd.getPanoramaById.push(arguments) - }, - kj: function(a, b, c) { - this.xd.getPanoramaByLocation.push(arguments) - }, - lE: function(a, b, c, e) { - this.xd.getVisiblePOIs.push(arguments) - }, - Kx: function(a, b) { - this.xd.getRecommendPanosById.push(arguments) - }, - Jx: function(a) { - this.xd.getPanoramaVersions.push(arguments) - }, - nC: function(a, b) { - this.xd.checkPanoSupportByCityCode.push(arguments) - }, - Ix: function(a, b) { - this.xd.getPanoramaByPOIId.push(arguments) - }, - CL: function(a) { - this.xd.getCopyrightProviders.push(arguments) - } - }); - var ne = ec.prototype; - T(ne, { - getPanoramaById: ne.ep, - getPanoramaByLocation: ne.kj, - getPanoramaByPOIId: ne.Ix - }); - function dc(a) { - Mc.call(this); - "api" == (a || {}).of ? Ra(Aa) : Ra(Ba) - } - dc.OG = B.vg("pano", "tile/"); - dc.prototype = new Mc; - dc.prototype.getTilesUrl = function(a, b) { - var c = dc.OG[(a.x + a.y) % dc.OG.length] + "?udt=20150114&qt=tile&styles=pl&x=" + a.x + "&y=" + a.y + "&z=" + b; - z.ca.ia && 6 >= z.ca.ia && (c += "&color_dep=32"); - return c - } - ; - dc.prototype.zt = ca(q); - oe.Wd = new S; - function oe() {} - z.extend(oe, { - OW: function(a, b, c) { - c = z.lang.Nc(c); - b = { - data: b - }; - "position_changed" == a && (b.data = oe.Wd.xj(new Q(b.data.mercatorX,b.data.mercatorY))); - c.dispatchEvent(new P("on" + a), b) - } - }); - var pe = oe; - T(pe, { - dispatchFlashEvent: pe.OW - }); - var qe = { - KP: 50 - }; - qe.Ou = B.vg("pano")[0]; - qe.Mu = { - width: 220, - height: 60 - }; - z.extend(qe, { - tM: function(a, b, c, e) { - if (!b || !c || !c.lngLat || !c.panoInstance) - e(); - else { - this.jo === l && (this.jo = new ec(s,{ - of: "api" - })); - var f = this; - this.jo.nC(b, function(b) { - b ? f.jo.kj(c.lngLat, qe.KP, function(b) { - if (b && b.id) { - var g = b.id - , m = b.rh - , b = b.th - , n = ec.Wd.kh(c.lngLat) - , o = f.AS(n, { - x: m, - y: b - }) - , m = f.PL(g, o, 0, qe.Mu.width, qe.Mu.height); - a.content = f.BS(a.content, m, c.titleTip, c.beforeDomId); - a.addEventListener("open", function() { - ia.M(z.Fc("infoWndPano"), "click", function() { - c.panoInstance.vc(g); - c.panoInstance.show(); - c.panoInstance.Pc({ - heading: o, - pitch: 0 - }) - }) - }) - } - e() - }) : e() - }) - } - }, - BS: function(a, b, c, e) { - var c = c || "", f; - !e || !a.split(e)[0] ? (e = a, - a = "") : (e = a.split(e)[0], - f = e.lastIndexOf("<"), - e = a.substring(0, f), - a = a.substring(f)); - f = []; - var g = qe.Mu.width - , i = qe.Mu.height; - f.push(e); - f.push("
    "); - f.push("" + c + "\u5916\u666f"); - f.push("
    \u8fdb\u5165\u5168\u666f>>"); - f.push("
    "); - f.push(a); - return f.join("") - }, - AS: function(a, b) { - var c = 90 - 180 * Math.atan2(a.y - b.y, a.x - b.x) / Math.PI; - 0 > c && (c += 360); - return c - }, - PL: function(a, b, c, e, f) { - var g = { - panoId: a, - panoHeading: b || 0, - panoPitch: c || 0, - width: e, - height: f - }; - return (qe.Ou + "?qt=pr3d&fovy=75&quality=80&panoid={panoId}&heading={panoHeading}&pitch={panoPitch}&width={width}&height={height}").replace(/\{(.*?)\}/g, function(a, b) { - return g[b] - }) - } - }); - var te = document, ue = Math, ve = te.createElement("div").style, we; - a: { - for (var xe = ["t", "webkitT", "MozT", "msT", "OT"], ye, ze = 0, Ae = xe.length; ze < Ae; ze++) - if (ye = xe[ze] + "ransform", - ye in ve) { - we = xe[ze].substr(0, xe[ze].length - 1); - break a - } - we = t - } - var Be = we ? "-" + we.toLowerCase() + "-" : "" - , De = Ce("transform") - , Ee = Ce("transitionProperty") - , Fe = Ce("transitionDuration") - , Ge = Ce("transformOrigin") - , He = Ce("transitionTimingFunction") - , Ie = Ce("transitionDelay") - , Sd = /android/gi.test(navigator.appVersion) - , Je = /iphone|ipad/gi.test(navigator.appVersion) - , Ke = /hp-tablet/gi.test(navigator.appVersion) - , Le = Ce("perspective")in ve - , Me = "ontouchstart"in window && !Ke - , Ne = we !== t - , Oe = Ce("transition")in ve - , Pe = "onorientationchange"in window ? "orientationchange" : "resize" - , Qe = Me ? "touchstart" : "mousedown" - , Re = Me ? "touchmove" : "mousemove" - , Se = Me ? "touchend" : "mouseup" - , Te = Me ? "touchcancel" : "mouseup" - , Ue = we === t ? t : { - "": "transitionend", - webkit: "webkitTransitionEnd", - Moz: "transitionend", - O: "otransitionend", - ms: "MSTransitionEnd" - }[we] - , Ve = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(a) { - return setTimeout(a, 1) - } - , We = window.cancelRequestAnimationFrame || window.U5 || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || clearTimeout - , Xe = Le ? " translateZ(0)" : ""; - function Ye(a, b) { - var c = this, e; - c.zn = "object" == typeof a ? a : te.getElementById(a); - c.zn.style.overflow = "hidden"; - c.Nb = c.zn.children[0]; - c.options = { - kp: q, - xn: q, - x: 0, - y: 0, - Go: q, - LV: t, - iy: q, - OE: q, - Yk: q, - wi: t, - n0: 0, - Pw: t, - Mx: q, - ii: q, - xi: q, - AD: Sd, - Qx: Je, - kX: Je && Le, - xF: "", - zoom: t, - $k: 1, - aq: 4, - QW: 2, - qP: "scroll", - iu: t, - Uy: 1, - CN: s, - uN: function(a) { - a.preventDefault() - }, - FN: s, - tN: s, - EN: s, - sN: s, - oy: s, - GN: s, - xN: s, - zp: s, - HN: s, - yp: s - }; - for (e in b) - c.options[e] = b[e]; - c.x = c.options.x; - c.y = c.options.y; - c.options.Yk = Ne && c.options.Yk; - c.options.ii = c.options.kp && c.options.ii; - c.options.xi = c.options.xn && c.options.xi; - c.options.zoom = c.options.Yk && c.options.zoom; - c.options.wi = Oe && c.options.wi; - c.options.zoom && Sd && (Xe = ""); - c.Nb.style[Ee] = c.options.Yk ? Be + "transform" : "top left"; - c.Nb.style[Fe] = "0"; - c.Nb.style[Ge] = "0 0"; - c.options.wi && (c.Nb.style[He] = "cubic-bezier(0.33,0.66,0.66,1)"); - c.options.Yk ? c.Nb.style[De] = "translate(" + c.x + "px," + c.y + "px)" + Xe : c.Nb.style.cssText += ";position:absolute;top:" + c.y + "px;left:" + c.x + "px"; - c.options.wi && (c.options.AD = q); - c.refresh(); - c.ba(Pe, window); - c.ba(Qe); - !Me && "none" != c.options.qP && (c.ba("DOMMouseScroll"), - c.ba("mousewheel")); - c.options.Pw && (c.XV = setInterval(function() { - c.PQ() - }, 500)); - this.options.Mx && (Event.prototype.stopImmediatePropagation || (document.body.removeEventListener = function(a, b, c) { - var e = Node.prototype.removeEventListener; - a === "click" ? e.call(document.body, a, b.iM || b, c) : e.call(document.body, a, b, c) - } - , - document.body.addEventListener = function(a, b, c) { - var e = Node.prototype.addEventListener; - a === "click" ? e.call(document.body, a, b.iM || (b.iM = function(a) { - a.RZ || b(a) - } - ), c) : e.call(document.body, a, b, c) - } - ), - c.ba("click", document.body, q)) - } - Ye.prototype = { - enabled: q, - x: 0, - y: 0, - yj: [], - scale: 1, - HC: 0, - IC: 0, - We: [], - wf: [], - fC: s, - cz: 0, - handleEvent: function(a) { - switch (a.type) { - case Qe: - if (!Me && 0 !== a.button) - break; - this.aw(a); - break; - case Re: - this.zT(a); - break; - case Se: - case Te: - this.lv(a); - break; - case Pe: - this.zB(); - break; - case "DOMMouseScroll": - case "mousewheel": - this.eV(a); - break; - case Ue: - this.$U(a); - break; - case "click": - this.$Q(a) - } - }, - PQ: function() { - !this.oh && (!this.al && !(this.Yl || this.Ky == this.Nb.offsetWidth * this.scale && this.Ip == this.Nb.offsetHeight * this.scale)) && this.refresh() - }, - Sv: function(a) { - var b; - this[a + "Scrollbar"] ? (this[a + "ScrollbarWrapper"] || (b = te.createElement("div"), - this.options.xF ? b.className = this.options.xF + a.toUpperCase() : b.style.cssText = "position:absolute;z-index:100;" + ("h" == a ? "height:7px;bottom:1px;left:2px;right:" + (this.xi ? "7" : "2") + "px" : "width:7px;bottom:" + (this.ii ? "7" : "2") + "px;top:2px;right:1px"), - b.style.cssText += ";pointer-events:none;" + Be + "transition-property:opacity;" + Be + "transition-duration:" + (this.options.kX ? "350ms" : "0") + ";overflow:hidden;opacity:" + (this.options.Qx ? "0" : "1"), - this.zn.appendChild(b), - this[a + "ScrollbarWrapper"] = b, - b = te.createElement("div"), - this.options.xF || (b.style.cssText = "position:absolute;z-index:100;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);" + Be + "background-clip:padding-box;" + Be + "box-sizing:border-box;" + ("h" == a ? "height:100%" : "width:100%") + ";" + Be + "border-radius:3px;border-radius:3px"), - b.style.cssText += ";pointer-events:none;" + Be + "transition-property:" + Be + "transform;" + Be + "transition-timing-function:cubic-bezier(0.33,0.66,0.66,1);" + Be + "transition-duration:0;" + Be + "transform: translate(0,0)" + Xe, - this.options.wi && (b.style.cssText += ";" + Be + "transition-timing-function:cubic-bezier(0.33,0.66,0.66,1)"), - this[a + "ScrollbarWrapper"].appendChild(b), - this[a + "ScrollbarIndicator"] = b), - "h" == a ? (this.fM = this.gM.clientWidth, - this.yY = ue.max(ue.round(this.fM * this.fM / this.Ky), 8), - this.xY.style.width = this.yY + "px") : (this.iP = this.jP.clientHeight, - this.L0 = ue.max(ue.round(this.iP * this.iP / this.Ip), 8), - this.K0.style.height = this.L0 + "px"), - this.AB(a, q)) : this[a + "ScrollbarWrapper"] && (Ne && (this[a + "ScrollbarIndicator"].style[De] = ""), - this[a + "ScrollbarWrapper"].parentNode.removeChild(this[a + "ScrollbarWrapper"]), - this[a + "ScrollbarWrapper"] = s, - this[a + "ScrollbarIndicator"] = s) - }, - zB: function() { - var a = this; - setTimeout(function() { - a.refresh() - }, Sd ? 200 : 0) - }, - Ar: function(a, b) { - this.al || (a = this.kp ? a : 0, - b = this.xn ? b : 0, - this.options.Yk ? this.Nb.style[De] = "translate(" + a + "px," + b + "px) scale(" + this.scale + ")" + Xe : (a = ue.round(a), - b = ue.round(b), - this.Nb.style.left = a + "px", - this.Nb.style.top = b + "px"), - this.x = a, - this.y = b, - this.AB("h"), - this.AB("v")) - }, - AB: function(a, b) { - var c = "h" == a ? this.x : this.y; - this[a + "Scrollbar"] && (c *= this[a + "ScrollbarProp"], - 0 > c ? (this.options.AD || (c = this[a + "ScrollbarIndicatorSize"] + ue.round(3 * c), - 8 > c && (c = 8), - this[a + "ScrollbarIndicator"].style["h" == a ? "width" : "height"] = c + "px"), - c = 0) : c > this[a + "ScrollbarMaxScroll"] && (this.options.AD ? c = this[a + "ScrollbarMaxScroll"] : (c = this[a + "ScrollbarIndicatorSize"] - ue.round(3 * (c - this[a + "ScrollbarMaxScroll"])), - 8 > c && (c = 8), - this[a + "ScrollbarIndicator"].style["h" == a ? "width" : "height"] = c + "px", - c = this[a + "ScrollbarMaxScroll"] + (this[a + "ScrollbarIndicatorSize"] - c))), - this[a + "ScrollbarWrapper"].style[Ie] = "0", - this[a + "ScrollbarWrapper"].style.opacity = b && this.options.Qx ? "0" : "1", - this[a + "ScrollbarIndicator"].style[De] = "translate(" + ("h" == a ? c + "px,0)" : "0," + c + "px)") + Xe) - }, - $Q: function(a) { - if (a.XR === q) - return this.YB = a.target, - this.sx = Date.now(), - q; - if (this.YB && this.sx) { - if (600 < Date.now() - this.sx) - return this.sx = this.YB = s, - q - } else { - for (var b = a.target; b != this.Nb && b != document.body; ) - b = b.parentNode; - if (b == document.body) - return q - } - for (b = a.target; 1 != b.nodeType; ) - b = b.parentNode; - b = b.tagName.toLowerCase(); - if ("select" != b && "input" != b && "textarea" != b) - return a.stopImmediatePropagation ? a.stopImmediatePropagation() : a.RZ = q, - a.stopPropagation(), - a.preventDefault(), - this.sx = this.YB = s, - t - }, - aw: function(a) { - var b = Me ? a.touches[0] : a, c, e; - if (this.enabled) { - this.options.uN && this.options.uN.call(this, a); - (this.options.wi || this.options.zoom) && this.FJ(0); - this.al = this.Yl = this.oh = t; - this.RC = this.QC = this.vw = this.uw = this.XC = this.WC = 0; - this.options.zoom && (Me && 1 < a.touches.length) && (e = ue.abs(a.touches[0].pageX - a.touches[1].pageX), - c = ue.abs(a.touches[0].pageY - a.touches[1].pageY), - this.p0 = ue.sqrt(e * e + c * c), - this.qy = ue.abs(a.touches[0].pageX + a.touches[1].pageX - 2 * this.iG) / 2 - this.x, - this.ty = ue.abs(a.touches[0].pageY + a.touches[1].pageY - 2 * this.jG) / 2 - this.y, - this.options.zp && this.options.zp.call(this, a)); - if (this.options.iy && (this.options.Yk ? (c = getComputedStyle(this.Nb, s)[De].replace(/[^0-9\-.,]/g, "").split(","), - e = +(c[12] || c[4]), - c = +(c[13] || c[5])) : (e = +getComputedStyle(this.Nb, s).left.replace(/[^0-9-]/g, ""), - c = +getComputedStyle(this.Nb, s).top.replace(/[^0-9-]/g, "")), - e != this.x || c != this.y)) - this.options.wi ? this.$d(Ue) : We(this.fC), - this.yj = [], - this.Ar(e, c), - this.options.oy && this.options.oy.call(this); - this.ww = this.x; - this.xw = this.y; - this.lu = this.x; - this.mu = this.y; - this.rh = b.pageX; - this.th = b.pageY; - this.startTime = a.timeStamp || Date.now(); - this.options.FN && this.options.FN.call(this, a); - this.ba(Re, window); - this.ba(Se, window); - this.ba(Te, window) - } - }, - zT: function(a) { - var b = Me ? a.touches[0] : a - , c = b.pageX - this.rh - , e = b.pageY - this.th - , f = this.x + c - , g = this.y + e - , i = a.timeStamp || Date.now(); - this.options.tN && this.options.tN.call(this, a); - if (this.options.zoom && Me && 1 < a.touches.length) - f = ue.abs(a.touches[0].pageX - a.touches[1].pageX), - g = ue.abs(a.touches[0].pageY - a.touches[1].pageY), - this.o0 = ue.sqrt(f * f + g * g), - this.al = q, - b = 1 / this.p0 * this.o0 * this.scale, - b < this.options.$k ? b = 0.5 * this.options.$k * Math.pow(2, b / this.options.$k) : b > this.options.aq && (b = 2 * this.options.aq * Math.pow(0.5, this.options.aq / b)), - this.rp = b / this.scale, - f = this.qy - this.qy * this.rp + this.x, - g = this.ty - this.ty * this.rp + this.y, - this.Nb.style[De] = "translate(" + f + "px," + g + "px) scale(" + b + ")" + Xe, - this.options.HN && this.options.HN.call(this, a); - else { - this.rh = b.pageX; - this.th = b.pageY; - if (0 < f || f < this.he) - f = this.options.Go ? this.x + c / 2 : 0 <= f || 0 <= this.he ? 0 : this.he; - if (g > this.sf || g < this.qd) - g = this.options.Go ? this.y + e / 2 : g >= this.sf || 0 <= this.qd ? this.sf : this.qd; - this.WC += c; - this.XC += e; - this.uw = ue.abs(this.WC); - this.vw = ue.abs(this.XC); - 6 > this.uw && 6 > this.vw || (this.options.OE && (this.uw > this.vw + 5 ? (g = this.y, - e = 0) : this.vw > this.uw + 5 && (f = this.x, - c = 0)), - this.oh = q, - this.Ar(f, g), - this.QC = 0 < c ? -1 : 0 > c ? 1 : 0, - this.RC = 0 < e ? -1 : 0 > e ? 1 : 0, - 300 < i - this.startTime && (this.startTime = i, - this.lu = this.x, - this.mu = this.y), - this.options.EN && this.options.EN.call(this, a)) - } - }, - lv: function(a) { - if (!(Me && 0 !== a.touches.length)) { - var b = this, c = Me ? a.changedTouches[0] : a, e, f, g = { - Ba: 0, - time: 0 - }, i = { - Ba: 0, - time: 0 - }, k = (a.timeStamp || Date.now()) - b.startTime; - e = b.x; - f = b.y; - b.$d(Re, window); - b.$d(Se, window); - b.$d(Te, window); - b.options.sN && b.options.sN.call(b, a); - if (b.al) - e = b.scale * b.rp, - e = Math.max(b.options.$k, e), - e = Math.min(b.options.aq, e), - b.rp = e / b.scale, - b.scale = e, - b.x = b.qy - b.qy * b.rp + b.x, - b.y = b.ty - b.ty * b.rp + b.y, - b.Nb.style[Fe] = "200ms", - b.Nb.style[De] = "translate(" + b.x + "px," + b.y + "px) scale(" + b.scale + ")" + Xe, - b.al = t, - b.refresh(), - b.options.yp && b.options.yp.call(b, a); - else { - if (b.oh) { - if (300 > k && b.options.iy) { - g = e ? b.BI(e - b.lu, k, -b.x, b.Ky - b.Cu + b.x, b.options.Go ? b.Cu : 0) : g; - i = f ? b.BI(f - b.mu, k, -b.y, 0 > b.qd ? b.Ip - b.An + b.y - b.sf : 0, b.options.Go ? b.An : 0) : i; - e = b.x + g.Ba; - f = b.y + i.Ba; - if (0 < b.x && 0 < e || b.x < b.he && e < b.he) - g = { - Ba: 0, - time: 0 - }; - if (b.y > b.sf && f > b.sf || b.y < b.qd && f < b.qd) - i = { - Ba: 0, - time: 0 - } - } - g.Ba || i.Ba ? (c = ue.max(ue.max(g.time, i.time), 10), - b.options.iu && (g = e - b.ww, - i = f - b.xw, - ue.abs(g) < b.options.Uy && ue.abs(i) < b.options.Uy ? b.scrollTo(b.ww, b.xw, 200) : (g = b.vJ(e, f), - e = g.x, - f = g.y, - c = ue.max(g.time, c))), - b.scrollTo(ue.round(e), ue.round(f), c)) : b.options.iu ? (g = e - b.ww, - i = f - b.xw, - ue.abs(g) < b.options.Uy && ue.abs(i) < b.options.Uy ? b.scrollTo(b.ww, b.xw, 200) : (g = b.vJ(b.x, b.y), - (g.x != b.x || g.y != b.y) && b.scrollTo(g.x, g.y, g.time))) : b.lo(200) - } else { - if (Me) - if (b.VK && b.options.zoom) - clearTimeout(b.VK), - b.VK = s, - b.options.zp && b.options.zp.call(b, a), - b.zoom(b.rh, b.th, 1 == b.scale ? b.options.QW : 1), - b.options.yp && setTimeout(function() { - b.options.yp.call(b, a) - }, 200); - else if (this.options.Mx) { - for (e = c.target; 1 != e.nodeType; ) - e = e.parentNode; - f = e.tagName.toLowerCase(); - "select" != f && "input" != f && "textarea" != f ? (f = te.createEvent("MouseEvents"), - f.initMouseEvent("click", q, q, a.view, 1, c.screenX, c.screenY, c.clientX, c.clientY, a.ctrlKey, a.altKey, a.shiftKey, a.metaKey, 0, s), - f.XR = q, - e.dispatchEvent(f)) : e.focus() - } - b.lo(400) - } - b.options.GN && b.options.GN.call(b, a) - } - } - }, - lo: function(a) { - var b = 0 <= this.x ? 0 : this.x < this.he ? this.he : this.x - , c = this.y >= this.sf || 0 < this.qd ? this.sf : this.y < this.qd ? this.qd : this.y; - if (b == this.x && c == this.y) { - if (this.oh && (this.oh = t, - this.options.oy && this.options.oy.call(this)), - this.ii && this.options.Qx && ("webkit" == we && (this.gM.style[Ie] = "300ms"), - this.gM.style.opacity = "0"), - this.xi && this.options.Qx) - "webkit" == we && (this.jP.style[Ie] = "300ms"), - this.jP.style.opacity = "0" - } else - this.scrollTo(b, c, a || 0) - }, - eV: function(a) { - var b = this, c, e; - if ("wheelDeltaX"in a) - c = a.wheelDeltaX / 12, - e = a.wheelDeltaY / 12; - else if ("wheelDelta"in a) - c = e = a.wheelDelta / 12; - else if ("detail"in a) - c = e = 3 * -a.detail; - else - return; - if ("zoom" == b.options.qP) { - if (e = b.scale * Math.pow(2, 1 / 3 * (e ? e / Math.abs(e) : 0)), - e < b.options.$k && (e = b.options.$k), - e > b.options.aq && (e = b.options.aq), - e != b.scale) - !b.cz && b.options.zp && b.options.zp.call(b, a), - b.cz++, - b.zoom(a.pageX, a.pageY, e, 400), - setTimeout(function() { - b.cz--; - !b.cz && b.options.yp && b.options.yp.call(b, a) - }, 400) - } else - c = b.x + c, - e = b.y + e, - 0 < c ? c = 0 : c < b.he && (c = b.he), - e > b.sf ? e = b.sf : e < b.qd && (e = b.qd), - 0 > b.qd && b.scrollTo(c, e, 0) - }, - $U: function(a) { - a.target == this.Nb && (this.$d(Ue), - this.MB()) - }, - MB: function() { - var a = this, b = a.x, c = a.y, e = Date.now(), f, g, i; - a.Yl || (a.yj.length ? (f = a.yj.shift(), - f.x == b && f.y == c && (f.time = 0), - a.Yl = q, - a.oh = q, - a.options.wi) ? (a.FJ(f.time), - a.Ar(f.x, f.y), - a.Yl = t, - f.time ? a.ba(Ue) : a.lo(0)) : (i = function() { - var k = Date.now(), m; - if (k >= e + f.time) { - a.Ar(f.x, f.y); - a.Yl = t; - a.options.zZ && a.options.zZ.call(a); - a.MB() - } else { - k = (k - e) / f.time - 1; - g = ue.sqrt(1 - k * k); - k = (f.x - b) * g + b; - m = (f.y - c) * g + c; - a.Ar(k, m); - if (a.Yl) - a.fC = Ve(i) - } - } - , - i()) : a.lo(400)) - }, - FJ: function(a) { - a += "ms"; - this.Nb.style[Fe] = a; - this.ii && (this.xY.style[Fe] = a); - this.xi && (this.K0.style[Fe] = a) - }, - BI: function(a, b, c, e, f) { - var b = ue.abs(a) / b - , g = b * b / 0.0012; - 0 < a && g > c ? (c += f / (6 / (6.0E-4 * (g / b))), - b = b * c / g, - g = c) : 0 > a && g > e && (e += f / (6 / (6.0E-4 * (g / b))), - b = b * e / g, - g = e); - return { - Ba: g * (0 > a ? -1 : 1), - time: ue.round(b / 6.0E-4) - } - }, - Zj: function(a) { - for (var b = -a.offsetLeft, c = -a.offsetTop; a = a.offsetParent; ) - b -= a.offsetLeft, - c -= a.offsetTop; - a != this.zn && (b *= this.scale, - c *= this.scale); - return { - left: b, - top: c - } - }, - vJ: function(a, b) { - var c, e, f; - f = this.We.length - 1; - c = 0; - for (e = this.We.length; c < e; c++) - if (a >= this.We[c]) { - f = c; - break - } - f == this.HC && (0 < f && 0 > this.QC) && f--; - a = this.We[f]; - e = (e = ue.abs(a - this.We[this.HC])) ? 500 * (ue.abs(this.x - a) / e) : 0; - this.HC = f; - f = this.wf.length - 1; - for (c = 0; c < f; c++) - if (b >= this.wf[c]) { - f = c; - break - } - f == this.IC && (0 < f && 0 > this.RC) && f--; - b = this.wf[f]; - c = (c = ue.abs(b - this.wf[this.IC])) ? 500 * (ue.abs(this.y - b) / c) : 0; - this.IC = f; - f = ue.round(ue.max(e, c)) || 200; - return { - x: a, - y: b, - time: f - } - }, - ba: function(a, b, c) { - (b || this.Nb).addEventListener(a, this, !!c) - }, - $d: function(a, b, c) { - (b || this.Nb).removeEventListener(a, this, !!c) - }, - NC: ga(2), - refresh: function() { - var a, b, c, e = 0; - b = 0; - this.scale < this.options.$k && (this.scale = this.options.$k); - this.Cu = this.zn.clientWidth || 1; - this.An = this.zn.clientHeight || 1; - this.sf = -this.options.n0 || 0; - this.Ky = ue.round(this.Nb.offsetWidth * this.scale); - this.Ip = ue.round((this.Nb.offsetHeight + this.sf) * this.scale); - this.he = this.Cu - this.Ky; - this.qd = this.An - this.Ip + this.sf; - this.RC = this.QC = 0; - this.options.CN && this.options.CN.call(this); - this.kp = this.options.kp && 0 > this.he; - this.xn = this.options.xn && (!this.options.LV && !this.kp || this.Ip > this.An); - this.ii = this.kp && this.options.ii; - this.xi = this.xn && this.options.xi && this.Ip > this.An; - a = this.Zj(this.zn); - this.iG = -a.left; - this.jG = -a.top; - if ("string" == typeof this.options.iu) { - this.We = []; - this.wf = []; - c = this.Nb.querySelectorAll(this.options.iu); - a = 0; - for (b = c.length; a < b; a++) - e = this.Zj(c[a]), - e.left += this.iG, - e.top += this.jG, - this.We[a] = e.left < this.he ? this.he : e.left * this.scale, - this.wf[a] = e.top < this.qd ? this.qd : e.top * this.scale - } else if (this.options.iu) { - for (this.We = []; e >= this.he; ) - this.We[b] = e, - e -= this.Cu, - b++; - this.he % this.Cu && (this.We[this.We.length] = this.he - this.We[this.We.length - 1] + this.We[this.We.length - 1]); - b = e = 0; - for (this.wf = []; e >= this.qd; ) - this.wf[b] = e, - e -= this.An, - b++; - this.qd % this.An && (this.wf[this.wf.length] = this.qd - this.wf[this.wf.length - 1] + this.wf[this.wf.length - 1]) - } - this.Sv("h"); - this.Sv("v"); - this.al || (this.Nb.style[Fe] = "0", - this.lo(400)) - }, - scrollTo: function(a, b, c, e) { - var f = a; - this.stop(); - f.length || (f = [{ - x: a, - y: b, - time: c, - TZ: e - }]); - a = 0; - for (b = f.length; a < b; a++) - f[a].TZ && (f[a].x = this.x - f[a].x, - f[a].y = this.y - f[a].y), - this.yj.push({ - x: f[a].x, - y: f[a].y, - time: f[a].time || 0 - }); - this.MB() - }, - disable: function() { - this.stop(); - this.lo(0); - this.enabled = t; - this.$d(Re, window); - this.$d(Se, window); - this.$d(Te, window) - }, - enable: function() { - this.enabled = q - }, - stop: function() { - this.options.wi ? this.$d(Ue) : We(this.fC); - this.yj = []; - this.Yl = this.oh = t - }, - zoom: function(a, b, c, e) { - var f = c / this.scale; - this.options.Yk && (this.al = q, - e = e === l ? 200 : e, - a = a - this.iG - this.x, - b = b - this.jG - this.y, - this.x = a - a * f + this.x, - this.y = b - b * f + this.y, - this.scale = c, - this.refresh(), - this.x = 0 < this.x ? 0 : this.x < this.he ? this.he : this.x, - this.y = this.y > this.sf ? this.sf : this.y < this.qd ? this.qd : this.y, - this.Nb.style[Fe] = e + "ms", - this.Nb.style[De] = "translate(" + this.x + "px," + this.y + "px) scale(" + c + ")" + Xe, - this.al = t) - } - }; - function Ce(a) { - if ("" === we) - return a; - a = a.charAt(0).toUpperCase() + a.substr(1); - return we + a - } - ve = s; - function Ze(a) { - this.j = { - anchor: Yb, - offset: new O(0,0), - maxWidth: "100%", - imageHeight: 80 - }; - var a = a || {}, b; - for (b in a) - this.j[b] = a[b]; - this.Ll = new ec(s,{ - of: "api" - }); - this.bk = []; - this.P = s; - this.ig = { - height: this.j.imageHeight, - width: this.j.imageHeight * $e - }; - this.Rc = this.BB = this.bm = this.Zc = s - } - var af = [0, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 5, 6, 6, 7, 8, 8, 8, 9, 10] - , bf = "\u5176\u4ed6 \u6b63\u95e8 \u623f\u578b \u8bbe\u65bd \u6b63\u95e8 \u9910\u996e\u8bbe\u65bd \u5176\u4ed6\u8bbe\u65bd \u6b63\u95e8 \u8bbe\u65bd \u89c2\u5f71\u5385 \u5176\u4ed6\u8bbe\u65bd".split(" "); - B.Tm(function(a) { - var b = s; - a.addEventListener("position_changed", function() { - a.j.visible && a.j.albumsControl === q && (b ? b.Ey(a.Xb()) : (b = new Ze(a.j.albumsControlOptions), - b.na(a))) - }); - a.addEventListener("albums_visible_changed", function() { - a.j.albumsControl === q ? (b ? b.Ey(a.Xb()) : (b = new Ze(a.j.albumsControlOptions), - b.na(a)), - b.show()) : b.U() - }); - a.addEventListener("albums_options_changed", function() { - b && b.Qk(a.j.albumsControlOptions) - }); - a.addEventListener("visible_changed", function() { - b && (a.kE() ? a.j.albumsControl === q && (b.C.style.visibility = "visible") : b.C.style.visibility = "hidden") - }) - }); - var $e = 1.8; - H() && ($e = 1); - z.extend(Ze.prototype, { - Qk: function(a) { - for (var b in a) - this.j[b] = a[b]; - a = this.j.imageHeight + "px"; - this.uc(this.j.anchor); - this.C.style.width = isNaN(Number(this.j.maxWidth)) === q ? this.j.maxWidth : this.j.maxWidth + "px"; - this.C.style.height = a; - this.gk.style.height = a; - this.Rh.style.height = a; - this.ig = { - height: this.j.imageHeight, - width: this.j.imageHeight * $e - }; - this.fk.style.height = this.ig.height - 6 + "px"; - this.fk.style.width = this.ig.width - 6 + "px"; - this.Ey(this.P.Xb(), q) - }, - na: function(a) { - this.P = a; - this.ls(); - this.yQ(); - this.OY(); - this.Ey(a.Xb()) - }, - ls: function() { - var a = this.j.imageHeight + "px"; - this.C = L("div"); - var b = this.C.style; - b.cssText = "background:rgb(37,37,37);background:rgba(37,37,37,0.9);"; - b.position = "absolute"; - b.zIndex = "2000"; - b.width = isNaN(Number(this.j.maxWidth)) === q ? this.j.maxWidth : this.j.maxWidth + "px"; - b.padding = "8px 0"; - b.visibility = "hidden"; - b.height = a; - this.gk = L("div"); - b = this.gk.style; - b.position = "absolute"; - b.overflow = "hidden"; - b.width = "100%"; - b.height = a; - this.Rh = L("div"); - b = this.Rh.style; - b.height = a; - this.gk.appendChild(this.Rh); - this.C.appendChild(this.gk); - this.P.C.appendChild(this.C); - this.fk = L("div", { - "class": "pano_photo_item_seleted" - }); - this.fk.style.height = this.ig.height - 6 + "px"; - this.fk.style.width = this.ig.width - 6 + "px"; - this.uc(this.j.anchor) - }, - RH: function(a) { - for (var b = this.bk, c = b.length - 1; 0 <= c; c--) - if (b[c].panoId == a) - return c; - return -1 - }, - Ey: function(a, b) { - if (b || !this.bk[this.Zc] || !(this.bk[this.Zc].panoId == a && 3 !== this.bk[this.Zc].recoType)) { - var c = this - , e = this.RH(a); - !b && -1 !== e && this.bk[e] && 3 !== this.bk[e].recoType ? this.Mp(e) : this.dY(function(a) { - for (var b = {}, e, k, m = t, n = [], o = 0, p = a.length; o < p; o++) - e = a[o].catlog, - k = a[o].floor, - l !== e && ("" === e && l !== k ? (m = q, - b[k] || (b[k] = []), - b[k].push(a[o])) : (b[af[e]] || (b[af[e]] = []), - b[af[e]].push(a[o]))); - for (var v in b) - m ? n.push({ - data: v + "F", - index: v - }) : n.push({ - data: bf[v], - index: v - }); - c.jH = b; - c.Ji = n; - c.Il(a); - 0 == a.length ? c.U() : c.show() - }) - } - }, - vW: function() { - if (!this.Gi) { - var a = this.SX(this.Ji) - , b = L("div"); - b.style.cssText = ["width:" + 134 * this.Ji.length + "px;", "overflow:hidden;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;"].join(""); - b.innerHTML = a; - a = L("div"); - a.appendChild(b); - a.style.cssText = "position:absolute;top:-25px;background:rgb(37,37,37);background:rgba(37,37,37,0.9);border-bottom:1px solid #4e596a;width:100%;line-height:25px;height:25px;overflow:scroll;outline:0"; - new Ye(a,{ - Go: t, - iy: q, - ii: t, - xi: t, - xn: t, - OE: q, - Pw: q, - Mx: q - }); - this.C.appendChild(a); - for (var c = this, e = b.getElementsByTagName("span"), f = 0, g = e.length; f < g; f++) - b = e[f], - z.M(b, "click", function() { - if (this.getAttribute("dataindex")) { - c.Il(c.jH[this.getAttribute("dataindex")]); - for (var a = 0, b = e.length; a < b; a++) - e[a].style.color = "#FFFFFF"; - this.style.color = "#3383FF" - } - }); - this.Gi = a - } - }, - sW: function() { - if (this.Gi) - a = this.AL(this.Ji), - this.OQ.innerHTML = a; - else { - var a = this.AL(this.Ji) - , b = L("ul") - , c = this; - b.style.cssText = "list-style: none;padding:0px;margin:0px;display:block;width:60px;position:absolute;top:7px"; - b.innerHTML = a; - z.M(b, "click", function(a) { - if (a = (a.srcElement || a.target).getAttribute("dataindex")) { - c.Il(c.jH[a]); - for (var e = b.getElementsByTagName("li"), f = 0, g = e.length; f < g; f++) - e[f].childNodes[0].getAttribute("dataindex") === a ? z.D.Ua(e[f], "pano_catlogLiActive") : z.D.Pb(e[f], "pano_catlogLiActive") - } - }); - var a = L("div") - , e = L("a") - , f = L("span") - , g = L("a") - , i = L("span") - , k = ["background:url(" + G.qa + "panorama/catlog_icon.png) no-repeat;", "display:block;width:10px;height:7px;margin:0 auto;"].join(""); - f.style.cssText = k + "background-position:-18px 0;"; - e.style.cssText = "background:#1C1C1C;display:block;position:absolute;width:58px;"; - i.style.cssText = k + "background-position:0 0;"; - g.style.cssText = "background:#1C1C1C;display:block;position:absolute;width:58px;"; - g.style.top = this.j.imageHeight - 7 + "px"; - a.style.cssText = "position:absolute;top:0px;left:0px;width:60px;"; - e.appendChild(f); - g.appendChild(i); - z.M(e, "mouseover", function() { - var a = parseInt(b.style.top, 10); - 7 !== a && (f.style.backgroundPosition = "-27px 0"); - new tb({ - Ic: 60, - kc: ub.Ks, - duration: 300, - va: function(c) { - b.style.top = a + (7 - a) * c + "px" - } - }) - }); - z.M(e, "mouseout", function() { - f.style.backgroundPosition = "-18px 0" - }); - z.M(g, "mouseover", function() { - var a = parseInt(b.style.top, 10) - , e = c.j.imageHeight - 14; - if (!(parseInt(b.offsetHeight, 10) < e)) { - var f = e - parseInt(b.offsetHeight, 10) + 7; - f !== a && (i.style.backgroundPosition = "-9px 0"); - new tb({ - Ic: 60, - kc: ub.Ks, - duration: 300, - va: function(c) { - b.style.top = a + (f - a) * c + "px" - } - }) - } - }); - z.M(g, "mouseout", function() { - i.style.backgroundPosition = "0 0" - }); - a.appendChild(e); - a.appendChild(g); - e = L("div"); - e.style.cssText = ["position:absolute;z-index:2001;left:20px;", "height:" + this.j.imageHeight + "px;", "width:62px;overflow:hidden;background:rgb(37,37,37);background:rgba(37,37,37,0.9);"].join(""); - e.appendChild(b); - e.appendChild(a); - this.Gi = e; - this.OQ = b; - this.C.appendChild(e) - } - }, - tW: function() { - if (this.Ji && !(0 >= this.Ji.length)) { - var a = L("div"); - a.innerHTML = this.hA; - a.style.cssText = "position:absolute;background:#252525"; - this.C.appendChild(a); - this.Os = a; - this.Rc.jg.style.left = this.ig.width + 8 + "px"; - this.Gi && (this.Gi.style.left = parseInt(this.Gi.style.left, 10) + this.ig.width + 8 + "px"); - var b = this; - z.M(a, "click", function() { - b.P.vc(b.gX) - }) - } - }, - Il: function(a) { - this.bk = a; - this.j.showCatalog && (0 < this.Ji.length ? (Ua() ? this.sW() : this.vW(), - this.Rc.offsetLeft = 60) : (this.Os && (this.C.removeChild(this.Os), - this.Os = s, - this.Rc.jg.style.left = "0px"), - this.Gi && (this.C.removeChild(this.Gi), - this.Gi = s), - this.Rc.offsetLeft = 0)); - var b = this.LX(a); - Ua() && (this.Ji && 0 < this.Ji.length && this.j.showExit && this.hA) && (this.Rc.offsetLeft += this.ig.width + 8, - this.Os ? this.Os.innerHTML = this.hA : this.tW()); - this.Rh.innerHTML = b; - this.Rh.style.width = (this.ig.width + 8) * a.length + 8 + "px"; - a = this.C.offsetWidth; - b = this.Rh.offsetWidth; - this.Rc.Vs && (b += this.Rc.Vs()); - b < a - 2 * this.Rc.Ai - this.Rc.offsetLeft ? this.C.style.width = b + this.Rc.offsetLeft + "px" : (this.C.style.width = isNaN(Number(this.j.maxWidth)) === q ? this.j.maxWidth : this.j.maxWidth + "px", - b < this.C.offsetWidth - 2 * this.Rc.Ai - this.Rc.offsetLeft && (this.C.style.width = b + this.Rc.offsetLeft + "px")); - this.Rc.refresh(); - this.BB = this.Rh.children; - this.Rh.appendChild(this.fk); - this.fk.style.left = "-100000px"; - a = this.RH(this.P.Xb(), this.Y1); - -1 !== a && this.Mp(a) - }, - SX: function(a) { - for (var b = "", c, e = 0, f = a.length; e < f; e++) - c = '
    ' + a[e].data + "
    ", - b += c; - return b - }, - AL: function(a) { - for (var b = "", c, e = 0, f = a.length; e < f; e++) - c = '
  • ' + a[e].data + "
  • ", - b += c; - return b - }, - LX: function(a) { - for (var b, c, e, f, g = [], i = this.ig.height, k = this.ig.width, m = 0; m < a.length; m++) - b = a[m], - recoType = b.recoType, - e = b.panoId, - f = b.name, - c = b.heading, - b = b.pitch, - c = qe.PL(e, c, b, 198, 108), - b = '' + f + '' + f + "", - 3 === recoType ? Ua() ? (this.hA = b, - this.gX = e, - a.splice(m, 1), - m--) : (b = '' + f + '
    ', - g.push(b)) : g.push(b); - return g.join("") - }, - dY: function(a) { - var b = this - , c = this.P.Xb(); - c && this.Ll.Kx(c, function(e) { - b.P.Xb() === c && a(e) - }) - }, - uc: function(a) { - if (!Wa(a) || isNaN(a) || a < Wb || 3 < a) - a = this.defaultAnchor; - var b = this.C - , c = this.j.offset.width - , e = this.j.offset.height; - b.style.left = b.style.top = b.style.right = b.style.bottom = "auto"; - switch (a) { - case Wb: - b.style.top = e + "px"; - b.style.left = c + "px"; - break; - case Xb: - b.style.top = e + "px"; - b.style.right = c + "px"; - break; - case Yb: - b.style.bottom = e + "px"; - b.style.left = c + "px"; - break; - case 3: - b.style.bottom = e + "px", - b.style.right = c + "px" - } - }, - yQ: function() { - this.wQ() - }, - wQ: function() { - var a = this; - z.M(this.C, "touchstart", function(a) { - a.stopPropagation() - }); - z.M(this.gk, "click", function(b) { - if ((b = (b.srcElement || b.target).getAttribute("data-index")) && b != a.Zc) - a.Mp(b), - a.P.vc(a.bk[b].panoId) - }); - z.M(this.Rh, "mouseover", function(b) { - b = (b.srcElement || b.target).getAttribute("data-index"); - b !== s && a.BK(b, q) - }); - this.P.addEventListener("size_changed", function() { - isNaN(Number(a.j.maxWidth)) && a.Qk({ - maxWidth: a.j.maxWidth - }) - }) - }, - Mp: function(a) { - this.fk.style.left = this.BB[a].offsetLeft + 8 + "px"; - this.fk.setAttribute("data-index", this.BB[a].getAttribute("data-index")); - this.Zc = a; - this.BK(a) - }, - BK: function(a, b) { - var c = this.ig.width + 8 - , e = 0; - this.Rc.Vs && (e = this.Rc.Vs() / 2); - var f = this.gk.offsetWidth - 2 * e - , g = this.Rh.offsetLeft || this.Rc.x - , g = g - e - , i = -a * c; - i > g && this.Rc.scrollTo(i + e); - c = i - c; - g -= f; - c < g && (!b || b && 8 < i - g) && this.Rc.scrollTo(c + f + e) - }, - OY: function() { - this.Rc = H() ? new Ye(this.gk,{ - Go: t, - iy: q, - ii: t, - xi: t, - xn: t, - OE: q, - Pw: q, - Mx: q - }) : new cf(this.gk) - }, - U: function() { - this.C.style.visibility = "hidden" - }, - show: function() { - this.C.style.visibility = "visible" - } - }); - function cf(a) { - this.C = a; - this.Vg = a.children[0]; - this.Pr = s; - this.Ai = 20; - this.offsetLeft = 0; - this.na() - } - cf.prototype = { - na: function() { - this.Vg.style.position = "relative"; - this.refresh(); - this.ls(); - this.$l() - }, - refresh: function() { - this.ho = this.C.offsetWidth - this.Vs(); - this.aB = -(this.Vg.offsetWidth - this.ho - this.Ai); - this.Ev = this.Ai + this.offsetLeft; - this.Vg.style.left = this.Ev + "px"; - this.Vg.children[0] && (this.Pr = this.Vg.children[0].offsetWidth); - this.jg && (this.jg.children[0].style.marginTop = this.Hr.children[0].style.marginTop = this.jg.offsetHeight / 2 - this.jg.children[0].offsetHeight / 2 + "px") - }, - Vs: function() { - return 2 * this.Ai - }, - ls: function() { - this.Tv = L("div"); - this.Tv.innerHTML = ''; - this.jg = this.Tv.children[0]; - this.Hr = this.Tv.children[1]; - this.C.appendChild(this.Tv); - this.jg.children[0].style.marginTop = this.Hr.children[0].style.marginTop = this.jg.offsetHeight / 2 - this.jg.children[0].offsetHeight / 2 + "px" - }, - $l: function() { - var a = this; - z.M(this.jg, "click", function() { - a.scrollTo(a.Vg.offsetLeft + a.ho) - }); - z.M(this.Hr, "click", function() { - a.scrollTo(a.Vg.offsetLeft - a.ho) - }) - }, - aV: function() { - z.D.Pb(this.jg, "pano_arrow_disable"); - z.D.Pb(this.Hr, "pano_arrow_disable"); - var a = this.Vg.offsetLeft; - a >= this.Ev && z.D.Ua(this.jg, "pano_arrow_disable"); - a - this.ho <= this.aB && z.D.Ua(this.Hr, "pano_arrow_disable") - }, - scrollTo: function(a) { - a = a < this.Vg.offsetLeft ? Math.ceil((a - this.Ai - this.ho) / this.Pr) * this.Pr + this.ho + this.Ai - 8 : Math.ceil((a - this.Ai) / this.Pr) * this.Pr + this.Ai; - a < this.aB ? a = this.aB : a > this.Ev && (a = this.Ev); - var b = this.Vg.offsetLeft - , c = this; - new tb({ - Ic: 60, - kc: ub.Ks, - duration: 300, - va: function(e) { - c.Vg.style.left = b + (a - b) * e + "px" - }, - finish: function() { - c.aV() - } - }) - } - }; - B.Map = Ka; - B.Hotspot = ib; - B.MapType = id; - B.Point = J; - B.Pixel = Q; - B.Size = O; - B.Bounds = fb; - B.TileLayer = Mc; - B.Projection = jc; - B.MercatorProjection = S; - B.PerspectiveProjection = hb; - B.Copyright = function(a, b, c) { - this.id = a; - this.bb = b; - this.content = c - } - ; - B.Overlay = mc; - B.Label = uc; - B.GroundOverlay = vc; - B.PointCollection = zc; - B.Marker = U; - B.CanvasLayer = Cc; - B.Icon = qc; - B.IconSequence = sc; - B.Symbol = rc; - B.Polyline = Gc; - B.Polygon = Fc; - B.InfoWindow = tc; - B.Circle = Hc; - B.Control = Vb; - B.NavigationControl = jb; - B.GeolocationControl = Zb; - B.OverviewMapControl = lb; - B.CopyrightControl = $b; - B.ScaleControl = kb; - B.MapTypeControl = mb; - B.CityListControl = ac; - B.PanoramaControl = cc; - B.TrafficLayer = Vc; - B.CustomLayer = nb; - B.ContextMenu = fc; - B.MenuItem = ic; - B.LocalSearch = cb; - B.TransitRoute = Kd; - B.DrivingRoute = Nd; - B.WalkingRoute = Od; - B.RidingRoute = Pd; - B.Autocomplete = Zd; - B.RouteSearch = Td; - B.Geocoder = Ud; - B.LocalCity = Wd; - B.Geolocation = Geolocation; - B.Convertor = lc; - B.BusLineSearch = Yd; - B.Boundary = Xd; - B.VectorCloudLayer = Tc; - B.VectorTrafficLayer = Uc; - B.Panorama = Oa; - B.PanoramaLabel = ee; - B.PanoramaService = ec; - B.PanoramaCoverageLayer = dc; - B.PanoramaFlashInterface = oe; - function T(a, b) { - for (var c in b) - a[c] = b[c] - } - T(window, { - BMap: B, - _jsload2: function(a, b) { - ia.Wy.ZY && ia.Wy.set(a, b); - K.WV(a, b) - }, - BMAP_API_VERSION: "2.0" - }); - var X = Ka.prototype; - T(X, { - getBounds: X.ve, - getCenter: X.Ka, - getMapType: X.oa, - getSize: X.cb, - setSize: X.Ce, - getViewport: X.ht, - getZoom: X.fa, - centerAndZoom: X.Fd, - panTo: X.qi, - panBy: X.Ag, - setCenter: X.Zf, - setCurrentCity: X.DF, - setMapType: X.Dg, - setViewport: X.yh, - setZoom: X.Qc, - highResolutionEnabled: X.Sx, - zoomTo: X.Gg, - zoomIn: X.kG, - zoomOut: X.lG, - addHotspot: X.Cw, - removeHotspot: X.VZ, - clearHotspots: X.dm, - checkResize: X.ZV, - addControl: X.Aw, - removeControl: X.VN, - getContainer: X.La, - addContextMenu: X.yo, - removeContextMenu: X.Cp, - addOverlay: X.Ga, - removeOverlay: X.Qb, - clearOverlays: X.yK, - openInfoWindow: X.pc, - closeInfoWindow: X.Yc, - pointToOverlayPixel: X.Xe, - overlayPixelToPoint: X.JN, - getInfoWindow: X.hh, - getOverlays: X.Hx, - getPanes: function() { - return { - floatPane: this.Yd.BD, - markerMouseTarget: this.Yd.RE, - floatShadow: this.Yd.sL, - labelPane: this.Yd.KE, - markerPane: this.Yd.fN, - markerShadow: this.Yd.gN, - mapPane: this.Yd.Et, - vertexPane: this.Yd.nP - } - }, - addTileLayer: X.Oe, - removeTileLayer: X.Yf, - pixelToPoint: X.xb, - pointToPixel: X.$b, - setFeatureStyle: X.Lp, - selectBaseElement: X.j5, - setMapStyle: X.Zt, - enable3DBuilding: X.Ro, - disable3DBuilding: X.KW, - getPanorama: X.tm, - initIndoorLayer: X.PY, - setNormalMapDisplay: X.D_ - }); - var df = id.prototype; - T(df, { - getTileLayer: df.oY, - getMinZoom: df.bp, - getMaxZoom: df.sm, - getProjection: df.wm, - getTextColor: df.zm, - getTips: df.gt - }); - T(window, { - BMAP_NORMAL_MAP: La, - BMAP_PERSPECTIVE_MAP: Qa, - BMAP_SATELLITE_MAP: Ya, - BMAP_HYBRID_MAP: Sa - }); - var ef = S.prototype; - T(ef, { - lngLatToPoint: ef.kh, - pointToLngLat: ef.xj - }); - var ff = hb.prototype; - T(ff, { - lngLatToPoint: ff.kh, - pointToLngLat: ff.xj - }); - var gf = fb.prototype; - T(gf, { - equals: gf.pb, - containsPoint: gf.js, - containsBounds: gf.kW, - intersects: gf.ot, - extend: gf.extend, - getCenter: gf.Ka, - isEmpty: gf.tj, - getSouthWest: gf.Ve, - getNorthEast: gf.Rf, - toSpan: gf.YF - }); - var hf = mc.prototype; - T(hf, { - isVisible: hf.jh, - show: hf.show, - hide: hf.U - }); - mc.getZIndex = mc.Ck; - var jf = gb.prototype; - T(jf, { - openInfoWindow: jf.pc, - closeInfoWindow: jf.Yc, - enableMassClear: jf.gj, - disableMassClear: jf.MW, - show: jf.show, - hide: jf.U, - getMap: jf.Dx, - addContextMenu: jf.yo, - removeContextMenu: jf.Cp - }); - var kf = U.prototype; - T(kf, { - setIcon: kf.Rb, - getIcon: kf.ap, - setPosition: kf.sa, - getPosition: kf.ga, - setOffset: kf.Ze, - getOffset: kf.Sf, - getLabel: kf.VD, - setLabel: kf.dn, - setTitle: kf.Ec, - setTop: kf.ui, - enableDragging: kf.Wb, - disableDragging: kf.TC, - setZIndex: kf.Sp, - getMap: kf.Dx, - setAnimation: kf.bn, - setShadow: kf.Oy, - hide: kf.U, - setRotation: kf.Op, - getRotation: kf.TL - }); - T(window, { - BMAP_ANIMATION_DROP: 1, - BMAP_ANIMATION_BOUNCE: 2 - }); - var lf = uc.prototype; - T(lf, { - setStyle: lf.Md, - setStyles: lf.ti, - setContent: lf.dd, - setPosition: lf.sa, - getPosition: lf.ga, - setOffset: lf.Ze, - getOffset: lf.Sf, - setTitle: lf.Ec, - setZIndex: lf.Sp, - getMap: lf.Dx, - getContent: lf.xk - }); - var mf = qc.prototype; - T(mf, { - setImageUrl: mf.mO, - setSize: mf.Ce, - setAnchor: mf.uc, - setImageOffset: mf.Yt, - setImageSize: mf.w_, - setInfoWindowAnchor: mf.z_, - setPrintImageUrl: mf.K_ - }); - var nf = tc.prototype; - T(nf, { - redraw: nf.je, - setTitle: nf.Ec, - setContent: nf.dd, - getContent: nf.xk, - getPosition: nf.ga, - enableMaximize: nf.dh, - disableMaximize: nf.kx, - isOpen: nf.Xa, - setMaxContent: nf.$t, - maximize: nf.hy, - enableAutoPan: nf.Ls - }); - var of = oc.prototype; - T(of, { - getPath: of.Ue, - setPath: of.ke, - setPositionAt: of.gn, - getStrokeColor: of.jY, - setStrokeWeight: of.Rp, - getStrokeWeight: of.WL, - setStrokeOpacity: of.Pp, - getStrokeOpacity: of.kY, - setFillOpacity: of.Xt, - getFillOpacity: of.HX, - setStrokeStyle: of.Qp, - getStrokeStyle: of.VL, - getFillColor: of.GX, - getBounds: of.ve, - enableEditing: of.mf, - disableEditing: of.LW, - getEditing: of.DX - }); - var pf = Hc.prototype; - T(pf, { - setCenter: pf.Zf, - getCenter: pf.Ka, - getRadius: pf.RL, - setRadius: pf.xf - }); - var qf = Fc.prototype; - T(qf, { - getPath: qf.Ue, - setPath: qf.ke, - setPositionAt: qf.gn - }); - var rf = ib.prototype; - T(rf, { - getPosition: rf.ga, - setPosition: rf.sa, - getText: rf.eE, - setText: rf.cu - }); - J.prototype.equals = J.prototype.pb; - Q.prototype.equals = Q.prototype.pb; - O.prototype.equals = O.prototype.pb; - T(window, { - BMAP_ANCHOR_TOP_LEFT: Wb, - BMAP_ANCHOR_TOP_RIGHT: Xb, - BMAP_ANCHOR_BOTTOM_LEFT: Yb, - BMAP_ANCHOR_BOTTOM_RIGHT: 3 - }); - var sf = Vb.prototype; - T(sf, { - setAnchor: sf.uc, - getAnchor: sf.HD, - setOffset: sf.Ze, - getOffset: sf.Sf, - show: sf.show, - hide: sf.U, - isVisible: sf.jh, - toString: sf.toString - }); - var tf = jb.prototype; - T(tf, { - getType: tf.ip, - setType: tf.hn - }); - T(window, { - BMAP_NAVIGATION_CONTROL_LARGE: 0, - BMAP_NAVIGATION_CONTROL_SMALL: 1, - BMAP_NAVIGATION_CONTROL_PAN: 2, - BMAP_NAVIGATION_CONTROL_ZOOM: 3 - }); - var uf = lb.prototype; - T(uf, { - changeView: uf.se, - setSize: uf.Ce, - getSize: uf.cb - }); - var vf = kb.prototype; - T(vf, { - getUnit: vf.sY, - setUnit: vf.LF - }); - T(window, { - BMAP_UNIT_METRIC: "metric", - BMAP_UNIT_IMPERIAL: "us" - }); - var wf = $b.prototype; - T(wf, { - addCopyright: wf.Bw, - removeCopyright: wf.qF, - getCopyright: wf.pm, - getCopyrightCollection: wf.PD - }); - T(window, { - BMAP_MAPTYPE_CONTROL_HORIZONTAL: bc, - BMAP_MAPTYPE_CONTROL_DROPDOWN: 1, - BMAP_MAPTYPE_CONTROL_MAP: 2 - }); - var xf = Mc.prototype; - T(xf, { - getMapType: xf.oa, - getCopyright: xf.pm, - isTransparentPng: xf.zt - }); - var yf = fc.prototype; - T(yf, { - addItem: yf.Dw, - addSeparator: yf.bC, - removeSeparator: yf.sF - }); - var zf = ic.prototype; - T(zf, { - setText: zf.cu - }); - var Af = W.prototype; - T(Af, { - getStatus: Af.xm, - setSearchCompleteCallback: Af.JF, - getPageCapacity: Af.qf, - setPageCapacity: Af.Np, - setLocation: Af.fn, - disableFirstResultSelection: Af.UC, - enableFirstResultSelection: Af.oD, - gotoPage: Af.Am, - searchNearby: Af.Jp, - searchInBounds: Af.an, - search: Af.search - }); - T(window, { - BMAP_STATUS_SUCCESS: 0, - BMAP_STATUS_CITY_LIST: 1, - BMAP_STATUS_UNKNOWN_LOCATION: sd, - BMAP_STATUS_UNKNOWN_ROUTE: 3, - BMAP_STATUS_INVALID_KEY: 4, - BMAP_STATUS_INVALID_REQUEST: 5, - BMAP_STATUS_PERMISSION_DENIED: td, - BMAP_STATUS_SERVICE_UNAVAILABLE: 7, - BMAP_STATUS_TIMEOUT: ud - }); - T(window, { - BMAP_POI_TYPE_NORMAL: 0, - BMAP_POI_TYPE_BUSSTOP: 1, - BMAP_POI_TYPE_BUSLINE: 2, - BMAP_POI_TYPE_SUBSTOP: 3, - BMAP_POI_TYPE_SUBLINE: 4 - }); - T(window, { - BMAP_TRANSIT_POLICY_RECOMMEND: 0, - BMAP_TRANSIT_POLICY_LEAST_TIME: 4, - BMAP_TRANSIT_POLICY_LEAST_TRANSFER: 1, - BMAP_TRANSIT_POLICY_LEAST_WALKING: 2, - BMAP_TRANSIT_POLICY_AVOID_SUBWAYS: 3, - BMAP_TRANSIT_POLICY_FIRST_SUBWAYS: 5, - BMAP_LINE_TYPE_BUS: 0, - BMAP_LINE_TYPE_SUBWAY: 1, - BMAP_LINE_TYPE_FERRY: 2, - BMAP_LINE_TYPE_TRAIN: 3, - BMAP_LINE_TYPE_AIRPLANE: 4, - BMAP_LINE_TYPE_COACH: 5 - }); - T(window, { - BMAP_TRANSIT_TYPE_POLICY_TRAIN: 0, - BMAP_TRANSIT_TYPE_POLICY_AIRPLANE: 1, - BMAP_TRANSIT_TYPE_POLICY_COACH: 2 - }); - T(window, { - BMAP_INTERCITY_POLICY_LEAST_TIME: 0, - BMAP_INTERCITY_POLICY_EARLY_START: 1, - BMAP_INTERCITY_POLICY_CHEAP_PRICE: 2 - }); - T(window, { - BMAP_TRANSIT_TYPE_IN_CITY: 0, - BMAP_TRANSIT_TYPE_CROSS_CITY: 1 - }); - T(window, { - BMAP_TRANSIT_PLAN_TYPE_ROUTE: 0, - BMAP_TRANSIT_PLAN_TYPE_LINE: 1 - }); - var Bf = Jd.prototype; - T(Bf, { - clearResults: Bf.Pe - }); - Ld = Kd.prototype; - T(Ld, { - setPolicy: Ld.bu, - toString: Ld.toString, - setPageCapacity: Ld.Np, - setIntercityPolicy: Ld.oO, - setTransitTypePolicy: Ld.xO - }); - T(window, { - BMAP_DRIVING_POLICY_DEFAULT: 0, - BMAP_DRIVING_POLICY_AVOID_HIGHWAYS: 3, - BMAP_DRIVING_POLICY_AVOID_CONGESTION: 5, - BMAP_DRIVING_POLICY_FIRST_HIGHWAYS: 4 - }); - T(window, { - BMAP_MODE_DRIVING: "driving", - BMAP_MODE_TRANSIT: "transit", - BMAP_MODE_WALKING: "walking", - BMAP_MODE_NAVIGATION: "navigation" - }); - var Cf = Td.prototype; - T(Cf, { - routeCall: Cf.gO - }); - T(window, { - BMAP_HIGHLIGHT_STEP: 1, - BMAP_HIGHLIGHT_ROUTE: 2 - }); - T(window, { - BMAP_ROUTE_TYPE_DRIVING: wd, - BMAP_ROUTE_TYPE_WALKING: vd, - BMAP_ROUTE_TYPE_RIDING: xd - }); - T(window, { - BMAP_ROUTE_STATUS_NORMAL: yd, - BMAP_ROUTE_STATUS_EMPTY: 1, - BMAP_ROUTE_STATUS_ADDRESS: 2 - }); - var Df = Nd.prototype; - T(Df, { - setPolicy: Df.bu - }); - var Ef = Zd.prototype; - T(Ef, { - show: Ef.show, - hide: Ef.U, - setTypes: Ef.KF, - setLocation: Ef.fn, - search: Ef.search, - setInputValue: Ef.Ly - }); - T(nb.prototype, {}); - var Ff = Xd.prototype; - T(Ff, { - get: Ff.get - }); - T(dc.prototype, {}); - T(db.prototype, {}); - T(window, { - BMAP_POINT_DENSITY_HIGH: 200, - BMAP_POINT_DENSITY_MEDIUM: Yc, - BMAP_POINT_DENSITY_LOW: 50 - }); - T(window, { - BMAP_POINT_SHAPE_STAR: 1, - BMAP_POINT_SHAPE_WATERDROP: 2, - BMAP_POINT_SHAPE_CIRCLE: wc, - BMAP_POINT_SHAPE_SQUARE: 4, - BMAP_POINT_SHAPE_RHOMBUS: 5 - }); - T(window, { - BMAP_POINT_SIZE_TINY: 1, - BMAP_POINT_SIZE_SMALLER: 2, - BMAP_POINT_SIZE_SMALL: 3, - BMAP_POINT_SIZE_NORMAL: xc, - BMAP_POINT_SIZE_BIG: 5, - BMAP_POINT_SIZE_BIGGER: 6, - BMAP_POINT_SIZE_HUGE: 7 - }); - T(window, { - BMap_Symbol_SHAPE_CAMERA: 11, - BMap_Symbol_SHAPE_WARNING: 12, - BMap_Symbol_SHAPE_SMILE: 13, - BMap_Symbol_SHAPE_CLOCK: 14, - BMap_Symbol_SHAPE_POINT: 9, - BMap_Symbol_SHAPE_PLANE: 10, - BMap_Symbol_SHAPE_CIRCLE: 1, - BMap_Symbol_SHAPE_RECTANGLE: 2, - BMap_Symbol_SHAPE_RHOMBUS: 3, - BMap_Symbol_SHAPE_STAR: 4, - BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW: 5, - BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW: 6, - BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW: 7, - BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW: 8 - }); - T(window, { - BMAP_CONTEXT_MENU_ICON_ZOOMIN: gc, - BMAP_CONTEXT_MENU_ICON_ZOOMOUT: hc - }); - T(window, { - BMAP_SYS_DRAWER: Ja, - BMAP_SVG_DRAWER: 1, - BMAP_VML_DRAWER: 2, - BMAP_CANVAS_DRAWER: 3, - BMAP_SVG_DRAWER_FIRST: 4 - }); - B.vV(); - B.Q0(); -} -)() diff --git a/static/BMap/js/map_city.js b/static/BMap/js/map_city.js deleted file mode 100644 index 97cc86d..0000000 --- a/static/BMap/js/map_city.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 离线地图城市坐标 - * 文本文件必须以UTF-8编码存储,建议用Notepad++编辑 - * 格式:城市名称 经度 纬度 - */ -var offlinemap_cities = [ - ['北京', 116.427265, 39.918698] - ,['上海', 121.472724, 31.239761] - ,['武汉', 114.28398, 30.601327] - ,['成都', 104.070606, 30.59138] - ,['广州', 113.270404, 23.159763] - ,['重庆', 106.595635, 29.619598] -]; - - -/* 城市数据映射 - * - */ -var offlinemap_cityobj = new Object(); -for(var i=0; i'); - //加载扩展函数 - // document.write(''); - //加载城市坐标 - // document.write(''); -})(); -/////////////////////////////////////////////////////////////////// diff --git a/static/BMap/js/map_plus.js b/static/BMap/js/map_plus.js deleted file mode 100644 index 83e2e7b..0000000 --- a/static/BMap/js/map_plus.js +++ /dev/null @@ -1,4 +0,0 @@ -/* - * 离线地图扩展功能函数 - */ - diff --git a/static/BMap/images/blank.gif b/static/BMap/images/blank.gif deleted file mode 100644 index 71cb4ee..0000000 --- a/static/BMap/images/blank.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/cabin.png b/static/BMap/images/cabin.png deleted file mode 100644 index f238b98..0000000 --- a/static/BMap/images/cabin.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/closedhand.cur b/static/BMap/images/closedhand.cur deleted file mode 100644 index ef36639..0000000 --- a/static/BMap/images/closedhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/copyright_logo.png b/static/BMap/images/copyright_logo.png deleted file mode 100644 index 2461ed0..0000000 --- a/static/BMap/images/copyright_logo.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw3.png b/static/BMap/images/iw3.png deleted file mode 100644 index 50b19ae..0000000 --- a/static/BMap/images/iw3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_bg.png b/static/BMap/images/iw_bg.png deleted file mode 100644 index 7976365..0000000 --- a/static/BMap/images/iw_bg.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_close1d3.gif b/static/BMap/images/iw_close1d3.gif deleted file mode 100644 index f9f0f50..0000000 --- a/static/BMap/images/iw_close1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iw_plus1d3.gif b/static/BMap/images/iw_plus1d3.gif deleted file mode 100644 index 3efc8b5..0000000 --- a/static/BMap/images/iw_plus1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/iws3.png b/static/BMap/images/iws3.png deleted file mode 100644 index 4c28596..0000000 --- a/static/BMap/images/iws3.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls.png b/static/BMap/images/mapctrls.png deleted file mode 100644 index e72138f..0000000 --- a/static/BMap/images/mapctrls.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls1d3.gif b/static/BMap/images/mapctrls1d3.gif deleted file mode 100644 index 522c6f8..0000000 --- a/static/BMap/images/mapctrls1d3.gif +++ /dev/null Binary files differ diff --git a/static/BMap/images/mapctrls2d0.png b/static/BMap/images/mapctrls2d0.png deleted file mode 100644 index fc6b518..0000000 --- a/static/BMap/images/mapctrls2d0.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/marker_red_sprite.png b/static/BMap/images/marker_red_sprite.png deleted file mode 100644 index 38a5900..0000000 --- a/static/BMap/images/marker_red_sprite.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/openhand.cur b/static/BMap/images/openhand.cur deleted file mode 100644 index cb444f9..0000000 --- a/static/BMap/images/openhand.cur +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.jpg b/static/BMap/images/simulator.jpg deleted file mode 100644 index 7eccb40..0000000 --- a/static/BMap/images/simulator.jpg +++ /dev/null Binary files differ diff --git a/static/BMap/images/simulator.png b/static/BMap/images/simulator.png deleted file mode 100644 index 981b8d7..0000000 --- a/static/BMap/images/simulator.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/st-close.png b/static/BMap/images/st-close.png deleted file mode 100644 index b516fa2..0000000 --- a/static/BMap/images/st-close.png +++ /dev/null Binary files differ diff --git a/static/BMap/images/well-gas.svg b/static/BMap/images/well-gas.svg deleted file mode 100644 index 50cdd83..0000000 --- a/static/BMap/images/well-gas.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-heat.svg b/static/BMap/images/well-heat.svg deleted file mode 100644 index baee123..0000000 --- a/static/BMap/images/well-heat.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-power.svg b/static/BMap/images/well-power.svg deleted file mode 100644 index e731bcd..0000000 --- a/static/BMap/images/well-power.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-rain.svg b/static/BMap/images/well-rain.svg deleted file mode 100644 index f2ef906..0000000 --- a/static/BMap/images/well-rain.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/images/well-sewage.svg b/static/BMap/images/well-sewage.svg deleted file mode 100644 index a9a1662..0000000 --- a/static/BMap/images/well-sewage.svg +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/static/BMap/js/apiv1.3.min.js b/static/BMap/js/apiv1.3.min.js deleted file mode 100644 index 63c0ac1..0000000 --- a/static/BMap/js/apiv1.3.min.js +++ /dev/null @@ -1,6424 +0,0 @@ -window.BMAP_AUTHENTIC_KEY = ""; -(function() { - var b2, a8 = b2 = a8 || { - version : "1.3.4" - }; - a8.guid = "$BAIDU$"; - window[a8.guid] = window[a8.guid] || {}; - a8.object = a8.object || {}; - a8.extend = a8.object.extend = function(cM, T) { - for ( var cL in T) { - if (T.hasOwnProperty(cL)) { - cM[cL] = T[cL] - } - } - return cM - }; - a8.dom = a8.dom || {}; - a8.dom.g = function(T) { - if ("string" == typeof T || T instanceof String) { - return document.getElementById(T) - } else { - if (T && T.nodeName && (T.nodeType == 1 || T.nodeType == 9)) { - return T - } - } - return null - }; - a8.g = a8.G = a8.dom.g; - a8.dom.hide = function(T) { - T = a8.dom.g(T); - T.style.display = "none"; - return T - }; - a8.hide = a8.dom.hide; - a8.lang = a8.lang || {}; - a8.lang.isString = function(T) { - return "[object String]" == Object.prototype.toString.call(T) - }; - a8.isString = a8.lang.isString; - a8.dom._g = function(T) { - if (a8.lang.isString(T)) { - return document.getElementById(T) - } - return T - }; - a8._g = a8.dom._g; - a8.dom.contains = function(T, cL) { - var cM = a8.dom._g; - T = cM(T); - cL = cM(cL); - return T.contains ? T != cL && T.contains(cL) : !!(T - .compareDocumentPosition(cL) & 16) - }; - a8.browser = a8.browser || {}; - if (/msie (\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.ie = a8.ie = document.documentMode || +RegExp["\x241"] - } - a8.dom._NAME_ATTRS = (function() { - var T = { - cellpadding : "cellPadding", - cellspacing : "cellSpacing", - colspan : "colSpan", - rowspan : "rowSpan", - valign : "vAlign", - usemap : "useMap", - frameborder : "frameBorder" - }; - if (a8.browser.ie < 8) { - T["for"] = "htmlFor"; - T["class"] = "className" - } else { - T.htmlFor = "for"; - T.className = "class" - } - return T - })(); - a8.dom.setAttr = function(cL, T, cM) { - cL = a8.dom.g(cL); - if ("style" == T) { - cL.style.cssText = cM - } else { - T = a8.dom._NAME_ATTRS[T] || T; - cL.setAttribute(T, cM) - } - return cL - }; - a8.setAttr = a8.dom.setAttr; - a8.dom.setAttrs = function(cM, T) { - cM = a8.dom.g(cM); - for ( var cL in T) { - a8.dom.setAttr(cM, cL, T[cL]) - } - return cM - }; - a8.setAttrs = a8.dom.setAttrs; - a8.string = a8.string || {}; - (function() { - var T = new RegExp( - "(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+\x24)", "g"); - a8.string.trim = function(cL) { - return String(cL).replace(T, "") - } - })(); - a8.trim = a8.string.trim; - a8.string.format = function(cM, T) { - cM = String(cM); - var cL = Array.prototype.slice.call(arguments, 1), cN = Object.prototype.toString; - if (cL.length) { - cL = cL.length == 1 ? (T !== null - && (/\[object Array\]|\[object Object\]/.test(cN.call(T))) ? T - : cL) - : cL; - return cM.replace(/#\{(.+?)\}/g, function(cO, cQ) { - var cP = cL[cQ]; - if ("[object Function]" == cN.call(cP)) { - cP = cP(cQ) - } - return ("undefined" == typeof cP ? "" : cP) - }) - } - return cM - }; - a8.format = a8.string.format; - a8.dom.removeClass = function(cP, cQ) { - cP = a8.dom.g(cP); - var cN = cP.className.split(/\s+/), cR = cQ.split(/\s+/), cL, T = cR.length, cM, cO = 0; - for (; cO < T; ++cO) { - for (cM = 0, cL = cN.length; cM < cL; ++cM) { - if (cN[cM] == cR[cO]) { - cN.splice(cM, 1); - break - } - } - } - cP.className = cN.join(" "); - return cP - }; - a8.removeClass = a8.dom.removeClass; - a8.dom.insertHTML = function(cN, T, cM) { - cN = a8.dom.g(cN); - var cL, cO; - if (cN.insertAdjacentHTML) { - cN.insertAdjacentHTML(T, cM) - } else { - cL = cN.ownerDocument.createRange(); - T = T.toUpperCase(); - if (T == "AFTERBEGIN" || T == "BEFOREEND") { - cL.selectNodeContents(cN); - cL.collapse(T == "AFTERBEGIN") - } else { - cO = T == "BEFOREBEGIN"; - cL[cO ? "setStartBefore" : "setEndAfter"](cN); - cL.collapse(cO) - } - cL.insertNode(cL.createContextualFragment(cM)) - } - return cN - }; - a8.insertHTML = a8.dom.insertHTML; - a8.dom.show = function(T) { - T = a8.dom.g(T); - T.style.display = ""; - return T - }; - a8.show = a8.dom.show; - a8.dom.getDocument = function(T) { - T = a8.dom.g(T); - return T.nodeType == 9 ? T : T.ownerDocument || T.document - }; - a8.dom.addClass = function(cP, cQ) { - cP = a8.dom.g(cP); - var cL = cQ.split(/\s+/), T = cP.className, cO = " " + T + " ", cN = 0, cM = cL.length; - for (; cN < cM; cN++) { - if (cO.indexOf(" " + cL[cN] + " ") < 0) { - T += " " + cL[cN] - } - } - cP.className = T; - return cP - }; - a8.addClass = a8.dom.addClass; - a8.dom._styleFixer = a8.dom._styleFixer || {}; - a8.dom._styleFilter = a8.dom._styleFilter || []; - a8.dom._styleFilter.filter = function(cL, cO, cP) { - for ( var T = 0, cN = a8.dom._styleFilter, cM; cM = cN[T]; T++) { - if (cM = cM[cP]) { - cO = cM(cL, cO) - } - } - return cO - }; - a8.string.toCamelCase = function(T) { - if (T.indexOf("-") < 0 && T.indexOf("_") < 0) { - return T - } - return T.replace(/[-_][^-_]/g, function(cL) { - return cL.charAt(1).toUpperCase() - }) - }; - a8.dom.getStyle = function(cM, cL) { - var cP = a8.dom; - cM = cP.g(cM); - cL = a8.string.toCamelCase(cL); - var cO = cM.style[cL]; - if (!cO) { - var T = cP._styleFixer[cL], cN = cM.currentStyle - || (a8.browser.ie ? cM.style : getComputedStyle(cM, null)); - cO = T && T.get ? T.get(cM, cN) : cN[T || cL] - } - if (T = cP._styleFilter) { - cO = T.filter(cL, cO, "get") - } - return cO - }; - a8.getStyle = a8.dom.getStyle; - if (/opera\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.opera = +RegExp["\x241"] - } - a8.browser.isWebkit = /webkit/i.test(navigator.userAgent); - a8.browser.isGecko = /gecko/i.test(navigator.userAgent) - && !/like gecko/i.test(navigator.userAgent); - a8.browser.isStrict = document.compatMode == "CSS1Compat"; - a8.dom.getPosition = function(T) { - T = a8.dom.g(T); - var cT = a8.dom.getDocument(T), cN = a8.browser, cQ = a8.dom.getStyle, cM = cN.isGecko > 0 - && cT.getBoxObjectFor - && cQ(T, "position") == "absolute" - && (T.style.top === "" || T.style.left === ""), cR = { - left : 0, - top : 0 - }, cP = (cN.ie && !cN.isStrict) ? cT.body : cT.documentElement, cU, cL; - if (T == cP) { - return cR - } - if (T.getBoundingClientRect) { - cL = T.getBoundingClientRect(); - cR.left = Math.floor(cL.left) - + Math.max(cT.documentElement.scrollLeft, - cT.body.scrollLeft); - cR.top = Math.floor(cL.top) - + Math.max(cT.documentElement.scrollTop, cT.body.scrollTop); - cR.left -= cT.documentElement.clientLeft; - cR.top -= cT.documentElement.clientTop; - var cS = cT.body, cV = parseInt(cQ(cS, "borderLeftWidth")), cO = parseInt(cQ( - cS, "borderTopWidth")); - if (cN.ie && !cN.isStrict) { - cR.left -= isNaN(cV) ? 2 : cV; - cR.top -= isNaN(cO) ? 2 : cO - } - } else { - cU = T; - do { - cR.left += cU.offsetLeft; - cR.top += cU.offsetTop; - if (cN.isWebkit > 0 && cQ(cU, "position") == "fixed") { - cR.left += cT.body.scrollLeft; - cR.top += cT.body.scrollTop; - break - } - cU = cU.offsetParent - } while (cU && cU != T); - if (cN.opera > 0 - || (cN.isWebkit > 0 && cQ(T, "position") == "absolute")) { - cR.top -= cT.body.offsetTop - } - cU = T.offsetParent; - while (cU && cU != cT.body) { - cR.left -= cU.scrollLeft; - if (!cN.opera || cU.tagName != "TR") { - cR.top -= cU.scrollTop - } - cU = cU.offsetParent - } - } - return cR - }; - if (/firefox\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.firefox = +RegExp["\x241"] - } - (function() { - var T = navigator.userAgent; - if (/(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(T) - && !/chrome/i.test(T)) { - a8.browser.safari = +(RegExp["\x241"] || RegExp["\x242"]) - } - })(); - if (/chrome\/(\d+\.\d)/i.test(navigator.userAgent)) { - a8.browser.chrome = +RegExp["\x241"] - } - a8.array = a8.array || {}; - a8.array.each = function(cP, cN) { - var cM, cO, cL, T = cP.length; - if ("function" == typeof cN) { - for (cL = 0; cL < T; cL++) { - cO = cP[cL]; - cM = cN.call(cP, cO, cL); - if (cM === false) { - break - } - } - } - return cP - }; - a8.each = a8.array.each; - a8.lang.guid = function() { - return "TANGRAM__" + (window[a8.guid]._counter++).toString(36) - }; - window[a8.guid]._counter = window[a8.guid]._counter || 1; - window[a8.guid]._instances = window[a8.guid]._instances || {}; - a8.lang.isFunction = function(T) { - return "[object Function]" == Object.prototype.toString.call(T) - }; - a8.lang.Class = function(T) { - this.guid = T || a8.lang.guid(); - window[a8.guid]._instances[this.guid] = this - }; - window[a8.guid]._instances = window[a8.guid]._instances || {}; - a8.lang.Class.prototype.dispose = function() { - delete window[a8.guid]._instances[this.guid]; - for ( var T in this) { - if (!a8.lang.isFunction(this[T])) { - delete this[T] - } - } - this.disposed = true - }; - a8.lang.Class.prototype.toString = function() { - return "[object " + (this._className || "Object") + "]" - }; - a8.lang.Event = function(T, cL) { - this.type = T; - this.returnValue = true; - this.target = cL || null; - this.currentTarget = null - }; - a8.lang.Class.prototype.addEventListener = function(cN, cM, cL) { - if (!a8.lang.isFunction(cM)) { - return - } - !this.__listeners && (this.__listeners = {}); - var T = this.__listeners, cO; - if (typeof cL == "string" && cL) { - if (/[^\w\-]/.test(cL)) { - throw ("nonstandard key:" + cL) - } else { - cM.hashCode = cL; - cO = cL - } - } - cN.indexOf("on") != 0 && (cN = "on" + cN); - typeof T[cN] != "object" && (T[cN] = {}); - cO = cO || a8.lang.guid(); - cM.hashCode = cO; - T[cN][cO] = cM - }; - a8.lang.Class.prototype.removeEventListener = function(cM, cL) { - if (a8.lang.isFunction(cL)) { - cL = cL.hashCode - } else { - if (!a8.lang.isString(cL)) { - return - } - } - !this.__listeners && (this.__listeners = {}); - cM.indexOf("on") != 0 && (cM = "on" + cM); - var T = this.__listeners; - if (!T[cM]) { - return - } - T[cM][cL] && delete T[cM][cL] - }; - a8.lang.Class.prototype.dispatchEvent = function(cN, T) { - if (a8.lang.isString(cN)) { - cN = new a8.lang.Event(cN) - } - !this.__listeners && (this.__listeners = {}); - T = T || {}; - for ( var cM in T) { - cN[cM] = T[cM] - } - var cM, cL = this.__listeners, cO = cN.type; - cN.target = cN.target || this; - cN.currentTarget = this; - cO.indexOf("on") != 0 && (cO = "on" + cO); - a8.lang.isFunction(this[cO]) && this[cO].apply(this, arguments); - if (typeof cL[cO] == "object") { - for (cM in cL[cO]) { - cL[cO][cM].apply(this, arguments) - } - } - return cN.returnValue - }; - a8.lang.inherits = function(cQ, cO, cN) { - var cM, cP, T = cQ.prototype, cL = new Function(); - cL.prototype = cO.prototype; - cP = cQ.prototype = new cL(); - for (cM in T) { - cP[cM] = T[cM] - } - cQ.prototype.constructor = cQ; - cQ.superClass = cO.prototype; - if ("string" == typeof cN) { - cP._className = cN - } - }; - a8.inherits = a8.lang.inherits; - a8.lang.instance = function(T) { - return window[a8.guid]._instances[T] || null - }; - a8.platform = a8.platform || {}; - a8.platform.isMacintosh = /macintosh/i.test(navigator.userAgent); - a8.platform.isWindows = /windows/i.test(navigator.userAgent); - a8.platform.isX11 = /x11/i.test(navigator.userAgent); - a8.platform.isAndroid = /android/i.test(navigator.userAgent); - a8.platform.isIpad = /ipad/i.test(navigator.userAgent); - a8.platform.isIphone = /iphone/i.test(navigator.userAgent); - a8.lang.Event.prototype.inherit = function(cM) { - var cL = this; - this.domEvent = cM = window.event || cM; - cL.clientX = cM.clientX || cM.pageX; - cL.clientY = cM.clientY || cM.pageY; - cL.offsetX = cM.offsetX || cM.layerX; - cL.offsetY = cM.offsetY || cM.layerY; - cL.screenX = cM.screenX; - cL.screenY = cM.screenY; - cL.ctrlKey = cM.ctrlKey || cM.metaKey; - cL.shiftKey = cM.shiftKey; - cL.altKey = cM.altKey; - if (cM.touches) { - cL.touches = []; - for ( var T = 0; T < cM.touches.length; T++) { - cL.touches.push( { - clientX : cM.touches[T].clientX, - clientY : cM.touches[T].clientY, - screenX : cM.touches[T].screenX, - screenY : cM.touches[T].screenY, - pageX : cM.touches[T].pageX, - pageY : cM.touches[T].pageY, - target : cM.touches[T].target, - identifier : cM.touches[T].identifier - }) - } - } - if (cM.changedTouches) { - cL.changedTouches = []; - for ( var T = 0; T < cM.changedTouches.length; T++) { - cL.changedTouches.push( { - clientX : cM.changedTouches[T].clientX, - clientY : cM.changedTouches[T].clientY, - screenX : cM.changedTouches[T].screenX, - screenY : cM.changedTouches[T].screenY, - pageX : cM.changedTouches[T].pageX, - pageY : cM.changedTouches[T].pageY, - target : cM.changedTouches[T].target, - identifier : cM.changedTouches[T].identifier - }) - } - } - if (cM.targetTouches) { - cL.targetTouches = []; - for ( var T = 0; T < cM.targetTouches.length; T++) { - cL.targetTouches.push( { - clientX : cM.targetTouches[T].clientX, - clientY : cM.targetTouches[T].clientY, - screenX : cM.targetTouches[T].screenX, - screenY : cM.targetTouches[T].screenY, - pageX : cM.targetTouches[T].pageX, - pageY : cM.targetTouches[T].pageY, - target : cM.targetTouches[T].target, - identifier : cM.targetTouches[T].identifier - }) - } - } - cL.rotation = cM.rotation; - cL.scale = cM.scale; - return cL - }; - a8.lang.decontrol = function(cL) { - var T = window[a8.guid]; - T._instances && (delete T._instances[cL]) - }; - a8.event = {}; - a8.on = a8.event.on = function(cM, cL, T) { - if (!(cM = a8.g(cM))) { - return cM - } - cL = cL.replace(/^on/, ""); - if (cM.addEventListener) { - cM.addEventListener(cL, T, false) - } else { - if (cM.attachEvent) { - cM.attachEvent("on" + cL, T) - } - } - return cM - }; - a8.un = a8.event.un = function(cM, cL, T) { - if (!(cM = a8.g(cM))) { - return cM - } - cL = cL.replace(/^on/, ""); - if (cM.removeEventListener) { - cM.removeEventListener(cL, T, false) - } else { - if (cM.detachEvent) { - cM.detachEvent("on" + cL, T) - } - } - return cM - }; - a8.dom.hasClass = function(cM, cL) { - if (!cM || !cM.className || typeof cM.className != "string") { - return false - } - var T = -1; - try { - T = cM.className == cL - || cM.className.search(new RegExp("(\\s|^)" + cL - + "(\\s|$)")) - } catch (cN) { - return false - } - return T > -1 - }; - window.BMap = window.BMap || {}; - window.BMap.version = "1.3"; - window.BMap._register = []; - window.BMap.register = function(T) { - this._register.push(T) - }; - window.BMap.apiLoad = window.BMap.apiLoad || function() { - }; - var bJ = window.BMAP_AUTHENTIC_KEY; - window.BMAP_AUTHENTIC_KEY = null; - function bz(cN, cP) { - cN = a8.g(cN); - if (!cN) { - return - } - var cO = this; - a8.lang.Class.call(cO); - cO.config = { - clickInterval : 200, - enableDragging : true, - enableKeyboard : false, - enableDblclickZoom : true, - enableContinuousZoom : false, - enableWheelZoom : false, - enableMouseDown : true, - enablePinchToZoom : true, - enableAutoResize : true, - fps : 25, - zoomerDuration : 240, - actionDuration : 450, - defaultCursor : cc.defaultCursor, - draggingCursor : cc.draggingCursor, - isOverviewMap : false, - minZoom : 1, - maxZoom : 18, - mapType : BMAP_NORMAL_MAP, - restrictBounds : false, - drawer : BMAP_SYS_DRAWER, - enableInertialDragging : false, - drawMargin : 500, - enableHighResolution : false - }; - a8.extend(cO.config, cP || {}); - if (cO.highResolutionEnabled()) { - var cR = document.querySelector("meta[name=viewport]"); - cR.content = "initial-scale=0.5, minimum-scale=0.5, maximum-scale=0.5, user-scalable=no, target-densitydpi=high-dpi" - } - cO.container = cN; - cO._setStyle(cN); - cN.unselectable = "on"; - cN.innerHTML = ""; - cN.appendChild(cO.render()); - var cL = cO.getSize(); - cO.width = cL.width; - cO.height = cL.height; - cO.offsetX = 0; - cO.offsetY = 0; - cO.platform = cN.firstChild; - cO.maskLayer = cO.platform.firstChild; - cO.maskLayer.style.width = cO.width + "px"; - cO.maskLayer.style.height = cO.height + "px"; - cO._panes = {}; - cO.centerPoint = new cd(0, 0); - cO.mercatorCenter = new cd(0, 0); - cO.zoomLevel = 1; - cO.lastLevel = 0; - cO.defaultZoomLevel = null; - cO.defaultCenter = null; - cO.currentCity = ""; - cO.cityCode = ""; - cO._hotspots = {}; - cO.currentOperation = 0; - cP = cP || {}; - var cQ = cO.mapType = cO.config.mapType; - cO.projection = cQ.getProjection(); - if (cQ === BMAP_PERSPECTIVE_MAP) { - _addStat(5002) - } - if (cQ === BMAP_SATELLITE_MAP || cQ === BMAP_HYBRID_MAP) { - _addStat(5003) - } - var T = cO.config; - T.userMinZoom = cP.minZoom; - T.userMaxZoom = cP.maxZoom; - cO._checkZoom(); - cO.temp = { - operating : false, - arrow : 0, - lastDomMoveTime : 0, - lastLoadTileTime : 0, - lastMovingTime : 0, - canKeyboard : false, - registerIndex : -1, - curSpots : [] - }; - cO.platform.style.cursor = cO.config.defaultCursor; - for ( var cM = 0; cM < BMap._register.length; cM++) { - BMap._register[cM](cO) - } - cO.temp.registerIndex = cM; - cO._bind(); - cA.load("map", function() { - cO._draw() - }); - if (bO()) { - cA.load("oppc", function() { - cO._asyncRegister() - }) - } - if (aA()) { - cA.load("opmb", function() { - cO._asyncRegister() - }) - } - cN = null - } - a8.lang.inherits(bz, a8.lang.Class, "Map"); - a8 - .extend( - bz.prototype, - { - render : function() { - var T = aa("div"); - var cN = T.style; - cN.overflow = "visible"; - cN.position = "absolute"; - cN.zIndex = "0"; - cN.top = cN.left = "0px"; - var cL = aa("div", { - "class" : "BMap_mask" - }); - var cM = cL.style; - cM.position = "absolute"; - cM.top = cM.left = "0px"; - cM.zIndex = "9"; - cM.overflow = "hidden"; - cM.WebkitUserSelect = "none"; - T.appendChild(cL); - return T - }, - _setStyle : function(cL) { - var T = cL.style; - T.overflow = "hidden"; - if (aJ(cL).position != "absolute") { - T.position = "relative"; - T.zIndex = 0 - } - T.backgroundColor = "#F3F1EC"; - T.color = "#000"; - T.textAlign = "left" - }, - _bind : function() { - var T = this; - T._watchSize = function() { - var cL = T.getSize(); - if (T.width != cL.width - || T.height != cL.height) { - var cN = new aH(T.width, T.height); - var cO = new bg("onbeforeresize"); - cO.size = cN; - T.dispatchEvent(cO); - T._updateCenterPoint( - (cL.width - T.width) / 2, - (cL.height - T.height) / 2); - T.maskLayer.style.width = (T.width = cL.width) - + "px"; - T.maskLayer.style.height = (T.height = cL.height) - + "px"; - var cM = new bg("onresize"); - cM.size = cL; - T.dispatchEvent(cM) - } - }; - if (T.config.enableAutoResize) { - T.temp.autoResizeTimer = setInterval( - T._watchSize, 80) - } - }, - _updateCenterPoint : function(cN, cL, cR, cQ) { - var cO = this.getMapType().getZoomUnits( - this.getZoom()); - var cS = this.projection; - var cP = true; - if (cR && cd.isInRange(cR)) { - this.centerPoint = new cd(cR.lng, cR.lat); - cP = false - } - var cM = (cR && cQ) ? cS.lngLatToMercator(cR, - this.currentCity) : this.mercatorCenter; - if (cM) { - this.mercatorCenter = new cd(cM.lng + cN * cO, - cM.lat - cL * cO); - var T = cS.mercatorToLngLat( - this.mercatorCenter, this.currentCity); - if (T && cP) { - this.centerPoint = T - } - } - }, - zoomTo : function(cN, cL) { - if (!aK(cN)) { - return - } - cN = this._getProperZoom(cN).zoom; - if (cN == this.zoomLevel) { - return - } - this.lastLevel = this.zoomLevel; - this.zoomLevel = cN; - var cM; - if (cL) { - cM = cL - } else { - if (this.getInfoWindow()) { - cM = this.getInfoWindow().getPosition() - } - } - if (cM) { - var T = this.pointToPixel(cM, this.lastLevel); - this._updateCenterPoint(this.width / 2 - T.x, - this.height / 2 - T.y, - this.pixelToPoint(T, this.lastLevel), - true) - } - this.dispatchEvent(new bg("onzoomstart")); - this.dispatchEvent(new bg("onzoomstartcode")) - }, - setZoom : function(T) { - this.zoomTo(T) - }, - zoomIn : function(T) { - this.zoomTo(this.zoomLevel + 1, T) - }, - zoomOut : function(T) { - this.zoomTo(this.zoomLevel - 1, T) - }, - panTo : function(T, cL) { - if (!(T instanceof cd)) { - return - } - this.mercatorCenter = this.projection - .lngLatToMercator(T, this.currentCity); - if (cd.isInRange(T)) { - this.centerPoint = new cd(T.lng, T.lat) - } else { - this.centerPoint = this.projection - .mercatorToLngLat(this.mercatorCenter, - this.currentCity) - } - }, - panBy : function(cL, T) { - cL = Math.round(cL) || 0; - T = Math.round(T) || 0; - this._updateCenterPoint(-cL, -T) - }, - addControl : function(T) { - if (T && I(T._i)) { - T._i(this); - this.dispatchEvent(new bg("onaddcontrol", T)) - } - }, - removeControl : function(T) { - if (T && I(T.remove)) { - T.remove(); - this - .dispatchEvent(new bg( - "onremovecontrol", T)) - } - }, - addContextMenu : function(T) { - if (T && I(T.initialize)) { - T.initialize(this); - this - .dispatchEvent(new bg( - "onaddcontextmenu", T)) - } - }, - removeContextMenu : function(T) { - if (T && I(T.remove)) { - this.dispatchEvent(new bg( - "onremovecontextmenu", T)); - T.remove() - } - }, - addOverlay : function(T) { - if (T && I(T._i)) { - T._i(this); - this.dispatchEvent(new bg("onaddoverlay", T)) - } - }, - removeOverlay : function(T) { - if (T && I(T.remove)) { - T.remove(); - this - .dispatchEvent(new bg( - "onremoveoverlay", T)) - } - }, - clearOverlays : function() { - this.dispatchEvent(new bg("onclearoverlays")) - }, - addTileLayer : function(T) { - if (T) { - this.dispatchEvent(new bg("onaddtilelayer", T)) - } - }, - removeTileLayer : function(T) { - if (T) { - this.dispatchEvent(new bg("onremovetilelayer", - T)) - } - }, - setMapType : function(cL) { - if (this.mapType === cL) { - return - } - var cM = new bg("onsetmaptype"); - var T = this.mapType; - cM.preMapType = T; - this.mapType = this.config.mapType = cL; - this.projection = this.mapType.getProjection(); - this._updateCenterPoint(0, 0, this.getCenter(), - true); - this._checkZoom(); - var cN = this._getProperZoom(this.getZoom()).zoom; - this.zoomTo(cN); - this.dispatchEvent(cM); - var cM = new bg("onmaptypechange"); - cM.zoomLevel = cN; - cM.mapType = cL; - this.dispatchEvent(cM); - if (cL === BMAP_SATELLITE_MAP - || cL === BMAP_HYBRID_MAP) { - _addStat(5003) - } - }, - setCenter : function(T) { - var cM = this; - if (T instanceof cd) { - cM.panTo(T, { - noAnimation : true - }) - } else { - if (b3(T)) { - var cL = this._getLocal(); - cL.setSearchCompleteCallback(function(cN) { - if (cL.getStatus() == 0 - && cL._json.result.type == 2) { - cM.setCenter(cN.getPoi(0).point); - if (BMAP_PERSPECTIVE_MAP - .getCityName(T)) { - cM.setCurrentCity(T) - } - } - }); - cL.search(T) - } - } - }, - centerAndZoom : function(T, cM) { - var cL = this; - if (b3(T)) { - var cP = cL._getLocal(); - cP - .setSearchCompleteCallback(function(cQ) { - if (cP.getStatus() == 0 - && cP._json.result.type == 2) { - var cS = cQ.getPoi(0).point; - var cR = cM - || S - .getBestLevel( - cP._json.content.level, - cL); - cL.centerAndZoom(cS, cR); - if (BMAP_PERSPECTIVE_MAP - .getCityName(T)) { - cL.setCurrentCity(T) - } - } - }); - cP.search(T); - return - } - if (!(T instanceof cd) || !cM) { - return - } - cM = cL._getProperZoom(cM).zoom; - cL.lastLevel = cL.zoomLevel || cM; - cL.zoomLevel = cM; - cL.centerPoint = new cd(T.lng, T.lat); - cL.mercatorCenter = cL.projection.lngLatToMercator( - cL.centerPoint, cL.currentCity); - cL.defaultZoomLevel = cL.defaultZoomLevel - || cL.zoomLevel; - cL.defaultCenter = cL.defaultCenter - || cL.centerPoint; - var cO = new bg("onload"); - var cN = new bg("onloadcode"); - cO.point = new cd(T.lng, T.lat); - cO.pixel = cL.pointToPixel(cL.centerPoint, - cL.zoomLevel); - cO.zoom = cM; - if (!cL.loaded) { - cL.loaded = true; - cL.dispatchEvent(cO) - } - cL.dispatchEvent(cN); - cL.dispatchEvent(new bg("onmoveend")); - if (cL.lastLevel != cL.zoomLevel) { - cL.dispatchEvent(new bg("onzoomend")) - } - }, - _getLocal : function() { - if (!this.temp.local) { - this.temp.local = new a4(1) - } - return this.temp.local - }, - reset : function() { - this.centerAndZoom(this.defaultCenter, - this.defaultZoomLevel, true) - }, - enableDragging : function() { - this.config.enableDragging = true - }, - disableDragging : function() { - this.config.enableDragging = false - }, - enableInertialDragging : function() { - this.config.enableInertialDragging = true - }, - disableInertialDragging : function() { - this.config.enableInertialDragging = false - }, - enableScrollWheelZoom : function() { - this.config.enableWheelZoom = true - }, - disableScrollWheelZoom : function() { - this.config.enableWheelZoom = false - }, - enableContinuousZoom : function() { - this.config.enableContinuousZoom = true - }, - disableContinuousZoom : function() { - this.config.enableContinuousZoom = false - }, - enableDoubleClickZoom : function() { - this.config.enableDblclickZoom = true - }, - disableDoubleClickZoom : function() { - this.config.enableDblclickZoom = false - }, - enableKeyboard : function() { - this.config.enableKeyboard = true - }, - disableKeyboard : function() { - this.config.enableKeyboard = false - }, - enablePinchToZoom : function() { - this.config.enablePinchToZoom = true - }, - disablePinchToZoom : function() { - this.config.enablePinchToZoom = false - }, - enableAutoResize : function() { - this.config.enableAutoResize = true; - this._watchSize(); - if (!this.temp.autoResizeTimer) { - this.temp.autoResizeTimer = setInterval( - this._watchSize, 80) - } - }, - disableAutoResize : function() { - this.config.enableAutoResize = false; - if (this.temp.autoResizeTimer) { - clearInterval(this.temp.autoResizeTimer); - this.temp.autoResizeTimer = null - } - }, - getSize : function() { - return new aH(this.container.clientWidth, - this.container.clientHeight) - }, - getCenter : function() { - return this.centerPoint - }, - getZoom : function() { - return this.zoomLevel - }, - checkResize : function() { - this._watchSize() - }, - _getProperZoom : function(cM) { - var cL = this.config.minZoom, T = this.config.maxZoom, cN = false; - if (cM < cL) { - cN = true; - cM = cL - } - if (cM > T) { - cN = true; - cM = T - } - return { - zoom : cM, - exceeded : cN - } - }, - getContainer : function() { - return this.container - }, - pointToPixel : function(T, cL) { - cL = cL || this.getZoom(); - return this.projection.pointToPixel(T, cL, - this.mercatorCenter, this.getSize(), - this.currentCity) - }, - pixelToPoint : function(T, cL) { - cL = cL || this.getZoom(); - return this.projection.pixelToPoint(T, cL, - this.mercatorCenter, this.getSize(), - this.currentCity) - }, - pointToOverlayPixel : function(T, cM) { - if (!T) { - return - } - var cN = new cd(T.lng, T.lat); - var cL = this.pointToPixel(cN, cM); - cL.x -= this.offsetX; - cL.y -= this.offsetY; - return cL - }, - overlayPixelToPoint : function(T, cM) { - if (!T) { - return - } - var cL = new bu(T.x, T.y); - cL.x += this.offsetX; - cL.y += this.offsetY; - return this.pixelToPoint(cL, cM) - }, - getBounds : function() { - if (!this.isLoaded()) { - return new bN() - } - var cL = arguments[0] || {}, cN = cL.margins - || [ 0, 0, 0, 0 ], T = cL.zoom || null, cO = this - .pixelToPoint( { - x : cN[3], - y : this.height - cN[2] - }, T), cM = this.pixelToPoint( { - x : this.width - cN[1], - y : cN[0] - }, T); - return new bN(cO, cM) - }, - isLoaded : function() { - return !!this.loaded - }, - _getBestLevel : function(cL, cM) { - var cP = this.getMapType(); - var cR = cM.margins || [ 10, 10, 10, 10 ], cO = cM.zoomFactor || 0, cS = cR[1] - + cR[3], cQ = cR[0] + cR[2], T = cP - .getMinZoom(), cU = cP.getMaxZoom(); - for ( var cN = cU; cN >= T; cN--) { - var cT = this.getMapType().getZoomUnits(cN); - if (cL.toSpan().lng / cT < this.width - cS - && cL.toSpan().lat / cT < this.height - - cQ) { - break - } - } - cN += cO; - if (cN < T) { - cN = T - } - if (cN > cU) { - cN = cU - } - return cN - }, - getViewport : function(cT, cL) { - var cX = { - center : this.getCenter(), - zoom : this.getZoom() - }; - if (!cT || !cT instanceof bN && cT.length == 0 - || cT instanceof bN && cT.isEmpty()) { - return cX - } - var cV = []; - if (cT instanceof bN) { - cV.push(cT.getNorthEast()); - cV.push(cT.getSouthWest()) - } else { - cV = cT.slice(0) - } - cL = cL || {}; - var cP = []; - for ( var cQ = 0, cO = cV.length; cQ < cO; cQ++) { - cP.push(this.projection.lngLatToMercator( - cV[cQ], this.currentCity)) - } - var cM = new bN(); - for ( var cQ = cP.length - 1; cQ >= 0; cQ--) { - cM.extend(cP[cQ]) - } - if (cM.isEmpty()) { - return cX - } - var T = cM.getCenter(); - var cW = this._getBestLevel(cM, cL); - if (cL.margins) { - var cS = cL.margins, cR = (cS[1] - cS[3]) / 2, cU = (cS[0] - cS[2]) / 2, cN = this - .getMapType().getZoomUnits(cW); - T.lng = T.lng + cN * cR; - T.lat = T.lat + cN * cU - } - T = this.projection.mercatorToLngLat(T, - this.currentCity); - return { - center : T, - zoom : cW - } - }, - setViewport : function(cL, cO) { - var T; - if (cL && cL.center) { - T = cL - } else { - T = this.getViewport(cL, cO) - } - cO = cO || {}; - var cM = cO.delay || 200; - if (T.zoom == this.zoomLevel - && cO.enableAnimation != false) { - var cN = this; - setTimeout(function() { - cN.panTo(T.center, { - duration : 210 - }) - }, cM) - } else { - this.centerAndZoom(T.center, T.zoom) - } - }, - getPanes : function() { - return this._panes - }, - getInfoWindow : function() { - if (this.temp.infoWin && this.temp.infoWin.isOpen()) { - return this.temp.infoWin - } - return null - }, - getDistance : function(cM, T) { - if (!cM || !T) { - return - } - var cL = 0; - cL = ba.getDistanceByLL(cM, T); - return cL - }, - getOverlays : function() { - var cN = [], cO = this._overlays, cM = this._customOverlays; - if (cO) { - for ( var cL in cO) { - if (cO[cL] instanceof Y) { - cN.push(cO[cL]) - } - } - } - if (cM) { - for ( var cL = 0, T = cM.length; cL < T; cL++) { - cN.push(cM[cL]) - } - } - return cN - }, - getMapType : function() { - return this.mapType - }, - _asyncRegister : function() { - for ( var T = this.temp.registerIndex; T < BMap._register.length; T++) { - BMap._register[T](this) - } - this.temp.registerIndex = T - }, - setCurrentCity : function(T) { - this.currentCity = BMAP_PERSPECTIVE_MAP - .getCityName(T); - this.cityCode = BMAP_PERSPECTIVE_MAP - .getCityCode(this.currentCity) - }, - setDefaultCursor : function(T) { - if (a8.browser.firefox && T.indexOf("url") == 0) { - T = T += ", -moz-grab" - } - this.config.defaultCursor = T; - if (this.platform) { - this.platform.style.cursor = this.config.defaultCursor - } - }, - getDefaultCursor : function() { - return this.config.defaultCursor - }, - setDraggingCursor : function(T) { - if (a8.browser.firefox && T.indexOf("url") == 0) { - T = T += ", -moz-grabbing" - } - this.config.draggingCursor = T - }, - getDraggingCursor : function() { - return this.config.draggingCursor - }, - highResolutionEnabled : function() { - return this.config.enableHighResolution - && window.devicePixelRatio > 1 - }, - addHotspot : function(cL) { - if (cL instanceof cm) { - this._hotspots[cL.guid] = cL; - cL.initialize(this) - } - var T = this; - cA.load("hotspot", function() { - T._asyncRegister() - }) - }, - removeHotspot : function(T) { - if (this._hotspots[T.guid]) { - delete this._hotspots[T.guid] - } - }, - clearHotspots : function() { - this._hotspots = {} - }, - _checkZoom : function() { - var cL = this.mapType.getMinZoom(); - var cM = this.mapType.getMaxZoom(); - var T = this.config; - T.minZoom = T.userMinZoom || cL; - T.maxZoom = T.userMaxZoom || cM; - if (T.minZoom < cL) { - T.minZoom = cL - } - if (T.maxZoom > cM) { - T.maxZoom = cM - } - }, - setMinZoom : function(T) { - if (T > this.config.maxZoom) { - T = this.config.maxZoom - } - this.config.userMinZoom = T; - this._updateZoom() - }, - setMaxZoom : function(T) { - if (T < this.config.minZoom) { - T = this.config.minZoom - } - this.config.userMaxZoom = T; - this._updateZoom() - }, - _updateZoom : function() { - this._checkZoom(); - var T = this.config; - if (this.zoomLevel < T.minZoom) { - this.setZoom(T.minZoom) - } else { - if (this.zoomLevel > T.maxZoom) { - this.setZoom(T.maxZoom) - } - } - var cL = new bg("onzoomspanchange"); - cL.minZoom = T.minZoom; - cL.maxZoom = T.maxZoom; - this.dispatchEvent(cL) - } - }); - window.BMAP_API_VERSION = "1.3"; - window.BMAP_COORD_LNGLAT = 0; - window.BMAP_COORD_MERCATOR = 1; - window.BMAP_SYS_DRAWER = 0; - window.BMAP_SVG_DRAWER = 1; - window.BMAP_VML_DRAWER = 2; - window.BMAP_CANVAS_DRAWER = 3; - window._addStat = function(cP, cO) { - if (!cP) { - return - } - cO = cO || {}; - var cN = ""; - for ( var cL in cO) { - cN = cN + "&" + cL + "=" + encodeURIComponent(cO[cL]) - } - var cQ = function(cR) { - if (!cR) { - return - } - _addStat._sending = true; - setTimeout(function() { - _addStat._img.src = cc.imgPath + "blank.gif?" + cR.src - }, 50) - }; - var T = function() { - var cR = _addStat._reqQueue.shift(); - if (cR) { - cQ(cR) - } - }; - var cM = (Math.random() * 100000000).toFixed(0); - if (_addStat._sending) { - _addStat._reqQueue.push( { - src : "t=" + cM + "&code=" + cP + cN - }) - } else { - cQ( { - src : "t=" + cM + "&code=" + cP + cN - }) - } - if (!_addStat._binded) { - a8.on(_addStat._img, "load", function() { - _addStat._sending = false; - T() - }); - a8.on(_addStat._img, "error", function() { - _addStat._sending = false; - T() - }); - _addStat._binded = true - } - }; - window._addStat._reqQueue = []; - window._addStat._img = new Image(); - _addStat(5000, { - v : BMap.version - }); - function g(cN) { - var T = { - duration : 1000, - fps : 30, - delay : 0, - transition : aw.linear, - onStop : function() { - } - }; - this._anis = []; - if (cN) { - for ( var cL in cN) { - T[cL] = cN[cL] - } - } - this._opts = T; - if (aK(T.delay)) { - var cM = this; - setTimeout(function() { - cM.start() - }, T.delay) - } else { - if (T.delay != g.INFINITE) { - this.start() - } - } - } - g.INFINITE = "INFINITE"; - g.prototype.start = function() { - this._beginTime = aE(); - this._endTime = this._beginTime + this._opts.duration; - this._launch() - }; - g.prototype.add = function(T) { - this._anis.push(T) - }; - g.prototype._launch = function() { - var cM = this; - var T = aE(); - if (T >= cM._endTime) { - if (I(cM._opts.render)) { - cM._opts.render(cM._opts.transition(1)) - } - if (I(cM._opts.finish)) { - cM._opts.finish() - } - if (cM._anis.length > 0) { - var cL = cM._anis[0]; - cL._anis = [].concat(cM._anis.slice(1)); - cL.start() - } - return - } - cM.schedule = cM._opts.transition((T - cM._beginTime) - / cM._opts.duration); - if (I(cM._opts.render)) { - cM._opts.render(cM.schedule) - } - if (!cM.terminative) { - cM._timer = setTimeout(function() { - cM._launch() - }, 1000 / cM._opts.fps) - } - }; - g.prototype.stop = function(cL) { - this.terminative = true; - for ( var T = 0; T < this._anis.length; T++) { - this._anis[T].stop(); - this._anis[T] = null - } - this._anis.length = 0; - if (this._timer) { - clearTimeout(this._timer); - this._timer = null - } - this._opts.onStop(this.schedule); - if (cL) { - this._endTime = this._beginTime; - this._launch() - } - }; - g.prototype.cancel = function() { - if (this._timer) { - clearTimeout(this._timer) - } - this._endTime = this._beginTime; - this.schedule = 0 - }; - g.prototype.setFinishCallback = function(T) { - if (this._anis.length > 0) { - this._anis[this._anis.length - 1]._opts.finish = T - } else { - this._opts.finish = T - } - }; - var aw = { - linear : function(T) { - return T - }, - reverse : function(T) { - return 1 - T - }, - easeInQuad : function(T) { - return T * T - }, - easeInCubic : function(T) { - return Math.pow(T, 3) - }, - easeOutQuad : function(T) { - return -(T * (T - 2)) - }, - easeOutCubic : function(T) { - return Math.pow((T - 1), 3) + 1 - }, - easeInOutQuad : function(T) { - if (T < 0.5) { - return T * T * 2 - } else { - return -2 * (T - 2) * T - 1 - } - return - }, - easeInOutCubic : function(T) { - if (T < 0.5) { - return Math.pow(T, 3) * 4 - } else { - return Math.pow(T - 1, 3) * 4 + 1 - } - }, - easeInOutSine : function(T) { - return (1 - Math.cos(Math.PI * T)) / 2 - } - }; - aw["ease-in"] = aw.easeInQuad; - aw["ease-out"] = aw.easeOutQuad; - var m = !!(window.BMAP_PROTOCOL == "https"); - var x = m ? "https://sapi.map.baidu.com/" : "http://api.map.baidu.com/"; - var cc = { - imgPath : "static/BMap/images/", //******* �Ķ�ͼƬimages·�� ******* - cityNames : { - "\u5317\u4eac" : "bj", - "\u4e0a\u6d77" : "sh", - "\u6df1\u5733" : "sz", - "\u5e7f\u5dde" : "gz" - }, - fontFamily : "arial,sans-serif" - }; - if (a8.browser.firefox) { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur),crosshair", - defaultCursor : "-moz-grab", - draggingCursor : "-moz-grabbing" - }); - if (a8.platform.isWindows) { - cc.fontFamily = "arial,simsun,sans-serif" - } - } else { - if (a8.browser.chrome || a8.browser.safari) { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur) 2 6,crosshair", - defaultCursor : "url(" + cc.imgPath - + "openhand.cur) 8 8,default", - draggingCursor : "url(" + cc.imgPath - + "closedhand.cur) 8 8,move" - }) - } else { - a8.extend(cc, { - distCursor : "url(" + cc.imgPath + "ruler.cur),crosshair", - defaultCursor : "url(" + cc.imgPath + "openhand.cur),default", - draggingCursor : "url(" + cc.imgPath + "closedhand.cur),move" - }) - } - } - function av(cM, cL, T) { - this.id = cM; - this.bounds = cL; - this.content = T - } - var bn = { - undo : 1, - redo : 2, - zoom : 4, - drag : 8, - move : 16, - mousewheel : 32, - toolbarOperation : 64, - stdMapCtrlDrag : 128, - dblclick : 256 - }; - function bI(cM, T) { - var cL = cM.style; - cL.left = T[0] + "px"; - cL.top = T[1] + "px" - } - function cw(T) { - if (a8.browser.ie > 0) { - T.unselectable = "on" - } else { - T.style.MozUserSelect = "none" - } - } - function y(T) { - return T && T.parentNode && T.parentNode.nodeType != 11 - } - function at(cL, T) { - a8.dom.insertHTML(cL, "beforeEnd", T); - return cL.lastChild - } - function bY(T) { - var cL = { - left : 0, - top : 0 - }; - while (T && T.offsetParent) { - cL.left += T.offsetLeft; - cL.top += T.offsetTop; - T = T.offsetParent - } - return cL - } - function aP(T) { - var T = window.event || T; - T.stopPropagation ? T.stopPropagation() : T.cancelBubble = true - } - function cC(T) { - var T = window.event || T; - T.preventDefault ? T.preventDefault() : T.returnValue = false; - return false - } - function co(T) { - aP(T); - return cC(T) - } - function cG() { - var T = document.documentElement, cL = document.body; - if (T && (T.scrollTop || T.scrollLeft)) { - return [ T.scrollTop, T.scrollLeft ] - } else { - if (cL) { - return [ cL.scrollTop, cL.scrollLeft ] - } else { - return [ 0, 0 ] - } - } - } - function ct(cL, T) { - if (!cL || !T) { - return - } - return Math.round(Math.sqrt(Math.pow(cL.x - T.x, 2) - + Math.pow(cL.y - T.y, 2))) - } - function O(T, cM) { - var cL = []; - cM = cM || function(cO) { - return cO - }; - for ( var cN in T) { - cL.push(cN + "=" + cM(T[cN])) - } - return cL.join("&") - } - function aa(cL, T, cM) { - var cN = document.createElement(cL); - if (cM) { - cN = document.createElementNS(cM, cL) - } - return a8.dom.setAttrs(cN, T || {}) - } - function aJ(T) { - if (T.currentStyle) { - return T.currentStyle - } else { - if (T.ownerDocument && T.ownerDocument.defaultView) { - return T.ownerDocument.defaultView.getComputedStyle(T, null) - } - } - } - function I(T) { - return typeof T == "function" - } - function aK(T) { - return typeof T == "number" - } - function b3(T) { - return typeof T == "string" - } - function ch(T) { - return typeof T != "undefined" - } - function cJ(T) { - return typeof T == "object" - } - function aY(T) { - return "[object Array]" == Object.prototype.toString.call(T) - } - var cf = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - function bV(cN) { - var cL = ""; - var cU, cS, cQ = ""; - var cT, cR, cP, cO = ""; - var cM = 0; - var T = /[^A-Za-z0-9\+\/\=]/g; - if (!cN || T.exec(cN)) { - return cN - } - cN = cN.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - do { - cT = cf.indexOf(cN.charAt(cM++)); - cR = cf.indexOf(cN.charAt(cM++)); - cP = cf.indexOf(cN.charAt(cM++)); - cO = cf.indexOf(cN.charAt(cM++)); - cU = (cT << 2) | (cR >> 4); - cS = ((cR & 15) << 4) | (cP >> 2); - cQ = ((cP & 3) << 6) | cO; - cL = cL + String.fromCharCode(cU); - if (cP != 64) { - cL = cL + String.fromCharCode(cS) - } - if (cO != 64) { - cL = cL + String.fromCharCode(cQ) - } - cU = cS = cQ = ""; - cT = cR = cP = cO = "" - } while (cM < cN.length); - return cL - } - var bg = a8.lang.Event; - function aA() { - return !!(a8.platform.isIphone || a8.platform.isIpad || a8.platform.isAndroid) - } - function bO() { - return !!(a8.platform.isWindows || a8.platform.isMacintosh || a8.platform.isX11) - } - function aE() { - return (new Date).getTime() - } - var cx = { - request : function(cL) { - var T = aa("script", { - src : cL, - type : "text/javascript", - charset : "utf-8" - }); - if (T.addEventListener) { - T.addEventListener("load", function(cN) { - var cM = cN.target; - cM.parentNode.removeChild(cM) - }, false) - } else { - if (T.attachEvent) { - T - .attachEvent( - "onreadystatechange", - function(cN) { - var cM = window.event.srcElement; - if (cM - && (cM.readyState == "loaded" || cM.readyState == "complete")) { - cM.parentNode.removeChild(cM) - } - }) - } - } - setTimeout(function() { - document.getElementsByTagName("head")[0].appendChild(T); - T = null - }, 1) - } - }; - function cA() { - } - a8.object.extend(cA, { - Request : { - INITIAL : -1, - WAITING : 0, - COMPLETED : 1 - }, - Dependency : { - control : [], - marker : [], - poly : [ "marker" ], - infowindow : [ "marker" ], - menu : [], - oppc : [], - opmb : [], - scommon : [], - local : [ "scommon" ], - route : [ "scommon" ], - othersearch : [ "scommon" ], - autocomplete : [ "scommon" ], - buslinesearch : [ "route" ], - hotspot : [] - }, - preLoaded : {}, - Config : { - _baseUrl : "js/", //x + "getmodules?v=1.3", //******* �Ķ���Դ��map,oppc,tile,control��·�� ******* - _timeout : 5000 - }, - delayFlag : false, - Module : { - _modules : {}, - _arrMdls : [] - }, - load : function(cL, cN) { - var T = this.current(cL); - if (T._status == this.Request.COMPLETED) { - return - } else { - if (T._status == this.Request.INITIAL) { - this.combine(cL); - this.pushUniqueMdl(cL); - var cM = this; - if (cM.delayFlag == false) { - cM.delayFlag = true; - window.setTimeout(function() { - var cO = cM.Config._baseUrl + "/modules" //"&mod=" - //+ cM.Module._arrMdls.join(","); - cx.request(cO); - cM.Module._arrMdls.length = 0; - cM.delayFlag = false - }, 1) - } - T._status = this.Request.WAITING - } - T._callbacks.push(cN) - } - }, - combine : function(T) { - if (T && this.Dependency[T]) { - var cM = this.Dependency[T]; - for ( var cL = 0; cL < cM.length; cL++) { - this.combine(cM[cL]); - if (!this.Module._modules[cM[cL]]) { - this.pushUniqueMdl(cM[cL]) - } - } - } - }, - pushUniqueMdl : function(cL) { - for ( var T = 0; T < this.Module._arrMdls.length; T++) { - if (this.Module._arrMdls[T] == cL) { - return - } - } - this.Module._arrMdls.push(cL) - }, - run : function(cM, cO) { - var cL = this.current(cM); - try { - eval(cO) - } catch (cP) { - return - } - cL._status = this.Request.COMPLETED; - for ( var cN = 0, T = cL._callbacks.length; cN < T; cN++) { - cL._callbacks[cN]() - } - cL._callbacks.length = 0 - }, - check : function(cL, cM) { - var T = this; - T.timeout = setTimeout(function() { - var cN = T.Module._modules[cL]._status; - if (cN != T.Request.COMPLETED) { - T.remove(cL); - T.load(cL, cM) - } else { - clearTimeout(T.timeout) - } - }, T.Config._timeout) - }, - current : function(cL) { - var T; - if (!this.Module._modules[cL]) { - this.Module._modules[cL] = {}; - this.Module._modules[cL]._status = this.Request.INITIAL; - this.Module._modules[cL]._callbacks = [] - } - T = this.Module._modules[cL]; - return T - }, - remove : function(cL) { - var T = this.current(cL); - delete T - } - }); - window._jsload = function(T, cL) { - cA.run(T, cL) - }; - function bu(T, cL) { - this.x = T || 0; - this.y = cL || 0 - } - bu.prototype.equals = function(T) { - return T && T.x == this.x && T.y == this.y - }; - function aH(cL, T) { - this.width = cL || 0; - this.height = T || 0 - } - aH.prototype.equals = function(T) { - return T && this.width == T.width && this.height == T.height - }; - function cm(T, cL) { - if (!T) { - return - } - this._position = T; - this.guid = "spot" + (cm.guid++); - cL = cL || {}; - this._text = cL.text || ""; - this._offsets = cL.offsets ? cL.offsets.slice(0) : [ 5, 5, 5, 5 ]; - this._userData = cL.userData || null; - this._minZoom = cL.minZoom || null; - this._maxZoom = cL.maxZoom || null - } - cm.guid = 0; - a8.extend(cm.prototype, { - initialize : function(T) { - if (this._minZoom == null) { - this._minZoom = T.config.minZoom - } - if (this._maxZoom == null) { - this._maxZoom = T.config.maxZoom - } - }, - setPosition : function(T) { - if (T instanceof cd) { - this._position = T - } - }, - getPosition : function() { - return this._position - }, - setText : function(T) { - this._text = T - }, - getText : function() { - return this._text - }, - setUserData : function(T) { - this._userData = T - }, - getUserData : function() { - return this._userData - } - }); - function cp() { - this._map = null; - this._container; - this._type = "control"; - this.blockInfoWindow = true; - this._visible = true - } - a8.lang.inherits(cp, a8.lang.Class, "Control"); - a8 - .extend( - cp.prototype, - { - initialize : function(T) { - this._map = T; - if (this._container) { - T.container.appendChild(this._container); - return this._container - } - return - }, - _i : function(T) { - if (!this._container && this.initialize - && I(this.initialize)) { - this._container = this.initialize(T) - } - this._opts = this._opts || { - printable : false - }; - this._setStyle(); - this._setPosition(); - if (this._container) { - this._container._jsobj = this - } - }, - _setStyle : function() { - var cL = this._container; - if (cL) { - var T = cL.style; - T.position = "absolute"; - T.zIndex = this._cZIndex || "10"; - T.MozUserSelect = "none"; - T.WebkitTextSizeAdjust = "none"; - if (!this._opts.printable) { - a8.dom.addClass(cL, "BMap_noprint") - } - a8.on(cL, "contextmenu", co) - } - }, - remove : function() { - this._map = null; - if (!this._container) { - return - } - this._container.parentNode - && this._container.parentNode - .removeChild(this._container); - this._container._jsobj = null; - this._container = null - }, - _render : function() { - this._container = at(this._map.container, - "
    "); - if (this._visible == false) { - a8.dom.hide(this._container) - } - return this._container - }, - _setPosition : function() { - this.setAnchor(this._opts.anchor) - }, - setAnchor : function(cN) { - if (this.anchorFixed || !aK(cN) || isNaN(cN) - || cN < BMAP_ANCHOR_TOP_LEFT - || cN > BMAP_ANCHOR_BOTTOM_RIGHT) { - cN = this.defaultAnchor - } - this._opts = this._opts || { - printable : false - }; - this._opts.offset = this._opts.offset - || this.defaultOffset; - var cM = this._opts.anchor; - this._opts.anchor = cN; - if (!this._container) { - return - } - var cP = this._container; - var T = this._opts.offset.width; - var cO = this._opts.offset.height; - cP.style.left = cP.style.top = cP.style.right = cP.style.bottom = "auto"; - switch (cN) { - case BMAP_ANCHOR_TOP_LEFT: - cP.style.top = cO + "px"; - cP.style.left = T + "px"; - break; - case BMAP_ANCHOR_TOP_RIGHT: - cP.style.top = cO + "px"; - cP.style.right = T + "px"; - break; - case BMAP_ANCHOR_BOTTOM_LEFT: - cP.style.bottom = cO + "px"; - cP.style.left = T + "px"; - break; - case BMAP_ANCHOR_BOTTOM_RIGHT: - cP.style.bottom = cO + "px"; - cP.style.right = T + "px"; - break; - default: - break - } - var cL = [ "TL", "TR", "BL", "BR" ]; - a8.dom.removeClass(this._container, "anchor" - + cL[cM]); - a8.dom.addClass(this._container, "anchor" + cL[cN]) - }, - getAnchor : function() { - return this._opts.anchor - }, - setOffset : function(T) { - if (!(T instanceof aH)) { - return - } - this._opts = this._opts || { - printable : false - }; - this._opts.offset = new aH(T.width, T.height); - if (!this._container) { - return - } - this.setAnchor(this._opts.anchor) - }, - getOffset : function() { - return this._opts.offset - }, - getDom : function() { - return this._container - }, - show : function() { - if (this._visible == true) { - return - } - this._visible = true; - if (this._container) { - a8.dom.show(this._container) - } - }, - hide : function() { - if (this._visible == false) { - return - } - this._visible = false; - if (this._container) { - a8.dom.hide(this._container) - } - }, - isPrintable : function() { - return !!this._opts.printable - }, - isVisible : function() { - if (!this._container && !this._map) { - return false - } - return !!this._visible - } - }); - window.BMAP_ANCHOR_TOP_LEFT = 0; - window.BMAP_ANCHOR_TOP_RIGHT = 1; - window.BMAP_ANCHOR_BOTTOM_LEFT = 2; - window.BMAP_ANCHOR_BOTTOM_RIGHT = 3; - window.BMAP_NAVIGATION_CONTROL_LARGE = 0; - window.BMAP_NAVIGATION_CONTROL_SMALL = 1; - window.BMAP_NAVIGATION_CONTROL_PAN = 2; - window.BMAP_NAVIGATION_CONTROL_ZOOM = 3; - function L(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false, - showZoomInfo : true - }; - a8.object.extend(this._opts, T); - this.defaultAnchor = BMAP_ANCHOR_TOP_LEFT; - this.defaultOffset = new aH(10, 10); - this.setAnchor(T.anchor); - this.setType(T.type); - this._asyncLoadCode() - } - a8.lang.inherits(L, cp, "NavigationControl"); - a8.extend(L.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setType : function(T) { - if (aK(T) && T >= BMAP_NAVIGATION_CONTROL_LARGE - && T <= BMAP_NAVIGATION_CONTROL_ZOOM) { - this._opts.type = T - } else { - this._opts.type = BMAP_NAVIGATION_CONTROL_LARGE - } - }, - getType : function() { - return this._opts.type - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function am(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - a8.object.extend(this._opts, T); - this._copyrightCollection = []; - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_LEFT; - this.defaultOffset = new aH(5, 2); - this.setAnchor(T.anchor); - this._canShow = true; - this.blockInfoWindow = false; - this._asyncLoadCode() - } - a8.lang.inherits(am, cp, "CopyrightControl"); - a8.object - .extend( - am.prototype, - { - initialize : function(T) { - this._map = T; - return this._container - }, - addCopyright : function(cM) { - if (!cM || !aK(cM.id) || isNaN(cM.id)) { - return - } - var T = { - bounds : null, - content : "" - }; - for ( var cL in cM) { - T[cL] = cM[cL] - } - var cN = this.getCopyright(cM.id); - if (cN) { - for ( var cO in T) { - cN[cO] = T[cO] - } - } else { - this._copyrightCollection.push(T) - } - }, - getCopyright : function(cM) { - for ( var cL = 0, T = this._copyrightCollection.length; cL < T; cL++) { - if (this._copyrightCollection[cL].id == cM) { - return this._copyrightCollection[cL] - } - } - }, - getCopyrightCollection : function() { - return this._copyrightCollection - }, - removeCopyright : function(cM) { - for ( var cL = 0, T = this._copyrightCollection.length; cL < T; cL++) { - if (this._copyrightCollection[cL].id == cM) { - r = this._copyrightCollection.splice(cL, 1); - cL--; - T = this._copyrightCollection.length - } - } - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function cK(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - this._opts = a8.extend(a8.extend(this._opts, { - size : new aH(150, 150), - padding : 5, - isOpen : false, - zoomInterval : 4 - }), T); - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_RIGHT; - this.defaultOffset = new aH(0, 0); - this._btnWidth = 13; - this._btnHeight = 13; - this.setAnchor(T.anchor); - this.setSize(this._opts.size); - this._asyncLoadCode() - } - a8.lang.inherits(cK, cp, "OverviewMapControl"); - a8.extend(cK.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setAnchor : function(T) { - cp.prototype.setAnchor.call(this, T) - }, - changeView : function() { - this.changeView._running = true; - this._opts.isOpen = !this._opts.isOpen; - if (!this._container) { - this.changeView._running = false - } - }, - setSize : function(T) { - if (!(T instanceof aH)) { - T = new aH(150, 150) - } - T.width = T.width > 0 ? T.width : 150; - T.height = T.height > 0 ? T.height : 150; - this._opts.size = T - }, - getSize : function() { - return this._opts.size - }, - isOpen : function() { - return this._opts.isOpen - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function bK(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false - }; - this._opts = a8.object.extend(a8.object.extend(this._opts, { - color : "black", - unit : "metric" - }), T); - this.defaultAnchor = BMAP_ANCHOR_BOTTOM_LEFT; - this.defaultOffset = new aH(81, 18); - this.setAnchor(T.anchor); - this._units = { - metric : { - name : "metric", - conv : 1, - incon : 1000, - u1 : "\u7c73", - u2 : "\u516c\u91cc" - }, - us : { - name : "us", - conv : 3.2808, - incon : 5280, - u1 : "\u82f1\u5c3a", - u2 : "\u82f1\u91cc" - } - }; - if (!this._units[this._opts.unit]) { - this._opts.unit = "metric" - } - this._scaleText = null; - this._numberArray = {}; - this._asyncLoadCode() - } - window.BMAP_UNIT_METRIC = "metric"; - window.BMAP_UNIT_IMPERIAL = "us"; - a8.lang.inherits(bK, cp, "ScaleControl"); - a8.object.extend(bK.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - setColor : function(T) { - this._opts.color = T + "" - }, - getColor : function() { - return this._opts.color - }, - setUnit : function(T) { - this._opts.unit = this._units[T] && this._units[T].name - || this._opts.unit - }, - getUnit : function() { - return this._opts.unit - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - window.BMAP_MAPTYPE_CONTROL_HORIZONTAL = 0; - window.BMAP_MAPTYPE_CONTROL_DROPDOWN = 1; - function aL(T) { - cp.call(this); - T = T || {}; - this._opts = { - printable : false, - mapTypes : [ BMAP_NORMAL_MAP, BMAP_SATELLITE_MAP, BMAP_HYBRID_MAP, - BMAP_PERSPECTIVE_MAP ], - type : BMAP_MAPTYPE_CONTROL_HORIZONTAL - }; - this.defaultAnchor = BMAP_ANCHOR_TOP_RIGHT; - this.defaultOffset = new aH(10, 10); - this.setAnchor(T.anchor); - this._opts = a8.extend(a8.extend(this._opts, { - offset : this.defaultOffset, - enableSwitch : true - }), T); - if (aY(T.mapTypes)) { - this._opts.mapTypes = T.mapTypes.slice(0) - } - this._asyncLoadCode() - } - a8.lang.inherits(aL, cp, "MapTypeControl"); - a8.object.extend(aL.prototype, { - initialize : function(T) { - this._map = T; - return this._container - }, - _asyncLoadCode : function() { - var T = this; - cA.load("control", function() { - T._asyncDraw() - }) - } - }); - function cz(cL) { - a8.lang.Class.call(this); - this._opts = { - container : null, - cursor : "default" - }; - this._opts = a8.extend(this._opts, cL); - this._type = "contextmenu"; - this._map = null; - this._container; - this._shadow; - this._left = 0; - this._top = 0; - this._items = []; - this._rItems = []; - this._dividers = []; - this.curPixel = null; - this.curPoint = null; - this._isOpen = false; - var T = this; - cA.load("menu", function() { - T._draw() - }) - } - a8.lang.inherits(cz, a8.lang.Class, "ContextMenu"); - a8.object.extend(cz.prototype, { - initialize : function(cL, T) { - this._map = cL; - this._overlay = T || null - }, - remove : function() { - this._map = this._overlay = null - }, - addItem : function(cM) { - if (!cM || cM._type != "menuitem" || cM._text == "" - || cM._width <= 0) { - return - } - for ( var cL = 0, T = this._items.length; cL < T; cL++) { - if (this._items[cL] === cM) { - return - } - } - this._items.push(cM); - this._rItems.push(cM) - }, - removeItem : function(cM) { - if (!cM || cM._type != "menuitem") { - return - } - for ( var cL = 0, T = this._items.length; cL < T; cL++) { - if (this._items[cL] === cM) { - this._items[cL].remove(); - this._items.splice(cL, 1); - T-- - } - } - for ( var cL = 0, T = this._rItems.length; cL < T; cL++) { - if (this._rItems[cL] === cM) { - this._rItems[cL].remove(); - this._rItems.splice(cL, 1); - T-- - } - } - }, - addSeparator : function() { - this._items.push( { - _type : "divider", - _dIndex : this._dividers.length - }); - this._dividers.push( { - dom : null - }) - }, - removeSeparator : function(cL) { - if (!this._dividers[cL]) { - return - } - for ( var cM = 0, T = this._items.length; cM < T; cM++) { - if (this._items[cM] && this._items[cM]._type == "divider" - && this._items[cM]._dIndex == cL) { - this._items.splice(cM, 1); - T-- - } - if (this._items[cM] && this._items[cM]._type == "divider" - && this._items[cM]._dIndex > cL) { - this._items[cM]._dIndex-- - } - } - this._dividers.splice(cL, 1) - }, - getDom : function() { - return this._container - }, - show : function() { - if (this._isOpen == true) { - return - } - this._isOpen = true - }, - hide : function() { - if (this._isOpen == false) { - return - } - this._isOpen = false - }, - setCursor : function(T) { - if (!T) { - return - } - this._opts.cursor = T - }, - getItem : function(T) { - return this._rItems[T] - } - }); - function be(cM, cN, cL) { - if (!cM || !I(cN)) { - return - } - a8.lang.Class.call(this); - this._opts = { - width : 100, - id : "" - }; - cL = cL || {}; - this._opts.width = (cL.width * 1) ? cL.width : 100; - this._opts.id = cL.id ? cL.id : ""; - this._text = cM + ""; - this._callback = cN; - this._map = null; - this._type = "menuitem"; - this._contextmenu = null; - this._container = null; - this._enabled = true; - var T = this; - cA.load("menu", function() { - T._draw() - }) - } - a8.lang.inherits(be, a8.lang.Class, "MenuItem"); - a8.object.extend(be.prototype, { - initialize : function(T, cL) { - this._map = T; - this._contextmenu = cL - }, - remove : function() { - this._contextmenu = null; - this._map = null - }, - setText : function(T) { - if (!T) { - return - } - this._text = T + "" - }, - getDom : function() { - return this._container - }, - enable : function() { - this._enabled = true - }, - disable : function() { - this._enabled = false - } - }); - function bN(T, cL) { - if (T && !cL) { - cL = T - } - this._sw = this._ne = null; - this._swLng = this._swLat = null; - this._neLng = this._neLat = null; - if (T) { - this._sw = new cd(T.lng, T.lat); - this._ne = new cd(cL.lng, cL.lat); - this._swLng = T.lng; - this._swLat = T.lat; - this._neLng = cL.lng; - this._neLat = cL.lat - } - } - a8.object.extend(bN.prototype, { - isEmpty : function() { - return !this._sw || !this._ne - }, - equals : function(T) { - if (!(T instanceof bN) || this.isEmpty()) { - return false - } - return this.getSouthWest().equals(T.getSouthWest()) - && this.getNorthEast().equals(T.getNorthEast()) - }, - getSouthWest : function() { - return this._sw - }, - getNorthEast : function() { - return this._ne - }, - containsBounds : function(T) { - if (!(T instanceof bN) || this.isEmpty() || T.isEmpty()) { - return false - } - return (T._swLng > this._swLng && T._neLng < this._neLng - && T._swLat > this._swLat && T._neLat < this._neLat) - }, - getCenter : function() { - if (this.isEmpty()) { - return null - } - return new cd((this._swLng + this._neLng) / 2, - (this._swLat + this._neLat) / 2) - }, - intersects : function(cM) { - if (!(cM instanceof bN)) { - return null - } - if (Math.max(cM._swLng, cM._neLng) < Math.min(this._swLng, - this._neLng) - || Math.min(cM._swLng, cM._neLng) > Math.max(this._swLng, - this._neLng) - || Math.max(cM._swLat, cM._neLat) < Math.min(this._swLat, - this._neLat) - || Math.min(cM._swLat, cM._neLat) > Math.max(this._swLat, - this._neLat)) { - return null - } - var cO = Math.max(this._swLng, cM._swLng); - var cL = Math.min(this._neLng, cM._neLng); - var cN = Math.max(this._swLat, cM._swLat); - var T = Math.min(this._neLat, cM._neLat); - return new bN(new cd(cO, cN), new cd(cL, T)) - }, - containsPoint : function(T) { - if (!(T instanceof cd) || this.isEmpty()) { - return false - } - return (T.lng >= this._swLng && T.lng <= this._neLng - && T.lat >= this._swLat && T.lat <= this._neLat) - }, - extend : function(T) { - if (!(T instanceof cd)) { - return - } - var cL = T.lng, cM = T.lat; - if (!this._sw) { - this._sw = new cd(0, 0) - } - if (!this._ne) { - this._ne = new cd(0, 0) - } - if (!this._swLng || this._swLng > cL) { - this._sw.lng = this._swLng = cL - } - if (!this._neLng || this._neLng < cL) { - this._ne.lng = this._neLng = cL - } - if (!this._swLat || this._swLat > cM) { - this._sw.lat = this._swLat = cM - } - if (!this._neLat || this._neLat < cM) { - this._ne.lat = this._neLat = cM - } - }, - toSpan : function() { - if (this.isEmpty()) { - return new cd(0, 0) - } - return new cd(Math.abs(this._neLng - this._swLng), Math - .abs(this._neLat - this._swLat)) - } - }); - function cd(T, cL) { - if (isNaN(T)) { - T = bV(T); - T = isNaN(T) ? 0 : T - } - if (b3(T)) { - T = parseFloat(T) - } - if (isNaN(cL)) { - cL = bV(cL); - cL = isNaN(cL) ? 0 : cL - } - if (b3(cL)) { - cL = parseFloat(cL) - } - this.lng = T; - this.lat = cL - } - cd.isInRange = function(T) { - return T && T.lng <= 180 && T.lng >= -180 && T.lat <= 74 - && T.lat >= -74 - }; - cd.prototype.equals = function(T) { - return T && this.lat == T.lat && this.lng == T.lng - }; - function bd() { - } - bd.prototype.lngLatToPoint = function() { - throw "lngLatToPoint\u65b9\u6cd5\u672a\u5b9e\u73b0" - }; - bd.prototype.pointToLngLat = function() { - throw "pointToLngLat\u65b9\u6cd5\u672a\u5b9e\u73b0" - }; - function b6() { - } - a8 - .extend( - b6, - { - num : { - bj : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 6) - }, - gz : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - }, - sz : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - }, - sh : { - num : Math.sin(Math.PI / 4), - num2 : Math.sin(Math.PI / 4) - } - }, - correct_pts : { - bj : [ { - j : 116.305687, - w : 39.990912, - utm_x : 12947230.73, - utm_y : 4836903.65, - x : 630412, - y : 547340 - }, { - j : 116.381837, - w : 40.000198, - utm_x : 12955707.8, - utm_y : 4838247.62, - x : 667412, - y : 561832 - }, { - j : 116.430651, - w : 39.995216, - utm_x : 12961141.81, - utm_y : 4837526.55, - x : 686556, - y : 573372 - }, { - j : 116.474111, - w : 39.976323, - utm_x : 12965979.81, - utm_y : 4834792.55, - x : 697152, - y : 586816 - }, { - j : 116.280328, - w : 39.953159, - utm_x : 12944407.75, - utm_y : 4831441.53, - x : 603272, - y : 549976 - }, { - j : 116.316117, - w : 39.952496, - utm_x : 12948391.8, - utm_y : 4831345.64, - x : 618504, - y : 557872 - }, { - j : 116.350477, - w : 39.938107, - utm_x : 12952216.78, - utm_y : 4829264.65, - x : 627044, - y : 568220 - }, { - j : 116.432025, - w : 39.947158, - utm_x : 12961294.76, - utm_y : 4830573.59, - x : 666280, - y : 584016 - }, { - j : 116.46873, - w : 39.949516, - utm_x : 12965380.79, - utm_y : 4830914.63, - x : 683328, - y : 591444 - }, { - j : 116.280077, - w : 39.913823, - utm_x : 12944379.8, - utm_y : 4825753.62, - x : 586150, - y : 558552 - }, { - j : 116.308625, - w : 39.91374, - utm_x : 12947557.79, - utm_y : 4825741.62, - x : 598648, - y : 564732 - }, { - j : 116.369853, - w : 39.912979, - utm_x : 12954373.73, - utm_y : 4825631.62, - x : 624561, - y : 578039 - }, { - j : 116.433552, - w : 39.914694, - utm_x : 12961464.75, - utm_y : 4825879.53, - x : 652972, - y : 591348 - }, { - j : 116.457034, - w : 39.914273, - utm_x : 12964078.78, - utm_y : 4825818.67, - x : 663028, - y : 596444 - }, { - j : 116.490927, - w : 39.914127, - utm_x : 12967851.77, - utm_y : 4825797.57, - x : 677968, - y : 604188 - }, { - j : 116.483839, - w : 39.877198, - utm_x : 12967062.73, - utm_y : 4820460.67, - x : 658596, - y : 610312 - }, { - j : 116.405777, - w : 39.864461, - utm_x : 12958372.82, - utm_y : 4818620.62, - x : 619256, - y : 596088 - }, { - j : 116.35345, - w : 39.859774, - utm_x : 12952547.74, - utm_y : 4817943.6, - x : 594633, - y : 585851 - }, { - j : 116.403818, - w : 39.9141, - utm_x : 12958154.74, - utm_y : 4825793.66, - x : 639699, - y : 585226 - }, { - j : 116.318111, - w : 39.891101, - utm_x : 12948613.78, - utm_y : 4822469.56, - x : 592856, - y : 571480 - }, { - j : 116.413047, - w : 39.907238, - utm_x : 12959182.12, - utm_y : 4824801.76, - x : 640680, - y : 588704 - }, { - j : 116.390843, - w : 39.906113, - utm_x : 12956710.35, - utm_y : 4824639.16, - x : 630620, - y : 584108 - }, { - j : 116.446527, - w : 39.899438, - utm_x : 12962909.14, - utm_y : 4823674.4, - x : 651752, - y : 597416 - }, { - j : 116.388665, - w : 39.95527, - utm_x : 12956467.9, - utm_y : 4831746.87, - x : 650656, - y : 572800 - }, { - j : 116.398343, - w : 39.939704, - utm_x : 12957545.26, - utm_y : 4829495.6, - x : 648036, - y : 578452 - }, { - j : 116.355101, - w : 39.973581, - utm_x : 12952731.53, - utm_y : 4834395.82, - x : 643268, - y : 560944 - }, { - j : 116.380727, - w : 39.88464, - utm_x : 12955584.23, - utm_y : 4821535.94, - x : 616920, - y : 586496 - }, { - j : 116.360843, - w : 39.946452, - utm_x : 12953370.73, - utm_y : 4830471.48, - x : 635293, - y : 568765 - }, { - j : 116.340955, - w : 39.973421, - utm_x : 12951156.79, - utm_y : 4834372.67, - x : 638420, - y : 558632 - }, { - j : 116.322585, - w : 40.023941, - utm_x : 12949111.83, - utm_y : 4841684.79, - x : 652135, - y : 543802 - }, { - j : 116.356486, - w : 39.883341, - utm_x : 12952885.71, - utm_y : 4821348.24, - x : 606050, - y : 581443 - }, { - j : 116.339592, - w : 39.992259, - utm_x : 12951005.06, - utm_y : 4837098.59, - x : 645664, - y : 554400 - }, { - j : 116.3778, - w : 39.86392, - utm_x : 12955258.4, - utm_y : 4818542.48, - x : 606848, - y : 590328 - }, { - j : 116.377354, - w : 39.964124, - utm_x : 12955208.75, - utm_y : 4833027.64, - x : 649911, - y : 568581 - }, { - j : 116.361837, - w : 39.963897, - utm_x : 12953481.39, - utm_y : 4832994.8, - x : 643286, - y : 565175 - }, { - j : 116.441397, - w : 39.939403, - utm_x : 12962338.06, - utm_y : 4829452.07, - x : 666772, - y : 587728 - }, { - j : 116.359176, - w : 40.006631, - utm_x : 12953185.16, - utm_y : 4839178.78, - x : 660440, - y : 555411 - } ], - sz : [ { - w : 22.498861, - utm_x : 12677279.029193671, - utm_y : 2555027.9501714734, - j : 113.880696, - y : 1104472, - x : 947240 - }, { - w : 22.500706, - utm_x : 12683920.978881944, - utm_y : 2555248.973138607, - j : 113.940361, - y : 1122320, - x : 974864 - }, { - w : 22.576848, - utm_x : 12675897.984563945, - utm_y : 2564373.058056766, - j : 113.86829, - y : 1074048, - x : 979136 - }, { - w : 22.55689, - utm_x : 12680064.05051775, - utm_y : 2561981.0013635466, - j : 113.905714, - y : 1092484, - x : 986240 - }, { - w : 22.58066, - utm_x : 12678671.98513852, - utm_y : 2564829.983373251, - j : 113.893209, - y : 1080528, - x : 992088 - }, { - w : 22.595751, - utm_x : 12678298.949465925, - utm_y : 2566638.9913895614, - j : 113.889858, - y : 1074484, - x : 997960 - }, { - w : 22.557499, - utm_x : 12684523.001238672, - utm_y : 2562053.9875916084, - j : 113.945769, - y : 1104696, - x : 1004564 - }, { - w : 22.648419, - utm_x : 12676422.97299485, - utm_y : 2572954.0513219936, - j : 113.873006, - y : 1051384, - x : 1015916 - }, { - w : 22.562664, - utm_x : 12690460.958807131, - utm_y : 2562673.0054078405, - j : 113.99911, - y : 1119860, - x : 1030228 - }, { - w : 22.646618, - utm_x : 12683008.037804369, - utm_y : 2572738.0652955617, - j : 113.93216, - y : 1070324, - x : 1041496 - }, { - w : 22.571091, - utm_x : 12695789.992135335, - utm_y : 2563683.019582462, - j : 114.046981, - y : 1131924, - x : 1055628 - }, { - w : 22.704467, - utm_x : 12682276.994753957, - utm_y : 2579677.075645295, - j : 113.925593, - y : 1048536, - x : 1066348 - }, { - w : 22.547152, - utm_x : 12702917.96800879, - utm_y : 2560813.9850610085, - j : 114.111012, - y : 1160352, - x : 1072596 - }, { - w : 22.546192, - utm_x : 12704502.952164687, - utm_y : 2560698.9417545213, - j : 114.12525, - y : 1165256, - x : 1078452 - }, { - w : 22.5714, - utm_x : 12702350.00978689, - utm_y : 2563720.0558210905, - j : 114.10591, - y : 1150556, - x : 1081960 - }, { - w : 22.555004, - utm_x : 12704883.001041513, - utm_y : 2561754.9738317807, - j : 114.128664, - y : 1163304, - x : 1084172 - }, { - w : 22.551925, - utm_x : 12706255.028694374, - utm_y : 2561385.978019464, - j : 114.140989, - y : 1168216, - x : 1088116 - }, { - w : 22.693756, - utm_x : 12690318.02302569, - utm_y : 2578392.0635360866, - j : 113.997826, - y : 1075100, - x : 1092860 - }, { - w : 22.573769, - utm_x : 12705731.042149788, - utm_y : 2564004.003107545, - j : 114.136282, - y : 1159404, - x : 1096572 - }, { - w : 22.583238, - utm_x : 12706369.021093281, - utm_y : 2565139.002548978, - j : 114.142013, - y : 1157896, - x : 1103632 - }, { - w : 22.605844, - utm_x : 12704694.980375737, - utm_y : 2567848.984570506, - j : 114.126975, - y : 1145540, - x : 1107972 - }, { - w : 22.637228, - utm_x : 12702545.043656897, - utm_y : 2571612.010208761, - j : 114.107662, - y : 1128764, - x : 1114460 - }, { - w : 22.62496, - utm_x : 12707132.013185183, - utm_y : 2570140.9407190788, - j : 114.148867, - y : 1145732, - x : 1127028 - }, { - w : 22.644524, - utm_x : 12707016.01701364, - utm_y : 2572486.9446672536, - j : 114.147825, - y : 1138800, - x : 1135876 - }, { - w : 22.640188, - utm_x : 12711515.0431873, - utm_y : 2571966.966986786, - j : 114.18824, - y : 1152692, - x : 1151836 - }, { - w : 22.59807, - utm_x : 12720011.039168343, - utm_y : 2566916.995355996, - j : 114.26456, - y : 1191212, - x : 1165180 - }, { - w : 22.668221, - utm_x : 12714081.987256048, - utm_y : 2575329.007304823, - j : 114.211299, - y : 1150576, - x : 1175404 - }, { - w : 22.702591, - utm_x : 12717292.031020584, - utm_y : 2579452.0022288463, - j : 114.240135, - y : 1148204, - x : 1204600 - }, { - w : 22.731786, - utm_x : 12717795.9798388, - utm_y : 2582955.0308636553, - j : 114.244662, - y : 1139532, - x : 1220540 - }, { - w : 22.727494, - utm_x : 12720675.957721734, - utm_y : 2582439.9980541077, - j : 114.270533, - y : 1148992, - x : 1230084 - }, { - w : 22.716335, - utm_x : 12725500.040345404, - utm_y : 2581101.0132384477, - j : 114.313868, - y : 1166316, - x : 1244102 - } ], - gz : [ { - j : 113.335098, - w : 23.147289, - utm_x : 12616542.68, - utm_y : 2632892.7, - x : 1129109, - y : 1073920 - }, { - j : 113.320932, - w : 23.146956, - utm_x : 12614965.71, - utm_y : 2632852.62, - x : 1125620, - y : 1071640 - }, { - j : 113.321435, - w : 23.140119, - utm_x : 12615021.7, - utm_y : 2632029.65, - x : 1124032, - y : 1072882 - }, { - j : 113.321471, - w : 23.119165, - utm_x : 12615025.71, - utm_y : 2629507.68, - x : 1118932, - y : 1076530 - }, { - j : 113.340201, - w : 23.118616, - utm_x : 12617110.75, - utm_y : 2629441.61, - x : 1123238, - y : 1079667 - }, { - j : 113.358068, - w : 23.116323, - utm_x : 12619099.71, - utm_y : 2629165.66, - x : 1126968, - y : 1083116 - }, { - j : 113.357529, - w : 23.131271, - utm_x : 12619039.71, - utm_y : 2630964.68, - x : 1130508, - y : 1080440 - }, { - j : 113.365811, - w : 23.150595, - utm_x : 12619961.67, - utm_y : 2633290.66, - x : 1137205, - y : 1078567 - }, { - j : 113.294145, - w : 23.118467, - utm_x : 12611983.76, - utm_y : 2629423.68, - x : 1112245, - y : 1072043 - }, { - j : 113.28615, - w : 23.121525, - utm_x : 12611093.75, - utm_y : 2629791.7, - x : 1110993, - y : 1070197 - }, { - j : 113.307152, - w : 23.055497, - utm_x : 12613431.71, - utm_y : 2621847.21, - x : 1100144, - y : 1085123 - }, { - j : 113.333445, - w : 23.052687, - utm_x : 12616358.66, - utm_y : 2621509.2, - x : 1105784, - y : 1089948 - }, { - j : 113.347476, - w : 23.048755, - utm_x : 12617920.6, - utm_y : 2621036.24, - x : 1108099, - y : 1093064 - }, { - j : 113.385774, - w : 23.036574, - utm_x : 12622183.96, - utm_y : 2619571.12, - x : 1113850, - y : 1101834 - }, { - j : 113.364185, - w : 22.89798, - utm_x : 12619780.66, - utm_y : 2602910.64, - x : 1073186, - y : 1123374 - }, { - j : 113.404577, - w : 22.906481, - utm_x : 12624277.13, - utm_y : 2603932.06, - x : 1084888, - y : 1128692 - }, { - j : 113.430856, - w : 22.913156, - utm_x : 12627202.52, - utm_y : 2604734.12, - x : 1092892, - y : 1131761 - }, { - j : 113.384554, - w : 22.933021, - utm_x : 12622048.15, - utm_y : 2607121.32, - x : 1086975, - y : 1120403 - }, { - j : 113.263566, - w : 23.146333, - utm_x : 12608579.68, - utm_y : 2632777.63, - x : 1111742, - y : 1062098 - }, { - j : 113.239213, - w : 23.152996, - utm_x : 12605868.69, - utm_y : 2633579.69, - x : 1107616, - y : 1056740 - }, { - j : 113.253865, - w : 23.131628, - utm_x : 12607499.76, - utm_y : 2631007.65, - x : 1105912, - y : 1062966 - }, { - j : 113.240767, - w : 23.088434, - utm_x : 12606041.68, - utm_y : 2625809.7, - x : 1092270, - y : 1068184 - }, { - j : 113.279628, - w : 23.088284, - utm_x : 12610367.72, - utm_y : 2625791.65, - x : 1101412, - y : 1074883 - }, { - j : 113.462271, - w : 23.107058, - utm_x : 12630699.66, - utm_y : 2628050.7, - x : 1148752, - y : 1101736 - }, { - j : 113.401618, - w : 23.052957, - utm_x : 12623947.73, - utm_y : 2621541.68, - x : 1121925, - y : 1101535 - }, { - j : 113.422504, - w : 23.05905, - utm_x : 12626272.77, - utm_y : 2622274.61, - x : 1128470, - y : 1104049 - }, { - j : 113.362506, - w : 23.107149, - utm_x : 12619593.75, - utm_y : 2628061.65, - x : 1125835, - y : 1085505 - }, { - j : 113.419629, - w : 23.143176, - utm_x : 12625952.73, - utm_y : 2632397.61, - x : 1148133, - y : 1089052 - }, { - j : 113.23315, - w : 23.062251, - utm_x : 12605193.75, - utm_y : 2622659.67, - x : 1084184, - y : 1071368 - }, { - j : 113.314525, - w : 23.101412, - utm_x : 12614252.48, - utm_y : 2627371.29, - x : 1113011, - y : 1078426 - }, { - j : 113.307947, - w : 23.131369, - utm_x : 12613520.21, - utm_y : 2630976.47, - x : 1118622, - y : 1072198 - } ], - sh : [ { - j : 121.524411, - w : 31.245875, - utm_x : 13528182.75, - utm_y : 3642354.51, - x : 1086581, - y : 1065728 - }, { - j : 121.419229, - w : 31.244887, - utm_x : 13516473.81, - utm_y : 3642226.51, - x : 1032616, - y : 1029148 - }, { - j : 121.405637, - w : 31.237871, - utm_x : 13514960.74, - utm_y : 3641317.54, - x : 1022724, - y : 1027244 - }, { - j : 121.415348, - w : 31.222879, - utm_x : 13516041.78, - utm_y : 3639375.47, - x : 1018548, - y : 1036980 - }, { - j : 121.422561, - w : 31.224261, - utm_x : 13516844.73, - utm_y : 3639554.48, - x : 1022976, - y : 1038908 - }, { - j : 121.412581, - w : 31.204148, - utm_x : 13515733.75, - utm_y : 3636949.48, - x : 1006568, - y : 1043696 - }, { - j : 121.443025, - w : 31.206202, - utm_x : 13519122.8, - utm_y : 3637215.49, - x : 1022656, - y : 1053704 - }, { - j : 121.524061, - w : 31.246917, - utm_x : 13528143.79, - utm_y : 3642489.52, - x : 1082052, - y : 1064124 - }, { - j : 121.529343, - w : 31.217769, - utm_x : 13528731.78, - utm_y : 3638713.59, - x : 1072696, - y : 1079064 - }, { - j : 121.530268, - w : 31.210341, - utm_x : 13528834.75, - utm_y : 3637751.53, - x : 1068748, - y : 1082416 - }, { - j : 121.511601, - w : 31.227303, - utm_x : 13526756.73, - utm_y : 3639948.53, - x : 1069276, - y : 1068716 - }, { - j : 121.4966, - w : 31.243614, - utm_x : 13525086.81, - utm_y : 3642061.58, - x : 1071220, - y : 1056805 - }, { - j : 121.485021, - w : 31.26138, - utm_x : 13523797.82, - utm_y : 3644363.54, - x : 1075708, - y : 1045540 - }, { - j : 121.465114, - w : 31.278803, - utm_x : 13521581.76, - utm_y : 3646621.48, - x : 1073740, - y : 1031268 - }, { - j : 121.454784, - w : 31.266566, - utm_x : 13520431.82, - utm_y : 3645035.58, - x : 1063591, - y : 1033191 - }, { - j : 121.46851, - w : 31.24951, - utm_x : 13521959.81, - utm_y : 3642825.48, - x : 1060200, - y : 1044520 - }, { - j : 121.446384, - w : 31.248422, - utm_x : 13519496.73, - utm_y : 3642684.51, - x : 1048784, - y : 1037750 - }, { - j : 121.509499, - w : 31.246469, - utm_x : 13526522.73, - utm_y : 3642431.47, - x : 1079309, - y : 1060105 - }, { - j : 121.481643, - w : 31.283943, - utm_x : 13523421.78, - utm_y : 3647287.68, - x : 1087096, - y : 1035304 - }, { - j : 121.508054, - w : 31.280609, - utm_x : 13526361.87, - utm_y : 3646855.56, - x : 1098432, - y : 1045648 - }, { - j : 121.493854, - w : 31.19121, - utm_x : 13524781.12, - utm_y : 3635274.07, - x : 1039624, - y : 1077288 - }, { - j : 121.500079, - w : 31.185541, - utm_x : 13525474.09, - utm_y : 3634540.04, - x : 1039960, - y : 1081640 - }, { - j : 121.484482, - w : 31.202846, - utm_x : 13523737.82, - utm_y : 3636780.87, - x : 1041388, - y : 1069232 - }, { - j : 121.480877, - w : 31.189587, - utm_x : 13523336.51, - utm_y : 3635063.92, - x : 1032484, - y : 1073640 - }, { - j : 121.502652, - w : 31.195209, - utm_x : 13525760.52, - utm_y : 3635791.9, - x : 1046384, - y : 1078728 - } ] - }, - getLnglatIndex : function(cN, cR, cQ) { - var cM = 0; - var cL = 0; - var cS = 10000000, cP = 1000000000; - for ( var cO = 0; cO < this.correct_pts[cN].length; cO++) { - var T = this.getDis(this.correct_pts[cN][cO].x, - this.correct_pts[cN][cO].y, cR, cQ); - if (T < cP) { - if (T < cS) { - cP = cS; - cS = T; - cL = cM; - cM = cO - } else { - sedMinDis = T; - cL = cO - } - } - } - return { - lt : cM, - rb : cL - } - }, - getOMapIndex_mm : function(cN, cS, cR) { - var cM = 0; - var cL = 0; - var cQ = 1294723000, cP = 1294723000; - for ( var cO = 0; cO < this.correct_pts[cN].length; cO++) { - var T = this.getDis( - this.correct_pts[cN][cO].utm_x, - this.correct_pts[cN][cO].utm_y, cS, cR); - if (T < cP) { - if (T < cQ) { - cP = cQ; - cQ = T; - cL = cM; - cM = cO - } else { - sedMinDis = T; - cL = cO - } - } - } - return { - lt : cM, - rb : cL - } - }, - getDis : function(T, cN, cL, cM) { - return Math.abs(T - cL) + Math.abs(cN - cM) - }, - toMap : function(cN, T, cO) { - var cL = (T - cO) * this.num[cN].num; - var cM = (T + cO) * this.num[cN].num - * this.num[cN].num2; - return { - x : cL, - y : cM - } - }, - fromMap : function(cN, T, cO) { - cO = cO / this.num[cN].num2; - var cL = (T + cO) / (this.num[cN].num * 2); - var cM = (cO - T) / (this.num[cN].num * 2); - return { - x : cL, - y : cM - } - }, - getDgPix_mm : function(cO, cT, cP) { - var cS = this.fromMap(cO, - this.correct_pts[cO][cT].x, - this.correct_pts[cO][cT].y); - var cQ = this.fromMap(cO, - this.correct_pts[cO][cP].x, - this.correct_pts[cO][cP].y); - var cY = cS.x, cL = cS.y; - var cX = cQ.x, T = cQ.y; - var cV = this.correct_pts[cO][cT].utm_x, cN = this.correct_pts[cO][cT].utm_y; - var cR = this.correct_pts[cO][cP].utm_x, cM = this.correct_pts[cO][cP].utm_y; - var cW = Math.abs((cR - cV) * 100000 / (cX - cY)); - var cU = Math.abs((cM - cN) * 100000 / (T - cL)); - return { - j : cW, - w : cU, - x : 100000 / cW, - y : 100000 / cU - } - }, - getPx_mm : function(c1, cX, cW, cO, cN) { - var cM = this.correct_pts[c1][cO]; - var T = this.correct_pts[c1][cO]; - var cU = this.getDgPix_mm(c1, cO, cN); - var cQ = this.fromMap(c1, cM.x, cM.y); - var cP = T.utm_x, c3 = T.utm_y; - var c2 = cX, cV = cW; - var c0 = cQ.x; - var cL = cQ.y; - var cS = c2 - cP, cZ = cV - c3; - var cT = cS * cU.x + c0; - var cR = -cZ * cU.y + cL; - var cY = this.toMap(c1, cT, cR); - return cY - }, - getJw_mm : function(cZ, cU, cT, cP, cO) { - var cS = this.correct_pts[cZ][cP]; - var cL = this.correct_pts[cZ][cP]; - var cV = this.getDgPix_mm(cZ, cP, cO); - var cX = this.fromMap(cZ, cU, cT); - var cN = this.fromMap(cZ, cS.x, cS.y); - var cQ = cL.utm_x, c0 = cL.utm_y; - var cY = cN.x; - var cM = cN.y; - var c1 = cX.x - cY, cW = cM - cX.y; - var cR = c1 / cV.x + cQ; - var T = cW / cV.y + c0; - return { - lng : cR, - lat : T - } - }, - getOMap_pts : function(cL, T) { - return this.getOMap_index(cL, T.lng, T.lat, T.lt, - T.rb) - }, - getMapJw_pts : function(cL, T) { - return this.getMapJw_index(cL, T.lng, - 9998336 - T.lat, T.lt, T.rb) - }, - getOMap_index : function(cQ, cP, cO, T, cN) { - if (!T || !cN) { - var cL = this.getOMapIndex_mm(cQ, cP, cO) - } else { - var cL = { - lt : T, - rb : cN - } - } - var cM = this.getPx_mm(cQ, cP, cO, cL.lt, cL.rb); - return { - x : Math.floor(cM.x), - y : 9998336 - Math.floor(cM.y), - lt : cL.lt, - rb : cL.rb - } - }, - getMapJw_index : function(cP, cM, cQ, cL, cO) { - if (!cL || !cO) { - var cN = this.getLnglatIndex(cP, cM, cQ) - } else { - var cN = { - lt : cL, - rb : cO - } - } - var T = this.getJw_mm(cP, cM, cQ, cN.lt, cN.rb); - return { - lng : T.lng, - lat : T.lat, - lt : cN.lt, - rb : cN.rb - } - } - }); - function ba() { - } - ba.prototype = new bd(); - a8.extend(ba, - { - EARTHRADIUS : 6370996.81, - MCBAND : [ 12890594.86, 8362377.87, 5591021, 3481989.83, - 1678043.12, 0 ], - LLBAND : [ 75, 60, 45, 30, 15, 0 ], - MC2LL : [ - [ 1.410526172116255e-8, 0.00000898305509648872, - -1.9939833816331, 200.9824383106796, - -187.2403703815547, 91.6087516669843, - -23.38765649603339, 2.57121317296198, - -0.03801003308653, 17337981.2 ], - [ -7.435856389565537e-9, 0.000008983055097726239, - -0.78625201886289, 96.32687599759846, - -1.85204757529826, -59.36935905485877, - 47.40033549296737, -16.50741931063887, - 2.28786674699375, 10260144.86 ], - [ -3.030883460898826e-8, 0.00000898305509983578, - 0.30071316287616, 59.74293618442277, - 7.357984074871, -25.38371002664745, - 13.45380521110908, -3.29883767235584, - 0.32710905363475, 6856817.37 ], - [ -1.981981304930552e-8, 0.000008983055099779535, - 0.03278182852591, 40.31678527705744, - 0.65659298677277, -4.44255534477492, - 0.85341911805263, 0.12923347998204, - -0.04625736007561, 4482777.06 ], - [ 3.09191371068437e-9, 0.000008983055096812155, - 0.00006995724062, 23.10934304144901, - -0.00023663490511, -0.6321817810242, - -0.00663494467273, 0.03430082397953, - -0.00466043876332, 2555164.4 ], - [ 2.890871144776878e-9, 0.000008983055095805407, - -3.068298e-8, 7.47137025468032, - -0.00000353937994, -0.02145144861037, - -0.00001234426596, 0.00010322952773, - -0.00000323890364, 826088.5 ] ], - LL2MC : [ - [ -0.0015702102444, 111320.7020616939, - 1704480524535203, -10338987376042340, - 26112667856603880, -35149669176653700, - 26595700718403920, -10725012454188240, - 1800819912950474, 82.5 ], - [ 0.0008277824516172526, 111320.7020463578, - 647795574.6671607, -4082003173.641316, - 10774905663.51142, -15171875531.51559, - 12053065338.62167, -5124939663.577472, - 913311935.9512032, 67.5 ], - [ 0.00337398766765, 111320.7020202162, - 4481351.045890365, -23393751.19931662, - 79682215.47186455, -115964993.2797253, - 97236711.15602145, -43661946.33752821, - 8477230.501135234, 52.5 ], - [ 0.00220636496208, 111320.7020209128, - 51751.86112841131, 3796837.749470245, - 992013.7397791013, -1221952.21711287, - 1340652.697009075, -620943.6990984312, - 144416.9293806241, 37.5 ], - [ -0.0003441963504368392, 111320.7020576856, - 278.2353980772752, 2485758.690035394, - 6070.750963243378, 54821.18345352118, - 9540.606633304236, -2710.55326746645, - 1405.483844121726, 22.5 ], - [ -0.0003218135878613132, 111320.7020701615, - 0.00369383431289, 823725.6402795718, - 0.46104986909093, 2351.343141331292, - 1.58060784298199, 8.77738589078284, - 0.37238884252424, 7.45 ] ], - getDistanceByMC : function(cP, cN) { - if (!cP || !cN) { - return 0 - } - var cL, cO, T, cM; - cP = this.convertMC2LL(cP); - if (!cP) { - return 0 - } - cL = this.toRadians(cP.lng); - cO = this.toRadians(cP.lat); - cN = this.convertMC2LL(cN); - if (!cN) { - return 0 - } - T = this.toRadians(cN.lng); - cM = this.toRadians(cN.lat); - return this.getDistance(cL, T, cO, cM) - }, - getDistanceByLL : function(cP, cN) { - if (!cP || !cN) { - return 0 - } - cP.lng = this.getLoop(cP.lng, -180, 180); - cP.lat = this.getRange(cP.lat, -74, 74); - cN.lng = this.getLoop(cN.lng, -180, 180); - cN.lat = this.getRange(cN.lat, -74, 74); - var cL, T, cO, cM; - cL = this.toRadians(cP.lng); - cO = this.toRadians(cP.lat); - T = this.toRadians(cN.lng); - cM = this.toRadians(cN.lat); - return this.getDistance(cL, T, cO, cM) - }, - convertMC2LL : function(cL) { - var cM, cO; - cM = new cd(Math.abs(cL.lng), Math.abs(cL.lat)); - for ( var cN = 0; cN < this.MCBAND.length; cN++) { - if (cM.lat >= this.MCBAND[cN]) { - cO = this.MC2LL[cN]; - break - } - } - var T = this.convertor(cL, cO); - var cL = new cd(T.lng.toFixed(6), T.lat.toFixed(6)); - return cL - }, - convertLL2MC : function(T) { - var cL, cN; - T.lng = this.getLoop(T.lng, -180, 180); - T.lat = this.getRange(T.lat, -74, 74); - cL = new cd(T.lng, T.lat); - for ( var cM = 0; cM < this.LLBAND.length; cM++) { - if (cL.lat >= this.LLBAND[cM]) { - cN = this.LL2MC[cM]; - break - } - } - if (!cN) { - for ( var cM = this.LLBAND.length - 1; cM >= 0; cM--) { - if (cL.lat <= -this.LLBAND[cM]) { - cN = this.LL2MC[cM]; - break - } - } - } - var cO = this.convertor(T, cN); - var T = new cd(cO.lng.toFixed(2), cO.lat.toFixed(2)); - return T - }, - convertor : function(cM, cN) { - if (!cM || !cN) { - return - } - var T = cN[0] + cN[1] * Math.abs(cM.lng); - var cL = Math.abs(cM.lat) / cN[9]; - var cO = cN[2] + cN[3] * cL + cN[4] * cL * cL + cN[5] * cL - * cL * cL + cN[6] * cL * cL * cL * cL + cN[7] * cL - * cL * cL * cL * cL + cN[8] * cL * cL * cL * cL - * cL * cL; - T *= (cM.lng < 0 ? -1 : 1); - cO *= (cM.lat < 0 ? -1 : 1); - return new cd(T, cO) - }, - getDistance : function(cL, T, cN, cM) { - return this.EARTHRADIUS - * Math.acos((Math.sin(cN) * Math.sin(cM) + Math - .cos(cN) - * Math.cos(cM) * Math.cos(T - cL))) - }, - toRadians : function(T) { - return Math.PI * T / 180 - }, - toDegrees : function(T) { - return (180 * T) / Math.PI - }, - getRange : function(cM, cL, T) { - if (cL != null) { - cM = Math.max(cM, cL) - } - if (T != null) { - cM = Math.min(cM, T) - } - return cM - }, - getLoop : function(cM, cL, T) { - while (cM > T) { - cM -= T - cL - } - while (cM < cL) { - cM += T - cL - } - return cM - } - }); - a8.extend(ba.prototype, { - lngLatToMercator : function(T) { - return ba.convertLL2MC(T) - }, - lngLatToPoint : function(T) { - var cL = ba.convertLL2MC(T); - return new bu(cL.lng, cL.lat) - }, - mercatorToLngLat : function(T) { - return ba.convertMC2LL(T) - }, - pointToLngLat : function(T) { - var cL = new cd(T.x, T.y); - return ba.convertMC2LL(cL) - }, - pointToPixel : function(cL, cP, cO, cN, cQ) { - if (!cL) { - return - } - cL = this.lngLatToMercator(cL, cQ); - var cM = this.getZoomUnits(cP); - var T = Math.round((cL.lng - cO.lng) / cM + cN.width / 2); - var cR = Math.round((cO.lat - cL.lat) / cM + cN.height / 2); - return new bu(T, cR) - }, - pixelToPoint : function(T, cS, cO, cM, cL) { - if (!T) { - return - } - var cR = this.getZoomUnits(cS); - var cP = cO.lng + cR * (T.x - cM.width / 2); - var cN = cO.lat - cR * (T.y - cM.height / 2); - var cQ = new cd(cP, cN); - return this.mercatorToLngLat(cQ, cL) - }, - getZoomUnits : function(T) { - return Math.pow(2, (18 - T)) - } - }); - function cE() { - } - cE.prototype = new ba(); - a8.extend(cE.prototype, { - lngLatToMercator : function(cL, T) { - return this._convert2DTo3D(T, ba.convertLL2MC(cL)) - }, - mercatorToLngLat : function(cL, T) { - return ba.convertMC2LL(this._convert3DTo2D(T, cL)) - }, - lngLatToPoint : function(cM, T) { - var cL = this._convert2DTo3D(T, ba.convertLL2MC(cM)); - return new bu(cL.lng, cL.lat) - }, - pointToLngLat : function(cL, T) { - var cM = new cd(cL.x, cL.y); - return ba.convertMC2LL(this._convert3DTo2D(T, cM)) - }, - _convert2DTo3D : function(cM, T) { - var cL = b6.getOMap_pts(cM || "bj", T); - return new cd(cL.x, cL.y) - }, - _convert3DTo2D : function(cM, T) { - var cL = b6.getMapJw_pts(cM || "bj", T); - return new cd(cL.lng, cL.lat) - }, - getZoomUnits : function(T) { - return Math.pow(2, (20 - T)) - } - }); - function bG() { - this._type = "overlay" - } - a8.lang.inherits(bG, a8.lang.Class, "Overlay"); - bG.getZIndex = function(T) { - T = T * 1; - if (!T) { - return 0 - } - return (T * -100000) << 1 - }; - a8.extend(bG.prototype, { - _i : function(T) { - if (!this.domElement && I(this.initialize)) { - this.domElement = this.initialize(T); - if (this.domElement) { - this.domElement.style.WebkitUserSelect = "none" - } - } - this.draw() - }, - initialize : function(T) { - throw "initialize\u65b9\u6cd5\u672a\u5b9e\u73b0" - }, - draw : function() { - throw "draw\u65b9\u6cd5\u672a\u5b9e\u73b0" - }, - remove : function() { - if (this.domElement && this.domElement.parentNode) { - this.domElement.parentNode.removeChild(this.domElement) - } - this.domElement = null; - this.dispatchEvent(new bg("onremove")) - }, - hide : function() { - if (this.domElement) { - a8.dom.hide(this.domElement) - } - }, - show : function() { - if (this.domElement) { - a8.dom.show(this.domElement) - } - }, - isVisible : function() { - if (!this.domElement) { - return false - } - if (this.domElement.style.display == "none" - || this.domElement.style.visibility == "hidden") { - return false - } - return true - } - }); - BMap.register(function(cM) { - var T = cM.temp; - T.overlayDiv = cM.overlayDiv = cL(cM.platform, 200); - cM._panes.floatPane = cL(T.overlayDiv, 800); - cM._panes.markerMouseTarget = cL(T.overlayDiv, 700); - cM._panes.floatShadow = cL(T.overlayDiv, 600); - cM._panes.labelPane = cL(T.overlayDiv, 500); - cM._panes.markerPane = cL(T.overlayDiv, 400); - cM._panes.markerShadow = cL(T.overlayDiv, 300); - cM._panes.mapPane = cL(T.overlayDiv, 200); - function cL(cN, cQ) { - var cP = aa("div"), cO = cP.style; - cO.position = "absolute"; - cO.top = cO.left = cO.width = cO.height = "0"; - cO.zIndex = cQ; - cN.appendChild(cP); - return cP - } - }); - function Y() { - a8.lang.Class.call(this); - bG.call(this); - this.map = null; - this._visible = true; - this.infoWindow = null; - this._dblclickTime = 0 - } - a8.lang.inherits(Y, bG, "OverlayInternal"); - a8.extend(Y.prototype, { - initialize : function(T) { - this.map = T; - a8.lang.Class.call(this, this.guid); - return null - }, - getMap : function() { - return this.map - }, - draw : function() { - }, - remove : function() { - this.map = null; - a8.lang.decontrol(this.guid); - bG.prototype.remove.call(this) - }, - hide : function() { - if (this._visible == false) { - return - } - this._visible = false - }, - show : function() { - if (this._visible == true) { - return - } - this._visible = true - }, - isVisible : function() { - if (!this.domElement) { - return false - } - return !!this._visible - }, - getContainer : function() { - return this.domElement - }, - setConfig : function(cL) { - cL = cL || {}; - for ( var T in cL) { - this._config[T] = cL[T] - } - }, - setZIndex : function(T) { - this.zIndex = T - }, - enableMassClear : function() { - this._config.enableMassClear = true - }, - disableMassClear : function() { - this._config.enableMassClear = false - }, - addContextMenu : function(T) { - this._menu = T - }, - removeContextMenu : function(T) { - this._menu = null - } - }); - function cs() { - this.map = null; - this._overlays = {}; - this._customOverlays = [] - } - BMap - .register(function(cL) { - var T = new cs(); - T.map = cL; - cL._overlays = T._overlays; - cL._customOverlays = T._customOverlays; - cL.addEventListener("load", function(cM) { - T.draw(cM) - }); - cL.addEventListener("moveend", function(cM) { - T.draw(cM) - }); - if (a8.browser.ie && a8.browser.ie < 8 - || document.compatMode == "BackCompat") { - cL.addEventListener("zoomend", function(cM) { - setTimeout(function() { - T.draw(cM) - }, 20) - }) - } else { - cL.addEventListener("zoomend", function(cM) { - T.draw(cM) - }) - } - cL.addEventListener("maptypechange", function(cM) { - T.draw(cM) - }); - cL - .addEventListener( - "addoverlay", - function(cQ) { - var cN = cQ.target; - if (cN instanceof Y) { - if (!T._overlays[cN.guid]) { - T._overlays[cN.guid] = cN - } - } else { - var cP = false; - for ( var cO = 0, cM = T._customOverlays.length; cO < cM; cO++) { - if (T._customOverlays[cO] === cN) { - cP = true; - break - } - } - if (!cP) { - T._customOverlays.push(cN) - } - } - }); - cL - .addEventListener( - "removeoverlay", - function(cP) { - var cN = cP.target; - if (cN instanceof Y) { - delete T._overlays[cN.guid] - } else { - for ( var cO = 0, cM = T._customOverlays.length; cO < cM; cO++) { - if (T._customOverlays[cO] === cN) { - T._customOverlays.splice(cO, 1); - break - } - } - } - }); - cL - .addEventListener( - "clearoverlays", - function(cP) { - this.closeInfoWindow(); - for ( var cO in T._overlays) { - if (T._overlays[cO]._config.enableMassClear) { - T._overlays[cO].remove(); - delete T._overlays[cO] - } - } - for ( var cN = 0, cM = T._customOverlays.length; cN < cM; cN++) { - if (T._customOverlays[cN].enableMassClear != false) { - T._customOverlays[cN].remove(); - T._customOverlays[cN] = null; - T._customOverlays.splice(cN, 1); - cN--; - cM-- - } - } - }); - cL.addEventListener("infowindowopen", function(cN) { - var cM = this.infoWindow; - if (cM) { - a8.dom.hide(cM.popDom); - a8.dom.hide(cM.shadowDom) - } - }); - cL.addEventListener("movestart", function() { - if (this.getInfoWindow()) { - this.getInfoWindow()._setOverflow() - } - }); - cL.addEventListener("moveend", function() { - if (this.getInfoWindow()) { - this.getInfoWindow()._resetOverflow() - } - }) - }); - cs.prototype.draw = function(cM) { - for ( var cL in this._overlays) { - this._overlays[cL].draw() - } - a8.array.each(this._customOverlays, function(cN) { - cN.draw() - }); - if (this.map.temp.infoWin) { - this.map.temp.infoWin.setPosition() - } - if (BMap.DrawerSelector) { - var T = BMap.DrawerSelector.getDrawer(this.map); - T.setPalette() - } - }; - function cF(T) { - Y.call(this); - this._config = { - strokeColor : "#3a6bdb", - strokeWeight : 5, - strokeOpacity : 0.65, - strokeStyle : "solid", - enableMassClear : true, - getParseTolerance : null, - getParseCacheIndex : null, - enableEditing : false, - mouseOverTolerance : 15, - use3DCoords : false, - clickable : true - }; - T = T || {}; - this.setConfig(T); - if (this._config.strokeWeight <= 0) { - this._config.strokeWeight = 5 - } - if (this._config.strokeOpacity < 0 || this._config.strokeOpacity > 1) { - this._config.strokeOpacity = 0.65 - } - if (this._config.fillOpacity < 0 || this._config.fillOpacity > 1) { - this._config.fillOpacity = 0.65 - } - if (this._config.strokeStyle != "solid" - && this._config.strokeStyle != "dashed") { - this._config.strokeStyle = "solid" - } - if (ch(T.enableClicking)) { - this._config.clickable = T.enableClicking - } - this.domElement = null; - this._bounds = new BMap.Bounds(0, 0, 0, 0); - this._parseCache = []; - this.vertexMarkers = []; - this._temp = {} - } - a8.lang.inherits(cF, Y, "Graph"); - cF.getGraphPoints = function(cL) { - var T = []; - if (!cL) { - return T - } - if (b3(cL)) { - var cM = cL.split(";"); - a8.array.each(cM, function(cO) { - var cN = cO.split(","); - T.push(new cd(cN[0], cN[1])) - }) - } - if (cL.constructor == Array && cL.length > 0) { - T = cL - } - return T - }; - cF.parseTolerance = [ 0.09, 0.005, 0.0001, 0.00001 ]; - a8.extend(cF.prototype, { - initialize : function(T) { - this.map = T; - return null - }, - draw : function() { - return; - if (!this.domElement) { - return - } - if (this._drawer) { - this._drawer.setPath(this.domElement, this - ._getDisplayPixels(this.points)) - } - }, - setPath : function(T) { - this._parseCache.length = 0; - this.points = cF.getGraphPoints(T).slice(0); - this._calcBounds() - }, - _calcBounds : function() { - if (!this.points) { - return - } - var T = this; - T._bounds = new bN(); - a8.array.each(this.points, function(cL) { - T._bounds.extend(cL) - }) - }, - getPath : function() { - return this.points - }, - setPositionAt : function(cL, T) { - if (!T || !this.points[cL]) { - return - } - this._parseCache.length = 0; - this.points[cL] = new cd(T.lng, T.lat); - this._calcBounds() - }, - setStrokeColor : function(T) { - this._config.strokeColor = T - }, - getStrokeColor : function() { - return this._config.strokeColor - }, - setStrokeWeight : function(T) { - if (T > 0) { - this._config.strokeWeight = T - } - }, - getStrokeWeight : function() { - return this._config.strokeWeight - }, - setStrokeOpacity : function(T) { - if (!T || T > 1 || T < 0) { - return - } - this._config.strokeOpacity = T - }, - getStrokeOpacity : function() { - return this._config.strokeOpacity - }, - setFillOpacity : function(T) { - if (T > 1 || T < 0) { - return - } - this._config.fillOpacity = T - }, - getFillOpacity : function() { - return this._config.fillOpacity - }, - setStrokeStyle : function(T) { - if (T != "solid" && T != "dashed") { - return - } - this._config.strokeStyle = T - }, - getStrokeStyle : function() { - return this._config.strokeStyle - }, - setFillColor : function(T) { - this._config.fillColor = T || "" - }, - getFillColor : function() { - return this._config.fillColor - }, - getBounds : function() { - return this._bounds - }, - remove : function() { - if (this.map) { - this.map.removeEventListener("onmousemove", - this._graphMouseEvent) - } - Y.prototype.remove.call(this); - this._parseCache.length = 0 - }, - enableEditing : function() { - this._config.enableEditing = true - }, - disableEditing : function() { - this._config.enableEditing = false - } - }); - function n(T) { - Y.call(this); - this.map = null; - this.domElement = null; - this._config = { - width : 0, - height : 0, - offset : new aH(0, 0), - opacity : 1, - background : "transparent", - lineStroke : 1, - lineColor : "#000", - lineStyle : "solid", - point : null - }; - this.setConfig(T); - this.point = this._config.point - } - a8.lang.inherits(n, Y, "Division"); - a8 - .extend( - n.prototype, - { - _addDom : function() { - var T = this._config; - var cM = this.content; - var cL = [ '
    '); - cL.push(cM); - cL.push("
    "); - this.domElement = at( - this.map.getPanes().markerMouseTarget, cL - .join("")) - }, - initialize : function(T) { - this.map = T; - this._addDom(); - if (this.domElement) { - a8.on(this.domElement, "mousedown", - function(cL) { - aP(cL) - }) - } - return this.domElement - }, - draw : function() { - var T = this.map - .pointToOverlayPixel(this._config.point); - this._config.offset = new aH( - -Math.round(this._config.width / 2) - - Math - .round(this._config.lineStroke), - -Math.round(this._config.height / 2) - - Math - .round(this._config.lineStroke)); - this.domElement.style.left = T.x - + this._config.offset.width + "px"; - this.domElement.style.top = T.y - + this._config.offset.height + "px" - }, - getPosition : function() { - return this._config.point - }, - _getPixel : function(T) { - return this.map.pointToPixel(this.getPosition()) - }, - setPosition : function(T) { - this._config.point = T; - this.draw() - }, - setDimension : function(T, cL) { - this._config.width = Math.round(T); - this._config.height = Math.round(cL); - if (this.domElement) { - this.domElement.style.width = this._config.width - + "px"; - this.domElement.style.height = this._config.height - + "px"; - this.draw() - } - } - }); - function M(cL, cM, cN) { - if (!cL || !cM) { - return - } - this.imageUrl = cL; - this.size = cM; - var T = new aH(Math.floor(cM.width / 2), Math.floor(cM.height / 2)); - var cO = { - anchor : T, - imageOffset : new aH(0, 0) - }; - cN = cN || {}; - a8.extend(cO, cN); - this.anchor = cO.anchor; - this.imageOffset = cO.imageOffset; - this.infoWindowAnchor = cN.infoWindowAnchor || this.anchor; - this.printImageUrl = cN.printImageUrl || "" - } - var bD = M.prototype; - bD.setImageUrl = function(T) { - if (!T) { - return - } - this.imageUrl = T - }; - bD.setPrintImageUrl = function(T) { - if (!T) { - return - } - this.printImageUrl = T - }; - bD.setSize = function(T) { - if (!T) { - return - } - this.size = new aH(T.width, T.height) - }; - bD.setAnchor = function(T) { - if (!T) { - return - } - this.anchor = new aH(T.width, T.height) - }; - bD.setImageOffset = function(T) { - if (!T) { - return - } - this.imageOffset = new aH(T.width, T.height) - }; - bD.setInfoWindowAnchor = function(T) { - if (!T) { - return - } - this.infoWindowAnchor = new aH(T.width, T.height) - }; - bD.toString = function() { - return "Icon" - }; - function bP(cM, cL) { - a8.lang.Class.call(this); - this.content = cM; - this.map = null; - this._config = { - width : 0, - height : 0, - maxWidth : 600, - offset : new aH(0, 0), - title : "", - maxContent : "", - enableMaximize : false, - enableAutoPan : true, - enableCloseOnClick : true, - margin : [ 10, 10, 40, 10 ], - collisions : [ [ 10, 10 ], [ 10, 10 ], [ 10, 10 ], [ 10, 10 ] ], - ifMaxScene : false, - onClosing : function() { - return true - } - }; - a8.extend(this._config, cL || {}); - if (this._config.width != 0) { - if (this._config.width < 220) { - this._config.width = 220 - } - if (this._config.width > 730) { - this._config.width = 730 - } - } - if (this._config.height != 0) { - if (this._config.height < 60) { - this._config.height = 60 - } - if (this._config.height > 650) { - this._config.height = 650 - } - } - if (this._config.maxWidth != 0) { - if (this._config.maxWidth < 220) { - this._config.maxWidth = 220 - } - if (this._config.maxWidth > 730) { - this._config.maxWidth = 730 - } - } - this.isWinMax = false; - this.IMG_PATH = cc.imgPath; - this.overlay = null; - var T = this; - cA.load("infowindow", function() { - T._draw() - }) - } - a8.lang.inherits(bP, a8.lang.Class, "InfoWindow"); - a8.extend(bP.prototype, { - setWidth : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 220) { - T = 220 - } - if (T > 730) { - T = 730 - } - } - this._config.width = T - }, - setHeight : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 60) { - T = 60 - } - if (T > 650) { - T = 650 - } - } - this._config.height = T - }, - setMaxWidth : function(T) { - if (!T && T != 0 || isNaN(T) || T < 0) { - return - } - if (T != 0) { - if (T < 220) { - T = 220 - } - if (T > 730) { - T = 730 - } - } - this._config.maxWidth = T - }, - setTitle : function(T) { - this._config.title = T - }, - getTitle : function() { - return this._config.title - }, - setContent : function(T) { - this.content = T - }, - getContent : function() { - return this.content - }, - setMaxContent : function(T) { - this._config.maxContent = T + "" - }, - redraw : function() { - }, - enableAutoPan : function() { - this._config.enableAutoPan = true - }, - disableAutoPan : function() { - this._config.enableAutoPan = false - }, - enableCloseOnClick : function() { - this._config.enableCloseOnClick = true - }, - disableCloseOnClick : function() { - this._config.enableCloseOnClick = false - }, - enableMaximize : function() { - this._config.enableMaximize = true - }, - disableMaximize : function() { - this._config.enableMaximize = false - }, - show : function() { - this._visible = true - }, - hide : function() { - this._visible = false - }, - close : function() { - this.hide() - }, - maximize : function() { - this.isWinMax = true - }, - restore : function() { - this.isWinMax = false - }, - isVisible : function() { - return this.isOpen() - }, - isOpen : function() { - return false - }, - getPosition : function() { - if (this.overlay && this.overlay.getPosition) { - return this.overlay.getPosition() - } - }, - getOffset : function() { - return this._config.offset - } - }); - bz.prototype.openInfoWindow = function(cN, T) { - if (!(cN instanceof bP) || !(T instanceof cd)) { - return - } - var cL = this.temp; - if (!cL.marker) { - var cM = new M(cc.imgPath + "blank.gif", { - width : 1, - height : 1 - }); - cL.marker = new ad(T, { - icon : cM, - width : 1, - height : 1, - offset : new aH(0, 0), - infoWindowOffset : new aH(0, 0), - clickable : false - }); - cL.marker._fromMap = 1 - } else { - cL.marker.setPosition(T) - } - this.addOverlay(cL.marker); - cL.marker.openInfoWindow(cN) - }; - bz.prototype.closeInfoWindow = function() { - var T = this.temp.infoWin || this.temp._infoWin; - if (T && T.overlay) { - T.overlay.closeInfoWindow() - } - }; - Y.prototype.openInfoWindow = function(T) { - if (this.map) { - this.map.closeInfoWindow(); - T._visible = true; - this.map.temp._infoWin = T; - T.overlay = this; - a8.lang.Class.call(T, T.guid) - } - }; - Y.prototype.closeInfoWindow = function() { - if (this.map && this.map.temp._infoWin) { - this.map.temp._infoWin._visible = false; - a8.lang.decontrol(this.map.temp._infoWin.guid); - this.map.temp._infoWin = null - } - }; - function ag(cM, cL) { - Y.call(this); - this.content = cM; - this.map = null; - this.domElement = null; - this._config = { - width : 0, - offset : new aH(0, 0), - styles : { - backgroundColor : "#fff", - border : "1px solid #f00", - padding : "1px", - whiteSpace : "nowrap", - font : "12px " + cc.fontFamily, - zIndex : "80", - MozUserSelect : "none" - }, - position : null, - enableMassClear : true, - clickable : true - }; - cL = cL || {}; - this.setConfig(cL); - if (this._config.width < 0) { - this._config.width = 0 - } - if (ch(cL.enableClicking)) { - this._config.clickable = cL.enableClicking - } - this.point = this._config.position; - var T = this; - cA.load("marker", function() { - T._draw() - }) - } - a8.lang.inherits(ag, Y, "Label"); - a8.extend(ag.prototype, { - getPosition : function() { - if (this._marker) { - return this._marker.getPosition() - } - return this.point - }, - setPosition : function(T) { - if (T instanceof cd && !this.getMarker()) { - this.point = this._config.position = new cd(T.lng, T.lat) - } - }, - setContent : function(T) { - this.content = T - }, - setOpacity : function(T) { - if (T >= 0 && T <= 1) { - this._config.opacity = T - } - }, - setOffset : function(T) { - if (!(T instanceof aH)) { - return - } - this._config.offset = new aH(T.width, T.height) - }, - getOffset : function() { - return this._config.offset - }, - setStyle : function(T) { - T = T || {}; - this._config.styles = a8.extend(this._config.styles, T) - }, - setStyles : function(T) { - return this.setStyle(T) - }, - setTitle : function(T) { - this._config.title = T || "" - }, - getTitle : function() { - return this._config.title - }, - setMarker : function(T) { - this._marker = T; - if (T) { - this.point = this._config.position = T.getPosition() - } else { - this.point = this._config.position = null - } - }, - getMarker : function() { - return this._marker || null - } - }); - window.BMAP_ANIMATION_DROP = 1; - window.BMAP_ANIMATION_BOUNCE = 2; - var au = new M(cc.imgPath + "marker_red_sprite.png", new aH(19, 25), { - anchor : new aH(10, 25), - infoWindowAnchor : new aH(10, 0) - }); - var ar = new M(cc.imgPath + "marker_red_sprite.png", new aH(20, 11), { - anchor : new aH(6, 11), - imageOffset : new aH(-19, -13) - }); - function ad(T, cM) { - Y.call(this); - cM = cM || {}; - this.point = T; - this.map = null; - this._animation = null; - this._config = { - offset : new aH(0, 0), - icon : au, - shadow : ar, - title : "", - label : null, - baseZIndex : 0, - clickable : true, - zIndexFixed : false, - isTop : false, - enableMassClear : true, - enableDragging : false, - raiseOnDrag : false, - restrictDraggingArea : false, - draggingCursor : cc.draggingCursor - }; - this.setConfig(cM); - if (cM.icon && !cM.shadow) { - this._config.shadow = null - } - if (ch(cM.enableClicking)) { - this._config.clickable = cM.enableClicking - } - var cL = this; - cA.load("marker", function() { - cL._draw() - }) - } - ad.TOP_ZINDEX = bG.getZIndex(-90) + 1000000; - ad.DRAG_ZINDEX = ad.TOP_ZINDEX + 1000000; - a8.lang.inherits(ad, Y, "Marker"); - a8.extend(ad.prototype, { - setIcon : function(T) { - if (T instanceof M) { - this._config.icon = T - } - }, - getIcon : function() { - return this._config.icon - }, - setShadow : function(T) { - if (T instanceof M) { - this._config.shadow = T - } - }, - getShadow : function() { - return this._config.shadow - }, - setLabel : function(T) { - this._config.label = T || null - }, - getLabel : function() { - return this._config.label - }, - enableDragging : function() { - this._config.enableDragging = true - }, - disableDragging : function() { - this._config.enableDragging = false - }, - getPosition : function() { - return this.point - }, - setPosition : function(T) { - if (T instanceof cd) { - this.point = new cd(T.lng, T.lat) - } - }, - setTop : function(cL, T) { - this._config.isTop = !!cL; - if (cL) { - this._addi = T || 0 - } - }, - setTitle : function(T) { - this._config.title = T + "" - }, - getTitle : function() { - return this._config.title - }, - setOffset : function(T) { - if (T instanceof aH) { - this._config.offset = T - } - }, - getOffset : function() { - return this._config.offset - }, - setAnimation : function(T) { - this._animation = T - } - }); - function cn(T, cM) { - cF.call(this, cM); - cM = cM || {}; - this._config.fillOpacity = cM.fillOpacity ? cM.fillOpacity : 0.65; - if (cM.fillColor == "") { - this._config.fillColor = "" - } else { - this._config.fillColor = cM.fillColor ? cM.fillColor : "#fff" - } - this.setPath(T); - var cL = this; - cA.load("poly", function() { - cL._draw() - }) - } - a8.lang.inherits(cn, cF, "Polygon"); - a8.extend(cn.prototype, { - setPath : function(cL, T) { - this._userPoints = cF.getGraphPoints(cL).slice(0); - var cM = cF.getGraphPoints(cL).slice(0); - if (cM.length > 1 && !cM[0].equals(cM[cM.length - 1])) { - cM.push(new cd(cM[0].lng, cM[0].lat)) - } - cF.prototype.setPath.call(this, cM, T) - }, - setPositionAt : function(cL, T) { - if (!this._userPoints[cL]) { - return - } - this._userPoints[cL] = new cd(T.lng, T.lat); - this.points[cL] = new cd(T.lng, T.lat); - if (cL == 0 - && !this.points[0] - .equals(this.points[this.points.length - 1])) { - this.points[this.points.length - 1] = new cd(T.lng, T.lat) - } - this._calcBounds() - }, - getPath : function() { - var T = this._userPoints; - if (T.length == 0) { - T = this.points - } - return T - } - }); - function f(T, cM) { - cF.call(this, cM); - this.setPath(T); - var cL = this; - cA.load("poly", function() { - cL._draw() - }) - } - a8.lang.inherits(f, cF, "Polyline"); - function a(cL, T, cM) { - this.point = cL; - this.radius = Math.abs(T); - cn.call(this, [], cM) - } - a.parseTolerance = [ 0.01, 0.0001, 0.00001, 0.000004 ]; - a8.lang.inherits(a, cn, "Circle"); - a8 - .extend( - a.prototype, - { - initialize : function(T) { - this.map = T; - this.points = this._getPerimeterPoints(this.point, - this.radius); - this._calcBounds(); - return null - }, - getCenter : function() { - return this.point - }, - setCenter : function(T, cL) { - if (!T) { - return - } - this.point = T - }, - getRadius : function() { - return this.radius - }, - setRadius : function(T) { - this.radius = Math.abs(T) - }, - _getPerimeterPoints : function(T, cS) { - if (!T || !cS || !this.map) { - return [] - } - var cL = this.map; - var cP = T.lng, cN = T.lat; - var cZ = []; - var cU = cS / 6378800, cR = (Math.PI / 180) * cN, cX = (Math.PI / 180) - * cP; - for ( var cQ = 0; cQ < 360; cQ += 9) { - var cO = (Math.PI / 180) * cQ, cV = Math - .asin(Math.sin(cR) * Math.cos(cU) - + Math.cos(cR) * Math.sin(cU) - * Math.cos(cO)), cT = Math - .atan2(Math.sin(cO) * Math.sin(cU) - * Math.cos(cR), Math.cos(cU) - - Math.sin(cR) * Math.sin(cV)), cW = ((cX - - cT + Math.PI) % (2 * Math.PI)) - - Math.PI, cY = new cd(cW - * (180 / Math.PI), cV * (180 / Math.PI)); - cZ.push(cY) - } - var cM = cZ[0]; - cZ.push(new cd(cM.lng, cM.lat)); - return cZ - } - }); - function bR(T) { - this.map = T; - this.mapTypeLayers = []; - this.tileLayers = []; - this.bufferNumber = 300; - this.realBufferNumber = 0; - this.mapTiles = {}; - this.bufferTiles = {}; - this.numLoading = 0; - this._mapTypeLayerContainer = this._createDiv(1); - this._normalLayerContainer = this._createDiv(2); - T.platform.appendChild(this._mapTypeLayerContainer); - T.platform.appendChild(this._normalLayerContainer) - } - BMap.register(function(cL) { - var T = new bR(cL); - T.initialize() - }); - a8.extend(bR.prototype, { - initialize : function() { - var T = this, cL = T.map; - cL.addEventListener("loadcode", function() { - T.loadTiles() - }); - cL.addEventListener("addtilelayer", function(cM) { - T.addTileLayer(cM) - }); - cL.addEventListener("removetilelayer", function(cM) { - T.removeTileLayer(cM) - }); - cL.addEventListener("setmaptype", function(cM) { - T.setMapType(cM) - }); - cL.addEventListener("zoomstartcode", function(cM) { - T._zoom(cM) - }) - }, - loadTiles : function() { - var T = this; - if (a8.browser.ie) { - try { - document.execCommand("BackgroundImageCache", false, true) - } catch (cL) { - } - } - if (!this.loaded) { - T.initMapTypeTiles() - } - T.moveGridTiles(); - if (!this.loaded) { - this.loaded = true; - cA.load("tile", function() { - T._asyncLoadTiles() - }) - } - }, - initMapTypeTiles : function() { - var cL = this.map.getMapType(); - var cM = cL.getTileLayers(); - for ( var T = 0; T < cM.length; T++) { - var cN = new p(); - a8.extend(cN, cM[T]); - this.mapTypeLayers.push(cN); - cN.initialize(this.map, this._mapTypeLayerContainer) - } - }, - _createDiv : function(cL) { - var T = aa("div"); - T.style.position = "absolute"; - T.style.left = T.style.top = "0"; - T.style.zIndex = cL; - return T - }, - showTile : function(cP, cO, cS) { - var cV = this; - cV.centerPos = cO; - var cR = this.map.getMapType(); - var cM = cV.getTileName(cP, cS); - var cZ = cR.getTileSize(); - var cN = (cP[0] * cZ) + cO[0]; - var cY = 0; - if (cR === BMAP_PERSPECTIVE_MAP && cV.map.getZoom() == 15) { - cY = 0.5 - } - var cL = (cY - 1 - cP[1]) * cZ + cO[1]; - var cT = [ cN, cL ]; - var cU = this.mapTiles[cM]; - if (cU && cU.img) { - bI(cU.img, cT); - if (cU.loaded) { - this._checkTilesLoaded() - } else { - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }) - } - return - } - cU = this.bufferTiles[cM]; - if (cU && cU.img) { - cS.tilesDiv.insertBefore(cU.img, cS.tilesDiv.lastChild); - this.mapTiles[cM] = cU; - bI(cU.img, cT); - if (cU.loaded) { - this._checkTilesLoaded() - } else { - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }) - } - return - } - var cX = 256 * Math.pow(2, (cR.getMaxZoom() - cP[2])); - var cW = new cd(cP[0] * cX, cP[1] * cX); - var cQ = new bu(cP[0], cP[1]); - var T = cS.getTilesUrl(cQ, cP[2]); - cU = new bU(this, T, cT, cP, cS); - cU._addLoadCbk(function() { - cV._checkTilesLoaded() - }); - cU._load(); - this.mapTiles[cM] = cU - }, - _checkTilesLoaded : function() { - this.numLoading--; - var T = this; - if (this.numLoading == 0) { - if (this._checkLoadedTimer) { - clearTimeout(this._checkLoadedTimer); - this._checkLoadedTimer = null - } - this._checkLoadedTimer = setTimeout(function() { - if (T.numLoading == 0) { - T.map.dispatchEvent(new bg("ontilesloaded")) - } - T._checkLoadedTimer = null - }, 80) - } - }, - getTileName : function(T, cL) { - if (this.map.getMapType() === BMAP_PERSPECTIVE_MAP) { - return "TILE-" + cL.guid + "-" + this.map.cityCode + "-" + T[0] - + "-" + T[1] + "-" + T[2] - } else { - return "TILE-" + cL.guid + "-" + T[0] + "-" + T[1] + "-" + T[2] - } - }, - hideTile : function(cL) { - var T = cL.img; - if (T) { - J(T); - if (y(T)) { - T.parentNode.removeChild(T) - } - } - delete this.mapTiles[cL.name]; - if (!cL.loaded) { - J(T); - T = null; - cL._callCbks(); - cL.img = null; - cL.mgr = null - } - }, - moveGridTiles : function() { - var da = this.mapTypeLayers; - var cW = da.concat(this.tileLayers); - var c2 = cW.length; - for ( var c4 = 0; c4 < c2; c4++) { - var cP = cW[c4]; - if (cP.baseLayer) { - this.tilesDiv = cP.tilesDiv - } - var dg = this.map; - var dc = dg.getMapType(); - var dh = dc.getProjection(); - var c3 = dg.zoomLevel; - var c6 = dg.mercatorCenter; - this.mapCenterPoint = c6; - var cU = dc.getZoomUnits(c3); - var cX = dc.getZoomFactor(c3); - var cV = Math.ceil(c6.lng / cX); - var cQ = Math.ceil(c6.lat / cX); - var c1 = dc.getTileSize(); - var cO = [ cV, cQ, (c6.lng - cV * cX) / cX * c1, - (c6.lat - cQ * cX) / cX * c1 ]; - var db = cO[0] - Math.ceil((dg.width / 2 - cO[2]) / c1); - var cN = cO[1] - Math.ceil((dg.height / 2 - cO[3]) / c1); - var c7 = cO[0] + Math.ceil((dg.width / 2 + cO[2]) / c1); - var cZ = 0; - if (dc === BMAP_PERSPECTIVE_MAP && dg.getZoom() == 15) { - cZ = 1 - } - var cY = cO[1] + Math.ceil((dg.height / 2 + cO[3]) / c1) + cZ; - this.areaCenter = new cd(c6.lng, c6.lat); - var cM = this.mapTiles; - var cT = -this.areaCenter.lng / cU; - var cS = this.areaCenter.lat / cU; - var de = [ Math.round(cT), Math.round(cS) ]; - var cL = dg.getZoom(); - for ( var df in cM) { - var di = cM[df]; - var dd = di.info; - if (dd[2] != cL - || (dd[2] == cL && (db > dd[0] || c7 <= dd[0] - || cN > dd[1] || cY <= dd[1]))) { - this.hideTile(di) - } - } - var cR = -dg.offsetX + dg.width / 2; - var c0 = -dg.offsetY + dg.height / 2; - cP.tilesDiv.style.left = Math.round(cT + cR) - de[0] + "px"; - cP.tilesDiv.style.top = Math.round(cS + c0) - de[1] + "px"; - var T = []; - for ( var c9 = db; c9 < c7; c9++) { - for ( var c8 = cN; c8 < cY; c8++) { - T.push( [ c9, c8 ]) - } - } - T.sort((function(dj) { - return function(dk, dl) { - return ((0.4 * Math.abs(dk[0] - dj[0]) + 0.6 * Math - .abs(dk[1] - dj[1])) - (0.4 * Math.abs(dl[0] - - dj[0]) + 0.6 * Math.abs(dl[1] - dj[1]))) - } - })( [ cO[0] - 1, cO[1] - 1 ])); - this.numLoading += T.length; - for ( var c9 = 0, c5 = T.length; c9 < c5; c9++) { - this.showTile( [ T[c9][0], T[c9][1], cL ], de, cP) - } - } - return - }, - addTileLayer : function(cN) { - var cM = this; - var T = cN.target; - for ( var cL = 0; cL < cM.tileLayers.length; cL++) { - if (cM.tileLayers[cL] == T) { - return - } - } - T.initialize(this.map, this._normalLayerContainer); - cM.tileLayers.push(T) - }, - removeTileLayer : function(cO) { - var cN = this; - var cL = cO.target; - for ( var cM = 0, T = cN.tileLayers.length; cM < T; cM++) { - if (cL == cN.tileLayers[cM]) { - cN.tileLayers.splice(cM, 1) - } - } - cL.remove() - }, - setMapType : function() { - var cM = this; - var cN = this.mapTypeLayers; - for ( var cL = 0, T = cN.length; cL < T; cL++) { - cN[cL].remove() - } - delete this.tilesDiv; - this.mapTypeLayers = []; - this.bufferTiles = this.mapTiles = {}; - this.initMapTypeTiles(); - this.moveGridTiles() - }, - _zoom : function() { - var T = this; - if (T.zoomsDiv) { - a8.dom.hide(T.zoomsDiv) - } - setTimeout(function() { - T.moveGridTiles(); - T.map.dispatchEvent(new bg("onzoomend")) - }, 10) - } - }); - function bU(cR, T, cO, cL, cN) { - this.mgr = cR; - this.position = cO; - this._cbks = []; - this.name = cR.getTileName(cL, cN); - this.info = cL; - this._transparentPng = cN.isTransparentPng(); - var cS = aa("img"); - cw(cS); - cS.galleryImg = false; - var cQ = cS.style; - var cM = cR.map.getMapType(); - cQ.position = "absolute"; - cQ.border = "none"; - cQ.width = cM.getTileSize() + "px"; - cQ.height = cM.getTileSize() + "px"; - cQ.left = cO[0] + "px"; - cQ.top = cO[1] + "px"; - this.img = cS; - this.src = T; - if (E) { - this.img.style.opacity = 0 - } - var cP = this; - this.img.onload = function(cY) { - cP.loaded = true; - if (!cP.mgr) { - return - } - var cU = cP.mgr; - var cT = cU.bufferTiles; - if (!cT[cP.name]) { - cU.realBufferNumber++; - cT[cP.name] = cP - } - if (cP.img && !y(cP.img)) { - if (cN.tilesDiv) { - cN.tilesDiv.appendChild(cP.img); - if (a8.browser.ie <= 6 && a8.browser.ie > 0 - && cP._transparentPng) { - cP.img.style.cssText += ';filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + cP.src + '",sizingMethod=scale);' - } - } - } - var cW = cU.realBufferNumber - cU.bufferNumber; - for ( var cX in cT) { - if (cW <= 0) { - break - } - if (!cU.mapTiles[cX]) { - cT[cX].mgr = null; - var cV = cT[cX].img; - if (cV && cV.parentNode) { - cV.parentNode.removeChild(cV); - J(cV) - } - cV = null; - cT[cX].img = null; - delete cT[cX]; - cU.realBufferNumber--; - cW-- - } - } - if (E) { - new g( { - fps : 20, - duration : 200, - render : function(cZ) { - if (cP.img && cP.img.style) { - cP.img.style.opacity = cZ * 1 - } - }, - finish : function() { - if (cP.img && cP.img.style) { - delete cP.img.style.opacity - } - } - }) - } - cP._callCbks() - }; - this.img.onerror = function() { - var cU = cP.img, cV = cP.img.getAttribute("isError") || 0; - if (m && cV < 5) { - cV++; - cU.setAttribute("isError", cV); - cU.src = T + "&t=" + new Date().getTime() - } else { - cP._callCbks(); - if (!cP.mgr) { - return - } - var cT = cP.mgr; - var cW = cT.map.getMapType(); - if (cW.getErrorImageUrl()) { - cP.error = true; - cP.img.src = cW.getErrorImageUrl(); - if (cP.img && !y(cP.img)) { - cN.tilesDiv.appendChild(cP.img) - } - } - } - }; - cS = null - } - bU.prototype._addLoadCbk = function(T) { - this._cbks.push(T) - }; - bU.prototype._load = function() { - if (a8.browser.ie > 0 && a8.browser.ie <= 6 && this._transparentPng) { - this.img.src = cc.imgPath + "blank.gif" - } else { - this.img.src = this.src - } - }; - bU.prototype._callCbks = function() { - var cL = this; - for ( var T = 0; T < cL._cbks.length; T++) { - cL._cbks[T]() - } - cL._cbks.length = 0 - }; - function J(cN) { - if (!cN) { - return - } - cN.onload = cN.onerror = null; - var cL = cN.attributes, cM, T, cO; - if (cL) { - T = cL.length; - for (cM = 0; cM < T; cM += 1) { - cO = cL[cM].name; - if (I(cN[cO])) { - cN[cO] = null - } - } - } - cL = cN.children; - if (cL) { - T = cL.length; - for (cM = 0; cM < T; cM += 1) { - J(cN.children[cM]) - } - } - } - var E = (!a8.browser.ie || a8.browser.ie > 8); - function p(T) { - this.opts = T || {}; - this.copyright = this.opts.copyright || null; - this.transparentPng = this.opts.transparentPng || false; - this.baseLayer = this.opts.baseLayer || false; - this.zIndex = this.opts.zIndex || 0; - this.guid = p._guid++ - } - p._guid = 0; - a8.lang.inherits(p, a8.lang.Class, "TileLayer"); - a8.extend(p.prototype, { - initialize : function(cM, T) { - if (this.baseLayer) { - this.zIndex = -100 - } - this.map = cM; - if (!this.tilesDiv) { - var cN = aa("div"); - var cL = cN.style; - if (!a8.platform.isAndroid) { - T.style.WebkitBackfaceVisibility = "hidden" - } - cL.position = "absolute"; - cL.zIndex = this.zIndex; - cL.left = Math.ceil(-cM.offsetX + cM.width / 2) + "px"; - cL.top = Math.ceil(-cM.offsetY + cM.height / 2) + "px"; - T.appendChild(cN); - this.tilesDiv = cN - } - }, - remove : function() { - if (this.tilesDiv && this.tilesDiv.parentNode) { - this.tilesDiv.innerHTML = ""; - this.tilesDiv.parentNode.removeChild(this.tilesDiv) - } - delete this.tilesDiv - }, - isTransparentPng : function() { - return this.transparentPng - }, - getTilesUrl : function(cL, cM) { - var T = ""; - if (this.opts.tileUrlTemplate) { - T = this.opts.tileUrlTemplate.replace(/\{X\}/, cL.x); - T = T.replace(/\{Y\}/, cL.y); - T = T.replace(/\{Z\}/, cM) - } - return T - }, - getCopyright : function() { - return this.copyright - }, - getMapType : function() { - return this.mapType || BMAP_NORMAL_MAP - } - }); - function aC(T) { - p.call(this, T); - this._opts = {}; - T = T || {}; - this._opts = a8.object.extend(this._opts, T); - if (this._opts.predictDate) { - if (this._opts.predictDate.weekday < 1 - || this._opts.predictDate.weekday > 7) { - this._opts.predictDate = 1 - } - if (this._opts.predictDate.hour < 0 - || this._opts.predictDate.hour > 23) { - this._opts.predictDate.hour = 0 - } - } - this._tileUrl = "http://its.map.baidu.com:8002/traffic/" - } - aC.prototype = new p(); - aC.prototype.initialize = function(cL, T) { - p.prototype.initialize.call(this, cL, T); - this._map = cL - }; - aC.prototype.isTransparentPng = function() { - return true - }; - aC.prototype.getTilesUrl = function(cQ, cL) { - var cR = ""; - if (this._opts.predictDate) { - cR = "HistoryService?day=" + (this._opts.predictDate.weekday - 1) - + "&hour=" + this._opts.predictDate.hour + "&t=" - + new Date().getTime() + "&" - } else { - cR = "TrafficTileService?time=" + new Date().getTime() + "&" - } - var cM = this._map, cS = cQ.x, cN = cQ.y, cP = Math.floor(cS / 200), cO = Math - .floor(cN / 200), T = this._tileUrl + cR + "level=" + cL - + "&x=" + cS + "&y=" + cN; - return T.replace(/-(\d+)/gi, "M$1") - }; - function cu(T, cL, cM) { - this._name = T; - this._layers = cL instanceof p ? [ cL ] : cL.slice(0); - this._opts = { - tips : "", - labelText : "", - minZoom : 1, - maxZoom : 19, - tileSize : 256, - textColor : "black", - errorImageUrl : "", - projection : new ba() - }; - if (this._layers.length == 1) { - this._layers[0].baseLayer = true - } - a8.extend(this._opts, cM || {}) - } - a8.extend(cu.prototype, { - getName : function() { - return this._name - }, - getTips : function() { - return this._opts.tips - }, - getLabelText : function() { - return this._opts.labelText - }, - getTileLayer : function() { - return this._layers[0] - }, - getTileLayers : function() { - return this._layers - }, - getTileSize : function() { - return this._opts.tileSize - }, - getMinZoom : function() { - return this._opts.minZoom - }, - getMaxZoom : function() { - return this._opts.maxZoom - }, - getTextColor : function() { - return this._opts.textColor - }, - getProjection : function() { - return this._opts.projection - }, - getErrorImageUrl : function() { - return this._opts.errorImageUrl - }, - getZoomUnits : function(T) { - return Math.pow(2, (18 - T)) - }, - getZoomFactor : function(T) { - return this.getZoomUnits(T) * 256 - } - }); - var b7 = [ "http://shangetu0.map.bdimg.com/it/", - "http://shangetu1.map.bdimg.com/it/", - "http://shangetu2.map.bdimg.com/it/", - "http://shangetu3.map.bdimg.com/it/", - "http://shangetu4.map.bdimg.com/it/" ]; - var j = [ "http://online0.map.bdimg.com/tile/", - "http://online1.map.bdimg.com/tile/", - "http://online2.map.bdimg.com/tile/", - "http://online3.map.bdimg.com/tile/", - "http://online4.map.bdimg.com/tile/" ]; - if (m) { - b7 = [ x + "it/" ] - } - var aT = new p(); - aT.getTilesUrl = function(cM, cP) { - var cQ = cM.x; - var cN = cM.y; -// var T = "20130712"; -// var cO = "pl"; -// if (this.map.highResolutionEnabled()) { -// cO = "ph" -// } -// var cL = j[Math.abs(cQ + cN) % j.length] + "?qt=tile&x=" -// + (cQ + "").replace(/-/gi, "M") + "&y=" -// + (cN + "").replace(/-/gi, "M") + "&z=" + cP + "&styles=" + cO -// + (a8.browser.ie == 6 ? "&color_dep=32&colors=50" : "") -// + "&udt=" + T; -// if (m) { -// cL = b7[Math.abs(cQ + cN) % b7.length] + "u=x=" + cQ + ";y=" + cN -// + ";z=" + cP + ";v=017;type=web&fm=44" -// } - cL = "static/BMap/maptile/" + cP + "/" + cQ + "/" + cN + ".jpg"; - return cL.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_NORMAL_MAP = new cu("\u5730\u56fe", aT, { - tips : "\u663e\u793a\u666e\u901a\u5730\u56fe" - }); - var bs = new p(); - bs.tileUrls = [ "http://d0.map.baidu.com/resource/mappic/", - "http://d1.map.baidu.com/resource/mappic/", - "http://d2.map.baidu.com/resource/mappic/", - "http://d3.map.baidu.com/resource/mappic/" ]; - bs.getTilesUrl = function(T, cM) { - var cO = T.x; - var cL = T.y; - var cN = Math.pow(2, (20 - cM)) * 256; - cL = Math.round((9998336 - cN * (cL)) / cN) - 1; - url = this.tileUrls[Math.abs(cO + cL) % this.tileUrls.length] - + this.map.currentCity + "/" + this.map.cityCode + "/3/lv" - + (21 - cM) + "/" + cO + "," + cL + ".jpg"; - return url - }; - window.BMAP_PERSPECTIVE_MAP = new cu("\u4e09\u7ef4", bs, { - tips : "\u663e\u793a\u4e09\u7ef4\u5730\u56fe", - minZoom : 15, - maxZoom : 20, - textColor : "white", - projection : new cE() - }); - BMAP_PERSPECTIVE_MAP.getZoomUnits = function(T) { - return Math.pow(2, (20 - T)) - }; - BMAP_PERSPECTIVE_MAP.getCityName = function(T) { - if (!T) { - return "" - } - var cL = cc.cityNames; - for ( var cM in cL) { - if (T.search(cM) > -1) { - return cL[cM] - } - } - return "" - }; - BMAP_PERSPECTIVE_MAP.getCityCode = function(T) { - return ( { - bj : 2, - gz : 1, - sz : 14, - sh : 4 - })[T] - }; - var bQ = new p( { - baseLayer : true - }); - bQ.getTilesUrl = function(cL, cN) { - var cO = cL.x; - var cM = cL.y; - var T = b7[Math.abs(cO + cM) % b7.length] + "u=x=" + cO + ";y=" + cM - + ";z=" + cN + ";v=009;type=sate&fm=46"; - return T.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_SATELLITE_MAP = new cu("\u536b\u661f", bQ, { - tips : "\u663e\u793a\u536b\u661f\u5f71\u50cf", - minZoom : 1, - maxZoom : 19, - textColor : "white" - }); - var o = new p( { - transparentPng : true - }); - o.getTilesUrl = function(cM, cO) { - var cP = cM.x; - var cN = cM.y; - var T = "20130617"; - var cL = j[Math.abs(cP + cN) % j.length] + "?qt=tile&x=" - + (cP + "").replace(/-/gi, "M") + "&y=" - + (cN + "").replace(/-/gi, "M") + "&z=" + cO + "&styles=sl" - + (a8.browser.ie == 6 ? "&color_dep=32&colors=50" : "") - + "&udt=" + T; - return cL.replace(/-(\d+)/gi, "M$1") - }; - window.BMAP_HYBRID_MAP = new cu( - "\u6df7\u5408", - [ bQ, o ], - { - tips : "\u663e\u793a\u5e26\u6709\u8857\u9053\u7684\u536b\u661f\u5f71\u50cf", - labelText : "\u8def\u7f51", - minZoom : 1, - maxZoom : 19, - textColor : "white" - }); - window.BMAP_POI_TYPE_NORMAL = 0; - window.BMAP_POI_TYPE_BUSSTOP = 1; - window.BMAP_POI_TYPE_BUSLINE = 2; - window.BMAP_POI_TYPE_SUBSTOP = 3; - window.BMAP_POI_TYPE_SUBLINE = 4; - var H = 0; - var bh = 1; - var an = {}; - function w(cL, T) { - a8.lang.Class.call(this); - this._loc = {}; - this.setLocation(cL); - this._opts = { - renderOptions : { - panel : null, - map : null, - autoViewport : true - }, - onSearchComplete : function() { - }, - onMarkersSet : function() { - }, - onInfoHtmlSet : function() { - }, - onResultsHtmlSet : function() { - }, - onGetBusListComplete : function() { - }, - onGetBusLineComplete : function() { - }, - onBusListHtmlSet : function() { - }, - onBusLineHtmlSet : function() { - }, - onPolylinesSet : function() { - }, - reqFrom : "" - }; - a8.extend(this._opts, T); - if (typeof T != "undefined" && typeof T.renderOptions != "undefined" - && typeof T.renderOptions.autoViewport != "undefined") { - this._opts.renderOptions.autoViewport = T.renderOptions.autoViewport - } else { - this._opts.renderOptions.autoViewport = true - } - this._opts.renderOptions.panel = a8.G(this._opts.renderOptions.panel) - } - a8.inherits(w, a8.lang.Class); - a8.extend(w.prototype, { - getResults : function() { - if (!this._isMultiKey) { - return this._results - } else { - return this._arrResults - } - }, - enableAutoViewport : function() { - this._opts.renderOptions.autoViewport = true - }, - disableAutoViewport : function() { - this._opts.renderOptions.autoViewport = false - }, - setLocation : function(T) { - if (!T) { - return - } - this._loc.src = T - }, - setSearchCompleteCallback : function(T) { - this._opts.onSearchComplete = T || function() { - } - }, - setMarkersSetCallback : function(T) { - this._opts.onMarkersSet = T || function() { - } - }, - setPolylinesSetCallback : function(T) { - this._opts.onPolylinesSet = T || function() { - } - }, - setInfoHtmlSetCallback : function(T) { - this._opts.onInfoHtmlSet = T || function() { - } - }, - setResultsHtmlSetCallback : function(T) { - this._opts.onResultsHtmlSet = T || function() { - } - }, - getStatus : function() { - return this._status - } - }); - var bb = { - REQ_BASE_URL : x, - request : function(cQ, cN, cL, cS, cM) { - return; - var cO = (Math.random() * 100000).toFixed(0); - BMap._rd["_cbk" + cO] = function(cT) { - cL = cL || {}; - cQ && cQ(cT, cL); - delete BMap._rd["_cbk" + cO] - }; - cS = cS || ""; - var cR; - if (cL && cL.useEncodeURI) { - cR = O(cN, encodeURI) - } else { - cR = O(cN, encodeURIComponent) - } - var cP = this, T = cP.REQ_BASE_URL + cS + "?" + cR - + "&ie=utf-8&oue=1&fromproduct=jsapi"; - if (!cM) { - T += "&res=api" - } - T += "&callback=BMap._rd._cbk" + cO; - cx.request(T) - } - }; - BMap._rd = {}; - var S = {}; - S.removeHtml = function(T) { - return T.replace(/<\/?b>/g, "") - }; - S.parseGeoExtReg1 = function(T) { - return T - .replace( - /([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g, - "$1,$2;") - }; - S.parseGeoExtReg2 = function(cL, T) { - var cM = new RegExp( - "(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){" - + T + "}", "ig"); - return cL.replace(cM, "$1") - }; - window.BMAP_STATUS_SUCCESS = 0; - window.BMAP_STATUS_CITY_LIST = 1; - window.BMAP_STATUS_UNKNOWN_LOCATION = 2; - window.BMAP_STATUS_UNKNOWN_ROUTE = 3; - window.BMAP_STATUS_INVALID_KEY = 4; - window.BMAP_STATUS_INVALID_REQUEST = 5; - window.BMAP_STATUS_PERMISSION_DENIED = 6; - window.BMAP_STATUS_SERVICE_UNAVAILABLE = 7; - window.BMAP_STATUS_TIMEOUT = 8; - window.BMAP_ROUTE_TYPE_WALKING = 2; - window.BMAP_ROUTE_TYPE_DRIVING = 3; - var cv = "cur"; - var c = "cen"; - var cj = "s"; - var Q = "con"; - var al = "bd"; - var cb = "nb"; - var F = "bt"; - var bM = "nav"; - var bv = "walk"; - var bA = "gc"; - var d = "rgc"; - var U = "dec"; - var aQ = "bse"; - var e = "nse"; - var G = "bl"; - var bf = "bsl"; - var aG = "bda"; - var ai = "sa"; - var a1 = "nba"; - var ci = "drag"; - var b4 = "ext"; - var s = 2; - var a5 = 4; - var bt = 7; - var X = 11; - var aN = 12; - var bi = 14; - var a2 = 15; - var cy = 18; - var u = 20; - var R = 21; - var ap = 26; - var bE = 28; - var z = 31; - var bq = 35; - var bC = 44; - var ax = 45; - var ae = 46; - var bS = 47; - var a0 = -1; - var ab = 0; - var cq = 1; - var a6 = 2; - var B = 3; - var cI = "http://map.baidu.com/"; - BMap.I = window.Instance = a8.lang.instance; - var a4 = function(cM, cL) { - w.call(this, cM, cL); - cL = cL || {}; - cL.renderOptions = cL.renderOptions || {}; - this.setPageCapacity(cL.pageCapacity); - if (typeof cL.renderOptions.selectFirstResult != "undefined" - && !cL.renderOptions.selectFirstResult) { - this.disableFirstResultSelection() - } else { - this.enableFirstResultSelection() - } - this._overlays = []; - this._arrPois = []; - this._curIndex = -1; - this._queryList = []; - var T = this; - cA.load("local", function() { - T._check() - }) - }; - a8.inherits(a4, w, "LocalSearch"); - a4.DEFAULT_PAGE_CAPACITY = 10; - a4.MIN_PAGE_CAPACITY = 1; - a4.MAX_PAGE_CAPACITY = 100; - a4.DEFAULT_RADIUS = 2000; - a4.MAX_RADIUS = 100000; - a8.extend(a4.prototype, { - search : function(T) { - this._queryList.push( { - method : "search", - arguments : [ T ] - }) - }, - searchInBounds : function(T, cL) { - this._queryList.push( { - method : "searchInBounds", - arguments : [ T, cL ] - }) - }, - searchNearby : function(cM, cL, T) { - this._queryList.push( { - method : "searchNearby", - arguments : [ cM, cL, T ] - }) - }, - clearResults : function() { - delete this._json; - delete this._status; - delete this._results; - delete this._ud; - this._curIndex = -1; - this._setStatus(); - if (this._opts.renderOptions.panel) { - this._opts.renderOptions.panel.innerHTML = "" - } - }, - gotoPage : function() { - }, - enableFirstResultSelection : function() { - this._opts.renderOptions.selectFirstResult = true - }, - disableFirstResultSelection : function() { - this._opts.renderOptions.selectFirstResult = false - }, - setPageCapacity : function(T) { - if (typeof T == "number" && !isNaN(T)) { - this._opts.pageCapacity = T < 1 ? a4.DEFAULT_PAGE_CAPACITY - : (T > a4.MAX_PAGE_CAPACITY ? a4.DEFAULT_PAGE_CAPACITY - : T) - } else { - this._opts.pageCapacity = a4.DEFAULT_PAGE_CAPACITY - } - }, - getPageCapacity : function() { - return this._opts.pageCapacity - }, - toString : function() { - return "LocalSearch" - } - }); - var b5 = function(cL, T) { - w.call(this, cL, T) - }; - a8.inherits(b5, w, "BaseRoute"); - a8.extend(b5.prototype, { - clearResults : function() { - } - }); - window.BMAP_TRANSIT_POLICY_LEAST_TIME = 0; - window.BMAP_TRANSIT_POLICY_LEAST_TRANSFER = 2; - window.BMAP_TRANSIT_POLICY_LEAST_WALKING = 3; - window.BMAP_TRANSIT_POLICY_AVOID_SUBWAYS = 4; - window.BMAP_LINE_TYPE_BUS = 0; - window.BMAP_LINE_TYPE_SUBWAY = 1; - window.BMAP_LINE_TYPE_FERRY = 2; - function aU(cM, cL) { - b5.call(this, cM, cL); - cL = cL || {}; - this.setPolicy(cL.policy); - this.setPageCapacity(cL.pageCapacity); - this.QUERY_TYPE = F; - this.RETURN_TYPE = bi; - this.ROUTE_TYPE = bh; - this._overlays = []; - this._curIndex = -1; - this._queryList = []; - var T = this; - cA.load("route", function() { - T._asyncSearch() - }) - } - aU.MAX_PAGE_CAPACITY = 100; - aU.LINE_TYPE_MAPPING = [ 0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 1 ]; - a8.inherits(aU, b5, "TransitRoute"); - a8.extend(aU.prototype, { - setPolicy : function(T) { - if (T >= BMAP_TRANSIT_POLICY_LEAST_TIME - && T <= BMAP_TRANSIT_POLICY_AVOID_SUBWAYS) { - this._opts.policy = T - } else { - this._opts.policy = BMAP_TRANSIT_POLICY_LEAST_TIME - } - }, - _internalSearch : function(cL, T) { - this._queryList.push( { - method : "_internalSearch", - arguments : [ cL, T ] - }) - }, - search : function(cL, T) { - this._queryList.push( { - method : "search", - arguments : [ cL, T ] - }) - }, - setPageCapacity : function(T) { - if (typeof T == "string") { - T = parseInt(T); - if (isNaN(T)) { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY; - return - } - } - if (typeof T != "number") { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY; - return - } - if (T >= 1 && T <= aU.MAX_PAGE_CAPACITY) { - this._opts.pageCapacity = Math.round(T) - } else { - this._opts.pageCapacity = aU.MAX_PAGE_CAPACITY - } - }, - toString : function() { - return "TransitRoute" - }, - _shortTitle : function(T) { - return T.replace(/\(.*\)/, "") - } - }); - window.BMAP_HIGHLIGHT_STEP = 1; - window.BMAP_HIGHLIGHT_ROUTE = 2; - var bl = function(T, cN) { - b5.call(this, T, cN); - this._overlays = []; - this._curIndex = -1; - this._queryList = []; - var cM = this; - var cL = this._opts.renderOptions; - if (cL.highlightMode != BMAP_HIGHLIGHT_STEP - && cL.highlightMode != BMAP_HIGHLIGHT_ROUTE) { - cL.highlightMode = BMAP_HIGHLIGHT_STEP - } - this._enableDragging = this._opts.renderOptions.enableDragging ? true - : false; - cA.load("route", function() { - cM._asyncSearch() - }) - }; - bl.ROAD_TYPE = [ "", "\u73af\u5c9b", "\u65e0\u5c5e\u6027\u9053\u8def", - "\u4e3b\u8def", "\u9ad8\u901f\u8fde\u63a5\u8def", - "\u4ea4\u53c9\u70b9\u5185\u8def\u6bb5", "\u8fde\u63a5\u9053\u8def", - "\u505c\u8f66\u573a\u5185\u90e8\u9053\u8def", - "\u670d\u52a1\u533a\u5185\u90e8\u9053\u8def", "\u6865", - "\u6b65\u884c\u8857", "\u8f85\u8def", "\u531d\u9053", - "\u5168\u5c01\u95ed\u9053\u8def", - "\u672a\u5b9a\u4e49\u4ea4\u901a\u533a\u57df", - "POI\u8fde\u63a5\u8def", "\u96a7\u9053", "\u6b65\u884c\u9053", - "\u516c\u4ea4\u4e13\u7528\u9053", "\u63d0\u524d\u53f3\u8f6c\u9053" ]; - a8.inherits(bl, b5, "DWRoute"); - a8.extend(bl.prototype, { - search : function(cL, T) { - this._queryList.push( { - method : "search", - arguments : [ cL, T ] - }) - } - }); - window.BMAP_DRIVING_POLICY_LEAST_TIME = 0; - window.BMAP_DRIVING_POLICY_LEAST_DISTANCE = 1; - window.BMAP_DRIVING_POLICY_AVOID_HIGHWAYS = 2; - function q(T, cL) { - bl.call(this, T, cL); - cL = cL || {}; - this.setPolicy(cL.policy); - this.QUERY_TYPE = bM; - this.RETURN_TYPE = u; - this.ROUTE_TYPE = BMAP_ROUTE_TYPE_DRIVING - } - a8.inherits(q, bl, "DrivingRoute"); - a8.extend(q.prototype, { - setPolicy : function(T) { - if (T >= BMAP_DRIVING_POLICY_LEAST_TIME - && T <= BMAP_DRIVING_POLICY_AVOID_HIGHWAYS) { - this._opts.policy = T - } else { - this._opts.policy = BMAP_DRIVING_POLICY_LEAST_TIME - } - } - }); - function cD(T, cL) { - bl.call(this, T, cL); - this.QUERY_TYPE = bv; - this.RETURN_TYPE = z; - this.ROUTE_TYPE = BMAP_ROUTE_TYPE_WALKING; - this._enableDragging = false - } - a8.inherits(cD, bl, "WalkingRoute"); - function aX(cL) { - this._opts = {}; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(aX, a8.lang.Class, "Geocoder"); - a8.extend(aX.prototype, { - getPoint : function(T, cM, cL) { - this._queryList.push( { - method : "getPoint", - arguments : [ T, cM, cL ] - }) - }, - getLocation : function(T, cM, cL) { - this._queryList.push( { - method : "getLocation", - arguments : [ T, cM, cL ] - }) - }, - toString : function() { - return "Geocoder" - } - }); - function ak(cL) { - this._opts = {}; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.extend(ak.prototype, { - getCurrentPosition : function(cL, T) { - this._queryList.push( { - method : "getCurrentPosition", - arguments : [ cL, T ] - }) - }, - getStatus : function() { - return this._status - } - }); - function b9(cL) { - this._opts = { - renderOptions : { - map : null - } - }; - a8.extend(this._opts, cL); - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(b9, a8.lang.Class, "LocalCity"); - a8.extend(b9.prototype, { - get : function(T) { - this._queryList.push( { - method : "get", - arguments : [ T ] - }) - }, - toString : function() { - return "LocalCity" - } - }); - function V() { - this._queryList = []; - var T = this; - cA.load("othersearch", function() { - T._asyncSearch() - }) - } - a8.inherits(V, a8.lang.Class, "Boundary"); - a8.extend(V.prototype, { - get : function(cL, T) { - this._queryList.push( { - method : "get", - arguments : [ cL, T ] - }) - }, - toString : function() { - return "Boundary" - } - }); - function bm(cM, cL) { - w.call(this, cM, cL); - this.QUERY_TYPE_BUSLIST = G; - this.RETURN_TYPE_BUSLIST = a2; - this.QUERY_TYPE_BUSLINE = bf; - this.RETURN_TYPE_BUSLINE = cy; - this._queryList = []; - var T = this; - cA.load("buslinesearch", function() { - T._asyncSearch() - }) - } - bm._iconOpen = cc.imgPath + "iw_plus.gif"; - bm._iconClose = cc.imgPath + "iw_minus.gif"; - bm._stopUrl = cc.imgPath + "stop_icon.png"; - a8.inherits(bm, w); - a8.extend(bm.prototype, { - getBusList : function(T) { - this._queryList.push( { - method : "getBusList", - arguments : [ T ] - }) - }, - getBusLine : function(T) { - this._queryList.push( { - method : "getBusLine", - arguments : [ T ] - }) - }, - setGetBusListCompleteCallback : function(T) { - this._opts.onGetBusListComplete = T || function() { - } - }, - setGetBusLineCompleteCallback : function(T) { - this._opts.onGetBusLineComplete = T || function() { - } - }, - setBusListHtmlSetCallback : function(T) { - this._opts.onBusListHtmlSet = T || function() { - } - }, - setBusLineHtmlSetCallback : function(T) { - this._opts.onBusLineHtmlSet = T || function() { - } - }, - setPolylinesSetCallback : function(T) { - this._opts.onPolylinesSet = T || function() { - } - } - }); - function by(cL) { - w.call(this, cL); - cL = cL || {}; - this._options = { - input : null, - types : [], - onSearchComplete : function() { - } - }; - a8.extend(this._options, cL); - this._loc.src = cL.location || "\u5168\u56fd"; - this._word = ""; - this._show = false; - this._suggestion = null; - this._inputValue = ""; - this._initialize(); - _addStat(5011); - var T = this; - cA.load("autocomplete", function() { - T._asyncSearch() - }) - } - a8.inherits(by, w, "Autocomplete"); - a8.extend(by.prototype, { - _initialize : function() { - }, - show : function() { - this._show = true - }, - hide : function() { - this._show = false - }, - setTypes : function(T) { - this._options.types = T - }, - setLocation : function(T) { - this._loc.src = T - }, - search : function(T) { - this._word = T - }, - setInputValue : function(T) { - this._inputValue = T - } - }); - function aj(T, cL) { - window.BMap[T] = cL - } - aj("Map", bz); - aj("Hotspot", cm); - aj("MapType", cu); - aj("Point", cd); - aj("Pixel", bu); - aj("Size", aH); - aj("Bounds", bN); - aj("TileLayer", p); - aj("Projection", bd); - aj("MercatorProjection", ba); - aj("PerspectiveProjection", cE); - aj("Copyright", av); - aj("Overlay", bG); - aj("Label", ag); - aj("Marker", ad); - aj("Icon", M); - aj("Polyline", f); - aj("Polygon", cn); - aj("InfoWindow", bP); - aj("Circle", a); - aj("Control", cp); - aj("NavigationControl", L); - aj("OverviewMapControl", cK); - aj("CopyrightControl", am); - aj("ScaleControl", bK); - aj("MapTypeControl", aL); - aj("TrafficLayer", aC); - aj("ContextMenu", cz); - aj("MenuItem", be); - aj("LocalSearch", a4); - aj("TransitRoute", aU); - aj("DrivingRoute", q); - aj("WalkingRoute", cD); - aj("Autocomplete", by); - aj("Geocoder", aX); - aj("LocalCity", b9); - aj("Geolocation", ak); - aj("BusLineSearch", bm); - aj("Boundary", V); - window.BMap.apiLoad(); -})(); diff --git a/static/BMap/js/bmap_offline_api_v3.0_min.js b/static/BMap/js/bmap_offline_api_v3.0_min.js deleted file mode 100644 index 878b4e9..0000000 --- a/static/BMap/js/bmap_offline_api_v3.0_min.js +++ /dev/null @@ -1,9809 +0,0 @@ -window.TILE_VERSION = { - "ditu": { - "normal": { - "version": "088", - "updateDate": "20180829" - }, - "satellite": { - "version": "009", - "updateDate": "20180829" - }, - "normalTraffic": { - "version": "081", - "updateDate": "20180829" - }, - "satelliteTraffic": { - "version": "083", - "updateDate": "20180829" - }, - "mapJS": { - "version": "104", - "updateDate": "20180829" - }, - "satelliteStreet": { - "version": "083", - "updateDate": "20180829" - }, - "panoClick": { - "version": "1033", - "updateDate": "20180816" - }, - "panoUdt": { - "version": "20180816", - "updateDate": "20180816" - }, - "panoSwfAPI": { - "version": "20150123", - "updateDate": "20150123" - }, - "panoSwfPlace": { - "version": "20141112", - "updateDate": "20141112" - }, - "earthVector": { - "version": "001", - "updateDate": "20180829" - } - }, - "webapp": { - "high_normal": { - "version": "001", - "updateDate": "20180829" - }, - "lower_normal": { - "version": "002", - "updateDate": "20180829" - } - }, - "api_for_mobile": { - "vector": { - "version": "002", - "updateDate": "20180829" - }, - "vectorIcon": { - "version": "002", - "updateDate": "20180829" - } - } -}; -window.BMAP_AUTHENTIC_KEY = ""; -var bmapcfg = { - 'imgext' : '.jpg', //瓦片图的后缀 ------ 根据需要修改,一般是 .png .jpg - 'tiles_dir' : 'static/BMap/maptile/', //普通瓦片图的地址,为空默认在 offlinemap/tiles/ 目录 - 'tiles_hybrid': '', //卫星瓦片图的地址,为空默认在 offlinemap/tiles_hybrid/ 目录 - 'tiles_self' : '', //自定义图层的地址,为空默认在 offlinemap/tiles_self/ 目录 - 'home':'static/BMap/' -}; -(function() { - function aa(a) { - throw a; - } - var l = void 0 - , q = !0 - , s = null - , t = !1; - function u() { - return function() {} - } - function ba(a) { - return function(b) { - this[a] = b - } - } - function w(a) { - return function() { - return this[a] - } - } - function ca(a) { - return function() { - return a - } - } - var da, ea = []; - function ga(a) { - return function() { - return ea[a].apply(this, arguments) - } - } - function ha(a, b) { - return ea[a] = b - } - var ia, z = ia = z || { - version: "1.3.4" - }; - z.aa = "$BAIDU$"; - window[z.aa] = window[z.aa] || {}; - z.object = z.object || {}; - z.extend = z.object.extend = function(a, b) { - for (var c in b) - b.hasOwnProperty(c) && (a[c] = b[c]); - return a - } - ; - z.D = z.D || {}; - z.D.$ = function(a) { - return "string" == typeof a || a instanceof String ? document.getElementById(a) : a && a.nodeName && (1 == a.nodeType || 9 == a.nodeType) ? a : s - } - ; - z.$ = z.Fc = z.D.$; - z.D.U = function(a) { - a = z.D.$(a); - if (a === s) - return a; - a.style.display = "none"; - return a - } - ; - z.U = z.D.U; - z.lang = z.lang || {}; - z.lang.wg = function(a) { - return "[object String]" == Object.prototype.toString.call(a) - } - ; - z.wg = z.lang.wg; - z.D.Oj = function(a) { - return z.lang.wg(a) ? document.getElementById(a) : a - } - ; - z.Oj = z.D.Oj; - z.D.getElementsByClassName = function(a, b) { - var c; - if (a.getElementsByClassName) - c = a.getElementsByClassName(b); - else { - var e = a; - e == s && (e = document); - c = []; - var e = e.getElementsByTagName("*"), f = e.length, g = RegExp("(^|\\s)" + b + "(\\s|$)"), i, k; - for (k = i = 0; i < f; i++) - g.test(e[i].className) && (c[k] = e[i], - k++) - } - return c - } - ; - z.getElementsByClassName = z.D.getElementsByClassName; - z.D.contains = function(a, b) { - var c = z.D.Oj - , a = c(a) - , b = c(b); - return a.contains ? a != b && a.contains(b) : !!(a.compareDocumentPosition(b) & 16) - } - ; - z.ca = z.ca || {}; - /msie (\d+\.\d)/i.test(navigator.userAgent) && (z.ca.ia = z.ia = document.documentMode || +RegExp.$1); - var ja = { - cellpadding: "cellPadding", - cellspacing: "cellSpacing", - colspan: "colSpan", - rowspan: "rowSpan", - valign: "vAlign", - usemap: "useMap", - frameborder: "frameBorder" - }; - 8 > z.ca.ia ? (ja["for"] = "htmlFor", - ja["class"] = "className") : (ja.htmlFor = "for", - ja.className = "class"); - z.D.RG = ja; - z.D.BF = function(a, b, c) { - a = z.D.$(a); - if (a === s) - return a; - if ("style" == b) - a.style.cssText = c; - else { - b = z.D.RG[b] || b; - a.setAttribute(b, c) - } - return a - } - ; - z.BF = z.D.BF; - z.D.CF = function(a, b) { - a = z.D.$(a); - if (a === s) - return a; - for (var c in b) - z.D.BF(a, c, b[c]); - return a - } - ; - z.CF = z.D.CF; - z.Wk = z.Wk || {}; - (function() { - var a = RegExp("(^[\\s\\t\\xa0\\u3000]+)|([\\u3000\\xa0\\s\\t]+$)", "g"); - z.Wk.trim = function(b) { - return ("" + b).replace(a, "") - } - } - )(); - z.trim = z.Wk.trim; - z.Wk.Wo = function(a, b) { - var a = "" + a - , c = Array.prototype.slice.call(arguments, 1) - , e = Object.prototype.toString; - if (c.length) { - c = c.length == 1 ? b !== s && /\[object Array\]|\[object Object\]/.test(e.call(b)) ? b : c : c; - return a.replace(/#\{(.+?)\}/g, function(a, b) { - var i = c[b]; - "[object Function]" == e.call(i) && (i = i(b)); - return "undefined" == typeof i ? "" : i - }) - } - return a - } - ; - z.Wo = z.Wk.Wo; - z.D.Pb = function(a, b) { - a = z.D.$(a); - if (a === s) - return a; - for (var c = a.className.split(/\s+/), e = b.split(/\s+/), f, g = e.length, i, k = 0; k < g; ++k) { - i = 0; - for (f = c.length; i < f; ++i) - if (c[i] == e[k]) { - c.splice(i, 1); - break - } - } - a.className = c.join(" "); - return a - } - ; - z.Pb = z.D.Pb; - z.D.Vx = function(a, b, c) { - a = z.D.$(a); - if (a === s) - return a; - var e; - if (a.insertAdjacentHTML) - a.insertAdjacentHTML(b, c); - else { - e = a.ownerDocument.createRange(); - b = b.toUpperCase(); - if (b == "AFTERBEGIN" || b == "BEFOREEND") { - e.selectNodeContents(a); - e.collapse(b == "AFTERBEGIN") - } else { - b = b == "BEFOREBEGIN"; - e[b ? "setStartBefore" : "setEndAfter"](a); - e.collapse(b) - } - e.insertNode(e.createContextualFragment(c)) - } - return a - } - ; - z.Vx = z.D.Vx; - z.D.show = function(a) { - a = z.D.$(a); - if (a === s) - return a; - a.style.display = ""; - return a - } - ; - z.show = z.D.show; - z.D.QD = function(a) { - a = z.D.$(a); - return a === s ? a : a.nodeType == 9 ? a : a.ownerDocument || a.document - } - ; - z.D.Ua = function(a, b) { - a = z.D.$(a); - if (a === s) - return a; - for (var c = b.split(/\s+/), e = a.className, f = " " + e + " ", g = 0, i = c.length; g < i; g++) - f.indexOf(" " + c[g] + " ") < 0 && (e = e + (" " + c[g])); - a.className = e; - return a - } - ; - z.Ua = z.D.Ua; - z.D.PB = z.D.PB || {}; - z.D.Ol = z.D.Ol || []; - z.D.Ol.filter = function(a, b, c) { - for (var e = 0, f = z.D.Ol, g; g = f[e]; e++) - if (g = g[c]) - b = g(a, b); - return b - } - ; - z.Wk.RO = function(a) { - return a.indexOf("-") < 0 && a.indexOf("_") < 0 ? a : a.replace(/[-_][^-_]/g, function(a) { - return a.charAt(1).toUpperCase() - }) - } - ; - z.D.m0 = function(a) { - z.D.it(a, "expand") ? z.D.Pb(a, "expand") : z.D.Ua(a, "expand") - } - ; - z.D.it = function(a) { - if (arguments.length <= 0 || typeof a === "function") - return this; - if (this.size() <= 0) - return t; - var a = a.replace(/^\s+/g, "").replace(/\s+$/g, "").replace(/\s+/g, " "), b = a.split(" "), c; - z.forEach(this, function(a) { - for (var a = a.className, f = 0; f < b.length; f++) - if (!~(" " + a + " ").indexOf(" " + b[f] + " ")) { - c = t; - return - } - c !== t && (c = q) - }); - return c - } - ; - z.D.oj = function(a, b) { - var c = z.D - , a = c.$(a); - if (a === s) - return a; - var b = z.Wk.RO(b) - , e = a.style[b]; - if (!e) - var f = c.PB[b] - , e = a.currentStyle || (z.ca.ia ? a.style : getComputedStyle(a, s)) - , e = f && f.get ? f.get(a, e) : e[f || b]; - if (f = c.Ol) - e = f.filter(b, e, "get"); - return e - } - ; - z.oj = z.D.oj; - /opera\/(\d+\.\d)/i.test(navigator.userAgent) && (z.ca.opera = +RegExp.$1); - z.ca.HM = /webkit/i.test(navigator.userAgent); - z.ca.VY = /gecko/i.test(navigator.userAgent) && !/like gecko/i.test(navigator.userAgent); - z.ca.DE = "CSS1Compat" == document.compatMode; - z.D.ga = function(a) { - a = z.D.$(a); - if (a === s) - return a; - var b = z.D.QD(a) - , c = z.ca - , e = z.D.oj; - c.VY > 0 && b.getBoxObjectFor && e(a, "position"); - var f = { - left: 0, - top: 0 - }, g; - if (a == (c.ia && !c.DE ? b.body : b.documentElement)) - return f; - if (a.getBoundingClientRect) { - a = a.getBoundingClientRect(); - f.left = Math.floor(a.left) + Math.max(b.documentElement.scrollLeft, b.body.scrollLeft); - f.top = Math.floor(a.top) + Math.max(b.documentElement.scrollTop, b.body.scrollTop); - f.left = f.left - b.documentElement.clientLeft; - f.top = f.top - b.documentElement.clientTop; - a = b.body; - b = parseInt(e(a, "borderLeftWidth")); - e = parseInt(e(a, "borderTopWidth")); - if (c.ia && !c.DE) { - f.left = f.left - (isNaN(b) ? 2 : b); - f.top = f.top - (isNaN(e) ? 2 : e) - } - } else { - g = a; - do { - f.left = f.left + g.offsetLeft; - f.top = f.top + g.offsetTop; - if (c.HM > 0 && e(g, "position") == "fixed") { - f.left = f.left + b.body.scrollLeft; - f.top = f.top + b.body.scrollTop; - break - } - g = g.offsetParent - } while (g && g != a);if (c.opera > 0 || c.HM > 0 && e(a, "position") == "absolute") - f.top = f.top - b.body.offsetTop; - for (g = a.offsetParent; g && g != b.body; ) { - f.left = f.left - g.scrollLeft; - if (!c.opera || g.tagName != "TR") - f.top = f.top - g.scrollTop; - g = g.offsetParent - } - } - return f - } - ; - /firefox\/(\d+\.\d)/i.test(navigator.userAgent) && (z.ca.Te = +RegExp.$1); - /BIDUBrowser/i.test(navigator.userAgent) && (z.ca.n2 = q); - var ka = navigator.userAgent; - /(\d+\.\d)?(?:\.\d)?\s+safari\/?(\d+\.\d+)?/i.test(ka) && !/chrome/i.test(ka) && (z.ca.Iy = +(RegExp.$1 || RegExp.$2)); - /chrome\/(\d+\.\d)/i.test(navigator.userAgent) && (z.ca.Qw = +RegExp.$1); - z.mc = z.mc || {}; - z.mc.Fb = function(a, b) { - var c, e, f = a.length; - if ("function" == typeof b) - for (e = 0; e < f; e++) { - c = a[e]; - c = b.call(a, c, e); - if (c === t) - break - } - return a - } - ; - z.Fb = z.mc.Fb; - z.lang.aa = function() { - return "TANGRAM__" + (window[z.aa]._counter++).toString(36) - } - ; - window[z.aa]._counter = window[z.aa]._counter || 1; - window[z.aa]._instances = window[z.aa]._instances || {}; - z.lang.wt = function(a) { - return "[object Function]" == Object.prototype.toString.call(a) - } - ; - z.lang.Ca = function(a) { - this.aa = a || z.lang.aa(); - window[z.aa]._instances[this.aa] = this - } - ; - window[z.aa]._instances = window[z.aa]._instances || {}; - z.lang.Ca.prototype.ci = ga(0); - z.lang.Ca.prototype.toString = function() { - return "[object " + (this.UQ || "Object") + "]" - } - ; - z.lang.Ju = function(a, b) { - this.type = a; - this.returnValue = q; - this.target = b || s; - this.currentTarget = s - } - ; - z.lang.Ca.prototype.addEventListener = function(a, b, c) { - if (z.lang.wt(b)) { - !b.fl && (b.fl = {}); - !this.Ci && (this.Ci = {}); - var e = this.Ci, f; - if (typeof c == "string" && c) { - /[^\w\-]/.test(c) && aa("nonstandard key:" + c); - f = b.Nx = c - } - a.indexOf("on") != 0 && (a = "on" + a); - typeof e[a] != "object" && (e[a] = {}); - typeof b.fl[a] != "object" && (b.fl[a] = {}); - f = f || z.lang.aa(); - b.fl[a].Nx = f; - e[a][f] = b - } - } - ; - z.lang.Ca.prototype.removeEventListener = function(a, b) { - a.indexOf("on") != 0 && (a = "on" + a); - if (z.lang.wt(b)) { - if (!b.fl || !b.fl[a]) - return; - b = b.fl[a].Nx - } else if (!z.lang.wg(b)) - return; - !this.Ci && (this.Ci = {}); - var c = this.Ci; - c[a] && c[a][b] && delete c[a][b] - } - ; - z.lang.Ca.prototype.dispatchEvent = function(a, b) { - z.lang.wg(a) && (a = new z.lang.Ju(a)); - !this.Ci && (this.Ci = {}); - var b = b || {}, c; - for (c in b) - a[c] = b[c]; - var e = this.Ci - , f = a.type; - a.target = a.target || this; - a.currentTarget = this; - f.indexOf("on") != 0 && (f = "on" + f); - z.lang.wt(this[f]) && this[f].apply(this, arguments); - if (typeof e[f] == "object") - for (c in e[f]) - e[f][c].apply(this, arguments); - return a.returnValue - } - ; - z.lang.ta = function(a, b, c) { - var e, f, g = a.prototype; - f = new Function; - f.prototype = b.prototype; - f = a.prototype = new f; - for (e in g) - f[e] = g[e]; - a.prototype.constructor = a; - a.b0 = b.prototype; - if ("string" == typeof c) - f.UQ = c - } - ; - z.ta = z.lang.ta; - z.lang.Nc = function(a) { - return window[z.aa]._instances[a] || s - } - ; - z.platform = z.platform || {}; - z.platform.AM = /macintosh/i.test(navigator.userAgent); - z.platform.h4 = /MicroMessenger/i.test(navigator.userAgent); - z.platform.IM = /windows/i.test(navigator.userAgent); - z.platform.cZ = /x11/i.test(navigator.userAgent); - z.platform.Jm = /android/i.test(navigator.userAgent); - /android (\d+\.\d)/i.test(navigator.userAgent) && (z.platform.dK = z.dK = RegExp.$1); - z.platform.XY = /ipad/i.test(navigator.userAgent); - z.platform.zE = /iphone/i.test(navigator.userAgent); - function la(a, b) { - a.domEvent = b = window.event || b; - a.clientX = b.clientX || b.pageX; - a.clientY = b.clientY || b.pageY; - a.offsetX = b.offsetX || b.layerX; - a.offsetY = b.offsetY || b.layerY; - a.screenX = b.screenX; - a.screenY = b.screenY; - a.ctrlKey = b.ctrlKey || b.metaKey; - a.shiftKey = b.shiftKey; - a.altKey = b.altKey; - if (b.touches) { - a.touches = []; - for (var c = 0; c < b.touches.length; c++) - a.touches.push({ - clientX: b.touches[c].clientX, - clientY: b.touches[c].clientY, - screenX: b.touches[c].screenX, - screenY: b.touches[c].screenY, - pageX: b.touches[c].pageX, - pageY: b.touches[c].pageY, - target: b.touches[c].target, - identifier: b.touches[c].identifier - }) - } - if (b.changedTouches) { - a.changedTouches = []; - for (c = 0; c < b.changedTouches.length; c++) - a.changedTouches.push({ - clientX: b.changedTouches[c].clientX, - clientY: b.changedTouches[c].clientY, - screenX: b.changedTouches[c].screenX, - screenY: b.changedTouches[c].screenY, - pageX: b.changedTouches[c].pageX, - pageY: b.changedTouches[c].pageY, - target: b.changedTouches[c].target, - identifier: b.changedTouches[c].identifier - }) - } - if (b.targetTouches) { - a.targetTouches = []; - for (c = 0; c < b.targetTouches.length; c++) - a.targetTouches.push({ - clientX: b.targetTouches[c].clientX, - clientY: b.targetTouches[c].clientY, - screenX: b.targetTouches[c].screenX, - screenY: b.targetTouches[c].screenY, - pageX: b.targetTouches[c].pageX, - pageY: b.targetTouches[c].pageY, - target: b.targetTouches[c].target, - identifier: b.targetTouches[c].identifier - }) - } - a.rotation = b.rotation; - a.scale = b.scale; - return a - } - z.lang.hx = function(a) { - var b = window[z.aa]; - b.eT && delete b.eT[a] - } - ; - z.event = {}; - z.M = z.event.M = function(a, b, c) { - if (!(a = z.$(a))) - return a; - b = b.replace(/^on/, ""); - a.addEventListener ? a.addEventListener(b, c, t) : a.attachEvent && a.attachEvent("on" + b, c); - return a - } - ; - z.ed = z.event.ed = function(a, b, c) { - if (!(a = z.$(a))) - return a; - b = b.replace(/^on/, ""); - a.removeEventListener ? a.removeEventListener(b, c, t) : a.detachEvent && a.detachEvent("on" + b, c); - return a - } - ; - z.D.it = function(a, b) { - if (!a || !a.className || typeof a.className != "string") - return t; - var c = -1; - try { - c = a.className == b || a.className.search(RegExp("(\\s|^)" + b + "(\\s|$)")) - } catch (e) { - return t - } - return c > -1 - } - ; - z.iL = function() { - function a(a) { - document.addEventListener && (this.element = a, - this.lL = this.Dk ? "touchstart" : "mousedown", - this.xD = this.Dk ? "touchmove" : "mousemove", - this.wD = this.Dk ? "touchend" : "mouseup", - this.oh = t, - this.mu = this.lu = 0, - this.element.addEventListener(this.lL, this, t), - ia.M(this.element, "mousedown", u()), - this.handleEvent(s)) - } - a.prototype = { - Dk: "ontouchstart"in window || "createTouch"in document, - start: function(a) { - ma(a); - this.oh = t; - this.lu = this.Dk ? a.touches[0].clientX : a.clientX; - this.mu = this.Dk ? a.touches[0].clientY : a.clientY; - this.element.addEventListener(this.xD, this, t); - this.element.addEventListener(this.wD, this, t) - }, - move: function(a) { - na(a); - var c = this.Dk ? a.touches[0].clientY : a.clientY; - if (10 < Math.abs((this.Dk ? a.touches[0].clientX : a.clientX) - this.lu) || 10 < Math.abs(c - this.mu)) - this.oh = q - }, - end: function(a) { - na(a); - this.oh || (a = document.createEvent("Event"), - a.initEvent("tap", t, q), - this.element.dispatchEvent(a)); - this.element.removeEventListener(this.xD, this, t); - this.element.removeEventListener(this.wD, this, t) - }, - handleEvent: function(a) { - if (a) - switch (a.type) { - case this.lL: - this.start(a); - break; - case this.xD: - this.move(a); - break; - case this.wD: - this.end(a) - } - } - }; - return function(b) { - return new a(b) - } - }(); - var B = window.BMap || {}; - B.version = "3.0"; - B.gV = 0.34 > Math.random(); - 0 <= B.version.indexOf("#") && (B.version = "3.0"); - B.Fr = []; - B.Ye = function(a) { - this.Fr.push(a) - } - ; - B.ur = []; - B.Tm = function(a) { - this.ur.push(a) - } - ; - B.vV = B.apiLoad || u(); - B.Q0 = B.verify || function() { - B.version && B.version >= 1.5 && oa(B.Wc + "?qt=verify&ak=" + qa, function(a) { - if (a && a.error !== 0) { - if (typeof map !== "undefined") { - map.La().innerHTML = ""; - map.Ci = {} - } - B = s; - var b = "\u767e\u5ea6\u672a\u6388\u6743\u4f7f\u7528\u5730\u56feAPI\uff0c\u53ef\u80fd\u662f\u56e0\u4e3a\u60a8\u63d0\u4f9b\u7684\u5bc6\u94a5\u4e0d\u662f\u6709\u6548\u7684\u767e\u5ea6LBS\u5f00\u653e\u5e73\u53f0\u5bc6\u94a5\uff0c\u6216\u6b64\u5bc6\u94a5\u672a\u5bf9\u672c\u5e94\u7528\u7684\u767e\u5ea6\u5730\u56feJavaScriptAPI\u6388\u6743\u3002\u60a8\u53ef\u4ee5\u8bbf\u95ee\u5982\u4e0b\u7f51\u5740\u4e86\u89e3\u5982\u4f55\u83b7\u53d6\u6709\u6548\u7684\u5bc6\u94a5\uff1ahttp://lbsyun.baidu.com/apiconsole/key#\u3002"; - switch (a.error) { - case 101: - b = "\u5f00\u53d1\u8005\u7981\u7528\u4e86\u8be5ak\u7684jsapi\u670d\u52a1\u6743\u9650\u3002\u60a8\u53ef\u4ee5\u8bbf\u95ee\u5982\u4e0b\u7f51\u5740\u4e86\u89e3\u5982\u4f55\u83b7\u53d6\u6709\u6548\u7684\u5bc6\u94a5\uff1ahttp://lbsyun.baidu.com/apiconsole/key#\u3002"; - break; - case 102: - b = "\u5f00\u53d1\u8005Referer\u4e0d\u6b63\u786e\u3002\u60a8\u53ef\u4ee5\u8bbf\u95ee\u5982\u4e0b\u7f51\u5740\u4e86\u89e3\u5982\u4f55\u83b7\u53d6\u6709\u6548\u7684\u5bc6\u94a5\uff1ahttp://lbsyun.baidu.com/apiconsole/key#\u3002" - } - alert(b) - } - }) - } - ; - var qa = window.BMAP_AUTHENTIC_KEY; - window.BMAP_AUTHENTIC_KEY = s; - var ra = window.BMap_loadScriptTime - , sa = (new Date).getTime() - , ta = s - , ua = q - , va = 5042 - , xa = 5002 - , ya = 5003 - , za = "load_mapclick" - , Aa = 5038 - , Ba = 5041 - , Ca = 5047 - , Da = 5036 - , Ea = 5039 - , Fa = 5037 - , Ga = 5040 - , Ha = 5011 - , Ia = 7E3; - var Ja = 0; - function Ka(a, b) { - if (a = z.$(a)) { - var c = this; - z.lang.Ca.call(c); - b = b || {}; - c.K = { - tC: 200, - Wb: q, - px: t, - nD: q, - To: q, - Uo: b.enableWheelZoom || t, - gL: q, - pD: q, - Ns: q, - nx: q, - tD: q, - Ro: b.enable3DBuilding || t, - Ic: 25, - b1: 240, - iV: 450, - Vb: G.Vb, - Hd: G.Hd, - Yx: !!b.Yx, - gc: Math.round(b.minZoom) || 1, - Yb: Math.round(b.maxZoom) || 19, - Hb: b.mapType || La, - e5: t, - cL: b.drawer || Ja, - ox: q, - lx: 500, - aX: b.enableHighResolution !== t, - fj: b.enableMapClick !== t, - devicePixelRatio: b.devicePixelRatio || window.devicePixelRatio || 1, - fG: 99, - ye: b.mapStyle || s, - jZ: b.logoControl === t ? t : q, - DV: [], - Kw: b.beforeClickIcon || s, - Ms: t, - qN: q - }; - c.K.ye && (this.LY(c.K.ye.controls), - this.sM(c.K.ye.geotableId)); - c.K.ye && c.K.ye.styleId && c.O3(c.K.ye.styleId); - c.K.fm = { - dark: { - backColor: "#2D2D2D", - textColor: "#bfbfbf", - iconUrl: "dicons" - }, - normal: { - backColor: "#F3F1EC", - textColor: "#c61b1b", - iconUrl: "icons" - }, - light: { - backColor: "#EBF8FC", - textColor: "#017fb4", - iconUrl: "licons" - } - }; - b.enableAutoResize && (c.K.nx = b.enableAutoResize); - b.enableStreetEntrance === t && (c.K.tD = b.enableStreetEntrance); - b.enableDeepZoom === t && (c.K.gL = b.enableDeepZoom); - var e = c.K.DV; - if (H()) - for (var f = 0, g = e.length; f < g; f++) - if (z.ca[e[f]]) { - c.K.devicePixelRatio = 1; - break - } - e = -1 < navigator.userAgent.toLowerCase().indexOf("android"); - f = -1 < navigator.userAgent.toLowerCase().indexOf("mqqbrowser"); - if (-1 < navigator.userAgent.toLowerCase().indexOf("UCBrowser") || e && f) - c.K.fG = 99; - c.Wa = a; - c.IB(a); - a.unselectable = "on"; - a.innerHTML = ""; - a.appendChild(c.va()); - b.size && this.Ce(b.size); - e = c.cb(); - c.width = e.width; - c.height = e.height; - c.offsetX = 0; - c.offsetY = 0; - c.platform = a.firstChild; - c.ze = c.platform.firstChild; - c.ze.style.width = c.width + "px"; - c.ze.style.height = c.height + "px"; - c.Yd = {}; - c.re = new J(0,0); - c.fc = new J(0,0); - c.Oa = 3; - c.Oc = 0; - c.LC = s; - c.KC = s; - c.Ub = ""; - c.Rw = ""; - c.Jh = {}; - c.Jh.custom = {}; - c.Sa = 0; - b.useWebGL === t && Na(t); - c.P = new Oa(a,{ - of: "api", - jT: q - }); - c.P.U(); - c.P.GF(c); - b = b || {}; - e = c.Hb = c.K.Hb; - c.cd = e.wm(); - e === Qa && Ra(xa); - e === Sa && Ra(ya); - e = c.K; - e.hP = Math.round(b.minZoom); - e.gP = Math.round(b.maxZoom); - c.bv(); - c.R = { - Jc: t, - nc: 0, - Bt: 0, - MM: 0, - l4: 0, - lC: t, - pF: -1, - Qe: [] - }; - c.platform.style.cursor = c.K.Vb; - for (f = 0; f < B.Fr.length; f++) - B.Fr[f](c); - c.R.pF = f; - c.ba(); - K.load("map", function() { - c.ib() - }); - c.K.fj && (setTimeout(function() { - Ra(za) - }, 1E3), - K.load("mapclick", function() { - window.MPC_Mgr = window.MPC_Mgr || {}; - window.MPC_Mgr[c.aa] = new Ta(c) - }, q)); - Ua() && K.load("oppc", function() { - c.Dz() - }); - H() && K.load("opmb", function() { - c.Dz() - }); - a = s; - c.WB = [] - } - } - z.lang.ta(Ka, z.lang.Ca, "Map"); - z.extend(Ka.prototype, { - va: function() { - var a = L("div") - , b = a.style; - b.overflow = "visible"; - b.position = "absolute"; - b.zIndex = "0"; - b.top = b.left = "0px"; - var b = L("div", { - "class": "BMap_mask" - }) - , c = b.style; - c.position = "absolute"; - c.top = c.left = "0px"; - c.zIndex = "9"; - c.overflow = "hidden"; - c.WebkitUserSelect = "none"; - a.appendChild(b); - return a - }, - IB: function(a) { - var b = a.style; - b.overflow = "hidden"; - "absolute" !== Va(a).position && (b.position = "relative", - b.zIndex = 0); - b.backgroundColor = "#F3F1EC"; - b.color = "#000"; - b.textAlign = "left" - }, - ba: function() { - var a = this; - a.as = function() { - var b = a.cb(); - if (a.width !== b.width || a.height !== b.height) { - var c = new O(a.width,a.height) - , e = new P("onbeforeresize"); - e.size = c; - a.dispatchEvent(e); - a.ik((b.width - a.width) / 2, (b.height - a.height) / 2); - a.ze.style.width = (a.width = b.width) + "px"; - a.ze.style.height = (a.height = b.height) + "px"; - c = new P("onresize"); - c.size = b; - a.dispatchEvent(c) - } - } - ; - a.K.nx && (a.R.es = setInterval(a.as, 80)) - }, - ik: function(a, b, c, e) { - var f = this.oa().dc(this.fa()) - , g = this.cd - , i = q; - c && J.yM(c) && (this.re = new J(c.lng,c.lat), - i = t); - if (c = c && e ? g.vj(c, this.Ub) : this.fc) - if (this.fc = new J(c.lng + a * f,c.lat - b * f), - (a = g.nh(this.fc, this.Ub)) && i) - this.re = a - }, - Gg: function(a, b) { - if (Wa(a) && (this.bv(), - this.dispatchEvent(new P("onzoomstart")), - a = this.Yn(a).zoom, - a !== this.Oa)) { - this.Oc = this.Oa; - this.Oa = a; - var c; - b ? c = b : this.hh() && (c = this.hh().ga()); - c && (c = this.$b(c, this.Oc), - this.ik(this.width / 2 - c.x, this.height / 2 - c.y, this.xb(c, this.Oc), q)); - this.dispatchEvent(new P("onzoomstartcode")) - } - }, - Qc: function(a) { - this.Gg(a) - }, - kG: function(a) { - this.Gg(this.Oa + 1, a) - }, - lG: function(a) { - this.Gg(this.Oa - 1, a) - }, - qi: function(a) { - a instanceof J && (this.fc = this.cd.vj(a, this.Ub), - this.re = J.yM(a) ? new J(a.lng,a.lat) : this.cd.nh(this.fc, this.Ub)) - }, - Ag: function(a, b) { - a = Math.round(a) || 0; - b = Math.round(b) || 0; - this.ik(-a, -b) - }, - Aw: function(a) { - a && Xa(a.He) && (a.He(this), - this.dispatchEvent(new P("onaddcontrol",a))) - }, - VN: function(a) { - a && Xa(a.remove) && (a.remove(), - this.dispatchEvent(new P("onremovecontrol",a))) - }, - yo: function(a) { - a && Xa(a.na) && (a.na(this), - this.dispatchEvent(new P("onaddcontextmenu",a))) - }, - Cp: function(a) { - a && Xa(a.remove) && (this.dispatchEvent(new P("onremovecontextmenu",a)), - a.remove()) - }, - Ga: function(a) { - a && Xa(a.He) && (a.He(this), - this.dispatchEvent(new P("onaddoverlay",a))) - }, - Qb: function(a) { - a && Xa(a.remove) && (a.remove(), - this.dispatchEvent(new P("onremoveoverlay",a))) - }, - yK: function() { - this.dispatchEvent(new P("onclearoverlays")) - }, - Oe: function(a) { - a && this.dispatchEvent(new P("onaddtilelayer",a)) - }, - Yf: function(a) { - a && this.dispatchEvent(new P("onremovetilelayer",a)) - }, - Dg: function(a) { - if (this.Hb !== a) { - var b = new P("onsetmaptype"); - b.V4 = this.Hb; - this.Hb = this.K.Hb = a; - this.cd = this.Hb.wm(); - this.ik(0, 0, this.Ka(), q); - this.bv(); - var c = this.Yn(this.fa()).zoom; - this.Gg(c); - this.dispatchEvent(b); - b = new P("onmaptypechange"); - b.Oa = c; - b.Hb = a; - this.dispatchEvent(b); - (a === Ya || a === Sa) && Ra(ya) - } - }, - Zf: function(a) { - var b = this; - if (a instanceof J) - b.qi(a, { - noAnimation: q - }); - else if ($a(a)) - if (b.Hb === Qa) { - var c = G.pC[a]; - c && (pt = c.k, - b.Zf(pt)) - } else { - var e = this.WH(); - e.JF(function(c) { - 0 === e.xm() && 2 === e.Ia.result.type && (b.Zf(c.Ak(0).point), - Qa.wk(a) && b.DF(a)) - }); - e.search(a, { - log: "center" - }) - } - }, - Fd: function(a, b) { - "[object Undefined]" !== Object.prototype.toString.call(b) && (b = parseInt(b)); - B.Fn("cus.fire", "time", { - z_loadscripttime: sa - ra - }); - var c = this; - if ($a(a)) - if (c.Hb === Qa) { - var e = G.pC[a]; - e && (pt = e.k, - c.Fd(pt, b)) - } else { - var f = c.WH(); - f.JF(function(e) { - if (0 === f.xm() && (2 === f.Ia.result.type || 11 === f.Ia.result.type)) { - var e = e.Ak(0).point - , g = b || ab.tx(f.Ia.content.level, c); - c.Fd(e, g); - Qa.wk(a) && c.DF(a) - } - }); - f.search(a, { - log: "center" - }) - } - else if (a instanceof J && b) { - b = c.Yn(b).zoom; - c.Oc = c.Oa || b; - c.Oa = b; - e = c.re; - c.re = new J(a.lng,a.lat); - c.fc = c.cd.vj(c.re, c.Ub); - c.LC = c.LC || c.Oa; - c.KC = c.KC || c.re; - var g = new P("onload") - , i = new P("onloadcode"); - g.point = new J(a.lng,a.lat); - g.pixel = c.$b(c.re, c.Oa); - g.zoom = b; - c.loaded || (c.loaded = q, - c.dispatchEvent(g), - ta || (ta = bb())); - c.dispatchEvent(i); - g = new P("onmoveend"); - g.mv = "centerAndZoom"; - e.pb(c.re) || c.dispatchEvent(g); - c.dispatchEvent(new P("onmoveend")); - c.Oc !== c.Oa && (e = new P("onzoomend"), - e.mv = "centerAndZoom", - c.dispatchEvent(e)); - c.K.Ro && c.Ro() - } - }, - WH: function() { - this.R.YM || (this.R.YM = new cb(1)); - return this.R.YM - }, - reset: function() { - this.Fd(this.KC, this.LC, q) - }, - enableDragging: function() { - this.K.Wb = q - }, - disableDragging: function() { - this.K.Wb = t - }, - enableInertialDragging: function() { - this.K.ox = q - }, - disableInertialDragging: function() { - this.K.ox = t - }, - enableScrollWheelZoom: function() { - this.K.Uo = q - }, - disableScrollWheelZoom: function() { - this.K.Uo = t - }, - enableContinuousZoom: function() { - this.K.To = q - }, - disableContinuousZoom: function() { - this.K.To = t - }, - enableDoubleClickZoom: function() { - this.K.nD = q - }, - disableDoubleClickZoom: function() { - this.K.nD = t - }, - enableKeyboard: function() { - this.K.px = q - }, - disableKeyboard: function() { - this.K.px = t - }, - enablePinchToZoom: function() { - this.K.Ns = q - }, - disablePinchToZoom: function() { - this.K.Ns = t - }, - enableAutoResize: function() { - this.K.nx = q; - this.as(); - this.R.es || (this.R.es = setInterval(this.as, 80)) - }, - disableAutoResize: function() { - this.K.nx = t; - this.R.es && (clearInterval(this.R.es), - this.R.es = s) - }, - Ro: function() { - this.K.Ro = q; - this.Nn || (this.Nn = new db({ - pL: q - }), - this.Oe(this.Nn)) - }, - KW: function() { - this.K.Ro = t; - this.Nn && (this.Yf(this.Nn), - this.Nn = s, - delete this.Nn) - }, - cb: function() { - return this.xs && this.xs instanceof O ? new O(this.xs.width,this.xs.height) : new O(this.Wa.clientWidth,this.Wa.clientHeight) - }, - Ce: function(a) { - a && a instanceof O ? (this.xs = a, - this.Wa.style.width = a.width + "px", - this.Wa.style.height = a.height + "px") : this.xs = s - }, - Ka: w("re"), - fa: w("Oa"), - ZV: function() { - this.as() - }, - Yn: function(a) { - var b = this.K.gc - , c = this.K.Yb - , e = t - , a = Math.round(a); - a < b && (e = q, - a = b); - a > c && (e = q, - a = c); - return { - zoom: a, - yD: e - } - }, - La: w("Wa"), - $b: function(a, b) { - b = b || this.fa(); - return this.cd.$b(a, b, this.fc, this.cb(), this.Ub) - }, - xb: function(a, b) { - b = b || this.fa(); - return this.cd.xb(a, b, this.fc, this.cb(), this.Ub) - }, - Xe: function(a, b) { - if (a) { - var c = this.$b(new J(a.lng,a.lat), b); - c.x -= this.offsetX; - c.y -= this.offsetY; - return c - } - }, - JN: function(a, b) { - if (a) { - var c = new Q(a.x,a.y); - c.x += this.offsetX; - c.y += this.offsetY; - return this.xb(c, b) - } - }, - pointToPixelFor3D: function(a, b) { - var c = map.Ub; - this.Hb === Qa && c && eb.EK(a, this, b) - }, - P4: function(a, b) { - var c = map.Ub; - this.Hb === Qa && c && eb.DK(a, this, b) - }, - Q4: function(a, b) { - var c = this - , e = map.Ub; - c.Hb === Qa && e && eb.EK(a, c, function(a) { - a.x -= c.offsetX; - a.y -= c.offsetY; - b && b(a) - }) - }, - L4: function(a, b) { - var c = map.Ub; - this.Hb === Qa && c && (a.x += this.offsetX, - a.y += this.offsetY, - eb.DK(a, this, b)) - }, - ve: function(a) { - if (!this.Xx()) - return new fb; - var b = a || {} - , a = b.margins || [0, 0, 0, 0] - , c = b.zoom || s - , b = this.xb({ - x: a[3], - y: this.height - a[2] - }, c) - , a = this.xb({ - x: this.width - a[1], - y: a[0] - }, c); - return new fb(b,a) - }, - Xx: function() { - return !!this.loaded - }, - nS: function(a, b) { - for (var c = this.oa(), e = b.margins || [10, 10, 10, 10], f = b.zoomFactor || 0, g = e[1] + e[3], e = e[0] + e[2], i = c.bp(), k = c = c.sm(); k >= i; k--) { - var m = this.oa().dc(k); - if (a.YF().lng / m < this.width - g && a.YF().lat / m < this.height - e) - break - } - k += f; - k < i && (k = i); - k > c && (k = c); - return k - }, - ht: function(a, b) { - var c = { - center: this.Ka(), - zoom: this.fa() - }; - if (!a || !a instanceof fb && 0 === a.length || a instanceof fb && a.tj()) - return c; - var e = []; - a instanceof fb ? (e.push(a.Rf()), - e.push(a.Ve())) : e = a.slice(0); - for (var b = b || {}, f = [], g = 0, i = e.length; g < i; g++) - f.push(this.cd.vj(e[g], this.Ub)); - e = new fb; - for (g = f.length - 1; 0 <= g; g--) - e.extend(f[g]); - if (e.tj()) - return c; - c = e.Ka(); - f = this.nS(e, b); - b.margins && (e = b.margins, - g = (e[1] - e[3]) / 2, - e = (e[0] - e[2]) / 2, - i = this.oa().dc(f), - b.offset && (g = b.offset.width, - e = b.offset.height), - c.lng += i * g, - c.lat += i * e); - c = this.cd.nh(c, this.Ub); - return { - center: c, - zoom: f - } - }, - yh: function(a, b) { - var c; - c = a && a.center ? a : this.ht(a, b); - var b = b || {} - , e = b.delay || 200; - if (c.zoom === this.Oa && b.enableAnimation !== t) { - var f = this; - setTimeout(function() { - f.qi(c.center, { - duration: 210 - }) - }, e) - } else - this.Fd(c.center, c.zoom) - }, - Tf: w("Yd"), - hh: function() { - return this.R.qb && this.R.qb.Xa() ? this.R.qb : s - }, - getDistance: function(a, b) { - if (a && b) { - if (a.pb(b)) - return 0; - var c = 0 - , c = S.$o(a, b); - if (c === s || c === l) - c = 0; - return c - } - }, - Hx: function() { - var a = [] - , b = this.ya - , c = this.Ee; - if (b) - for (var e in b) - b[e]instanceof gb && a.push(b[e]); - if (c) { - e = 0; - for (b = c.length; e < b; e++) - a.push(c[e]) - } - return a - }, - oa: w("Hb"), - Dz: function() { - for (var a = this.R.pF; a < B.Fr.length; a++) - B.Fr[a](this); - this.R.pF = a - }, - DF: function(a) { - //修改 setCurrentCity - //i_setCurrentCity(this, a); - this.Ub = Qa.wk(a); - this.Rw = Qa.BL(this.Ub); - this.Hb === Qa && this.cd instanceof hb && (this.cd.$i = this.Ub) - }, - setDefaultCursor: function(a) { - this.K.Vb = a; - this.platform && (this.platform.style.cursor = this.K.Vb) - }, - getDefaultCursor: function() { - return this.K.Vb - }, - setDraggingCursor: function(a) { - this.K.Hd = a - }, - getDraggingCursor: function() { - return this.K.Hd - }, - Sx: function() { - return this.K.aX && 1.5 <= this.K.devicePixelRatio - }, - Cw: function(a, b) { - b ? this.Jh[b] || (this.Jh[b] = {}) : b = "custom"; - a.tag = b; - a instanceof ib && (this.Jh[b][a.aa] = a, - a.na(this)); - var c = this; - K.load("hotspot", function() { - c.Dz() - }, q) - }, - VZ: function(a, b) { - b || (b = "custom"); - this.Jh[b][a.aa] && delete this.Jh[b][a.aa] - }, - dm: function(a) { - a || (a = "custom"); - this.Jh[a] = {} - }, - bv: function() { - var a = this.Hb.bp() - , b = this.Hb.sm() - , c = this.K; - c.gc = c.hP || a; - c.Yb = c.gP || b; - c.gc < a && (c.gc = a); - c.Yb > b && (c.Yb = b) - }, - setMinZoom: function(a) { - a = Math.round(a); - a > this.K.Yb && (a = this.K.Yb); - this.K.hP = a; - this.HJ() - }, - setMaxZoom: function(a) { - a = Math.round(a); - a < this.K.gc && (a = this.K.gc); - this.K.gP = a; - this.HJ() - }, - HJ: function() { - this.bv(); - var a = this.K; - this.Oa < a.gc ? this.Qc(a.gc) : this.Oa > a.Yb && this.Qc(a.Yb); - var b = new P("onzoomspanchange"); - b.gc = a.gc; - b.Yb = a.Yb; - this.dispatchEvent(b) - }, - Q3: w("WB"), - getKey: function() { - return qa - }, - Zt: function(a) { - var b = this; - window.MPC_Mgr && window.MPC_Mgr[b.aa] && window.MPC_Mgr[b.aa].close(); - b.K.fj = t; - B.Fn("cus.fire", "count", "z_setmapstylecount"); - if (a) { - b = this; - a.styleJson && (a.styleStr = b.Z_(a.styleJson)); - H() && z.ca.Iy ? setTimeout(function() { - b.K.ye = a; - b.dispatchEvent(new P("onsetcustomstyles",a)) - }, 50) : (this.K.ye = a, - this.dispatchEvent(new P("onsetcustomstyles",a)), - this.sM(b.K.ye.geotableId)); - var c = { - style: a.style - }; - a.features && 0 < a.features.length && (c.features = q); - a.styleJson && 0 < a.styleJson.length && (c.styleJson = q); - Ra(5050, c); - a.style && (c = b.K.fm[a.style] ? b.K.fm[a.style].backColor : b.K.fm.normal.backColor) && (this.La().style.backgroundColor = c) - } - }, - LY: function(a) { - this.controls || (this.controls = { - navigationControl: new jb, - scaleControl: new kb, - overviewMapControl: new lb, - mapTypeControl: new mb - }); - var b = this, c; - for (c in this.controls) - b.VN(b.controls[c]); - a = a || []; - z.mc.Fb(a, function(a) { - b.Aw(b.controls[a]) - }) - }, - sM: function(a) { - a ? this.vs && this.vs.Cf === a || (this.Yf(this.vs), - this.vs = new nb({ - geotableId: a - }), - this.Oe(this.vs)) : this.Yf(this.vs) - }, - Sb: function() { - var a = this.fa() >= this.K.fG && this.oa() === La && 18 >= this.fa() - , b = t; - try { - document.createElement("canvas").getContext("2d"), - b = q - } catch (c) { - b = t - } - return a && b - }, - getCurrentCity: function() { - return { - name: this.$g, - code: this.fs - } - }, - tm: function() { - this.P.co(); - return this.P - }, - PY: function(a) { - B.alog("cus.fire", "count", "z_loadindoormapcount"); - La.setMaxZoom(a.maxZoom || 19); - var b = new P("oninitindoorlayer"); - b.vf = a; - this.dispatchEvent(b); - this.K.Ms = t - }, - D_: function(a) { - this.K.qN = a; - this.Va.Jb.parentElement.style.display = a ? "block" : "none" - }, - setPanorama: function(a) { - this.P = a; - this.P.GF(this) - }, - Z_: function(a) { - for (var b = { - featureType: "t", - elementType: "e", - visibility: "v", - color: "c", - lightness: "l", - saturation: "s", - weight: "w", - zoom: "z", - hue: "h" - }, c = { - all: "all", - geometry: "g", - "geometry.fill": "g.f", - "geometry.stroke": "g.s", - labels: "l", - "labels.text.fill": "l.t.f", - "labels.text.stroke": "l.t.s", - "lables.text": "l.t", - "labels.icon": "l.i" - }, e = [], f = 0, g; g = a[f]; f++) { - var i = g.stylers; - delete g.stylers; - z.extend(g, i); - var i = [], k; - for (k in b) - if (g[k]) - if ("elementType" === k) - i.push(b[k] + ":" + c[g[k]]); - else { - switch (g[k]) { - case "poilabel": - g[k] = "poi"; - break; - case "districtlabel": - g[k] = "label" - } - i.push(b[k] + ":" + g[k]) - } - 2 < i.length && e.push(i.join("|")) - } - return e.join(",") - } - }); - function Ra(a, b) { - if (a) { - var b = b || {}, c = "", e; - for (e in b) - c = c + "&" + e + "=" + encodeURIComponent(b[e]); - var f = function(a) { - a && (ob = q, - setTimeout(function() { - pb.src = B.Wc + "images/blank.gif?" + a.src - }, 50)) - } - , g = function() { - var a = qb.shift(); - a && f(a) - }; - e = (1E8 * Math.random()).toFixed(0); - ob ? qb.push({ - src: "product=jsapi&sub_product=jsapi&v=" + B.version + "&sub_product_v=" + B.version + "&t=" + e + "&code=" + a + "&da_src=" + a + c - }) : f({ - src: "product=jsapi&sub_product=jsapi&v=" + B.version + "&sub_product_v=" + B.version + "&t=" + e + "&code=" + a + "&da_src=" + a + c - }); - rb || (z.M(pb, "load", function() { - ob = t; - g() - }), - z.M(pb, "error", function() { - ob = t; - g() - }), - rb = q) - } - } - var ob, rb, qb = [], pb = new Image; - Ra(5E3, { - device_pixel_ratio: window.devicePixelRatio, - platform: navigator.platform - }); - B.mM = { - TILE_BASE_URLS: ["gss0.bdstatic.com/5bwHcj7lABFU8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFV8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFS8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFT8t_jkk_Z1zRvfdw6buu", "gss0.bdstatic.com/5bwHcj7lABFY8t_jkk_Z1zRvfdw6buu"], - TILE_ONLINE_URLS: ["gss0.bdstatic.com/8bo_dTSlR1gBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlRMgBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlRcgBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlRsgBo1vgoIiO_jowehsv", "gss0.bdstatic.com/8bo_dTSlQ1gBo1vgoIiO_jowehsv"], - TIlE_PERSPECT_URLS: ["gss0.bdstatic.com/-OR1cTe9KgQFm2e88IuM_a", "gss0.bdstatic.com/-ON1cTe9KgQFm2e88IuM_a", "gss0.bdstatic.com/-OZ1cTe9KgQFm2e88IuM_a", "gss0.bdstatic.com/-OV1cTe9KgQFm2e88IuM_a"], - geolocControl: "gsp0.baidu.com/8LkJsjOpB1gCo2Kml5_Y_D3", - TILES_YUN_HOST: ["gsp0.baidu.com/-eR1bSahKgkFkRGko9WTAnF6hhy", "gsp0.baidu.com/-eN1bSahKgkFkRGko9WTAnF6hhy", "gsp0.baidu.com/-eZ1bSahKgkFkRGko9WTAnF6hhy", "gsp0.baidu.com/-eV1bSahKgkFkRGko9WTAnF6hhy"], - traffic: "gsp0.baidu.com/7_AZsjOpB1gCo2Kml5_Y_DAcsMJiwa", - iw_pano: "gss0.bdstatic.com/5LUZemba_QUU8t7mm9GUKT-xh_", - message: "gsp0.baidu.com/7vo0bSba2gU2pMbgoY3K", - baidumap: "gsp0.baidu.com/80MWsjip0QIZ8tyhnq", - wuxian: "gsp0.baidu.com/6a1OdTeaKgQFm2e88IuM_a", - pano: ["gss0.bdstatic.com/5LUZemba_QUU8t7mm9GUKT-xh_", "gss0.bdstatic.com/5LUZemfa_QUU8t7mm9GUKT-xh_", "gss0.bdstatic.com/5LUZemja_QUU8t7mm9GUKT-xh_"], - main_domain_nocdn: { - baidu: "gsp0.baidu.com/9_Q4sjOpB1gCo2Kml5_Y_D3", - other: "api.map.baidu.com" - }, - main_domain_cdn: { - baidu: ["gss0.bdstatic.com/9_Q4vHSd2RZ3otebn9fN2DJv", "gss0.baidu.com/9_Q4vXSd2RZ3otebn9fN2DJv", "gss0.bdstatic.com/9_Q4vnSd2RZ3otebn9fN2DJv"], - other: ["api.map.baidu.com"], - webmap: ["gss0.baidu.com/6b1IcTe9R1gBo1vgoIiO_jowehsv"] - }, - map_click: "gsp0.baidu.com/80MWbzKh2wt3n2qy8IqW0jdnxx1xbK", - vector_traffic: "gss0.bdstatic.com/8aZ1cTe9KgQIm2_p8IuM_a" - }; - B.DY = { - TILE_BASE_URLS: ["shangetu0.map.bdimg.com", "shangetu1.map.bdimg.com", "shangetu2.map.bdimg.com", "shangetu3.map.bdimg.com", "shangetu4.map.bdimg.com"], - TILE_ONLINE_URLS: ["online0.map.bdimg.com", "online1.map.bdimg.com", "online2.map.bdimg.com", "online3.map.bdimg.com", "online4.map.bdimg.com"], - TIlE_PERSPECT_URLS: ["d0.map.baidu.com", "d1.map.baidu.com", "d2.map.baidu.com", "d3.map.baidu.com"], - geolocControl: "loc.map.baidu.com", - TILES_YUN_HOST: ["g0.api.map.baidu.com", "g1.api.map.baidu.com", "g2.api.map.baidu.com", "g3.api.map.baidu.com"], - traffic: "its.map.baidu.com:8002", - iw_pano: "pcsv0.map.bdimg.com", - message: "j.map.baidu.com", - baidumap: "map.baidu.com", - wuxian: "wuxian.baidu.com", - pano: ["pcsv0.map.bdimg.com", "pcsv1.map.bdimg.com", "pcsv2.map.bdimg.com"], - main_domain_nocdn: { - baidu: "api.map.baidu.com" - }, - main_domain_cdn: { - baidu: ["api0.map.bdimg.com", "api1.map.bdimg.com", "api2.map.bdimg.com"], - webmap: ["webmap0.map.bdimg.com"] - }, - map_click: "mapclick.map.baidu.com", - vector_traffic: "or.map.bdimg.com" - }; - B.F0 = { - "0": { - proto: "http://", - domain: B.DY - }, - 1: { - proto: "https://", - domain: B.mM - }, - 2: { - proto: "https://", - domain: B.mM - } - }; - window.BMAP_PROTOCOL && "https" === window.BMAP_PROTOCOL && (window.HOST_TYPE = 2); - B.xu = window.HOST_TYPE || "0"; - B.url = B.F0[B.xu]; - B.vp = B.url.proto + B.url.domain.baidumap + "/"; - //B.vp =bmapcfg.home; //修改,本地工具资源引用(离线路径) - B.Wc = B.url.proto + ("2" == B.xu ? B.url.domain.main_domain_nocdn.other : B.url.domain.main_domain_nocdn.baidu) + "/"; - //B.Wc =bmapcfg.home; //修改,本地工具资源引用(离线路径) - //B.ka=B.url.proto+("2"==B.xu?B.url.domain.main_domain_cdn.other[0]:B.url.domain.main_domain_cdn.baidu[0])+"/"; - B.ka = bmapcfg.home; //修改,本地工具资源引用(离线路径) - B.Yi = B.url.proto + B.url.domain.main_domain_cdn.webmap[0] + "/"; - //B.Yi =bmapcfg.home; //修改,本地工具资源引用(离线路径) - B.vg = function(a, b) { - var c, e, b = b || ""; - switch (a) { - case "main_domain_nocdn": - c = B.Wc + b; - break; - case "main_domain_cdn": - c = B.ka + b; - break; - default: - e = B.url.domain[a], - "[object Array]" == Object.prototype.toString.call(e) ? (c = [], - z.mc.Fb(e, function(a, e) { - c[e] = B.url.proto + a + "/" + b - })) : c = B.url.proto + B.url.domain[a] + "/" + b - } - return c - } - ; - function tb(a) { - var b = { - duration: 1E3, - Ic: 30, - No: 0, - kc: ub.UM, - Kt: u() - }; - this.dg = []; - if (a) - for (var c in a) - b[c] = a[c]; - this.j = b; - if (Wa(b.No)) { - var e = this; - setTimeout(function() { - e.start() - }, b.No) - } else - b.No != vb && this.start() - } - var vb = "INFINITE"; - tb.prototype.start = function() { - this.Uu = bb(); - this.gA = this.Uu + this.j.duration; - wb(this) - } - ; - tb.prototype.add = function(a) { - this.dg.push(a) - } - ; - function wb(a) { - var b = bb(); - b >= a.gA ? (Xa(a.j.va) && a.j.va(a.j.kc(1)), - Xa(a.j.finish) && a.j.finish(), - 0 < a.dg.length && (b = a.dg[0], - b.dg = [].concat(a.dg.slice(1)), - b.start())) : (a.Jy = a.j.kc((b - a.Uu) / a.j.duration), - Xa(a.j.va) && a.j.va(a.Jy), - a.TF || (a.Yr = setTimeout(function() { - wb(a) - }, 1E3 / a.j.Ic))) - } - tb.prototype.stop = function(a) { - this.TF = q; - for (var b = 0; b < this.dg.length; b++) - this.dg[b].stop(), - this.dg[b] = s; - this.dg.length = 0; - this.Yr && (clearTimeout(this.Yr), - this.Yr = s); - this.j.Kt(this.Jy); - a && (this.gA = this.Uu, - wb(this)) - } - ; - tb.prototype.cancel = ga(1); - var ub = { - UM: function(a) { - return a - }, - reverse: function(a) { - return 1 - a - }, - iD: function(a) { - return a * a - }, - hD: function(a) { - return Math.pow(a, 3) - }, - Ks: function(a) { - return -(a * (a - 2)) - }, - eL: function(a) { - return Math.pow(a - 1, 3) + 1 - }, - dL: function(a) { - return 0.5 > a ? 2 * a * a : -2 * (a - 2) * a - 1 - }, - R2: function(a) { - return 0.5 > a ? 4 * Math.pow(a, 3) : 4 * Math.pow(a - 1, 3) + 1 - }, - S2: function(a) { - return (1 - Math.cos(Math.PI * a)) / 2 - } - }; - ub["ease-in"] = ub.iD; - ub["ease-out"] = ub.Ks; - var G = { - oG: 34, - pG: 21, - qG: new O(21,32), - wP: new O(10,32), - vP: new O(24,36), - uP: new O(12,36), - mG: new O(13,1), - qa: B.ka + "images/", - a4: "http://api0.map.bdimg.com/images/", - nG: B.ka + "images/markers_new.png", - sP: 24, - tP: 73, - pC: { - "\u5317\u4eac": { - yy: "bj", - k: new J(116.403874,39.914889) - }, - "\u4e0a\u6d77": { - yy: "sh", - k: new J(121.487899,31.249162) - }, - "\u6df1\u5733": { - yy: "sz", - k: new J(114.025974,22.546054) - }, - "\u5e7f\u5dde": { - yy: "gz", - k: new J(113.30765,23.120049) - } - }, - fontFamily: "arial,sans-serif" - }; - z.ca.Te ? (z.extend(G, { - TK: "url(" + G.qa + "ruler.cur),crosshair", - Vb: "-moz-grab", - Hd: "-moz-grabbing" - }), - z.platform.IM && (G.fontFamily = "arial,simsun,sans-serif")) : z.ca.Qw || z.ca.Iy ? z.extend(G, { - TK: "url(" + G.qa + "ruler.cur) 2 6,crosshair", - Vb: "url(" + G.qa + "openhand.cur) 8 8,default", - Hd: "url(" + G.qa + "closedhand.cur) 8 8,move" - }) : z.extend(G, { - TK: "url(" + G.qa + "ruler.cur),crosshair", - Vb: "url(" + G.qa + "openhand.cur),default", - Hd: "url(" + G.qa + "closedhand.cur),move" - }); - function xb(a, b) { - var c = a.style; - c.left = b[0] + "px"; - c.top = b[1] + "px" - } - function yb(a) { - 0 < z.ca.ia ? a.unselectable = "on" : a.style.MozUserSelect = "none" - } - function zb(a) { - return a && a.parentNode && 11 !== a.parentNode.nodeType - } - function Ab(a, b) { - z.D.Vx(a, "beforeEnd", b); - return a.lastChild - } - function Bb(a) { - for (var b = { - left: 0, - top: 0 - }; a && a.offsetParent; ) - b.left += a.offsetLeft, - b.top += a.offsetTop, - a = a.offsetParent; - return b - } - function ma(a) { - a = window.event || a; - a.stopPropagation ? a.stopPropagation() : a.cancelBubble = q - } - function Cb(a) { - a = window.event || a; - a.preventDefault ? a.preventDefault() : a.returnValue = t; - return t - } - function na(a) { - ma(a); - return Cb(a) - } - function Eb() { - var a = document.documentElement - , b = document.body; - return a && (a.scrollTop || a.scrollLeft) ? [a.scrollTop, a.scrollLeft] : b ? [b.scrollTop, b.scrollLeft] : [0, 0] - } - function Fb(a, b) { - if (a && b) - return Math.round(Math.sqrt(Math.pow(a.x - b.x, 2) + Math.pow(a.y - b.y, 2))) - } - function Gb(a, b) { - var c = [], b = b || function(a) { - return a - } - , e; - for (e in a) - c.push(e + "=" + b(a[e])); - return c.join("&") - } - function L(a, b, c) { - var e = document.createElement(a); - c && (e = document.createElementNS(c, a)); - return z.D.CF(e, b || {}) - } - function Va(a) { - if (a.currentStyle) - return a.currentStyle; - if (a.ownerDocument && a.ownerDocument.defaultView) - return a.ownerDocument.defaultView.getComputedStyle(a, s) - } - function Xa(a) { - return "function" === typeof a - } - function Wa(a) { - return "number" === typeof a - } - function $a(a) { - return "string" == typeof a - } - function Hb(a) { - return "undefined" != typeof a - } - function Ib(a) { - return "object" == typeof a - } - var Jb = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; - function Kb(a) { - for (var b = "", c = 0; c < a.length; c++) { - var e = a.charCodeAt(c) << 1 - , f = e = e.toString(2); - 8 > e.length && (f = "00000000" + e, - f = f.substr(e.length, 8)); - b += f - } - a = 5 - b.length % 5; - e = []; - for (c = 0; c < a; c++) - e[c] = "0"; - b = e.join("") + b; - f = []; - for (c = 0; c < b.length / 5; c++) - e = b.substr(5 * c, 5), - f.push(String.fromCharCode(parseInt(e, 2) + 50)); - return f.join("") + a.toString() - } - function Lb(a) { - var b = "", c, e, f = "", g, i = "", k = 0; - g = /[^A-Za-z0-9\+\/\=]/g; - if (!a || g.exec(a)) - return a; - a = a.replace(/[^A-Za-z0-9\+\/\=]/g, ""); - do - c = Jb.indexOf(a.charAt(k++)), - e = Jb.indexOf(a.charAt(k++)), - g = Jb.indexOf(a.charAt(k++)), - i = Jb.indexOf(a.charAt(k++)), - c = c << 2 | e >> 4, - e = (e & 15) << 4 | g >> 2, - f = (g & 3) << 6 | i, - b += String.fromCharCode(c), - 64 != g && (b += String.fromCharCode(e)), - 64 != i && (b += String.fromCharCode(f)); - while (k < a.length);return b - } - var P = z.lang.Ju; - function H() { - return !(!z.platform.zE && !z.platform.XY && !z.platform.Jm) - } - function Ua() { - return !(!z.platform.IM && !z.platform.AM && !z.platform.cZ) - } - function bb() { - return (new Date).getTime() - } - function Mb() { - var a = document.body.appendChild(L("div")); - a.innerHTML = ''; - var b = a.firstChild; - if (!b.style) - return t; - b.style.behavior = "url(#default#VML)"; - b = b ? "object" === typeof b.adj : q; - a.parentNode.removeChild(a); - return b - } - function Nb() { - return !!document.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Shape", "1.1") - } - function Ob() { - return !!L("canvas").getContext - } - function Pb(a) { - return a * Math.PI / 180 - } - B.iZ = function() { - var a = q - , b = q - , c = q - , e = q - , f = 0 - , g = 0 - , i = 0 - , k = 0; - return { - eR: function() { - f += 1; - a && (a = t, - setTimeout(function() { - Ra(5054, { - pic: f - }); - a = q; - f = 0 - }, 1E4)) - }, - v1: function() { - g += 1; - b && (b = t, - setTimeout(function() { - Ra(5055, { - move: g - }); - b = q; - g = 0 - }, 1E4)) - }, - x1: function() { - i += 1; - c && (c = t, - setTimeout(function() { - Ra(5056, { - zoom: i - }); - c = q; - i = 0 - }, 1E4)) - }, - w1: function(a) { - k += a; - e && (e = t, - setTimeout(function() { - Ra(5057, { - tile: k - }); - e = q; - k = 0 - }, 5E3)) - } - } - }(); - B.iq = { - DG: "#83a1ff", - kq: "#808080" - }; - function Qb(a, b, c) { - b.Om || (b.Om = [], - b.handle = {}); - b.Om.push({ - filter: c, - nm: a - }); - b.addEventListener || (b.addEventListener = function(a, c) { - b.attachEvent("on" + a, c) - } - ); - b.handle.click || (b.addEventListener("click", function(a) { - for (var c = a.target || a.srcElement; c != b; ) { - Rb(b.Om, function(b, i) { - RegExp(i.filter).test(c.getAttribute("filter")) && i.nm.call(c, a, c.getAttribute("filter")) - }); - c = c.parentNode - } - }, t), - b.handle.click = q) - } - function Rb(a, b) { - for (var c = 0, e = a.length; c < e; c++) - b(c, a[c]) - } - void function(a, b, c) { - void function(a, b, c) { - function i(a) { - if (!a.Mo) { - for (var c = q, e = [], g = a.ZZ, k = 0; g && k < g.length; k++) { - var m = g[k] - , n = pa[m] = pa[m] || {}; - if (n.Mo || n == a) - e.push(n.Nc); - else { - c = t; - if (!n.DW && (m = (Ma.get("alias") || {})[m] || m + ".js", - !R[m])) { - R[m] = q; - var o = b.createElement("script") - , p = b.getElementsByTagName("script")[0]; - o.async = q; - o.src = m; - p.parentNode.insertBefore(o, p) - } - n.bz = n.bz || {}; - n.bz[a.name] = a - } - } - if (c) { - a.Mo = q; - a.KK && (a.Nc = a.KK.apply(a, e)); - for (var v in a.bz) - i(a.bz[v]) - } - } - } - function k(a) { - return (a || new Date) - F - } - function m(a, b, c) { - if (a) { - "string" == typeof a && (c = b, - b = a, - a = M); - try { - a == M ? (N[b] = N[b] || [], - N[b].unshift(c)) : a.addEventListener ? a.addEventListener(b, c, t) : a.attachEvent && a.attachEvent("on" + b, c) - } catch (e) {} - } - } - function n(a, b, c) { - if (a) { - "string" == typeof a && (c = b, - b = a, - a = M); - try { - if (a == M) { - var e = N[b]; - if (e) - for (var f = e.length; f--; ) - e[f] === c && e.splice(f, 1) - } else - a.removeEventListener ? a.removeEventListener(b, c, t) : a.detachEvent && a.detachEvent("on" + b, c) - } catch (g) {} - } - } - function o(a) { - var b = N[a] - , c = 0; - if (b) { - for (var e = [], f = arguments, g = 1; g < f.length; g++) - e.push(f[g]); - for (g = b.length; g--; ) - b[g].apply(this, e) && c++; - return c - } - } - function p(a, b) { - if (a && b) { - var c = new Image(1,1), e = [], f = "img_" + +new Date, g; - for (g in b) - b[g] && e.push(g + "=" + encodeURIComponent(b[g])); - M[f] = c; - c.onload = c.onerror = function() { - M[f] = c = c.onload = c.onerror = s; - delete M[f] - } - ; - c.src = a + "?" + e.join("&") - } - } - function v() { - var a = arguments - , b = a[0]; - if (this.JK || /^(on|un|set|get|create)$/.test(b)) { - for (var b = y.prototype[b], c = [], e = 1, f = a.length; e < f; e++) - c.push(a[e]); - "function" == typeof b && b.apply(this, c) - } else - this.iK.push(a) - } - function x(a, b) { - var c = {}, e; - for (e in a) - a.hasOwnProperty(e) && (c[e] = a[e]); - for (e in b) - b.hasOwnProperty(e) && (c[e] = b[e]); - return c - } - function y(a) { - this.name = a; - this.Ps = { - protocolParameter: { - postUrl: s, - protocolParameter: s - } - }; - this.iK = []; - this.alog = M - } - function A(a) { - a = a || "default"; - if ("*" == a) { - var a = [], b; - for (b in fa) - a.push(fa[b]); - return a - } - (b = fa[a]) || (b = fa[a] = new y(a)); - return b - } - var E = c.alog; - if (!E || !E.Mo) { - var C = b.all && a.attachEvent - , F = E && E.IE || +new Date - , D = a.o4 || (+new Date).toString(36) + Math.random().toString(36).substr(2, 3) - , I = 0 - , R = {} - , M = function(a) { - var b = arguments, c, e, f, g; - if ("define" == a || "require" == a) { - for (e = 1; e < b.length; e++) - switch (typeof b[e]) { - case "string": - c = b[e]; - break; - case "object": - f = b[e]; - break; - case "function": - g = b[e] - } - "require" == a && (c && !f && (f = [c]), - c = s); - c = !c ? "#" + I++ : c; - e = pa[c] = pa[c] || {}; - e.Mo || (e.name = c, - e.ZZ = f, - e.KK = g, - "define" == a && (e.DW = q), - i(e)) - } else - "function" == typeof a ? a(M) : ("" + a).replace(/^(?:([\w$_]+)\.)?(\w+)$/, function(a, c, e) { - b[0] = e; - v.apply(M.bG(c), b) - }) - } - , N = {} - , fa = {} - , pa = { - i2: { - name: "alog", - Mo: q, - Nc: M - } - }; - y.prototype.start = y.prototype.create = function(a) { - if (!this.JK) { - "object" == typeof a && this.set(a); - this.JK = new Date; - for (this.Qs("create", this); a = this.iK.shift(); ) - v.apply(this, a) - } - } - ; - y.prototype.send = function(a, b) { - var c = x({ - ts: k().toString(36), - t: a, - sid: D - }, this.Ps); - if ("object" == typeof b) - c = x(c, b); - else { - var e = arguments; - switch (a) { - case "pageview": - e[1] && (c.page = e[1]); - e[2] && (c.title = e[2]); - break; - case "event": - e[1] && (c.eventCategory = e[1]); - e[2] && (c.eventAction = e[2]); - e[3] && (c.eventLabel = e[3]); - e[4] && (c.eventValue = e[4]); - break; - case "timing": - e[1] && (c.timingCategory = e[1]); - e[2] && (c.timingVar = e[2]); - e[3] && (c.timingValue = e[3]); - e[4] && (c.timingLabel = e[4]); - break; - case "exception": - e[1] && (c.exDescription = e[1]); - e[2] && (c.exFatal = e[2]); - break; - default: - return - } - } - this.Qs("send", c); - var f; - if (e = this.Ps.protocolParameter) { - var g = {}; - for (f in c) - e[f] !== s && (g[e[f] || f] = c[f]); - f = g - } else - f = c; - p(this.Ps.postUrl, f) - } - ; - y.prototype.set = function(a, b) { - if ("string" == typeof a) - "protocolParameter" == a && (b = x({ - postUrl: s, - protocolParameter: s - }, b)), - this.Ps[a] = b; - else if ("object" == typeof a) - for (var c in a) - this.set(c, a[c]) - } - ; - y.prototype.get = function(a, b) { - var c = this.Ps[a]; - "function" == typeof b && b(c); - return c - } - ; - y.prototype.Qs = function(a, b) { - return M.Qs(this.name + "." + a, b) - } - ; - y.prototype.M = function(a, b) { - M.M(this.name + "." + a, b) - } - ; - y.prototype.ed = function(a, b) { - M.ed(this.name + "." + a, b) - } - ; - M.name = "alog"; - M.BO = D; - M.Mo = q; - M.timestamp = k; - M.ed = n; - M.M = m; - M.Qs = o; - M.bG = A; - M("init"); - var wa = y.prototype; - T(wa, { - start: wa.start, - create: wa.create, - send: wa.send, - set: wa.set, - get: wa.get, - on: wa.M, - un: wa.ed, - fire: wa.Qs - }); - var Ma = A(); - Ma.set("protocolParameter", { - h2: s - }); - if (E) { - wa = [].concat(E.wb || [], E.Wm || []); - E.wb = E.Wm = s; - for (var sb in M) - M.hasOwnProperty(sb) && (E[sb] = M[sb]); - M.wb = M.Wm = { - push: function(a) { - M.apply(M, a) - } - }; - for (E = 0; E < wa.length; E++) - M.apply(M, wa[E]) - } - c.alog = M; - C && m(b, "mouseup", function(a) { - a = a.target || a.srcElement; - 1 == a.nodeType && /^ajavascript:/i.test(a.tagName + a.href) - }); - var Za = t; - a.onerror = function(a, b, e, f) { - var i = q; - !b && /^script error/i.test(a) && (Za ? i = t : Za = q); - i && c.alog("exception.send", "exception", { - Ht: a, - HE: b, - Dt: e, - hs: f - }); - return t - } - ; - c.alog("exception.on", "catch", function(a) { - c.alog("exception.send", "exception", { - Ht: a.Ht, - HE: a.path, - Dt: a.Dt, - method: a.method, - rL: "catch" - }) - }) - } - }(a, b, c); - void function(a, b, c) { - var i = "18_3"; - H() && (i = "18_4"); - var k = "http://static.tieba.baidu.com"; - "https:" === a.location.protocol && (k = "https://gsp0.baidu.com/5aAHeD3nKhI2p27j8IqW0jdnxx1xbK"); - var m = Math.random - , k = k + "/tb/pms/img/st.gif" - , n = { - wh: "0.1" - } - , o = { - wh: "0.1" - } - , p = { - wh: "0.1" - } - , v = { - wh: "0" - }; - if (n && n.wh && m() < n.wh) { - var x = c.alog.bG("monkey"), y, n = a.screen, A = b.referrer; - x.set("ver", 5); - x.set("pid", 241); - n && x.set("px", n.width + "*" + n.height); - x.set("ref", A); - c.alog("monkey.on", "create", function() { - y = c.alog.timestamp; - x.set("protocolParameter", { - reports: s - }) - }); - c.alog("monkey.on", "send", function(a) { - "pageview" == a.t && (a.cmd = "open"); - a.now && (a.ts = y(a.now).toString(36), - a.now = "") - }); - c.alog("monkey.create", { - page: i, - pid: "241", - p: "18", - dv: 6, - postUrl: k, - reports: { - refer: 1 - } - }); - c.alog("monkey.send", "pageview", { - now: +new Date - }) - } - if (o && o.wh && m() < o.wh) { - var E = t; - a.onerror = function(a, b, e, f) { - var i = q; - !b && /^script error/i.test(a) && (E ? i = t : E = q); - i && c.alog("exception.send", "exception", { - Ht: a, - HE: b, - Dt: e, - hs: f - }); - return t - } - ; - c.alog("exception.on", "catch", function(a) { - c.alog("exception.send", "exception", { - Ht: a.Ht, - HE: a.path, - Dt: a.Dt, - method: a.method, - rL: "catch" - }) - }); - c.alog("exception.create", { - postUrl: k, - dv: 7, - page: i, - pid: "170", - p: "18" - }) - } - p && (p.wh && m() < p.wh) && (c.alog("cus.on", "time", function(a) { - var b = {}, e = t, f; - if ("[object Object]" === a.toString()) { - for (var i in a) - "page" == i ? b.page = a[i] : (f = parseInt(a[i]), - 0 < f && /^z_/.test(i) && (e = q, - b[i] = f)); - e && c.alog("cus.send", "time", b) - } - }), - c.alog("cus.on", "count", function(a) { - var b = {} - , e = t; - "string" === typeof a && (a = [a]); - if (a instanceof Array) - for (var f = 0; f < a.length; f++) - /^z_/.test(a[f]) ? (e = q, - b[a[f]] = 1) : /^page:/.test(a[f]) && (b.page = a[f].substring(5)); - e && c.alog("cus.send", "count", b) - }), - c.alog("cus.create", { - dv: 3, - postUrl: k, - page: i, - p: "18" - })); - if (v && v.wh && m() < v.wh) { - var C = ["Moz", "O", "ms", "Webkit"] - , F = ["-webkit-", "-moz-", "-o-", "-ms-"] - , D = function() { - return typeof b.createElement !== "function" ? b.createElement(arguments[0]) : b.createElement.apply(b, arguments) - } - , I = D("dpFeatureTest").style - , R = function(a) { - return M(a, l, l) - } - , M = function(a, b, c) { - var e = a.charAt(0).toUpperCase() + a.slice(1) - , f = (a + " " + C.join(e + " ") + e).split(" "); - if (typeof b === "string" || typeof b === "undefined") - return N(f, b); - f = (a + " " + C.join(e + " ") + e).split(" "); - a: { - var a = f, g; - for (g in a) - if (a[g]in b) { - if (c === t) { - b = a[g]; - break a - } - g = b[a[g]]; - b = typeof g === "function" ? fnBind(g, c || b) : g; - break a - } - b = t - } - return b - } - , N = function(a, b) { - var c, e, f; - e = a.length; - for (c = 0; c < e; c++) { - f = a[c]; - ~("" + f).indexOf("-") && (f = fa(f)); - if (I[f] !== l) - return b == "pfx" ? f : q - } - return t - } - , fa = function(a) { - return a.replace(/([a-z])-([a-z])/g, function(a, b, c) { - return b + c.toUpperCase() - }).replace(/^-/, "") - } - , pa = function(a, b, c) { - if (a.indexOf("@") === 0) - return atRule(a); - a.indexOf("-") != -1 && (a = fa(a)); - return !b ? M(a, "pfx") : M(a, b, c) - } - , wa = function() { - var a = D("canvas"); - return !(!a.getContext || !a.getContext("2d")) - } - , Ma = function() { - var a = D("div"); - return "draggable"in a || "ondragstart"in a && "ondrop"in a - } - , sb = function() { - try { - localStorage.setItem("localStorage", "localStorage"); - localStorage.removeItem("localStorage"); - return q - } catch (a) { - return t - } - } - , Za = function() { - return "content"in b.createElement("template") - } - , Pa = function() { - return "createShadowRoot"in b.createElement("a") - } - , oi = function() { - return "registerElement"in b - } - , pi = function() { - return "import"in b.createElement("link") - } - , qi = function() { - return "getItems"in b - } - , ri = function() { - return "EventSource"in window - } - , re = function(a, b) { - var c = new Image; - c.onload = function() { - b(a, c.width > 0 && c.height > 0) - } - ; - c.onerror = function() { - b(a, t) - } - ; - c.src = "data:image/webp;base64," + { - r4: "UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA", - q4: "UklGRhoAAABXRUJQVlA4TA0AAAAvAAAAEAcQERGIiP4HAA==", - alpha: "UklGRkoAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAwAAAARBxAR/Q9ERP8DAABWUDggGAAAABQBAJ0BKgEAAQAAAP4AAA3AAP7mtQAAAA==", - kk: "UklGRlIAAABXRUJQVlA4WAoAAAASAAAAAAAAAAAAQU5JTQYAAAD/////AABBTk1GJgAAAAAAAAAAAAAAAAAAAGQAAABWUDhMDQAAAC8AAAAQBxAREYiI/gcA" - }[a] - } - , se = function(a, b) { - return Tb.ei["WebP-" + a] = b - } - , si = function() { - return "openDatabase"in a - } - , ti = function() { - return "performance"in a && "timing"in a.performance - } - , ui = function() { - return "performance"in a && "mark"in a.performance - } - , vi = function() { - return !(!Array.prototype || !Array.prototype.every || !Array.prototype.filter || !Array.prototype.forEach || !Array.prototype.indexOf || !Array.prototype.lastIndexOf || !Array.prototype.map || !Array.prototype.some || !Array.prototype.reduce || !Array.prototype.reduceRight || !Array.isArray) - } - , wi = function() { - return "Promise"in a && "cast"in a.lq && "resolve"in a.lq && "reject"in a.lq && "all"in a.lq && "race"in a.lq && function() { - var b; - new a.lq(function(a) { - b = a - } - ); - return typeof b === "function" - }() - } - , xi = function() { - var b = !!a.i1 - , c = a.XMLHttpRequest && "withCredentials"in new XMLHttpRequest; - return !!a.l1 && b && c - } - , yi = function() { - return "geolocation"in navigator - } - , zi = function() { - var b = D("canvas") - , c = "probablySupportsContext"in b ? "probablySupportsContext" : "supportsContext"; - return c in b ? b[c]("webgl") || b[c]("experimental-webgl") : "WebGLRenderingContext"in a - } - , Ai = function() { - return !!b.createElementNS && !!b.createElementNS("http://www.w3.org/2000/svg", "svg").A2 - } - , Bi = function() { - return !!a.s1 - } - , Ci = function() { - return "WebSocket"in a && a.p1.f1 === 2 - } - , Di = function() { - return !!b.createElement("video").canPlayType - } - , Ei = function() { - return !!b.createElement("audio").canPlayType - } - , Fi = function() { - return !!(a.history && "pushState"in a.history) - } - , Gi = function() { - return !(!a.g1 || !a.h1) - } - , Hi = function() { - return "postMessage"in window - } - , Ii = function() { - return !!a.webkitNotifications || "Notification"in a && "permission"in a.PP && "requestPermission"in a.PP - } - , Ji = function() { - for (var b = ["webkit", "moz", "o", "ms"], c = a.requestAnimationFrame, f = 0; f < b.length && !c; ++f) - c = a[b[f] + "RequestAnimationFrame"]; - return !!c - } - , Ki = function() { - return "JSON"in a && "parse"in JSON && "stringify"in JSON - } - , Li = function() { - return !(!pa("exitFullscreen", b, t) && !pa("cancelFullScreen", b, t)) - } - , Mi = function() { - return !!pa("Intl", a) - } - , Ni = function() { - return R("flexBasis") - } - , Oi = function() { - return !!R("perspective") - } - , Pi = function() { - return R("shapeOutside") - } - , Qi = function() { - var a = D("div"); - a.style.cssText = F.join("filter:blur(2px); "); - return !!a.style.length && (b.documentMode === l || b.documentMode > 9) - } - , Ri = function() { - return "XMLHttpRequest"in a && "withCredentials"in new XMLHttpRequest - } - , Si = function() { - return D("progress").max !== l - } - , Ti = function() { - return D("meter").max !== l - } - , Ui = function() { - return "sendBeacon"in navigator - } - , Vi = function() { - return R("borderRadius") - } - , Wi = function() { - return R("boxShadow") - } - , Xi = function() { - var a = D("div").style; - a.cssText = F.join("opacity:.55;"); - return /^0.55$/.test(a.opacity) - } - , Yi = function() { - return N(["textShadow"], l) - } - , Zi = function() { - return R("animationName") - } - , $i = function() { - return R("transition") - } - , aj = function() { - return navigator.userAgent.indexOf("Android 2.") === -1 && R("transform") - } - , Tb = { - ei: {}, - pa: function(a, b, c) { - this.ei[a] = b.apply(this, [].slice.call(arguments, 2)) - }, - Ed: function(a, b) { - a.apply(this, [].slice.call(arguments, 1)) - }, - f_: function() { - this.pa("bdrs", Vi); - this.pa("bxsd", Wi); - this.pa("opat", Xi); - this.pa("txsd", Yi); - this.pa("anim", Zi); - this.pa("trsi", $i); - this.pa("trfm", aj); - this.pa("flex", Ni); - this.pa("3dtr", Oi); - this.pa("shpe", Pi); - this.pa("fltr", Qi); - this.pa("cavs", wa); - this.pa("dgdp", Ma); - this.pa("locs", sb); - this.pa("wctem", Za); - this.pa("wcsdd", Pa); - this.pa("wccse", oi); - this.pa("wchti", pi); - this.Ed(re, "lossy", se); - this.Ed(re, "lossless", se); - this.Ed(re, "alpha", se); - this.Ed(re, "animation", se); - this.pa("wsql", si); - this.pa("natm", ti); - this.pa("ustm", ui); - this.pa("arra", vi); - this.pa("prms", wi); - this.pa("xhr2", xi); - this.pa("wbgl", zi); - this.pa("geol", yi); - this.pa("svg", Ai); - this.pa("work", Bi); - this.pa("wbsk", Ci); - this.pa("vido", Di); - this.pa("audo", Ei); - this.pa("hsty", Fi); - this.pa("file", Gi); - this.pa("psmg", Hi); - this.pa("wknf", Ii); - this.pa("rqaf", Ji); - this.pa("json", Ki); - this.pa("flsc", Li); - this.pa("i18n", Mi); - this.pa("cors", Ri); - this.pa("prog", Si); - this.pa("metr", Ti); - this.pa("becn", Ui); - this.pa("mcrd", qi); - this.pa("esrc", ri) - } - } - , x = c.alog.bG("feature"); - x.M("commit", function() { - Tb.f_(); - var a = setInterval(function() { - if ("WebP-lossy"in Tb.ei && "WebP-lossless"in Tb.ei && "WebP-alpha"in Tb.ei && "WebP-animation"in Tb.ei) { - for (var b in Tb.ei) - Tb.ei[b] = Tb.ei[b] ? "y" : "n"; - x.send("feature", Tb.ei); - clearInterval(a) - } - }, 500) - }); - c.alog("feature.create", { - P2: 4, - R4: k, - page: i, - wb: "18" - }); - c.alog("feature.fire", "commit") - } - }(a, b, c) - }(window, document, B); - B.Fn = B.alog || u(); - B.alog("cus.fire", "count", "z_loadscriptcount"); - "https:" === location.protocol && B.alog("cus.fire", "count", "z_httpscount"); - function Sb(a) { - var b = window.TILE_VERSION - , c = "20170927"; - b && b.ditu && (b = b.ditu, - b[a] && b[a].updateDate && (c = b[a].updateDate)); - return c - } - ;function oa(a, b) { - if (/^http/.test(a)) return;//修改 屏蔽ak验证,若调用外部资源直接返回 - - if (b) { - var c = (1E5 * Math.random()).toFixed(0); - B._rd["_cbk" + c] = function(a) { - b && b(a); - delete B._rd["_cbk" + c] - } - ; - a += "&callback=BMap._rd._cbk" + c - } - var e = L("script", { - type: "text/javascript" - }); - e.charset = "utf-8"; - e.src = a; - e.addEventListener ? e.addEventListener("load", function(a) { - a = a.target; - a.parentNode.removeChild(a) - }, t) : e.attachEvent && e.attachEvent("onreadystatechange", function() { - var a = window.event.srcElement; - a && ("loaded" == a.readyState || "complete" == a.readyState) && a.parentNode.removeChild(a) - }); - setTimeout(function() { - document.getElementsByTagName("head")[0].appendChild(e); - e = s - }, 1) - } - ;var Ub = { //修改,这里是所有的模块,用到时自动加载(在线),离线的话要先下载下来放到本地,如http://api0.map.bdimg.com/getmodules?v=3.0&mod=模块1,模块2 - //模块命名格式是map_dbwcej,直接拼接起来 - map: "dbwcej", - common: "wkrfcz", - style: "fkofpc", - tile: "ok3b3m", - vectordrawlib: "4pdipq", - newvectordrawlib: "wbnuee", - groundoverlay: "ekozhc", - pointcollection: "feabuc", - marker: "00uyqy", - symbol: "cq3a5n", - canvablepath: "dia5aw", - vmlcontext: "phwtog", - markeranimation: "rfnmxu", - poly: "r52vuo", - draw: "jb4osz", - drawbysvg: "vxyn51", - drawbyvml: "whxmqq", - drawbycanvas: "ufwkvb", - infowindow: "wtflsn", - oppc: "10riq5", - opmb: "2c1ejz", - menu: "152mop", - control: "hlzh1t", - navictrl: "h32mnb", - geoctrl: "xprajs", - copyrightctrl: "gmc2ps", - citylistcontrol: "ms3ahy", - scommon: "oadc3d", - local: "k0pcpi", - route: "v4yyam", - othersearch: "pwg4ey", - mapclick: "e40viw", - buslinesearch: "vxmb31", - hotspot: "vuwxs4", - autocomplete: "punr3o", - coordtrans: "lmf5kv", - coordtransutils: "d33qf1", - convertor: "d0ze2w", - clayer: "0hwrfx", - pservice: "j5tlrp", - pcommon: "yqek4k", - panorama: "jbqj24", - panoramaflash: "dm4xq2", - vector: "2hrruc" - }; - z.Wy = function() { - function a(a) { - return e && !!c[b + a + "_" + Ub[a]] - } - var b = "BMap_" - , c = window.localStorage - , e = "localStorage"in window && c !== s && c !== l; - return { - ZY: e, - set: function(a, g) { - if (e) { - for (var i = b + a + "_", k = c.length, m; k--; ) - m = c.key(k), - -1 < m.indexOf(i) && c.removeItem(m); - try { - c.setItem(b + a + "_" + Ub[a], g) - } catch (n) { - c.clear() - } - } - }, - get: function(f) { - return e && a(f) ? c.getItem(b + f + "_" + Ub[f]) : t - }, - uK: a - } - }(); - function K() {} - z.object.extend(K, { - Cj: { - EG: -1, - cQ: 0, - cq: 1 - }, - GL: function() { - var a = "canvablepath" - , b = B.gV ? "newvectordrawlib" : "vectordrawlib"; - if (!H() || !Ob()) - Nb() || (Mb() ? a = "vmlcontext" : Ob()); - return { - tile: [b, "style"], - control: [], - marker: ["symbol"], - symbol: ["canvablepath", "common"], - canvablepath: "canvablepath" === a ? [] : [a], - vmlcontext: [], - style: [], - poly: ["marker", "drawbycanvas", "drawbysvg", "drawbyvml"], - drawbysvg: ["draw"], - drawbyvml: ["draw"], - drawbycanvas: ["draw"], - infowindow: ["common", "marker"], - menu: [], - oppc: [], - opmb: [], - scommon: [], - local: ["scommon"], - route: ["scommon"], - othersearch: ["scommon"], - autocomplete: ["scommon"], - citylistcontrol: ["autocomplete"], - mapclick: ["scommon"], - buslinesearch: ["route"], - hotspot: [], - coordtransutils: ["coordtrans"], - convertor: [], - clayer: ["tile"], - pservice: [], - pcommon: ["style", "pservice"], - panorama: ["pcommon"], - panoramaflash: ["pcommon"] - } - }, - U4: {}, - wG: { - tQ: B.ka + "getmodules?v=3.0", - WU: 5E3 - }, - MC: t, - Rd: { - xl: {}, - Hn: [], - cw: [] - }, - load: function(a, b, c) { - var e = this.kb(a); - if (e.Me == this.Cj.cq) - c && b(); - else { - if (e.Me == this.Cj.EG) { - this.AK(a); - this.SN(a); - var f = this; - f.MC == t && (f.MC = q, - setTimeout(function() { - for (var a = [], b = 0, c = f.Rd.Hn.length; b < c; b++) { - var e = f.Rd.Hn[b] - , n = ""; - ia.Wy.uK(e) ? n = ia.Wy.get(e) : (n = "", - a.push(e + "_" + Ub[e])); - f.Rd.cw.push({ - jN: e, - ZE: n - }) - } - f.MC = t; - f.Rd.Hn.length = 0; - //0 == a.length ? f.kL() : oa(f.wG.tQ + "&mod=" + a.join(",")) - // 修改 加载本地模块文件,在 modules 目录下 - console.log(a); //打印所需模块 - if( a.length > 0 ){ - for(i=0; i"); - this.Qa == t && z.D.U(this.C); - return this.C - }, - Nr: function() { - this.uc(this.j.anchor) - }, - uc: function(a) { - if (this.j2 || !Wa(a) || isNaN(a) || a < Wb || 3 < a) - a = this.defaultAnchor; - this.j = this.j || { - Cg: t - }; - this.j.za = this.j.za || this.defaultOffset; - var b = this.j.anchor; - this.j.anchor = a; - if (this.C) { - var c = this.C - , e = this.j.za.width - , f = this.j.za.height; - c.style.left = c.style.top = c.style.right = c.style.bottom = "auto"; - switch (a) { - case Wb: - c.style.top = f + "px"; - c.style.left = e + "px"; - break; - case Xb: - c.style.top = f + "px"; - c.style.right = e + "px"; - break; - case Yb: - c.style.bottom = f + "px"; - c.style.left = e + "px"; - break; - case 3: - c.style.bottom = f + "px", - c.style.right = e + "px" - } - c = ["TL", "TR", "BL", "BR"]; - z.D.Pb(this.C, "anchor" + c[b]); - z.D.Ua(this.C, "anchor" + c[a]) - } - }, - HD: function() { - return this.j.anchor - }, - getContainer: w("C"), - Ze: function(a) { - a instanceof O && (this.j = this.j || { - Cg: t - }, - this.j.za = new O(a.width,a.height), - this.C && this.uc(this.j.anchor)) - }, - Sf: function() { - return this.j.za - }, - Jd: w("C"), - show: function() { - this.Qa != q && (this.Qa = q, - this.C && z.D.show(this.C)) - }, - U: function() { - this.Qa != t && (this.Qa = t, - this.C && z.D.U(this.C)) - }, - isPrintable: function() { - return !!this.j.Cg - }, - jh: function() { - return !this.C && !this.B ? t : !!this.Qa - } - }); - var Wb = 0 - , Xb = 1 - , Yb = 2; - function jb(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - OF: a.showZoomInfo || q, - anchor: a.anchor, - za: a.offset, - type: a.type, - $W: a.enableGeolocation || t - }; - this.defaultAnchor = H() ? 3 : Wb; - this.defaultOffset = new O(10,10); - this.uc(a.anchor); - this.hn(a.type); - this.De() - } - z.lang.ta(jb, Vb, "NavigationControl"); - z.extend(jb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - hn: function(a) { - this.j.type = Wa(a) && 0 <= a && 3 >= a ? a : 0 - }, - ip: function() { - return this.j.type - }, - De: function() { - var a = this; - K.load("navictrl", function() { - a.zf() - }) - } - }); - function Zb(a) { - Vb.call(this); - a = a || {}; - this.j = { - anchor: a.anchor || Yb, - za: a.offset || new O(10,30), - O_: a.showAddressBar !== t, - U2: a.enableAutoLocation || t, - bN: a.locationIcon || s - }; - var b = this; - this.Hz = 1200; - b.I0 = []; - this.pe = []; - K.load("geoctrl", function() { - (function e() { - if (0 !== b.pe.length) { - var a = b.pe.shift(); - b[a.method].apply(b, a.arguments); - e() - } - } - )(); - b.sQ() - }); - Ra(Ia) - } - z.lang.ta(Zb, Vb, "GeolocationControl"); - z.extend(Zb.prototype, { - location: function() { - this.pe.push({ - method: "location", - arguments: arguments - }) - }, - getAddressComponent: ca(s) - }); - function $b(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - anchor: a.anchor, - za: a.offset - }; - this.cc = []; - this.defaultAnchor = Yb; - this.defaultOffset = new O(5,2); - this.uc(a.anchor); - this.nK = t; - this.De() - } - z.lang.ta($b, Vb, "CopyrightControl"); - z.object.extend($b.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - Bw: function(a) { - if (a && Wa(a.id) && !isNaN(a.id)) { - var b = { - bounds: s, - content: "" - }, c; - for (c in a) - b[c] = a[c]; - if (a = this.pm(a.id)) - for (var e in b) - a[e] = b[e]; - else - this.cc.push(b) - } - }, - pm: function(a) { - for (var b = 0, c = this.cc.length; b < c; b++) - if (this.cc[b].id == a) - return this.cc[b] - }, - PD: w("cc"), - qF: function(a) { - for (var b = 0, c = this.cc.length; b < c; b++) - this.cc[b].id == a && (r = this.cc.splice(b, 1), - b--, - c = this.cc.length) - }, - De: function() { - var a = this; - K.load("copyrightctrl", function() { - a.zf() - }) - } - }); - function lb(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - size: a.size || new O(150,150), - padding: 5, - Xa: a.isOpen === q ? q : t, - $0: 4, - za: a.offset, - anchor: a.anchor - }; - this.defaultAnchor = 3; - this.defaultOffset = new O(0,0); - this.Bq = this.Cq = 13; - this.uc(a.anchor); - this.Ce(this.j.size); - this.De() - } - z.lang.ta(lb, Vb, "OverviewMapControl"); - z.extend(lb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - uc: function(a) { - Vb.prototype.uc.call(this, a) - }, - se: function() { - this.se.mo = q; - this.j.Xa = !this.j.Xa; - this.C || (this.se.mo = t) - }, - Ce: function(a) { - a instanceof O || (a = new O(150,150)); - a.width = 0 < a.width ? a.width : 150; - a.height = 0 < a.height ? a.height : 150; - this.j.size = a - }, - cb: function() { - return this.j.size - }, - Xa: function() { - return this.j.Xa - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }) - } - }); - function ac(a) { - Vb.call(this); - a = a || {}; - this.defaultAnchor = Wb; - this.TV = a.canCheckSize === t ? t : q; - this.$i = ""; - this.defaultOffset = new O(10,10); - this.onChangeBefore = []; - this.onChangeAfter = []; - this.onChangeSuccess = []; - this.j = { - Cg: t, - za: a.offset || this.defaultOffset, - anchor: a.anchor || this.defaultAnchor, - expand: !!a.expand - }; - a.onChangeBefore && Xa(a.onChangeBefore) && this.onChangeBefore.push(a.onChangeBefore); - a.onChangeAfter && Xa(a.onChangeAfter) && this.onChangeAfter.push(a.onChangeAfter); - a.onChangeSuccess && Xa(a.onChangeSuccess) && this.onChangeSuccess.push(a.onChangeSuccess); - this.uc(a.anchor); - this.De() - } - z.lang.ta(ac, Vb, "CityListControl"); - z.object.extend(ac.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - De: function() { - var a = this; - K.load("citylistcontrol", function() { - a.zf() - }, q) - } - }); - function kb(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - color: "black", - fd: "metric", - za: a.offset - }; - this.defaultAnchor = Yb; - this.defaultOffset = new O(81,18); - this.uc(a.anchor); - this.Uh = { - metric: { - name: "metric", - CK: 1, - rM: 1E3, - bP: "\u7c73", - cP: "\u516c\u91cc" - }, - us: { - name: "us", - CK: 3.2808, - rM: 5280, - bP: "\u82f1\u5c3a", - cP: "\u82f1\u91cc" - } - }; - this.Uh[this.j.fd] || (this.j.fd = "metric"); - this.gJ = s; - this.GI = {}; - this.De() - } - z.lang.ta(kb, Vb, "ScaleControl"); - z.object.extend(kb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - Pk: function(a) { - this.j.color = a + "" - }, - n3: function() { - return this.j.color - }, - LF: function(a) { - this.j.fd = this.Uh[a] && this.Uh[a].name || this.j.fd - }, - sY: function() { - return this.j.fd - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }) - } - }); - var bc = 0; - function mb(a) { - Vb.call(this); - a = a || {}; - this.defaultAnchor = Xb; - this.defaultOffset = new O(10,10); - this.j = { - Cg: t, - mh: [La, Ya, Sa, Qa], - BW: ["B_DIMENSIONAL_MAP", "B_SATELLITE_MAP", "B_NORMAL_MAP"], - type: a.type || bc, - za: a.offset || this.defaultOffset, - dX: q - }; - this.uc(a.anchor); - "[object Array]" == Object.prototype.toString.call(a.mapTypes) && (this.j.mh = a.mapTypes.slice(0)); - this.De() - } - z.lang.ta(mb, Vb, "MapTypeControl"); - z.object.extend(mb.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - Xy: function(a) { - this.B.ao = a - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }, q) - } - }); - function cc(a) { - Vb.call(this); - a = a || {}; - this.j = { - Cg: t, - za: a.offset, - anchor: a.anchor - }; - this.Ni = t; - this.hw = s; - this.QI = new dc({ - of: "api" - }); - this.RI = new ec(s,{ - of: "api" - }); - this.defaultAnchor = Xb; - this.defaultOffset = new O(10,10); - this.uc(a.anchor); - this.De(); - Ra(va) - } - z.lang.ta(cc, Vb, "PanoramaControl"); - z.extend(cc.prototype, { - initialize: function(a) { - this.B = a; - return this.C - }, - De: function() { - var a = this; - K.load("control", function() { - a.zf() - }) - } - }); - function fc(a) { - z.lang.Ca.call(this); - this.j = { - Wa: s, - cursor: "default" - }; - this.j = z.extend(this.j, a); - this.Mb = "contextmenu"; - this.B = s; - this.xa = []; - this.Kf = []; - this.Fe = []; - this.fx = this.qs = s; - this.Kh = t; - var b = this; - K.load("menu", function() { - b.ib() - }) - } - z.lang.ta(fc, z.lang.Ca, "ContextMenu"); - z.object.extend(fc.prototype, { - na: function(a, b) { - this.B = a; - this.Cl = b || s - }, - remove: function() { - this.B = this.Cl = s - }, - Dw: function(a) { - if (a && !("menuitem" != a.Mb || "" == a.Wg || 0 >= a.Vi)) { - for (var b = 0, c = this.xa.length; b < c; b++) - if (this.xa[b] === a) - return; - this.xa.push(a); - this.Kf.push(a) - } - }, - removeItem: function(a) { - if (a && "menuitem" == a.Mb) { - for (var b = 0, c = this.xa.length; b < c; b++) - this.xa[b] === a && (this.xa[b].remove(), - this.xa.splice(b, 1), - c--); - b = 0; - for (c = this.Kf.length; b < c; b++) - this.Kf[b] === a && (this.Kf[b].remove(), - this.Kf.splice(b, 1), - c--) - } - }, - bC: function() { - this.xa.push({ - Mb: "divider", - Lj: this.Fe.length - }); - this.Fe.push({ - D: s - }) - }, - sF: function(a) { - if (this.Fe[a]) { - for (var b = 0, c = this.xa.length; b < c; b++) - this.xa[b] && ("divider" == this.xa[b].Mb && this.xa[b].Lj == a) && (this.xa.splice(b, 1), - c--), - this.xa[b] && ("divider" == this.xa[b].Mb && this.xa[b].Lj > a) && this.xa[b].Lj--; - this.Fe.splice(a, 1) - } - }, - Jd: w("C"), - show: function() { - this.Kh != q && (this.Kh = q) - }, - U: function() { - this.Kh != t && (this.Kh = t) - }, - t_: function(a) { - a && (this.j.cursor = a) - }, - getItem: function(a) { - return this.Kf[a] - } - }); - var gc = G.qa + "menu_zoom_in.png" - , hc = G.qa + "menu_zoom_out.png"; - function ic(a, b, c) { - if (a && Xa(b)) { - z.lang.Ca.call(this); - this.j = { - width: 100, - id: "", - Dm: "" - }; - c = c || {}; - this.j.width = 1 * c.width ? c.width : 100; - this.j.id = c.id ? c.id : ""; - this.j.Dm = c.iconUrl ? c.iconUrl : ""; - this.Wg = a + ""; - this.Kz = b; - this.B = s; - this.Mb = "menuitem"; - this.Ur = this.yv = this.C = this.Eh = s; - this.Ih = q; - var e = this; - K.load("menu", function() { - e.ib() - }) - } - } - z.lang.ta(ic, z.lang.Ca, "MenuItem"); - z.object.extend(ic.prototype, { - na: function(a, b) { - this.B = a; - this.Eh = b - }, - remove: function() { - this.B = this.Eh = s - }, - cu: function(a) { - a && (this.Wg = a + "") - }, - Rb: function(a) { - a && (this.j.Dm = a) - }, - Jd: w("C"), - enable: function() { - this.Ih = q - }, - disable: function() { - this.Ih = t - } - }); - function fb(a, b) { - a && !b && (b = a); - this.Ie = this.Xd = this.Ne = this.Zd = this.Pl = this.Al = s; - a && (this.Pl = new J(a.lng,a.lat), - this.Al = new J(b.lng,b.lat), - this.Ne = a.lng, - this.Zd = a.lat, - this.Ie = b.lng, - this.Xd = b.lat) - } - z.object.extend(fb.prototype, { - tj: function() { - return !this.Pl || !this.Al - }, - pb: function(a) { - return !(a instanceof fb) || this.tj() ? t : this.Ve().pb(a.Ve()) && this.Rf().pb(a.Rf()) - }, - Ve: w("Pl"), - Rf: w("Al"), - kW: function(a) { - return !(a instanceof fb) || this.tj() || a.tj() ? t : a.Ne > this.Ne && a.Ie < this.Ie && a.Zd > this.Zd && a.Xd < this.Xd - }, - Ka: function() { - return this.tj() ? s : new J((this.Ne + this.Ie) / 2,(this.Zd + this.Xd) / 2) - }, - ot: function(a) { - if (!(a instanceof fb) || Math.max(a.Ne, a.Ie) < Math.min(this.Ne, this.Ie) || Math.min(a.Ne, a.Ie) > Math.max(this.Ne, this.Ie) || Math.max(a.Zd, a.Xd) < Math.min(this.Zd, this.Xd) || Math.min(a.Zd, a.Xd) > Math.max(this.Zd, this.Xd)) - return s; - var b = Math.max(this.Ne, a.Ne) - , c = Math.min(this.Ie, a.Ie) - , e = Math.max(this.Zd, a.Zd) - , a = Math.min(this.Xd, a.Xd); - return new fb(new J(b,e),new J(c,a)) - }, - js: function(a) { - return !(a instanceof J) || this.tj() ? t : a.lng >= this.Ne && a.lng <= this.Ie && a.lat >= this.Zd && a.lat <= this.Xd - }, - extend: function(a) { - if (a instanceof J) { - var b = a.lng - , a = a.lat; - this.Pl || (this.Pl = new J(0,0)); - this.Al || (this.Al = new J(0,0)); - if (!this.Ne || this.Ne > b) - this.Pl.lng = this.Ne = b; - if (!this.Ie || this.Ie < b) - this.Al.lng = this.Ie = b; - if (!this.Zd || this.Zd > a) - this.Pl.lat = this.Zd = a; - if (!this.Xd || this.Xd < a) - this.Al.lat = this.Xd = a - } - }, - YF: function() { - return this.tj() ? new J(0,0) : new J(Math.abs(this.Ie - this.Ne),Math.abs(this.Xd - this.Zd)) - } - }); - function J(a, b) { - isNaN(a) && (a = Lb(a), - a = isNaN(a) ? 0 : a); - $a(a) && (a = parseFloat(a)); - isNaN(b) && (b = Lb(b), - b = isNaN(b) ? 0 : b); - $a(b) && (b = parseFloat(b)); - this.lng = a; - this.lat = b - } - J.yM = function(a) { - return a && 180 >= a.lng && -180 <= a.lng && 74 >= a.lat && -74 <= a.lat - } - ; - J.prototype.pb = function(a) { - return a && this.lat == a.lat && this.lng == a.lng - } - ; - function jc() {} - jc.prototype.kh = function() { - aa("lngLatToPoint\u65b9\u6cd5\u672a\u5b9e\u73b0") - } - ; - jc.prototype.xj = function() { - aa("pointToLngLat\u65b9\u6cd5\u672a\u5b9e\u73b0") - } - ; - function kc() {} - ;var eb = { - EK: function(a, b, c) { - K.load("coordtransutils", function() { - eb.AV(a, b, c) - }, q) - }, - DK: function(a, b, c) { - K.load("coordtransutils", function() { - eb.zV(a, b, c) - }, q) - } - }; - function lc() { - this.Pa = []; - var a = this; - K.load("convertor", function() { - a.qQ() - }) - } - z.ta(lc, z.lang.Ca, "Convertor"); - z.extend(lc.prototype, { - translate: function(a, b, c, e) { - this.Pa.push({ - method: "translate", - arguments: [a, b, c, e] - }) - } - }); - T(lc.prototype, { - translate: lc.prototype.translate - }); - function S() {} - S.prototype = new jc; - z.extend(S, { - GP: 6370996.81, - IG: [1.289059486E7, 8362377.87, 5591021, 3481989.83, 1678043.12, 0], - Nu: [75, 60, 45, 30, 15, 0], - MP: [[1.410526172116255E-8, 8.98305509648872E-6, -1.9939833816331, 200.9824383106796, -187.2403703815547, 91.6087516669843, -23.38765649603339, 2.57121317296198, -0.03801003308653, 1.73379812E7], [-7.435856389565537E-9, 8.983055097726239E-6, -0.78625201886289, 96.32687599759846, -1.85204757529826, -59.36935905485877, 47.40033549296737, -16.50741931063887, 2.28786674699375, 1.026014486E7], [-3.030883460898826E-8, 8.98305509983578E-6, 0.30071316287616, 59.74293618442277, 7.357984074871, -25.38371002664745, 13.45380521110908, -3.29883767235584, 0.32710905363475, 6856817.37], [-1.981981304930552E-8, 8.983055099779535E-6, 0.03278182852591, 40.31678527705744, 0.65659298677277, -4.44255534477492, 0.85341911805263, 0.12923347998204, -0.04625736007561, 4482777.06], [3.09191371068437E-9, 8.983055096812155E-6, 6.995724062E-5, 23.10934304144901, -2.3663490511E-4, -0.6321817810242, -0.00663494467273, 0.03430082397953, -0.00466043876332, 2555164.4], [2.890871144776878E-9, 8.983055095805407E-6, -3.068298E-8, 7.47137025468032, -3.53937994E-6, -0.02145144861037, -1.234426596E-5, 1.0322952773E-4, -3.23890364E-6, 826088.5]], - FG: [[-0.0015702102444, 111320.7020616939, 1704480524535203, -10338987376042340, 26112667856603880, -35149669176653700, 26595700718403920, -10725012454188240, 1800819912950474, 82.5], [8.277824516172526E-4, 111320.7020463578, 6.477955746671607E8, -4.082003173641316E9, 1.077490566351142E10, -1.517187553151559E10, 1.205306533862167E10, -5.124939663577472E9, 9.133119359512032E8, 67.5], [0.00337398766765, 111320.7020202162, 4481351.045890365, -2.339375119931662E7, 7.968221547186455E7, -1.159649932797253E8, 9.723671115602145E7, -4.366194633752821E7, 8477230.501135234, 52.5], [0.00220636496208, 111320.7020209128, 51751.86112841131, 3796837.749470245, 992013.7397791013, -1221952.21711287, 1340652.697009075, -620943.6990984312, 144416.9293806241, 37.5], [-3.441963504368392E-4, 111320.7020576856, 278.2353980772752, 2485758.690035394, 6070.750963243378, 54821.18345352118, 9540.606633304236, -2710.55326746645, 1405.483844121726, 22.5], [-3.218135878613132E-4, 111320.7020701615, 0.00369383431289, 823725.6402795718, 0.46104986909093, 2351.343141331292, 1.58060784298199, 8.77738589078284, 0.37238884252424, 7.45]], - t3: function(a, b) { - if (!a || !b) - return 0; - var c, e, a = this.Tb(a); - if (!a) - return 0; - c = this.Xk(a.lng); - e = this.Xk(a.lat); - b = this.Tb(b); - return !b ? 0 : this.pf(c, this.Xk(b.lng), e, this.Xk(b.lat)) - }, - $o: function(a, b) { - if (!a || !b) - return 0; - a.lng = this.WD(a.lng, -180, 180); - a.lat = this.aE(a.lat, -74, 74); - b.lng = this.WD(b.lng, -180, 180); - b.lat = this.aE(b.lat, -74, 74); - return this.pf(this.Xk(a.lng), this.Xk(b.lng), this.Xk(a.lat), this.Xk(b.lat)) - }, - Tb: function(a) { - if (a === s || a === l) - return new J(0,0); - var b, c; - b = new J(Math.abs(a.lng),Math.abs(a.lat)); - for (var e = 0; e < this.IG.length; e++) - if (b.lat >= this.IG[e]) { - c = this.MP[e]; - break - } - a = this.FK(a, c); - return a = new J(a.lng.toFixed(6),a.lat.toFixed(6)) - }, - Eb: function(a) { - if (a === s || a === l || 180 < a.lng || -180 > a.lng || 90 < a.lat || -90 > a.lat) - return new J(0,0); - var b, c; - a.lng = this.WD(a.lng, -180, 180); - a.lat = this.aE(a.lat, -74, 74); - b = new J(a.lng,a.lat); - for (var e = 0; e < this.Nu.length; e++) - if (b.lat >= this.Nu[e]) { - c = this.FG[e]; - break - } - if (!c) - for (e = 0; e < this.Nu.length; e++) - if (b.lat <= -this.Nu[e]) { - c = this.FG[e]; - break - } - a = this.FK(a, c); - return a = new J(a.lng.toFixed(2),a.lat.toFixed(2)) - }, - FK: function(a, b) { - if (a && b) { - var c = b[0] + b[1] * Math.abs(a.lng) - , e = Math.abs(a.lat) / b[9] - , e = b[2] + b[3] * e + b[4] * e * e + b[5] * e * e * e + b[6] * e * e * e * e + b[7] * e * e * e * e * e + b[8] * e * e * e * e * e * e - , c = c * (0 > a.lng ? -1 : 1) - , e = e * (0 > a.lat ? -1 : 1); - return new J(c,e) - } - }, - pf: function(a, b, c, e) { - return this.GP * Math.acos(Math.sin(c) * Math.sin(e) + Math.cos(c) * Math.cos(e) * Math.cos(b - a)) - }, - Xk: function(a) { - return Math.PI * a / 180 - }, - B5: function(a) { - return 180 * a / Math.PI - }, - aE: function(a, b, c) { - b != s && (a = Math.max(a, b)); - c != s && (a = Math.min(a, c)); - return a - }, - WD: function(a, b, c) { - for (; a > c; ) - a -= c - b; - for (; a < b; ) - a += c - b; - return a - } - }); - z.extend(S.prototype, { - vj: function(a) { - return S.Eb(a) - }, - kh: function(a) { - a = S.Eb(a); - return new Q(a.lng,a.lat) - }, - nh: function(a) { - return S.Tb(a) - }, - xj: function(a) { - a = new J(a.x,a.y); - return S.Tb(a) - }, - $b: function(a, b, c, e, f) { - if (a) - return a = this.vj(a, f), - b = this.dc(b), - new Q(Math.round((a.lng - c.lng) / b + e.width / 2),Math.round((c.lat - a.lat) / b + e.height / 2)) - }, - xb: function(a, b, c, e, f) { - if (a) - return b = this.dc(b), - this.nh(new J(c.lng + b * (a.x - e.width / 2),c.lat - b * (a.y - e.height / 2)), f) - }, - dc: function(a) { - return Math.pow(2, 18 - a) - } - }); - function hb() { - this.$i = "bj" - } - hb.prototype = new S; - z.extend(hb.prototype, { - vj: function(a, b) { - return this.bR(b, S.Eb(a)) - }, - nh: function(a, b) { - return S.Tb(this.cR(b, a)) - }, - lngLatToPointFor3D: function(a, b) { - var c = this - , e = S.Eb(a); - K.load("coordtrans", function() { - var a = kc.ZD(c.$i || "bj", e) - , a = new Q(a.x,a.y); - b && b(a) - }, q) - }, - pointToLngLatFor3D: function(a, b) { - var c = this - , e = new J(a.x,a.y); - K.load("coordtrans", function() { - var a = kc.XD(c.$i || "bj", e) - , a = new J(a.lng,a.lat) - , a = S.Tb(a); - b && b(a) - }, q) - }, - bR: function(a, b) { - if (K.kb("coordtrans").Me == K.Cj.cq) { - var c = kc.ZD(a || "bj", b); - return new J(c.x,c.y) - } - K.load("coordtrans", u()); - return new J(0,0) - }, - cR: function(a, b) { - if (K.kb("coordtrans").Me == K.Cj.cq) { - var c = kc.XD(a || "bj", b); - return new J(c.lng,c.lat) - } - K.load("coordtrans", u()); - return new J(0,0) - }, - dc: function(a) { - return Math.pow(2, 20 - a) - } - }); - function mc() { - this.Mb = "overlay" - } - z.lang.ta(mc, z.lang.Ca, "Overlay"); - mc.Ck = function(a) { - a *= 1; - return !a ? 0 : -1E5 * a << 1 - } - ; - z.extend(mc.prototype, { - He: function(a) { - if (!this.V && Xa(this.initialize) && (this.V = this.initialize(a))) - this.V.style.WebkitUserSelect = "none"; - this.draw() - }, - initialize: function() { - aa("initialize\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - draw: function() { - aa("draw\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - remove: function() { - this.V && this.V.parentNode && this.V.parentNode.removeChild(this.V); - this.V = s; - this.dispatchEvent(new P("onremove")) - }, - U: function() { - this.V && z.D.U(this.V) - }, - show: function() { - this.V && z.D.show(this.V) - }, - jh: function() { - return !this.V || "none" == this.V.style.display || "hidden" == this.V.style.visibility ? t : q - } - }); - B.Ye(function(a) { - function b(a, b) { - var c = L("div") - , i = c.style; - i.position = "absolute"; - i.top = i.left = i.width = i.height = "0"; - i.zIndex = b; - a.appendChild(c); - return c - } - var c = a.R; - c.rd = a.rd = b(a.platform, 200); - a.Yd.BD = b(c.rd, 800); - a.Yd.RE = b(c.rd, 700); - a.Yd.sL = b(c.rd, 600); - a.Yd.KE = b(c.rd, 500); - a.Yd.fN = b(c.rd, 400); - a.Yd.gN = b(c.rd, 300); - a.Yd.nP = b(c.rd, 201); - a.Yd.Et = b(c.rd, 200) - }); - function gb() { - z.lang.Ca.call(this); - mc.call(this); - this.map = s; - this.Qa = q; - this.zb = s; - this.vH = 0 - } - z.lang.ta(gb, mc, "OverlayInternal"); - z.extend(gb.prototype, { - initialize: function(a) { - this.map = a; - z.lang.Ca.call(this, this.aa); - return s - }, - Dx: w("map"), - draw: u(), - Ej: u(), - remove: function() { - this.map = s; - z.lang.hx(this.aa); - mc.prototype.remove.call(this) - }, - U: function() { - this.Qa !== t && (this.Qa = t) - }, - show: function() { - this.Qa !== q && (this.Qa = q) - }, - jh: function() { - return !this.V ? t : !!this.Qa - }, - La: w("V"), - lO: function(a) { - var a = a || {}, b; - for (b in a) - this.z[b] = a[b] - }, - Sp: ba("zIndex"), - gj: function() { - this.z.gj = q - }, - MW: function() { - this.z.gj = t - }, - yo: ba("lg"), - Cp: function() { - this.lg = s - } - }); - function nc() { - this.map = s; - this.ya = {}; - this.Ee = [] - } - B.Ye(function(a) { - var b = new nc; - b.map = a; - a.ya = b.ya; - a.Ee = b.Ee; - a.addEventListener("load", function(a) { - b.draw(a) - }); - a.addEventListener("moveend", function(a) { - b.draw(a) - }); - z.ca.ia && 8 > z.ca.ia || "BackCompat" === document.compatMode ? a.addEventListener("zoomend", function(a) { - setTimeout(function() { - b.draw(a) - }, 20) - }) : a.addEventListener("zoomend", function(a) { - b.draw(a) - }); - a.addEventListener("maptypechange", function(a) { - b.draw(a) - }); - a.addEventListener("addoverlay", function(a) { - a = a.target; - if (a instanceof gb) - b.ya[a.aa] || (b.ya[a.aa] = a); - else { - for (var e = t, f = 0, g = b.Ee.length; f < g; f++) - if (b.Ee[f] === a) { - e = q; - break - } - e || b.Ee.push(a) - } - }); - a.addEventListener("removeoverlay", function(a) { - a = a.target; - if (a instanceof gb) - delete b.ya[a.aa]; - else - for (var e = 0, f = b.Ee.length; e < f; e++) - if (b.Ee[e] === a) { - b.Ee.splice(e, 1); - break - } - }); - a.addEventListener("clearoverlays", function() { - this.Yc(); - for (var a in b.ya) - b.ya[a].z.gj && (b.ya[a].remove(), - delete b.ya[a]); - a = 0; - for (var e = b.Ee.length; a < e; a++) - b.Ee[a].enableMassClear !== t && (b.Ee[a].remove(), - b.Ee[a] = s, - b.Ee.splice(a, 1), - a--, - e--) - }); - a.addEventListener("infowindowopen", function() { - var a = this.zb; - a && (z.D.U(a.Ac), - z.D.U(a.ac)) - }); - a.addEventListener("movestart", function() { - this.hh() && this.hh().mJ() - }); - a.addEventListener("moveend", function() { - this.hh() && this.hh().cJ() - }) - }); - nc.prototype.draw = function(a) { - if (B.hq) { - var b = B.hq.Ws(this.map); - "canvas" === b.Mb && b.canvas && b.XQ(b.canvas.getContext("2d")) - } - for (var c in this.ya) - this.ya[c].draw(a); - z.mc.Fb(this.Ee, function(a) { - a.draw() - }); - this.map.R.qb && this.map.R.qb.sa(); - B.hq && b.IF() - } - ; - function oc(a) { - gb.call(this); - a = a || {}; - this.z = { - strokeColor: a.strokeColor || "#3a6bdb", - rc: a.strokeWeight || 5, - td: a.strokeOpacity || 0.65, - strokeStyle: a.strokeStyle || "solid", - gj: a.enableMassClear === t ? t : q, - zk: s, - um: s, - mf: a.enableEditing === q ? q : t, - kN: 5, - G0: t, - jf: a.enableClicking === t ? t : q, - ji: a.icons && 0 < a.icons.length ? a.icons : s - }; - 0 >= this.z.rc && (this.z.rc = 5); - if (0 > this.z.td || 1 < this.z.td) - this.z.td = 0.65; - if (0 > this.z.tg || 1 < this.z.tg) - this.z.tg = 0.65; - "solid" != this.z.strokeStyle && "dashed" != this.z.strokeStyle && (this.z.strokeStyle = "solid"); - this.V = s; - this.Vu = new fb(0,0); - this.gf = []; - this.tc = []; - this.Ra = {} - } - z.lang.ta(oc, gb, "Graph"); - oc.yx = function(a) { - var b = []; - if (!a) - return b; - $a(a) && z.mc.Fb(a.split(";"), function(a) { - a = a.split(","); - b.push(new J(a[0],a[1])) - }); - "[object Array]" == Object.prototype.toString.apply(a) && 0 < a.length && (b = a); - return b - } - ; - oc.eF = [0.09, 0.0050, 1.0E-4, 1.0E-5]; - z.extend(oc.prototype, { - initialize: function(a) { - this.map = a; - return s - }, - draw: u(), - Mr: function(a) { - this.gf.length = 0; - this.ja = oc.yx(a).slice(0); - this.Bh() - }, - ke: function(a) { - this.Mr(a) - }, - Bh: function() { - if (this.ja) { - var a = this; - a.Vu = new fb; - z.mc.Fb(this.ja, function(b) { - a.Vu.extend(b) - }) - } - }, - Ue: w("ja"), - gn: function(a, b) { - b && this.ja[a] && (this.gf.length = 0, - this.ja[a] = new J(b.lng,b.lat), - this.Bh()) - }, - setStrokeColor: function(a) { - this.z.strokeColor = a - }, - jY: function() { - return this.z.strokeColor - }, - Rp: function(a) { - 0 < a && (this.z.rc = a) - }, - WL: function() { - return this.z.rc - }, - Pp: function(a) { - a == l || (1 < a || 0 > a) || (this.z.td = a) - }, - kY: function() { - return this.z.td - }, - Xt: function(a) { - 1 < a || 0 > a || (this.z.tg = a) - }, - HX: function() { - return this.z.tg - }, - Qp: function(a) { - "solid" != a && "dashed" != a || (this.z.strokeStyle = a) - }, - VL: function() { - return this.z.strokeStyle - }, - setFillColor: function(a) { - this.z.fillColor = a || "" - }, - GX: function() { - return this.z.fillColor - }, - ve: w("Vu"), - remove: function() { - this.map && this.map.removeEventListener("onmousemove", this.vv); - gb.prototype.remove.call(this); - this.gf.length = 0 - }, - mf: function() { - if (!(2 > this.ja.length)) { - this.z.mf = q; - var a = this; - K.load("poly", function() { - a.Ul() - }, q) - } - }, - LW: function() { - this.z.mf = t; - var a = this; - K.load("poly", function() { - a.nk() - }, q) - }, - DX: function() { - return this.z.mf - } - }); - function pc(a) { - gb.call(this); - this.V = this.map = s; - this.z = { - width: 0, - height: 0, - za: new O(0,0), - opacity: 1, - background: "transparent", - ey: 1, - SM: "#000", - hZ: "solid", - point: s - }; - this.lO(a); - this.point = this.z.point - } - z.lang.ta(pc, gb, "Division"); - z.extend(pc.prototype, { - Ej: function() { - var a = this.z - , b = this.content - , c = ['
    '); - c.push(b); - c.push("
    "); - this.V = Ab(this.map.Tf().RE, c.join("")) - }, - initialize: function(a) { - this.map = a; - this.Ej(); - this.V && z.M(this.V, H() ? "touchstart" : "mousedown", function(a) { - ma(a) - }); - return this.V - }, - draw: function() { - var a = this.map.Xe(this.z.point); - this.z.za = new O(-Math.round(this.z.width / 2) - Math.round(this.z.ey),-Math.round(this.z.height / 2) - Math.round(this.z.ey)); - this.V.style.left = a.x + this.z.za.width + "px"; - this.V.style.top = a.y + this.z.za.height + "px" - }, - ga: function() { - return this.z.point - }, - L1: function() { - return this.map.$b(this.ga()) - }, - sa: function(a) { - this.z.point = a; - this.draw() - }, - u_: function(a, b) { - this.z.width = Math.round(a); - this.z.height = Math.round(b); - this.V && (this.V.style.width = this.z.width + "px", - this.V.style.height = this.z.height + "px", - this.draw()) - } - }); - function qc(a, b, c) { - a && b && (this.imageUrl = a, - this.size = b, - a = new O(Math.floor(b.width / 2),Math.floor(b.height / 2)), - c = c || {}, - a = c.anchor || a, - b = c.imageOffset || new O(0,0), - this.imageSize = c.imageSize, - this.anchor = a, - this.imageOffset = b, - this.infoWindowAnchor = c.infoWindowAnchor || this.anchor, - this.printImageUrl = c.printImageUrl || "") - } - z.extend(qc.prototype, { - mO: function(a) { - a && (this.imageUrl = a) - }, - K_: function(a) { - a && (this.printImageUrl = a) - }, - Ce: function(a) { - a && (this.size = new O(a.width,a.height)) - }, - uc: function(a) { - a && (this.anchor = new O(a.width,a.height)) - }, - Yt: function(a) { - a && (this.imageOffset = new O(a.width,a.height)) - }, - z_: function(a) { - a && (this.infoWindowAnchor = new O(a.width,a.height)) - }, - w_: function(a) { - a && (this.imageSize = new O(a.width,a.height)) - }, - toString: ca("Icon") - }); - function rc(a, b) { - if (a) { - b = b || {}; - this.style = { - anchor: b.anchor || new O(0,0), - fillColor: b.fillColor || "#000", - tg: b.fillOpacity || 0, - scale: b.scale || 1, - rotation: b.rotation || 0, - strokeColor: b.strokeColor || "#000", - td: b.strokeOpacity || 1, - rc: b.strokeWeight - }; - this.Mb = "number" === typeof a ? a : "UserDefined"; - this.Di = this.style.anchor; - this.rr = new O(0,0); - this.anchor = s; - this.vB = a; - var c = this; - K.load("symbol", function() { - c.Mn() - }, q) - } - } - z.extend(rc.prototype, { - setPath: ba("vB"), - setAnchor: function(a) { - this.Di = this.style.anchor = a - }, - setRotation: function(a) { - this.style.rotation = a - }, - setScale: function(a) { - this.style.scale = a - }, - setStrokeWeight: function(a) { - this.style.rc = a - }, - setStrokeColor: function(a) { - a = z.is.AC(a, this.style.td); - this.style.strokeColor = a - }, - setStrokeOpacity: function(a) { - this.style.td = a - }, - setFillOpacity: function(a) { - this.style.tg = a - }, - setFillColor: function(a) { - this.style.fillColor = a - } - }); - function sc(a, b, c, e) { - a && (this.Ov = {}, - this.qL = e ? !!e : t, - this.Vc = [], - this.c0 = a instanceof rc ? a : s, - this.WI = b === l ? q : !!(b.indexOf("%") + 1), - this.Zj = isNaN(parseFloat(b)) ? 1 : this.WI ? parseFloat(b) / 100 : parseFloat(b), - this.XI = !!(c.indexOf("%") + 1), - this.repeat = c != l ? this.XI ? parseFloat(c) / 100 : parseFloat(c) : 0) - } - ;function tc(a, b) { - z.lang.Ca.call(this); - this.content = a; - this.map = s; - b = b || {}; - this.z = { - width: b.width || 0, - height: b.height || 0, - maxWidth: b.maxWidth || 730, - za: b.offset || new O(0,0), - title: b.title || "", - SE: b.maxContent || "", - dh: b.enableMaximize || t, - Ls: b.enableAutoPan === t ? t : q, - lD: b.enableCloseOnClick === t ? t : q, - margin: b.margin || [10, 10, 40, 10], - vC: b.collisions || [[10, 10], [10, 10], [10, 10], [10, 10]], - GY: t, - AZ: b.onClosing || ca(q), - hL: t, - qD: b.enableParano === q ? q : t, - message: b.message, - sD: b.enableSearchTool === q ? q : t, - Ox: b.headerContent || "", - mD: b.enableContentScroll || t - }; - if (0 != this.z.width && (220 > this.z.width && (this.z.width = 220), - 730 < this.z.width)) - this.z.width = 730; - if (0 != this.z.height && (60 > this.z.height && (this.z.height = 60), - 650 < this.z.height)) - this.z.height = 650; - if (0 != this.z.maxWidth && (220 > this.z.maxWidth && (this.z.maxWidth = 220), - 730 < this.z.maxWidth)) - this.z.maxWidth = 730; - this.de = t; - this.yi = G.qa; - this.fb = s; - var c = this; - K.load("infowindow", function() { - c.ib() - }) - } - z.lang.ta(tc, z.lang.Ca, "InfoWindow"); - z.extend(tc.prototype, { - setWidth: function(a) { - !a && 0 != a || (isNaN(a) || 0 > a) || (0 != a && (220 > a && (a = 220), - 730 < a && (a = 730)), - this.z.width = a) - }, - setHeight: function(a) { - !a && 0 != a || (isNaN(a) || 0 > a) || (0 != a && (60 > a && (a = 60), - 650 < a && (a = 650)), - this.z.height = a) - }, - qO: function(a) { - !a && 0 != a || (isNaN(a) || 0 > a) || (0 != a && (220 > a && (a = 220), - 730 < a && (a = 730)), - this.z.maxWidth = a) - }, - Ec: function(a) { - this.z.title = a - }, - getTitle: function() { - return this.z.title - }, - dd: ba("content"), - xk: w("content"), - $t: function(a) { - this.z.SE = a + "" - }, - je: u(), - Ls: function() { - this.z.Ls = q - }, - disableAutoPan: function() { - this.z.Ls = t - }, - enableCloseOnClick: function() { - this.z.lD = q - }, - disableCloseOnClick: function() { - this.z.lD = t - }, - dh: function() { - this.z.dh = q - }, - kx: function() { - this.z.dh = t - }, - show: function() { - this.Qa = q - }, - U: function() { - this.Qa = t - }, - close: function() { - this.U() - }, - hy: function() { - this.de = q - }, - restore: function() { - this.de = t - }, - jh: function() { - return this.Xa() - }, - Xa: ca(t), - ga: function() { - if (this.fb && this.fb.ga) - return this.fb.ga() - }, - Sf: function() { - return this.z.za - } - }); - Ka.prototype.pc = function(a, b) { - if (a instanceof tc && b instanceof J) { - var c = this.R; - c.Nm ? c.Nm.sa(b) : (c.Nm = new U(b,{ - icon: new qc(G.qa + "blank.gif",{ - width: 1, - height: 1 - }), - offset: new O(0,0), - clickable: t - }), - c.Nm.bS = 1); - this.Ga(c.Nm); - c.Nm.pc(a) - } - } - ; - Ka.prototype.Yc = function() { - var a = this.R.qb || this.R.rl; - a && a.fb && a.fb.Yc() - } - ; - gb.prototype.pc = function(a) { - this.map && (this.map.Yc(), - a.Qa = q, - this.map.R.rl = a, - a.fb = this, - z.lang.Ca.call(a, a.aa)) - } - ; - gb.prototype.Yc = function() { - this.map && this.map.R.rl && (this.map.R.rl.Qa = t, - z.lang.hx(this.map.R.rl.aa), - this.map.R.rl = s) - } - ; - function uc(a, b) { - gb.call(this); - this.content = a; - this.V = this.map = s; - b = b || {}; - this.z = { - width: 0, - za: b.offset || new O(0,0), - Wp: { - backgroundColor: "#fff", - border: "1px solid #f00", - padding: "1px", - whiteSpace: "nowrap", - font: "12px " + G.fontFamily, - zIndex: "80", - MozUserSelect: "none" - }, - position: b.position || s, - gj: b.enableMassClear === t ? t : q, - jf: q - }; - 0 > this.z.width && (this.z.width = 0); - Hb(b.enableClicking) && (this.z.jf = b.enableClicking); - this.point = this.z.position; - var c = this; - K.load("marker", function() { - c.ib() - }) - } - z.lang.ta(uc, gb, "Label"); - z.extend(uc.prototype, { - ga: function() { - return this.Dv ? this.Dv.ga() : this.point - }, - sa: function(a) { - a instanceof J && !this.Ex() && (this.point = this.z.position = new J(a.lng,a.lat)) - }, - dd: ba("content"), - HF: function(a) { - 0 <= a && 1 >= a && (this.z.opacity = a) - }, - Ze: function(a) { - a instanceof O && (this.z.za = new O(a.width,a.height)) - }, - Sf: function() { - return this.z.za - }, - Md: function(a) { - a = a || {}; - this.z.Wp = z.extend(this.z.Wp, a) - }, - ti: function(a) { - return this.Md(a) - }, - Ec: function(a) { - this.z.title = a || "" - }, - getTitle: function() { - return this.z.title - }, - pO: function(a) { - this.point = (this.Dv = a) ? this.z.position = a.ga() : this.z.position = s - }, - Ex: function() { - return this.Dv || s - }, - xk: w("content") - }); - function vc(a, b) { - if (0 !== arguments.length) { - gb.apply(this, arguments); - b = b || {}; - this.z = { - bb: a, - opacity: b.opacity || 1, - Gm: b.Gm || "", - Bs: b.displayOnMinLevel || 1, - gj: b.enableMassClear === t ? t : q, - As: b.displayOnMaxLevel || 19, - X_: b.stretch || t - }; - var c = this; - K.load("groundoverlay", function() { - c.ib() - }) - } - } - z.lang.ta(vc, gb, "GroundOverlay"); - z.extend(vc.prototype, { - setBounds: function(a) { - this.z.bb = a - }, - getBounds: function() { - return this.z.bb - }, - setOpacity: function(a) { - this.z.opacity = a - }, - getOpacity: function() { - return this.z.opacity - }, - setImageURL: function(a) { - this.z.Gm = a - }, - getImageURL: function() { - return this.z.Gm - }, - setDisplayOnMinLevel: function(a) { - this.z.Bs = a - }, - getDisplayOnMinLevel: function() { - return this.z.Bs - }, - setDisplayOnMaxLevel: function(a) { - this.z.As = a - }, - getDisplayOnMaxLevel: function() { - return this.z.As - } - }); - var wc = 3 - , xc = 4; - function yc() { - var a = document.createElement("canvas"); - return !(!a.getContext || !a.getContext("2d")) - } - function zc(a, b) { - var c = this; - yc() && (a === l && aa(Error("\u6ca1\u6709\u4f20\u5165points\u6570\u636e")), - "[object Array]" !== Object.prototype.toString.call(a) && aa(Error("points\u6570\u636e\u4e0d\u662f\u6570\u7ec4")), - b = b || {}, - gb.apply(c, arguments), - c.ea = { - ja: a - }, - c.z = { - shape: b.shape || wc, - size: b.size || xc, - color: b.color || "#fa937e", - gj: q - }, - this.sB = [], - this.pe = [], - K.load("pointcollection", function() { - for (var a = 0, b; b = c.sB[a]; a++) - c[b.method].apply(c, b.arguments); - for (a = 0; b = c.pe[a]; a++) - c[b.method].apply(c, b.arguments) - })) - } - z.lang.ta(zc, gb, "PointCollection"); - z.extend(zc.prototype, { - initialize: function(a) { - this.sB && this.sB.push({ - method: "initialize", - arguments: arguments - }) - }, - setPoints: function(a) { - this.pe && this.pe.push({ - method: "setPoints", - arguments: arguments - }) - }, - setStyles: function(a) { - this.pe && this.pe.push({ - method: "setStyles", - arguments: arguments - }) - }, - clear: function() { - this.pe && this.pe.push({ - method: "clear", - arguments: arguments - }) - }, - remove: function() { - this.pe && this.pe.push({ - method: "remove", - arguments: arguments - }) - } - }); - var Ac = new qc(G.qa + "marker_red_sprite.png",new O(19,25),{ - anchor: new O(10,25), - infoWindowAnchor: new O(10,0) - }) - , Bc = new qc(G.qa + "marker_red_sprite.png",new O(20,11),{ - anchor: new O(6,11), - imageOffset: new O(-19,-13) - }); - function U(a, b) { - gb.call(this); - b = b || {}; - this.point = a; - this.yq = this.map = s; - this.z = { - za: b.offset || new O(0,0), - rj: b.icon || Ac, - Sk: Bc, - title: b.title || "", - label: s, - lK: b.baseZIndex || 0, - jf: q, - X5: t, - EE: t, - gj: b.enableMassClear === t ? t : q, - Wb: t, - UN: b.raiseOnDrag === q ? q : t, - aO: t, - Hd: b.draggingCursor || G.Hd, - rotation: b.rotation || 0 - }; - b.icon && !b.shadow && (this.z.Sk = s); - b.enableDragging && (this.z.Wb = b.enableDragging); - Hb(b.enableClicking) && (this.z.jf = b.enableClicking); - var c = this; - K.load("marker", function() { - c.ib() - }) - } - U.Qu = mc.Ck(-90) + 1E6; - U.AG = U.Qu + 1E6; - z.lang.ta(U, gb, "Marker"); - z.extend(U.prototype, { - Rb: function(a) { - if (a instanceof qc || a instanceof rc) - this.z.rj = a - }, - ap: function() { - return this.z.rj - }, - Oy: function(a) { - a instanceof qc && (this.z.Sk = a) - }, - getShadow: function() { - return this.z.Sk - }, - dn: function(a) { - this.z.label = a || s - }, - VD: function() { - return this.z.label - }, - Wb: function() { - this.z.Wb = q - }, - TC: function() { - this.z.Wb = t - }, - ga: w("point"), - sa: function(a) { - a instanceof J && (this.point = new J(a.lng,a.lat)) - }, - ui: function(a, b) { - this.z.EE = !!a; - a && (this.XG = b || 0) - }, - Ec: function(a) { - this.z.title = a + "" - }, - getTitle: function() { - return this.z.title - }, - Ze: function(a) { - a instanceof O && (this.z.za = a) - }, - Sf: function() { - return this.z.za - }, - bn: ba("yq"), - Op: function(a) { - this.z.rotation = a - }, - TL: function() { - return this.z.rotation - } - }); - function Cc(a) { - this.options = a || {}; - this.GZ = this.options.paneName || "labelPane"; - this.zIndex = this.options.zIndex || 0 - } - z.lang.ta(Cc, gb, "CanvasLayer"); - Cc.prototype.initialize = function(a) { - this.B = a; - var b = this.canvas = document.createElement("canvas") - , c = this.canvas.getContext("2d"); - b.style.cssText = "position:absolute;left:0;top:0;z-index:" + this.zIndex + ";"; - Dc(this); - Ec(c); - a.getPanes()[this.GZ].appendChild(b); - var e = this; - a.addEventListener("resize", function() { - Dc(e); - e.ib() - }); - return this.canvas - } - ; - function Dc(a) { - var b = a.B.cb() - , a = a.canvas; - a.width = b.width; - a.height = b.height; - a.style.width = a.width + "px"; - a.style.height = a.height + "px" - } - function Ec(a) { - var b = (window.devicePixelRatio || 1) / (a.CV || a.T5 || a.x4 || a.y4 || a.B4 || a.CV || 1) - , c = a.canvas.width - , e = a.canvas.height; - a.canvas.width = c * b; - a.canvas.height = e * b; - a.canvas.style.width = c + "px"; - a.canvas.style.height = e + "px"; - a.scale(b, b) - } - Cc.prototype.draw = function() { - var a = this - , b = arguments; - clearTimeout(a.j0); - a.j0 = setTimeout(function() { - a.ib.apply(a, b) - }, 15) - } - ; - da = Cc.prototype; - da.ib = function() { - var a = this.B; - this.canvas.style.left = -a.offsetX + "px"; - this.canvas.style.top = -a.offsetY + "px"; - this.dispatchEvent("draw"); - this.options.update && this.options.update.apply(this, arguments) - } - ; - da.La = w("canvas"); - da.show = function() { - this.canvas || this.B.Ga(this); - this.canvas.style.display = "block" - } - ; - da.U = function() { - this.canvas.style.display = "none" - } - ; - da.Sp = function(a) { - this.canvas.style.zIndex = a - } - ; - da.Ck = w("zIndex"); - function Fc(a, b) { - oc.call(this, b); - b = b || {}; - this.z.tg = b.fillOpacity ? b.fillOpacity : 0.65; - this.z.fillColor = "" == b.fillColor ? "" : b.fillColor ? b.fillColor : "#fff"; - this.ke(a); - var c = this; - K.load("poly", function() { - c.ib() - }) - } - z.lang.ta(Fc, oc, "Polygon"); - z.extend(Fc.prototype, { - ke: function(a, b) { - this.vo = oc.yx(a).slice(0); - var c = oc.yx(a).slice(0); - 1 < c.length && c.push(new J(c[0].lng,c[0].lat)); - oc.prototype.ke.call(this, c, b) - }, - gn: function(a, b) { - this.vo[a] && (this.vo[a] = new J(b.lng,b.lat), - this.ja[a] = new J(b.lng,b.lat), - 0 == a && !this.ja[0].pb(this.ja[this.ja.length - 1]) && (this.ja[this.ja.length - 1] = new J(b.lng,b.lat)), - this.Bh()) - }, - Ue: function() { - var a = this.vo; - 0 == a.length && (a = this.ja); - return a - } - }); - function Gc(a, b) { - oc.call(this, b); - this.Mr(a); - var c = this; - K.load("poly", function() { - c.ib() - }) - } - z.lang.ta(Gc, oc, "Polyline"); - function Hc(a, b, c) { - this.point = a; - this.wa = Math.abs(b); - Fc.call(this, [], c) - } - Hc.eF = [0.01, 1.0E-4, 1.0E-5, 4.0E-6]; - z.lang.ta(Hc, Fc, "Circle"); - z.extend(Hc.prototype, { - initialize: function(a) { - this.map = a; - this.ja = this.qv(this.point, this.wa); - this.Bh(); - return s - }, - Ka: w("point"), - Zf: function(a) { - a && (this.point = a) - }, - RL: w("wa"), - xf: function(a) { - this.wa = Math.abs(a) - }, - qv: function(a, b) { - if (!a || !b || !this.map) - return []; - for (var c = [], e = b / 6378800, f = Math.PI / 180 * a.lat, g = Math.PI / 180 * a.lng, i = 0; 360 > i; i += 9) { - var k = Math.PI / 180 * i - , m = Math.asin(Math.sin(f) * Math.cos(e) + Math.cos(f) * Math.sin(e) * Math.cos(k)) - , k = new J(((g - Math.atan2(Math.sin(k) * Math.sin(e) * Math.cos(f), Math.cos(e) - Math.sin(f) * Math.sin(m)) + Math.PI) % (2 * Math.PI) - Math.PI) * (180 / Math.PI),m * (180 / Math.PI)); - c.push(k) - } - e = c[0]; - c.push(new J(e.lng,e.lat)); - return c - } - }); - var Ic = {}; - function Jc(a) { - this.map = a; - this.Mm = []; - this.$f = []; - this.Fg = []; - this.OV = 300; - this.oF = 0; - this.yg = {}; - this.Zi = {}; - this.ph = 0; - this.yE = q; - this.MK = {}; - this.eo = this.Kj(1); - this.od = this.Kj(2); - this.Bl = this.Kj(3); - this.Ki = this.Kj(4); - a.platform.appendChild(this.eo); - a.platform.appendChild(this.od); - a.platform.appendChild(this.Bl); - a.platform.appendChild(this.Ki); - var b = 256 * Math.pow(2, 15) - , c = 3 * b - , a = S.Eb(new J(180,0)).lng - , c = c - a - , b = -3 * b - , e = S.Eb(new J(-180,0)).lng; - this.yI = a; - this.zI = e; - this.ZA = c + (e - b); - this.AI = a - e - } - B.Ye(function(a) { - var b = new Jc(a); - b.na(); - a.Va = b - }); - z.extend(Jc.prototype, { - na: function() { - var a = this - , b = a.map; - b.addEventListener("loadcode", function() { - a.up() - }); - b.addEventListener("addtilelayer", function(b) { - a.Oe(b) - }); - b.addEventListener("removetilelayer", function(b) { - a.Yf(b) - }); - b.addEventListener("setmaptype", function(b) { - a.Dg(b) - }); - b.addEventListener("zoomstartcode", function(b) { - a.Mc(b) - }); - b.addEventListener("setcustomstyles", function(b) { - a.Zt(b.target); - a.Wf(q) - }); - b.addEventListener("initindoorlayer", function(b) { - a.tE(b) - }) - }, - up: function() { - var a = this; - if (z.ca.ia) - try { - document.execCommand("BackgroundImageCache", t, q) - } catch (b) {} - this.loaded || a.Ux(); - a.Wf(); - this.loaded || (this.loaded = q, - K.load("tile", function() { - a.rQ() - })) - }, - tE: function(a) { - this.zu = new Kc(this); - this.zu.Oe(new Lc(this.map,this.zu,a.vf)) - }, - Ux: function() { - for (var a = this.map.oa().ff, b = 0; b < a.length; b++) { - var c = new Mc; - z.extend(c, a[b]); - this.Mm.push(c); - c.na(this.map, this.eo) - } - this.Zt() - }, - Kj: function(a) { - var b = L("div"); - b.style.position = "absolute"; - b.style.overflow = "visible"; - b.style.left = b.style.top = "0"; - b.style.zIndex = a; - return b - }, - Af: function() { - this.ph--; - var a = this; - this.yE && (this.map.dispatchEvent(new P("onfirsttileloaded")), - this.yE = t); - 0 == this.ph && (this.Hi && (clearTimeout(this.Hi), - this.Hi = s), - this.Hi = setTimeout(function() { - if (a.ph == 0) { - a.map.dispatchEvent(new P("ontilesloaded")); - a.yE = q - } - a.Hi = s - }, 80)) - }, - fE: function(a, b) { - return "TILE-" + b.aa + "-" + a[0] + "-" + a[1] + "-" + a[2] - }, - Rx: function(a) { - var b = a.Gb; - b && zb(b) && b.parentNode.removeChild(b); - delete this.yg[a.name]; - a.loaded || (Nc(a), - a.Gb = s, - a.Pm = s) - }, - pj: function(a, b, c) { - var e = this.map - , f = e.oa() - , g = e.Oa - , i = e.fc - , k = f.dc(g) - , m = this.DL() - , n = m[0] - , o = m[1] - , p = m[2] - , v = m[3] - , x = m[4] - , c = "undefined" != typeof c ? c : 0 - , f = f.$c() - , m = e.aa.replace(/^TANGRAM_/, ""); - for (this.hc ? this.hc.length = 0 : this.hc = []; n < p; n++) - for (var y = o; y < v; y++) { - var A = n - , E = y; - this.hc.push([A, E]); - A = m + "_" + b + "_" + A + "_" + E + "_" + g; - this.MK[A] = A - } - this.hc.sort(function(a) { - return function(b, c) { - return 0.4 * Math.abs(b[0] - a[0]) + 0.6 * Math.abs(b[1] - a[1]) - (0.4 * Math.abs(c[0] - a[0]) + 0.6 * Math.abs(c[1] - a[1])) - } - }([x[0] - 1, x[1] - 1])); - i = [Math.round(-i.lng / k), Math.round(i.lat / k)]; - n = -e.offsetY + e.height / 2; - a.style.left = -e.offsetX + e.width / 2 + "px"; - a.style.top = n + "px"; - this.Cc ? this.Cc.length = 0 : this.Cc = []; - n = 0; - for (e = a.childNodes.length; n < e; n++) - y = a.childNodes[n], - y.Sj = t, - this.Cc.push(y); - if (n = this.qh) - for (var C in n) - delete n[C]; - else - this.qh = {}; - this.Dc ? this.Dc.length = 0 : this.Dc = []; - n = 0; - for (e = this.hc.length; n < e; n++) { - C = this.hc[n][0]; - k = this.hc[n][1]; - y = 0; - for (o = this.Cc.length; y < o; y++) - if (p = this.Cc[y], - p.id == m + "_" + b + "_" + C + "_" + k + "_" + g) { - p.Sj = q; - this.qh[p.id] = p; - break - } - } - n = 0; - for (e = this.Cc.length; n < e; n++) - p = this.Cc[n], - p.Sj || this.Dc.push(p); - this.nn = []; - y = (f + c) * this.map.K.devicePixelRatio; - n = 0; - for (e = this.hc.length; n < e; n++) - C = this.hc[n][0], - k = this.hc[n][1], - v = C * f + i[0] - c / 2, - x = (-1 - k) * f + i[1] - c / 2, - A = m + "_" + b + "_" + C + "_" + k + "_" + g, - o = this.qh[A], - p = s, - o ? (p = o.style, - p.left = v + "px", - p.top = x + "px", - o.yd || this.nn.push([C, k, o])) : (0 < this.Dc.length ? (o = this.Dc.shift(), - o.getContext("2d").clearRect(-c / 2, -c / 2, y, y), - p = o.style) : (o = document.createElement("canvas"), - p = o.style, - p.position = "absolute", - p.width = f + c + "px", - p.height = f + c + "px", - this.Zx() && (p.WebkitTransform = "scale(1.001)"), - o.setAttribute("width", y), - o.setAttribute("height", y), - a.appendChild(o)), - o.id = A, - p.left = v + "px", - p.top = x + "px", - -1 < A.indexOf("bg") && (v = "#F3F1EC", - this.map.K.Eo && (v = this.map.K.Eo), - p.background = v ? v : ""), - this.nn.push([C, k, o])), - o.style.visibility = ""; - n = 0; - for (e = this.Dc.length; n < e; n++) - this.Dc[n].style.visibility = "hidden"; - return this.nn - }, - Zx: function() { - return /M040/i.test(navigator.userAgent) - }, - DL: function() { - var a = this.map - , b = a.oa() - , c = b.mE(a.Oa) - , e = a.fc - , f = Math.ceil(e.lng / c) - , g = Math.ceil(e.lat / c) - , b = b.$c() - , c = [f, g, (e.lng - f * c) / c * b, (e.lat - g * c) / c * b]; - return [c[0] - Math.ceil((a.width / 2 - c[2]) / b), c[1] - Math.ceil((a.height / 2 - c[3]) / b), c[0] + Math.ceil((a.width / 2 + c[2]) / b), c[1] + Math.ceil((a.height / 2 + c[3]) / b), c] - }, - R_: function(a, b, c, e) { - var f = this; - f.u2 = b; - var g = this.map.oa() - , i = f.fE(a, c) - , k = g.$c() - , b = [a[0] * k + b[0], (-1 - a[1]) * k + b[1]] - , m = this.yg[i]; - if (this.map.oa() !== Ya && this.map.oa() !== Sa) { - var n = this.Lw(a[0], a[2]).offsetX; - b[0] += n; - b.Q1 = n - } - m && m.Gb ? (xb(m.Gb, b), - e && (e = new Q(a[0],a[1]), - g = this.map.K.ye ? this.map.K.ye.style : "normal", - e = c.getTilesUrl(e, a[2], g), - m.loaded = t, - Oc(m, e)), - m.loaded ? this.Af() : Pc(m, function() { - f.Af() - })) : (m = this.Zi[i]) && m.Gb ? (c.Jb.insertBefore(m.Gb, c.Jb.lastChild), - this.yg[i] = m, - xb(m.Gb, b), - e && (e = new Q(a[0],a[1]), - g = this.map.K.ye ? this.map.K.ye.style : "normal", - e = c.getTilesUrl(e, a[2], g), - m.loaded = t, - Oc(m, e)), - m.loaded ? this.Af() : Pc(m, function() { - f.Af() - })) : (m = k * Math.pow(2, g.sm() - a[2]), - new J(a[0] * m,a[1] * m), - e = new Q(a[0],a[1]), - g = this.map.K.ye ? this.map.K.ye.style : "normal", - e = c.getTilesUrl(e, a[2], g), - m = new Qc(this,e,b,a,c), - Pc(m, function() { - f.Af() - }), - m.co(), - this.yg[i] = m) - }, - Af: function() { - this.ph--; - var a = this; - 0 == this.ph && (this.Hi && (clearTimeout(this.Hi), - this.Hi = s), - this.Hi = setTimeout(function() { - if (a.ph == 0) { - a.map.dispatchEvent(new P("ontilesloaded")); - if (ua) { - if (ra && sa && ta) { - var b = bb() - , c = a.map.cb(); - setTimeout(function() { - Ra(5030, { - load_script_time: sa - ra, - load_tiles_time: b - ta, - map_width: c.width, - map_height: c.height, - map_size: c.width * c.height - }) - }, 1E4); - B.Fn("cus.fire", "time", { - z_imgfirstloaded: b - ta - }) - } - ua = t - } - } - a.Hi = s - }, 80)) - }, - fE: function(a, b) { - return this.map.oa() === Qa ? "TILE-" + b.aa + "-" + this.map.Rw + "-" + a[0] + "-" + a[1] + "-" + a[2] : "TILE-" + b.aa + "-" + a[0] + "-" + a[1] + "-" + a[2] - }, - Rx: function(a) { - var b = a.Gb; - b && (Rc(b), - zb(b) && b.parentNode.removeChild(b)); - delete this.yg[a.name]; - a.loaded || (Rc(b), - Nc(a), - a.Gb = s, - a.Pm = s) - }, - Lw: function(a, b) { - for (var c = 0, e = 6 * Math.pow(2, b - 3), f = e / 2 - 1, g = -e / 2; a > f; ) - a -= e, - c -= this.ZA; - for (; a < g; ) - a += e, - c += this.ZA; - c = Math.round(c / Math.pow(2, 18 - b)); - return { - offsetX: c, - hs: a - } - }, - QV: function(a) { - for (var b = a.lng; b > this.yI; ) - b -= this.AI; - for (; b < this.zI; ) - b += this.AI; - a.lng = b; - return a - }, - RV: function(a, b) { - for (var c = 256 * Math.pow(2, 18 - b), e = Math.floor(this.yI / c), f = Math.floor(this.zI / c), c = Math.floor(this.ZA / c), g = [], i = 0; i < a.length; i++) { - var k = a[i] - , m = k[0] - , k = k[1]; - if (m >= e) { - var m = m + c - , n = "id_" + m + "_" + k + "_" + b; - a[n] || (a[n] = q, - g.push([m, k])) - } else - m <= f && (m -= c, - n = "id_" + m + "_" + k + "_" + b, - a[n] || (a[n] = q, - g.push([m, k]))) - } - for (i = 0; i < g.length; i++) - a.push(g[i]); - return a - }, - Wf: function(a) { - var b = this; - if (b.map.oa() == Qa) - K.load("coordtrans", function() { - b.map.Ub || (b.map.Ub = Qa.wk(b.map.$g), - b.map.Rw = Qa.BL(b.map.Ub)); - b.CI() - }, q); - else { - if (a && a) - for (var c in this.Zi) - delete this.Zi[c]; - b.CI(a) - } - }, - CI: function(a) { - var b = this.Mm.concat(this.$f) - , c = b.length - , e = this.map - , f = e.oa() - , g = e.fc; - this.map.oa() !== Ya && this.map.oa() !== Sa && (g = this.QV(g)); - for (var i = 0; i < c; i++) { - var k = b[i]; - if (k.gc && e.Oa < k.gc) - break; - if (k.Jw) { - var m = this.Jb = k.Jb; - if (a) { - var n = m; - if (n && n.childNodes) - for (var o = n.childNodes.length, p = o - 1; 0 <= p; p--) - o = n.childNodes[p], - n.removeChild(o), - o = s - } - if (this.map.Sb()) { - this.od.style.display = "block"; - m.style.display = "none"; - this.map.dispatchEvent(new P("vectorchanged"), { - isvector: q - }); - continue - } else - m.style.display = "block", - this.od.style.display = "none", - this.map.dispatchEvent(new P("vectorchanged"), { - isvector: t - }) - } - if (!k.pI && !(k.pp && !this.map.Sb() || k.GM && this.map.Sb())) { - e = this.map; - f = e.oa(); - m = f.wm(); - o = e.Oa; - g = e.fc; - f == Qa && g.pb(new J(0,0)) && (g = e.fc = m.vj(e.re, e.Ub)); - var v = f.dc(o) - , m = f.mE(o) - , n = Math.ceil(g.lng / m) - , x = Math.ceil(g.lat / m) - , y = f.$c() - , m = [n, x, (g.lng - n * m) / m * y, (g.lat - x * m) / m * y] - , p = m[0] - Math.ceil((e.width / 2 - m[2]) / y) - , n = m[1] - Math.ceil((e.height / 2 - m[3]) / y) - , x = m[0] + Math.ceil((e.width / 2 + m[2]) / y) - , A = 0; - f === Qa && 15 == e.fa() && (A = 1); - f = m[1] + Math.ceil((e.height / 2 + m[3]) / y) + A; - this.gK = new J(g.lng,g.lat); - var E = this.yg, y = -this.gK.lng / v, A = this.gK.lat / v, v = [Math.ceil(y), Math.ceil(A)], g = e.fa(), C; - for (C in E) { - var F = E[C] - , D = F.info; - (D[2] != g || D[2] == g && (p > D[0] || x <= D[0] || n > D[1] || f <= D[1])) && this.Rx(F) - } - E = -e.offsetX + e.width / 2; - F = -e.offsetY + e.height / 2; - k.Jb && (k.Jb.style.left = Math.ceil(y + E) - v[0] + "px", - k.Jb.style.top = Math.ceil(A + F) - v[1] + "px", - k.Jb.style.WebkitTransform = "translate3d(0,0,0)"); - y = []; - for (e.WB = []; p < x; p++) - for (A = n; A < f; A++) - y.push([p, A]), - e.WB.push({ - x: p, - y: A - }); - this.map.oa() !== Ya && this.map.oa() !== Sa && (y = this.RV(y, o)); - y.sort(function(a) { - return function(b, c) { - return 0.4 * Math.abs(b[0] - a[0]) + 0.6 * Math.abs(b[1] - a[1]) - (0.4 * Math.abs(c[0] - a[0]) + 0.6 * Math.abs(c[1] - a[1])) - } - }([m[0] - 1, m[1] - 1])); - o = y.length; - this.ph += o; - for (p = 0; p < o; p++) - this.R_([y[p][0], y[p][1], g], v, k, a) - } - } - }, - Oe: function(a) { - var b = this - , c = a.target - , a = b.map.Sb(); - if (c instanceof db) - a && !c.Im && (c.na(this.map, this.od), - c.Im = q); - else if (c.ag && this.map.Oe(c.ag), - c.pp) { - for (a = 0; a < b.Fg.length; a++) - if (b.Fg[a] == c) - return; - K.load("vector", function() { - c.na(b.map, b.od); - b.Fg.push(c) - }, q) - } else { - for (a = 0; a < b.$f.length; a++) - if (b.$f[a] == c) - return; - c.na(this.map, this.Bl); - b.$f.push(c) - } - }, - Yf: function(a) { - var a = a.target - , b = this.map.Sb(); - if (a instanceof db) - b && a.Im && (a.remove(), - a.Im = t); - else { - a.ag && this.map.Yf(a.ag); - if (a.pp) - for (var b = 0, c = this.Fg.length; b < c; b++) - a == this.Fg[b] && this.Fg.splice(b, 1); - else { - b = 0; - for (c = this.$f.length; b < c; b++) - a == this.$f[b] && this.$f.splice(b, 1) - } - a.remove() - } - }, - Dg: function() { - for (var a = this.Mm, b = 0, c = a.length; b < c; b++) - a[b].remove(); - delete this.Jb; - this.Mm = []; - this.Zi = this.yg = {}; - this.Ux(); - this.Wf() - }, - Mc: function() { - var a = this; - a.vd && z.D.U(a.vd); - setTimeout(function() { - a.Wf(); - a.map.dispatchEvent(new P("onzoomend")) - }, 10) - }, - L5: u(), - Zt: function(a) { - var b = this.map.oa(); - if (!this.map.Sb() && (a ? this.map.K.$_ = a : a = this.map.K.$_, - a)) - for (var c = s, c = "2" == B.xu ? [B.url.proto + B.url.domain.main_domain_cdn.other[0] + "/"] : [B.url.proto + B.url.domain.main_domain_cdn.baidu[0] + "/", B.url.proto + B.url.domain.main_domain_cdn.baidu[1] + "/", B.url.proto + B.url.domain.main_domain_cdn.baidu[2] + "/"], e = 0, f; f = this.Mm[e]; e++) - if (f.M_ == q) { - b.j.Yb = 18; - f.getTilesUrl = function(b, e) { - var f = b.x - , f = this.map.Va.Lw(f, e).hs - , m = b.y - , n = Sb("normal") - , o = 1; - this.map.Sx() && (o = 2); - n = "customimage/tile?&x=" + f + "&y=" + m + "&z=" + e + "&udt=" + n + "&scale=" + o + "&ak=" + qa; - n = a.styleStr ? n + ("&styles=" + encodeURIComponent(a.styleStr)) : n + ("&customid=" + a.style); - return c[Math.abs(f + m) % c.length] + n - } - ; - break - } - } - }); - function Qc(a, b, c, e, f) { - this.Pm = a; - this.position = c; - this.$u = []; - this.name = a.fE(e, f); - this.info = e; - this.GJ = f.zt(); - e = L("img"); - yb(e); - e.uL = t; - var g = e.style - , a = a.map.oa(); - g.position = "absolute"; - g.border = "none"; - g.width = a.$c() + "px"; - g.height = a.$c() + "px"; - g.left = c[0] + "px"; - g.top = c[1] + "px"; - g.maxWidth = "none"; - this.Gb = e; - this.src = b; - Sc && (this.Gb.style.opacity = 0); - var i = this; - this.Gb.onload = function() { - B.iZ.eR(); - i.loaded = q; - if (i.Pm) { - var a = i.Pm - , b = a.Zi; - if (!b[i.name]) { - a.oF++; - b[i.name] = i - } - if (i.Gb && !zb(i.Gb) && f.Jb) { - f.Jb.appendChild(i.Gb); - if (z.ca.ia <= 6 && z.ca.ia > 0 && i.GJ) - i.Gb.style.cssText = i.Gb.style.cssText + (';filter: progid:DXImageTransform.Microsoft.AlphaImageLoader(src="' + i.src + '",sizingMethod=scale);') - } - var c = a.oF - a.OV, e; - for (e in b) { - if (c <= 0) - break; - if (!a.yg[e]) { - b[e].Pm = s; - var g = b[e].Gb; - if (g && g.parentNode) { - g.parentNode.removeChild(g); - Rc(g) - } - g = s; - b[e].Gb = s; - delete b[e]; - a.oF--; - c-- - } - } - Sc && new tb({ - Ic: 20, - duration: 200, - va: function(a) { - if (i.Gb && i.Gb.style) - i.Gb.style.opacity = a * 1 - }, - finish: function() { - i.Gb && i.Gb.style && delete i.Gb.style.opacity - } - }); - Nc(i) - } - } - ; - this.Gb.onerror = function() { - Nc(i); - if (i.Pm) { - var a = i.Pm.map.oa(); - if (a.j.vD) { - i.error = q; - i.Gb.src = a.j.vD; - i.Gb && !zb(i.Gb) && f.Jb.appendChild(i.Gb) - } - } - } - ; - e = s - } - function Pc(a, b) { - a.$u.push(b) - } - Qc.prototype.co = function() { - this.Gb.src = 0 < z.ca.ia && 6 >= z.ca.ia && this.GJ ? G.qa + "blank.gif" : "" !== this.src && this.Gb.src == this.src ? this.src + "&t = " + Date.now() : this.src - } - ; - function Nc(a) { - for (var b = 0; b < a.$u.length; b++) - a.$u[b](); - a.$u.length = 0 - } - function Rc(a) { - if (a) { - a.onload = a.onerror = s; - var b = a.attributes, c, e, f; - if (b) { - e = b.length; - for (c = 0; c < e; c += 1) - f = b[c].name, - Xa(a[f]) && (a[f] = s) - } - if (b = a.children) { - e = b.length; - for (c = 0; c < e; c += 1) - Rc(a.children[c]) - } - } - } - function Oc(a, b) { - a.src = b; - a.co() - } - var Sc = !z.ca.ia || 8 < z.ca.ia; - function Mc(a) { - this.vf = a || {}; - this.mW = this.vf.copyright || s; - this.B0 = this.vf.transparentPng || t; - this.Jw = this.vf.baseLayer || t; - this.zIndex = this.vf.zIndex || 0; - this.aa = Mc.SS++ - } - Mc.SS = 0; - z.lang.ta(Mc, z.lang.Ca, "TileLayer"); - z.extend(Mc.prototype, { - na: function(a, b) { - this.Jw && (this.zIndex = -100); - this.map = a; - if (!this.Jb) { - var c = L("div") - , e = c.style; - e.position = "absolute"; - e.overflow = "visible"; - e.zIndex = this.zIndex; - e.left = Math.ceil(-a.offsetX + a.width / 2) + "px"; - e.top = Math.ceil(-a.offsetY + a.height / 2) + "px"; - b.appendChild(c); - this.Jb = c - } - }, - remove: function() { - this.Jb && this.Jb.parentNode && (this.Jb.innerHTML = "", - this.Jb.parentNode.removeChild(this.Jb)); - delete this.Jb - }, - zt: w("B0"), - getTilesUrl: function(a, b) { - if (this.map.oa() !== Ya && this.map.oa() !== Sa) - var c = this.map.Va.Lw(a.x, b).hs; - var e = ""; - this.vf.tileUrlTemplate && (e = this.vf.tileUrlTemplate.replace(/\{X\}/, c), - e = e.replace(/\{Y\}/, a.y), - e = e.replace(/\{Z\}/, b)); - return e - }, - pm: w("mW"), - oa: function() { - return this.Hb || La - } - }); - function Tc(a, b) { - Ib(a) ? b = a || {} : (b = b || {}, - b.databoxId = a); - this.j = { - OK: b.databoxId, - eh: b.geotableId, - Wm: b.q || "", - pu: b.tags || "", - filter: b.filter || "", - Vy: b.sortby || "", - Y_: b.styleId || "", - Vl: b.ak || qa, - Gw: b.age || 36E5, - zIndex: 11, - fZ: "VectorCloudLayer", - Fk: b.hotspotName || "vector_md_" + (1E5 * Math.random()).toFixed(0), - uV: "LBS\u4e91\u9ebb\u70b9\u5c42" - }; - this.pp = q; - Mc.call(this, this.j); - this.GW = B.Wc + "geosearch/detail/"; - this.HW = B.Wc + "geosearch/v2/detail/"; - this.lp = {} - } - z.ta(Tc, Mc, "VectorCloudLayer"); - function Uc(a) { - a = a || {}; - this.j = z.extend(a, { - zIndex: 1, - fZ: "VectorTrafficLayer", - uV: "\u77e2\u91cf\u8def\u51b5\u5c42" - }); - this.pp = q; - Mc.call(this, this.j); - this.x0 = B.url.proto + B.url.domain.vector_traffic + "/gvd/?qt=lgvd&styles=pl&layers=tf"; - this.Db = { - "0": [2, 1354709503, 2, 2, 0, [], 0, 0], - 1: [2, 1354709503, 3, 2, 0, [], 0, 0], - 10: [2, -231722753, 2, 2, 0, [], 0, 0], - 11: [2, -231722753, 3, 2, 0, [], 0, 0], - 12: [2, -231722753, 4, 2, 0, [], 0, 0], - 13: [2, -231722753, 5, 2, 0, [], 0, 0], - 14: [2, -231722753, 6, 2, 0, [], 0, 0], - 15: [2, -1, 4, 0, 0, [], 0, 0], - 16: [2, -1, 5.5, 0, 0, [], 0, 0], - 17: [2, -1, 7, 0, 0, [], 0, 0], - 18: [2, -1, 8.5, 0, 0, [], 0, 0], - 19: [2, -1, 10, 0, 0, [], 0, 0], - 2: [2, 1354709503, 4, 2, 0, [], 0, 0], - 3: [2, 1354709503, 5, 2, 0, [], 0, 0], - 4: [2, 1354709503, 6, 2, 0, [], 0, 0], - 5: [2, -6350337, 2, 2, 0, [], 0, 0], - 6: [2, -6350337, 3, 2, 0, [], 0, 0], - 7: [2, -6350337, 4, 2, 0, [], 0, 0], - 8: [2, -6350337, 5, 2, 0, [], 0, 0], - 9: [2, -6350337, 6, 2, 0, [], 0, 0] - } - } - z.ta(Uc, Mc, "VectorTrafficLayer"); - function db(a) { - this.PV = [B.url.proto + B.url.domain.TILE_ONLINE_URLS[1] + "/gvd/?", B.url.proto + B.url.domain.TILE_ONLINE_URLS[2] + "/gvd/?", B.url.proto + B.url.domain.TILE_ONLINE_URLS[3] + "/gvd/?", B.url.proto + B.url.domain.TILE_ONLINE_URLS[4] + "/gvd/?"]; - this.j = { - pL: t - }; - for (var b in a) - this.j[b] = a[b]; - this.Th = this.Fh = this.Ya = this.C = this.B = s; - this.LM = 0; - var c = this; - K.load("vector", function() { - c.De() - }) - } - z.extend(db.prototype, { - na: function(a, b) { - this.B = a; - this.C = b - }, - remove: function() { - this.C = this.B = s - } - }); - function Vc(a) { - Mc.call(this, a); - this.j = a || {}; - this.GM = q; - this.ag = new Uc; - this.ag.$y = this; - if (this.j.predictDate) { - if (1 > this.j.predictDate.weekday || 7 < this.j.predictDate.weekday) - this.j.predictDate = 1; - if (0 > this.j.predictDate.hour || 23 < this.j.predictDate.hour) - this.j.predictDate.hour = 0 - } - this.VU = B.url.proto + B.url.domain.traffic + "/traffic/" - } - Vc.prototype = new Mc; - Vc.prototype.na = function(a, b) { - Mc.prototype.na.call(this, a, b); - this.B = a - } - ; - Vc.prototype.zt = ca(q); - Vc.prototype.getTilesUrl = function(a, b) { - var c = ""; - this.j.predictDate ? c = "HistoryService?day=" + (this.j.predictDate.weekday - 1) + "&hour=" + this.j.predictDate.hour + "&t=" + (new Date).getTime() + "&" : (c = "TrafficTileService?time=" + (new Date).getTime() + "&", - c += "label=web2D&v=016&"); - var c = this.VU + c + "level=" + b + "&x=" + a.x + "&y=" + a.y - , e = 1; - this.B.Sx() && (e = 2); - return (c + "&scaler=" + e).replace(/-(\d+)/gi, "M$1") - } - ; - var Wc = [B.url.proto + B.url.domain.TILES_YUN_HOST[0] + "/georender/gss", B.url.proto + B.url.domain.TILES_YUN_HOST[1] + "/georender/gss", B.url.proto + B.url.domain.TILES_YUN_HOST[2] + "/georender/gss", B.url.proto + B.url.domain.TILES_YUN_HOST[3] + "/georender/gss"] - , Xc = B.url.proto + B.url.domain.main_domain_nocdn.baidu + "/style/poi/rangestyle" - , Yc = 100; - function nb(a, b) { - Mc.call(this); - var c = this; - this.GM = q; - var e = t; - try { - document.createElement("canvas").getContext("2d"), - e = q - } catch (f) { - e = t - } - e && (this.ag = new Tc(a,b), - this.ag.$y = this); - Ib(a) ? b = a || {} : (c.Rn = a, - b = b || {}); - b.geotableId && (c.Cf = b.geotableId); - b.databoxId && (c.Rn = b.databoxId); - e = B.Wc + "geosearch"; - c.ub = { - ON: b.pointDensity || Yc, - BY: e + "/detail/", - CY: e + "/v2/detail/", - Gw: b.age || 36E5, - Wm: b.q || "", - i0: "png", - X3: [5, 5, 5, 5], - eZ: { - backgroundColor: "#FFFFD5", - borderColor: "#808080" - }, - Vl: b.ak || qa, - pu: b.tags || "", - filter: b.filter || "", - Vy: b.sortby || "", - Fk: b.hotspotName || "tile_md_" + (1E5 * Math.random()).toFixed(0), - dG: q - }; - K.load("clayer", function() { - c.Sd() - }) - } - nb.prototype = new Mc; - nb.prototype.na = function(a, b) { - Mc.prototype.na.call(this, a, b); - this.B = a - } - ; - nb.prototype.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y - , f = this.ub - , c = Wc[Math.abs(c + e) % Wc.length] + "/image?grids=" + c + "_" + e + "_" + b + "&q=" + f.Wm + "&tags=" + f.pu + "&filter=" + f.filter + "&sortby=" + f.Vy + "&ak=" + this.ub.Vl + "&age=" + f.Gw + "&page_size=" + f.ON + "&format=" + f.i0; - f.dG || (f = (1E5 * Math.random()).toFixed(0), - c += "&timeStamp=" + f); - this.Cf ? c += "&geotable_id=" + this.Cf : this.Rn && (c += "&databox_id=" + this.Rn); - return c - } - ; - nb.prototype.enableUseCache = function() { - this.ub.dG = q - } - ; - nb.prototype.disableUseCache = function() { - this.ub.dG = t - } - ; - nb.tU = /^point\(|\)$/ig; - nb.uU = /\s+/; - nb.wU = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g; - var Zc = {}; - function $c(a, b) { - this.kd = a; - this.uQ = 18; - this.j = { - le: 256, - cd: new S - }; - z.extend(this.j, b || {}) - } - var ad = [0, 0, 0, 8, 7, 7, 6, 6, 5, 5, 4, 3, 3, 3, 2, 2, 1, 1, 0, 0, 0, 0] - , bd = [512, 2048, 4096, 32768, 65536, 262144, 1048576, 4194304, 8388608] - , cd = [0, 0, 0, 3, 5, 5, 7, 7, 9, 9, 10, 12, 12, 12, 15, 15, 17, 17, 19, 19, 19, 19] - , dd = [0, 0, 0, 256, 256, 512, 256, 512, 256, 512, 256, 256, 512, 1024, 256, 512, 512, 1024, 512, 1024, 2048, 4096]; - $c.prototype = { - getName: w("kd"), - $c: function(a) { - return "na" === this.kd ? dd[a] : this.j.le - }, - FL: function(a) { - return "na" === this.kd ? cd[a] : a - }, - wm: function() { - return this.j.cd - }, - dc: function(a) { - return Math.pow(2, this.uQ - a) - }, - RX: function(a) { - return "na" === this.kd ? bd[ad[a]] : this.dc(a) * this.$c(a) - } - }; - P = z.lang.Ju; - function Lc(a, b, c) { - this.B = a; - this.cV = b; - this.Cd = b.qc; - this.ub = { - h0: "na", - zIndex: 0, - OO: c.tileUrls, - AO: q - }; - this.UB = ""; - this.qT = {}; - var c = c.urlOpts || {}, e; - for (e in c) - c.hasOwnProperty(e) && (this.UB = this.UB + "&" + e + "=" + c[e]); - this.GC = []; - this.JE = 0; - this.zM = t; - a = this.ub.h0; - Zc[a] ? a = Zc[a] : (b = new $c(a,l), - a = Zc[a] = b); - this.Wr = a - } - window.VectorIndoorTileLayer = "VectorIndoorTileLayer"; - da = Lc.prototype; - da.na = function() { - var a = this.B - , b = a.Va; - if (!this.Vh) { - var c = b.Kj(this.ub.zIndex); - c.style.WebkitTransform = "translate3d(0px, 0px, 0)"; - this.Vh = c - } - b.Ki.appendChild(this.Vh); - b.b4 = c; - if (this.ub.AO) { - ed(this); - var e = this; - a.addEventListener("checkvectorclick", function(a) { - var b; - a: { - b = a.offsetX; - var c = a.offsetY - , k = e.GC.N4; - if (k) - for (var m = 0; m < k.length; m++) - for (var n = k[m], o = 0; o < n.length; o++) - if (a = n[o], - !a.f4 && a.EY && b > a.WE && b < a.TE && c > a.XE && c < a.UE) { - b = a.EY; - b = { - type: 9, - name: a.name, - uid: a.uid, - point: { - x: b.H2 + b.width / 2, - y: b.I2 + 6 - } - }; - break a - } - b = s - } - b && (a = new P("onvectorclick"), - a.Y3 = b, - a.of = "base", - this.dispatchEvent(a)) - }) - } - } - ; - function ed(a) { - var b = a.B - , c = b.Va - , e = a.Cd - , f = b.cb() - , g = f.width - , f = f.height - , i = L("canvas"); - i.style.cssText = "position: absolute;left:0;top:0;width:" + g + "px;height:" + f + "px;z-index:2;"; - i.width = g * e; - i.height = f * e; - a.by = i; - a.At = i.getContext("2d"); - a.At.scale(e, e); - a.At.textBaseline = "top"; - c.Ki.appendChild(i); - b.ZS = i - } - da.update = function(a, b) { - b = b || {}; - if (this.ub.AO && (b.Tw && this.Tw(), - b.S_)) { - var c = this.Cd - , e = this.B.cb() - , f = e.width - , e = e.height - , g = this.by - , i = g.style; - i.width = f + "px"; - i.height = e + "px"; - g.width = f * c; - g.height = e * c; - this.At.scale(c, c); - this.At.textBaseline = "top" - } - if (b.M5) { - c = this.Vh; - f = 0; - for (e = c.childNodes.length; f < e; f++) - c.childNodes[f].yd = t - } - this.NK = a; - this.up(a) - } - ; - da.up = function(a) { - this.GC = []; - var b = this.B - , c = b.fa() - , e = b.cd.vj(b.re) - , f = this.Wr.dc(c) - , e = [Math.round(-e.lng / f), Math.round(e.lat / f)] - , f = this.Wr.$c(c) - , g = b.aa.replace(/^TANGRAM_/, "") - , i = this.Wr.FL(c) - , b = this.B - , k = -b.offsetY + b.height / 2 - , m = this.Vh; - m.style.left = -b.offsetX + b.width / 2 + "px"; - m.style.top = k + "px"; - this.Cc ? this.Cc.length = 0 : this.Cc = []; - b = 0; - for (k = m.childNodes.length; b < k; b++) { - var n = m.childNodes[b]; - n.Sj = t; - this.Cc.push(n) - } - if (b = this.qh) - for (var o in b) - delete b[o]; - else - this.qh = {}; - this.Dc ? this.Dc.length = 0 : this.Dc = []; - b = 0; - for (k = a.length; b < k; b++) { - var n = a[b][0] - , p = a[b][1]; - o = 0; - for (var v = this.Cc.length; o < v; o++) { - var x = this.Cc[o]; - if (x.id === g + "_" + n + "_" + p + "_" + i + "_" + c) { - x.Sj = q; - this.qh[x.id] = x; - break - } - } - } - b = 0; - for (k = this.Cc.length; b < k; b++) - x = this.Cc[b], - x.Sj || (x.Lc = s, - delete x.Lc, - x.yd = t, - this.Dc.push(x)); - o = []; - v = f * this.Cd; - b = 0; - for (k = a.length; b < k; b++) { - var n = a[b][0] - , p = a[b][1] - , x = n * f + e[0] - , y = (-1 - p) * f + e[1] - , A = g + "_" + n + "_" + p + "_" + i + "_" + c - , E = this.qh[A] - , C = s; - if (E) - C = E.style, - C.left = x + "px", - C.top = y + "px", - C.width = f + "px", - C.height = f + "px", - E.yd ? E.MO && E.MO && this.GC.push(E.MO) : (E.NR = q, - E.Lc = s, - delete E.Lc, - o.push([n, p, E])); - else { - if (0 < this.Dc.length) { - var E = this.Dc.shift() - , F = E.getContext("2d"); - E.getAttribute("width") !== v && (E._scale = t); - E.setAttribute("width", v); - E.setAttribute("height", v); - C = E.style; - C.width = f + "px"; - C.height = f + "px"; - F.clearRect(0, 0, v, v) - } else - E = document.createElement("canvas"), - C = E.style, - C.position = "absolute", - this.ub.backgroundColor && (C.background = this.ub.backgroundColor), - C.width = f + "px", - C.height = f + "px", - E.setAttribute("width", v), - E.setAttribute("height", v), - m.appendChild(E); - E.id = A; - C.left = x + "px"; - C.top = y + "px"; - o.push([n, p, E]) - } - E.style.visibility = "" - } - b = 0; - for (k = this.Dc.length; b < k; b++) - this.Dc[b].style.visibility = "hidden"; - if (0 === o.length) - fd(this); - else { - this.JE = o.length; - this.zM = t; - c = this.Wr.FL(this.B.fa()); - for (e = 0; e < a.length; e++) - a[e][3] = c; - for (e = 0; e < o.length; e++) - a = o[e][2], - f = o[e][0], - g = o[e][1], - o[e][3] = c, - a.yd = t, - a.NR = t, - gd(this, f, g, c, a) - } - } - ; - function gd(a, b, c, e, f) { - var g = b + "_" + c + "_" + e - , i = a.qT; - if (i[g]) { - if ("loading" === i[g].status) - return - } else - i[g] = { - status: "init", - bO: 0 - }; - var k = a - , m = k.B - , n = [] - , n = "0" === B.xu ? k.ub.OO.http : k.ub.OO.https - , o = Math.abs(b + c) % n.length - , p = "x=" + b + "&y=" + c + "&z=" + e - , v = hd(a.cV) - , x = v.O0 - , v = v.C0 - , y = "_" + (0 > b ? "_" : "") + (0 > c ? "$" : "") + parseInt(Math.abs(b) + "" + Math.abs(c) + "" + e, 10).toString(36) - , p = p + a.UB + "v=" + x + "&udt=" + v + "&fn=window." + y - , x = n[o] + "&" + p - , x = n[o] + "¶m=" + window.encodeURIComponent(Kb(p)); - window[y] = function(a) { - clearTimeout(i[g].Od); - i[g] = s; - if (a) { - m.fa(); - var n; - a: { - for (n = 0; n < k.NK.length; n++) { - var o = k.NK[n]; - if (o[0] === b && o[1] === c && o[3] === e) { - n = q; - break a - } - } - n = t - } - n !== t && (n = new P("updateindoor"), - n.IndoorCanvas = [], - n.IndoorCanvas.push({ - canvasDom: f, - data: a, - canvasID: f.id, - ratio: k.Cd - }), - m.dispatchEvent(n), - k.JE--, - (0 === k.JE || k.zM === q) && fd(k), - delete window[y]) - } - } - ; - oa(x); - i[g].status = "loading"; - k = a; - i[g].Od = setTimeout(function() { - 3 > i[g].bO ? (i[g].bO++, - i[g].status = "init", - gd(k, b, c, e, f)) : i[g] = s - }, 4E3) - } - function fd(a) { - if (a.by) { - var b = a.B; - a.by.style.left = -b.offsetX + "px"; - a.by.style.top = -b.offsetY + "px"; - a = new P("updateindoorlabel"); - a.labelCanvasDom = b.ZS; - b.dispatchEvent(a) - } - } - da.Tw = function() { - var a = this.B.cb() - , b = this.Cd; - this.At.clearRect(0, 0, a.width * b, a.height * b) - } - ; - da.remove = function() { - var a = this.B.Va; - this.Vh && a.Ki.removeChild(this.Vh) - } - ; - function Kc(a) { - this.B = a.map; - this.ff = []; - this.Xr = {}; - this.qc = this.B.K.devicePixelRatio; - this.na() - } - window.VectorIndoorTileMgr = "VectorIndoorTileMgr"; - da = Kc.prototype; - da.na = function() { - var a = this - , b = this.B; - b.addEventListener("addtilelayer", function(b) { - a.Oe(b.target) - }); - b.addEventListener("removetilelayer", function(b) { - a.Yf(b.target) - }); - setTimeout(function() { - b.addEventListener("onmoveend", function(b) { - "centerAndZoom" !== b.mv && a.update() - }); - b.addEventListener("onzoomend", function(b) { - "centerAndZoom" !== b.mv && a.update({ - Tw: q - }) - }); - b.addEventListener("centerandzoom", function() { - a.update({ - Tw: q - }) - }) - }, 1); - b.addEventListener("indoor_data_refresh", u()); - b.addEventListener("onresize", function() { - a.update({ - S_: q - }) - }); - a.update() - } - ; - da.Oe = function(a) { - if (a instanceof Lc) { - for (var b = 0; b < this.ff.length; b++) - if (this.ff[b] === a) - return; - this.ff.push(a); - a.na(); - this.B.loaded && this.update() - } - } - ; - da.Yf = function(a) { - if (a instanceof Lc) { - for (var b = 0; b < this.ff.length; b++) - if (this.ff[b] === a) { - this.ff.splice(b, 1); - break - } - a.remove() - } - } - ; - da.pj = function(a) { - var b = a.getName(); - if (this.Xr[b]) - return this.Xr[b]; - var c = this.B - , e = c.fa() - , f = c.fc - , g = a.RX(e); - c.aa.replace(/^TANGRAM_/, ""); - var i = Math.ceil(f.lng / g) - , k = Math.ceil(f.lat / g) - , a = a.$c(e) - , m = [i, k, (f.lng / g - i) * a, (f.lat / g - k) * a] - , e = m[0] - Math.ceil((c.width / 2 - m[2]) / a) - , f = m[1] - Math.ceil((c.height / 2 - m[3]) / a) - , g = m[0] + Math.ceil((c.width / 2 + m[2]) / a) - , c = m[1] + Math.ceil((c.height / 2 + m[3]) / a); - this.hc ? this.hc.length = 0 : this.hc = []; - for (a = e; a < g; a++) - for (e = f; e < c; e++) - this.hc.push([a, e]); - this.hc.sort(function(a) { - return function(b, c) { - return 0.4 * Math.abs(b[0] - a[0]) + 0.6 * Math.abs(b[1] - a[1]) - (0.4 * Math.abs(c[0] - a[0]) + 0.6 * Math.abs(c[1] - a[1])) - } - }([i, k])); - this.Xr[b] = this.hc.slice(0); - return this.Xr[b] - } - ; - function hd(a) { - if (a.gG) - return a.gG; - var b = "undefined" !== typeof TVC ? TVC.K2.z4 : {}; - a.gG = { - O0: b.version ? b.version : "001", - C0: b.wn ? b.wn : "20171110" - }; - return a.gG - } - da.update = function(a) { - this.Xr = {}; - for (var b = 0; b < this.ff.length; b++) { - var c = this.ff[b] - , e = this.pj(c.Wr); - c.update(e, a) - } - } - ; - function id(a, b, c) { - this.kd = a; - this.ff = b instanceof Mc ? [b] : b.slice(0); - c = c || {}; - this.j = { - k0: c.tips || "", - LE: "", - gc: c.minZoom || 3, - Yb: c.maxZoom || 18, - W3: c.minZoom || 3, - V3: c.maxZoom || 18, - le: 256, - UF: c.textColor || "black", - vD: c.errorImageUrl || "", - bb: new fb(new J(-21364736,-16023552),new J(23855104,19431424)), - cd: c.projection || new S - }; - 1 <= this.ff.length && (this.ff[0].Jw = q); - z.extend(this.j, c) - } - z.extend(id.prototype, { - getName: w("kd"), - gt: function() { - return this.j.k0 - }, - B3: function() { - return this.j.LE - }, - oY: function() { - return this.ff[0] - }, - P3: w("ff"), - $c: function() { - return this.j.le - }, - bp: function() { - return this.j.gc - }, - sm: function() { - return this.j.Yb - }, - setMaxZoom: function(a) { - this.j.Yb = a - }, - zm: function() { - return this.j.UF - }, - wm: function() { - return this.j.cd - }, - u3: function() { - return this.j.vD - }, - $c: function() { - return this.j.le - }, - dc: function(a) { - return Math.pow(2, 18 - a) - }, - mE: function(a) { - return this.dc(a) * this.$c() - } - }); - var jd = [B.url.proto + B.url.domain.TILE_BASE_URLS[0] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[1] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[2] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[3] + "/it/", B.url.proto + B.url.domain.TILE_BASE_URLS[4] + "/it/"] - , kd = [B.url.proto + B.url.domain.TILE_ONLINE_URLS[0] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[1] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[2] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[3] + "/tile/", B.url.proto + B.url.domain.TILE_ONLINE_URLS[4] + "/tile/"] - , ld = { - dark: "dl", - light: "ll", - normal: "pl" - } - , md = new Mc; - md.M_ = q; - md.getTilesUrl = function(a, b, c) { - var e = a.x - , a = a.y - , f = Sb("normal") - , g = 1 - , c = ld[c]; - //this.map.Sx() && (g = 2); //修改 - //e = this.map.Va.Lw(e, b).hs; - //return (kd[Math.abs(e + a) % kd.length] + "?qt=tile&x=" + (e + "").replace(/-/gi, "M") + "&y=" + (a + "").replace(/-/gi, "M") + "&z=" + b + "&styles=" + c + "&scaler=" + g + (6 == z.ca.ia ? "&color_dep=32&colors=50" : "") + "&udt=" + f).replace(/-(\d+)/gi, "M$1") - - var tdir = bmapcfg.tiles_dir.length>0?bmapcfg.tiles_dir:bmapcfg.home + "tiles"; - return tdir + "/" + b + "/" + e + "/" + a + bmapcfg.imgext; // 使用本地的瓦片 - } - ; - var La = new id("\u5730\u56fe",md,{ - tips: "\u663e\u793a\u666e\u901a\u5730\u56fe", - maxZoom: 19 - }) - , nd = new Mc; - nd.NO = [B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[0] + "/resource/mappic/", B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[1] + "/resource/mappic/", B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[2] + "/resource/mappic/", B.url.proto + B.url.domain.TIlE_PERSPECT_URLS[3] + "/resource/mappic/"]; - nd.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y - , f = 256 * Math.pow(2, 20 - b) - , e = Math.round((9998336 - f * e) / f) - 1; - /*var tdir = bmapcfg.tiles_hybrid.length > 0 ? bmapcfg.tiles_hybrid : bmapcfg.home + "tiles_hybrid";//修改 使用本地卫星的瓦片 - tdir = tdir + "/" + b + "/" + c + "/" + e + bmapcfg.imgext; //修改 使用本地卫星的瓦片 - return tdir;*/ - return url = this.NO[Math.abs(c + e) % this.NO.length] + this.map.Ub + "/" + this.map.Rw + "/3/lv" + (21 - b) + "/" + c + "," + e + ".jpg" - } - ; - var Qa = new id("\u4e09\u7ef4",nd,{ - tips: "\u663e\u793a\u4e09\u7ef4\u5730\u56fe", - minZoom: 15, - maxZoom: 20, - textColor: "white", - projection: new hb - }); - Qa.dc = function(a) { - return Math.pow(2, 20 - a) - } - ; - Qa.wk = function(a) { - if (!a) - return ""; - var b = G.pC, c; - for (c in b) - if (-1 < a.search(c)) - return b[c].yy; - return "" - } - ; - Qa.BL = function(a) { - return { - bj: 2, - gz: 1, - sz: 14, - sh: 4 - }[a] - } - ; - var od = new Mc({ - Jw: q - }); - od.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y; - return (jd[Math.abs(c + e) % jd.length] + "u=x=" + c + ";y=" + e + ";z=" + b + ";v=009;type=sate&fm=46&udt=" + Sb("satellite")).replace(/-(\d+)/gi, "M$1") - } - ; - var Ya = new id("\u536b\u661f",od,{ - tips: "\u663e\u793a\u536b\u661f\u5f71\u50cf", - minZoom: 1, - maxZoom: 19, - textColor: "white" - }) - , pd = new Mc({ - transparentPng: q - }); - pd.getTilesUrl = function(a, b) { - var c = a.x - , e = a.y - , f = Sb("satelliteStreet"); - return (kd[Math.abs(c + e) % kd.length] + "?qt=vtile&x=" + (c + "").replace(/-/gi, "M") + "&y=" + (e + "").replace(/-/gi, "M") + "&z=" + b + "&styles=sl" + (6 == z.ca.ia ? "&color_dep=32&colors=50" : "") + "&udt=" + f).replace(/-(\d+)/gi, "M$1") - } - ; - var Sa = new id("\u6df7\u5408",[od, pd],{ - tips: "\u663e\u793a\u5e26\u6709\u8857\u9053\u7684\u536b\u661f\u5f71\u50cf", - labelText: "\u8def\u7f51", - minZoom: 1, - maxZoom: 19, - textColor: "white" - }); - var qd = 1 - , V = {}; - window.c1 = V; - function W(a, b) { - z.lang.Ca.call(this); - this.Ad = {}; - this.fn(a); - b = b || {}; - b.la = b.renderOptions || {}; - this.j = { - la: { - Ma: b.la.panel || s, - map: b.la.map || s, - Zg: b.la.autoViewport || q, - Ut: b.la.selectFirstResult, - kt: b.la.highlightMode, - Wb: b.la.enableDragging || t - }, - py: b.onSearchComplete || u(), - BN: b.onMarkersSet || u(), - AN: b.onInfoHtmlSet || u(), - DN: b.onResultsHtmlSet || u(), - zN: b.onGetBusListComplete || u(), - yN: b.onGetBusLineComplete || u(), - wN: b.onBusListHtmlSet || u(), - vN: b.onBusLineHtmlSet || u(), - bF: b.onPolylinesSet || u(), - Dp: b.reqFrom || "" - }; - this.j.la.Zg = "undefined" != typeof b && "undefined" != typeof b.renderOptions && "undefined" != typeof b.renderOptions.autoViewport ? b.renderOptions.autoViewport : q; - this.j.la.Ma = z.Fc(this.j.la.Ma) - } - z.ta(W, z.lang.Ca); - z.extend(W.prototype, { - getResults: function() { - return this.Hc ? this.Ei : this.ha - }, - enableAutoViewport: function() { - this.j.la.Zg = q - }, - disableAutoViewport: function() { - this.j.la.Zg = t - }, - fn: function(a) { - a && (this.Ad.src = a) - }, - JF: function(a) { - this.j.py = a || u() - }, - setMarkersSetCallback: function(a) { - this.j.BN = a || u() - }, - setPolylinesSetCallback: function(a) { - this.j.bF = a || u() - }, - setInfoHtmlSetCallback: function(a) { - this.j.AN = a || u() - }, - setResultsHtmlSetCallback: function(a) { - this.j.DN = a || u() - }, - xm: w("Me") - }); - var rd = { - KG: B.Wc, - ab: function(a, b, c, e, f) { - this.SZ(b); - var g = (1E5 * Math.random()).toFixed(0); - B._rd["_cbk" + g] = function(b) { - b.result && b.result.error && 202 === b.result.error ? alert("\u8be5AK\u56e0\u4e3a\u6076\u610f\u884c\u4e3a\u5df2\u7ecf\u88ab\u7ba1\u7406\u5458\u5c01\u7981\uff01") : (c = c || {}, - a && a(b, c), - delete B._rd["_cbk" + g]) - } - ; - e = e || ""; - b = c && c.H0 ? Gb(b, encodeURI) : Gb(b, encodeURIComponent); - this.KG = c && c.jL ? c.$N ? c.$N : B.vp : B.Wc; - e = this.KG + e + "?" + b + "&ie=utf-8&oue=1&fromproduct=jsapi"; - f || (e += "&res=api"); - e = e + ("&callback=BMap._rd._cbk" + g) + ("&ak=" + qa); - oa(e) - }, - SZ: function(a) { - if (a.qt) { - var b = ""; - switch (a.qt) { - case "bt": - b = "z_qt|bt"; - break; - case "nav": - b = "z_qt|nav"; - break; - case "walk": - b = "z_qt|walk"; - break; - case "bse": - b = "z_qt|bse"; - break; - case "nse": - b = "z_qt|nse"; - break; - case "drag": - b = "z_qt|drag" - } - "" !== b && B.alog("cus.fire", "count", b) - } - } - }; - window.o1 = rd; - B._rd = {}; - var ab = {}; - window.n1 = ab; - ab.WN = function(a) { - a = a.replace(/<\/?[^>]*>/g, ""); - return a = a.replace(/[ | ]* /g, " ") - } - ; - ab.JZ = function(a) { - return a.replace(/([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*),([1-9]\d*\.\d*|0\.\d*[1-9]\d*|0?\.0+|0|[1-9]\d*)(,)/g, "$1,$2;") - } - ; - ab.KZ = function(a, b) { - return a.replace(RegExp("(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);)(((-?\\d+)(\\.\\d+)?),((-?\\d+)(\\.\\d+)?);){" + b + "}", "ig"), "$1") - } - ; - var sd = 2 - , td = 6 - , ud = 8 - , vd = 2 - , wd = 3 - , xd = 6 - , yd = 0 - , zd = "bt" - , Ad = "nav" - , Bd = "walk" - , Cd = "bl" - , Dd = "bsl" - , Ed = "ride" - , Fd = 15 - , Gd = 18; - B.I = window.Instance = z.lang.Nc; - function Hd(a, b, c) { - z.lang.Ca.call(this); - if (a) { - this.Wa = "object" == typeof a ? a : z.Fc(a); - this.page = 1; - this.Kd = 100; - this.hK = "pg"; - this.Xf = 4; - this.qK = b; - this.update = q; - a = { - page: 1, - $e: 100, - Kd: 100, - Xf: 4, - hK: "pg", - update: q - }; - c || (c = a); - for (var e in c) - "undefined" != typeof c[e] && (this[e] = c[e]); - this.va() - } - } - z.extend(Hd.prototype, { - va: function() { - this.na() - }, - na: function() { - this.YV(); - this.Wa.innerHTML = this.uW() - }, - YV: function() { - isNaN(parseInt(this.page)) && (this.page = 1); - isNaN(parseInt(this.Kd)) && (this.Kd = 1); - 1 > this.page && (this.page = 1); - 1 > this.Kd && (this.Kd = 1); - this.page > this.Kd && (this.page = this.Kd); - this.page = parseInt(this.page); - this.Kd = parseInt(this.Kd) - }, - G3: function() { - location.search.match(RegExp("[?&]?" + this.hK + "=([^&]*)[&$]?", "gi")); - this.page = RegExp.$1 - }, - uW: function() { - var a = [] - , b = this.page - 1 - , c = this.page + 1; - a.push('

    '); - if (!(1 > b)) { - if (this.page >= this.Xf) { - var e; - a.push('\u9996\u9875'.replace("{temp1}", "BMap.I('" + this.aa + "').toPage(1);")) - } - a.push('\u4e0a\u4e00\u9875'.replace("{temp2}", "BMap.I('" + this.aa + "').toPage(" + b + ");")) - } - if (this.page < this.Xf) - e = 0 == this.page % this.Xf ? this.page - this.Xf - 1 : this.page - this.page % this.Xf + 1, - b = e + this.Xf - 1; - else { - e = Math.floor(this.Xf / 2); - var f = this.Xf % 2 - 1 - , b = this.Kd > this.page + e ? this.page + e : this.Kd; - e = this.page - e - f - } - this.page > this.Kd - this.Xf && this.page >= this.Xf && (e = this.Kd - this.Xf + 1, - b = this.Kd); - for (f = e; f <= b; f++) - 0 < f && (f == this.page ? a.push('' + f + "") : 1 <= f && f <= this.Kd && (e = '[' + f + "]", - a.push(e.replace("{temp3}", "BMap.I('" + this.aa + "').toPage(" + f + ");")))); - c > this.Kd || a.push('\u4e0b\u4e00\u9875'.replace("{temp4}", "BMap.I('" + this.aa + "').toPage(" + c + ");")); - a.push("

    "); - return a.join("") - }, - toPage: function(a) { - a = a ? a : 1; - "function" == typeof this.qK && (this.qK(a), - this.page = a); - this.update && this.va() - } - }); - function cb(a, b) { - W.call(this, a, b); - b = b || {}; - b.renderOptions = b.renderOptions || {}; - this.Np(b.pageCapacity); - "undefined" != typeof b.renderOptions.selectFirstResult && !b.renderOptions.selectFirstResult ? this.UC() : this.oD(); - this.ya = []; - this.yf = []; - this.mb = -1; - this.Pa = []; - var c = this; - K.load("local", function() { - c.Nz() - }, q) - } - z.ta(cb, W, "LocalSearch"); - cb.fq = 10; - cb.k1 = 1; - cb.En = 100; - cb.zG = 2E3; - cb.HG = 1E5; - z.extend(cb.prototype, { - search: function(a, b) { - this.Pa.push({ - method: "search", - arguments: [a, b] - }) - }, - an: function(a, b, c) { - this.Pa.push({ - method: "searchInBounds", - arguments: [a, b, c] - }) - }, - Jp: function(a, b, c, e) { - this.Pa.push({ - method: "searchNearby", - arguments: [a, b, c, e] - }) - }, - Pe: function() { - delete this.Ia; - delete this.Me; - delete this.ha; - delete this.ua; - this.mb = -1; - this.Ta(); - this.j.la.Ma && (this.j.la.Ma.innerHTML = "") - }, - Am: u(), - oD: function() { - this.j.la.Ut = q - }, - UC: function() { - this.j.la.Ut = t - }, - Np: function(a) { - this.j.Jk = "number" == typeof a && !isNaN(a) ? 1 > a ? cb.fq : a > cb.En ? cb.fq : a : cb.fq - }, - qf: function() { - return this.j.Jk - }, - toString: ca("LocalSearch") - }); - var Id = cb.prototype; - T(Id, { - clearResults: Id.Pe, - setPageCapacity: Id.Np, - getPageCapacity: Id.qf, - gotoPage: Id.Am, - searchNearby: Id.Jp, - searchInBounds: Id.an, - search: Id.search, - enableFirstResultSelection: Id.oD, - disableFirstResultSelection: Id.UC - }); - function Jd(a, b) { - W.call(this, a, b) - } - z.ta(Jd, W, "BaseRoute"); - z.extend(Jd.prototype, { - Pe: u() - }); - function Kd(a, b) { - W.call(this, a, b); - b = b || {}; - this.bu(b.policy); - this.oO(b.intercityPolicy); - this.xO(b.transitTypePolicy); - this.Np(b.pageCapacity); - this.Ab = zd; - this.mq = qd; - this.ya = []; - this.mb = -1; - this.j.Vn = b.enableTraffic || t; - this.Pa = []; - var c = this; - K.load("route", function() { - c.Sd() - }) - } - Kd.En = 100; - Kd.HP = [0, 1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 1, 1, 1]; - Kd.IP = [0, 3, 4, 0, 0, 0, 5]; - z.ta(Kd, Jd, "TransitRoute"); - z.extend(Kd.prototype, { - bu: function(a) { - this.j.ie = 0 <= a && 5 >= a ? a : 0 - }, - oO: function(a) { - this.j.Hm = 0 <= a && 2 >= a ? a : 0 - }, - xO: function(a) { - this.j.tn = 0 <= a && 2 >= a ? a : 0 - }, - NA: function(a, b) { - this.Pa.push({ - method: "_internalSearch", - arguments: [a, b] - }) - }, - search: function(a, b) { - this.Pa.push({ - method: "search", - arguments: [a, b] - }) - }, - Np: function(a) { - if ("string" === typeof a && (a = parseInt(a, 10), - isNaN(a))) { - this.j.Jk = Kd.En; - return - } - this.j.Jk = "number" !== typeof a ? Kd.En : 1 <= a && a <= Kd.En ? Math.round(a) : Kd.En - }, - toString: ca("TransitRoute"), - Z1: function(a) { - return a.replace(/\(.*\)/, "") - } - }); - var Ld = Kd.prototype; - T(Ld, { - _internalSearch: Ld.NA - }); - function Md(a, b) { - W.call(this, a, b); - this.ya = []; - this.mb = -1; - this.Pa = []; - var c = this - , e = this.j.la; - 1 !== e.kt && 2 !== e.kt && (e.kt = 1); - this.kv = this.j.la.Wb ? q : t; - K.load("route", function() { - c.Sd() - }); - this.vE && this.vE() - } - Md.WP = " \u73af\u5c9b \u65e0\u5c5e\u6027\u9053\u8def \u4e3b\u8def \u9ad8\u901f\u8fde\u63a5\u8def \u4ea4\u53c9\u70b9\u5185\u8def\u6bb5 \u8fde\u63a5\u9053\u8def \u505c\u8f66\u573a\u5185\u90e8\u9053\u8def \u670d\u52a1\u533a\u5185\u90e8\u9053\u8def \u6865 \u6b65\u884c\u8857 \u8f85\u8def \u531d\u9053 \u5168\u5c01\u95ed\u9053\u8def \u672a\u5b9a\u4e49\u4ea4\u901a\u533a\u57df POI\u8fde\u63a5\u8def \u96a7\u9053 \u6b65\u884c\u9053 \u516c\u4ea4\u4e13\u7528\u9053 \u63d0\u524d\u53f3\u8f6c\u9053".split(" "); - z.ta(Md, Jd, "DWRoute"); - z.extend(Md.prototype, { - search: function(a, b, c) { - this.Pa.push({ - method: "search", - arguments: [a, b, c] - }) - } - }); - function Nd(a, b) { - Md.call(this, a, b); - b = b || {}; - this.j.Vn = b.enableTraffic || t; - this.bu(b.policy); - this.Ab = Ad; - this.mq = wd - } - z.ta(Nd, Md, "DrivingRoute"); - Nd.prototype.bu = function(a) { - this.j.ie = 0 <= a && 5 >= a ? a : 0 - } - ; - function Od(a, b) { - Md.call(this, a, b); - this.Ab = Bd; - this.mq = vd; - this.kv = t - } - z.ta(Od, Md, "WalkingRoute"); - function Pd(a, b) { - Md.call(this, a, b); - this.Ab = Ed; - this.mq = xd; - this.kv = t - } - z.ta(Pd, Md, "RidingRoute"); - function Qd(a, b) { - z.lang.Ca.call(this); - this.Vf = []; - this.Kk = []; - this.j = b; - this.uj = a; - this.map = this.j.la.map || s; - this.hO = this.j.hO; - this.zb = s; - this.pk = 0; - this.SF = ""; - this.nf = 1; - this.uD = ""; - this.Ep = [0, 0, 0, 0, 0, 0, 0]; - this.XM = []; - this.os = [1, 1, 1, 1, 1, 1, 1]; - this.VO = [1, 1, 1, 1, 1, 1, 1]; - this.Fp = [0, 0, 0, 0, 0, 0, 0]; - this.Zm = [0, 0, 0, 0, 0, 0, 0]; - this.Ib = [{ - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }, { - m: "", - Ed: 0, - vn: 0, - x: 0, - y: 0, - pa: -1 - }]; - this.bi = -1; - this.ru = []; - this.aG = []; - K.load("route", u()) - } - z.lang.ta(Qd, z.lang.Ca, "RouteAddr"); - var Rd = navigator.userAgent; - /ipad|iphone|ipod|iph/i.test(Rd); - var Sd = /android/i.test(Rd); - function Td(a) { - this.vf = a || {} - } - z.extend(Td.prototype, { - gO: function(a, b, c) { - var e = this; - K.load("route", function() { - e.Sd(a, b, c) - }) - } - }); - function Ud(a) { - this.j = {}; - z.extend(this.j, a); - this.Pa = []; - var b = this; - K.load("othersearch", function() { - b.Sd() - }) - } - z.ta(Ud, z.lang.Ca, "Geocoder"); - z.extend(Ud.prototype, { - vm: function(a, b, c) { - this.Pa.push({ - method: "getPoint", - arguments: [a, b, c] - }) - }, - rm: function(a, b, c) { - this.Pa.push({ - method: "getLocation", - arguments: [a, b, c] - }) - }, - toString: ca("Geocoder") - }); - var Vd = Ud.prototype; - T(Vd, { - getPoint: Vd.vm, - getLocation: Vd.rm - }); - function Geolocation(a) { - a = a || {}; - this.K = { - timeout: a.timeout || 1E4, - maximumAge: a.maximumAge || 6E5, - enableHighAccuracy: a.enableHighAccuracy || t, - zi: a.SDKLocation || t - }; - this.pe = []; - var b = this; - K.load("othersearch", function() { - for (var a = 0, e; e = b.pe[a]; a++) - b[e.method].apply(b, e.arguments) - }) - } - z.extend(Geolocation.prototype, { - getCurrentPosition: function(a, b) { - this.pe.push({ - method: "getCurrentPosition", - arguments: arguments - }) - }, - getStatus: function() { - return sd - }, - enableSDKLocation: function() { - H() && (this.K.zi = q) - }, - disableSDKLocation: function() { - this.K.zi = t - } - }); - function Wd(a) { - a = a || {}; - a.la = a.renderOptions || {}; - this.j = { - la: { - map: a.la.map || s - } - }; - this.Pa = []; - var b = this; - K.load("othersearch", function() { - b.Sd() - }) - } - z.ta(Wd, z.lang.Ca, "LocalCity"); - z.extend(Wd.prototype, { - get: function(a) { - this.Pa.push({ - method: "get", - arguments: [a] - }) - }, - toString: ca("LocalCity") - }); - function Xd() { - this.Pa = []; - var a = this; - K.load("othersearch", function() { - a.Sd() - }) - } - z.ta(Xd, z.lang.Ca, "Boundary"); - z.extend(Xd.prototype, { - get: function(a, b) { - this.Pa.push({ - method: "get", - arguments: [a, b] - }) - }, - toString: ca("Boundary") - }); - function Yd(a, b) { - W.call(this, a, b); - this.TP = Cd; - this.VP = Fd; - this.SP = Dd; - this.UP = Gd; - this.Pa = []; - var c = this; - K.load("buslinesearch", function() { - c.Sd() - }) - } - Yd.zv = G.qa + "iw_plus.gif"; - Yd.YS = G.qa + "iw_minus.gif"; - Yd.RU = G.qa + "stop_icon.png"; - z.ta(Yd, W); - z.extend(Yd.prototype, { - getBusList: function(a) { - this.Pa.push({ - method: "getBusList", - arguments: [a] - }) - }, - getBusLine: function(a) { - this.Pa.push({ - method: "getBusLine", - arguments: [a] - }) - }, - setGetBusListCompleteCallback: function(a) { - this.j.zN = a || u() - }, - setGetBusLineCompleteCallback: function(a) { - this.j.yN = a || u() - }, - setBusListHtmlSetCallback: function(a) { - this.j.wN = a || u() - }, - setBusLineHtmlSetCallback: function(a) { - this.j.vN = a || u() - }, - setPolylinesSetCallback: function(a) { - this.j.bF = a || u() - } - }); - function Zd(a) { - W.call(this, a); - a = a || {}; - this.ub = { - input: a.input || s, - gC: a.baseDom || s, - types: a.types || [], - py: a.onSearchComplete || u() - }; - this.Ad.src = a.location || "\u5168\u56fd"; - this.Wi = ""; - this.pg = s; - this.lI = ""; - this.Mi(); - Ra(Ha); - var b = this; - K.load("autocomplete", function() { - b.Sd() - }) - } - z.ta(Zd, W, "Autocomplete"); - z.extend(Zd.prototype, { - Mi: u(), - show: u(), - U: u(), - KF: function(a) { - this.ub.types = a - }, - fn: function(a) { - this.Ad.src = a - }, - search: ba("Wi"), - Ly: ba("lI") - }); - var Ta; - function Oa(a, b) { - function c() { - f.j.visible ? ("inter" === f.Ke && f.j.haveBreakId && f.j.indoorExitControl === q ? z.D.show(f.GA) : z.D.U(f.GA), - this.j.closeControl && this.Bf && this.B && this.B.La() === this.C ? z.D.show(f.Bf) : z.D.U(f.Bf), - this.j.forceCloseControl && z.D.show(f.Bf)) : (z.D.U(f.Bf), - z.D.U(f.GA)) - } - this.C = "string" == typeof a ? z.$(a) : a; - this.aa = $d++; - this.j = { - enableScrollWheelZoom: q, - panoramaRenderer: "flash", - swfSrc: B.vg("main_domain_nocdn", "res/swf/") + "APILoader.swf", - visible: q, - indoorExitControl: q, - indoorFloorControl: t, - linksControl: q, - clickOnRoad: q, - navigationControl: q, - closeControl: q, - indoorSceneSwitchControl: q, - albumsControl: t, - albumsControlOptions: {}, - copyrightControlOptions: {}, - forceCloseControl: t, - haveBreakId: t - }; - var b = b || {}, e; - for (e in b) - this.j[e] = b[e]; - b.closeControl === q && (this.j.forceCloseControl = q); - b.useWebGL === t && Na(t); - this.Da = { - heading: 0, - pitch: 0 - }; - this.bo = []; - this.Lb = this.Za = s; - this.dk = this.er(); - this.ya = []; - this.Mc = 1; - this.Ke = this.xT = this.jl = ""; - this.Je = {}; - this.Of = s; - this.Sg = []; - this.xr = []; - "cvsRender" == this.dk || Na() ? (this.Vj = 90, - this.Xj = -90) : "cssRender" == this.dk && (this.Vj = 45, - this.Xj = -45); - this.Br = t; - var f = this; - this.co = function() { - this.dk === "flashRender" ? K.load("panoramaflash", function() { - f.Mi() - }, q) : K.load("panorama", function() { - f.ib() - }, q); - b.of == "api" ? Ra(Da) : Ra(Ea); - this.co = u() - } - ; - this.j.jT !== q && (this.co(), - B.Fn("cus.fire", "count", "z_loadpanoramacount")); - this.aU(this.C); - this.addEventListener("id_changed", function() { - Ra(Ca, { - from: b.of - }) - }); - this.mQ(); - this.addEventListener("indoorexit_options_changed", c); - this.addEventListener("scene_type_changed", c); - this.addEventListener("onclose_options_changed", c); - this.addEventListener("onvisible_changed", c) - } - var ae = 4 - , be = 1 - , $d = 0; - z.lang.ta(Oa, z.lang.Ca, "Panorama"); - z.extend(Oa.prototype, { - mQ: function() { - var a = this - , b = this.Bf = L("div"); - b.className = "pano_close"; - b.style.cssText = "z-index: 1201;display: none"; - b.title = "\u9000\u51fa\u5168\u666f"; - b.onclick = function() { - a.U() - } - ; - this.C.appendChild(b); - var c = this.GA = L("a"); - c.className = "pano_pc_indoor_exit"; - c.style.cssText = "z-index: 1201;display: none"; - c.innerHTML = '\u51fa\u53e3'; - c.title = "\u9000\u51fa\u5ba4\u5185\u666f"; - c.onclick = function() { - a.Vo() - } - ; - this.C.appendChild(c); - window.ActiveXObject && !document.addEventListener && (b.style.backgroundColor = "rgb(37,37,37)", - c.style.backgroundColor = "rgb(37,37,37)") - }, - Vo: u(), - aU: function(a) { - var b, c; - b = a.style; - c = Va(a).position; - "absolute" != c && "relative" != c && (b.position = "relative", - b.zIndex = 0); - if ("absolute" === c || "relative" === c) - if (a = Va(a).zIndex, - !a || "auto" === a) - b.zIndex = 0 - }, - OX: w("bo"), - Xb: w("Za"), - pY: w("jw"), - wO: w("jw"), - ga: w("Lb"), - Ea: w("Da"), - fa: w("Mc"), - jj: w("jl"), - I3: function() { - return this.U1 || [] - }, - D3: w("xT"), - ft: w("Ke"), - Ny: function(a) { - a !== this.Ke && (this.Ke = a, - this.dispatchEvent(new P("onscene_type_changed"))) - }, - vc: function(a, b, c) { - "object" === typeof b && (c = b, - b = l); - a != this.Za && (this.ul = this.Za, - this.vl = this.Lb, - this.Za = a, - this.Ke = b || "street", - this.Lb = s, - c && c.pov && this.Pc(c.pov)) - }, - sa: function(a) { - a.pb(this.Lb) || (this.ul = this.Za, - this.vl = this.Lb, - this.Lb = a, - this.Za = s) - }, - Pc: function(a) { - a && (this.Da = a, - a = this.Da.pitch, - a > this.Vj ? a = this.Vj : a < this.Xj && (a = this.Xj), - this.Br = q, - this.Da.pitch = a) - }, - H_: function(a, b) { - this.Xj = 0 <= a ? 0 : a; - this.Vj = 0 >= b ? 0 : b - }, - Qc: function(a) { - a != this.Mc && (a > ae && (a = ae), - a < be && (a = be), - a != this.Mc && (this.Mc = a), - "cssRender" === this.dk && this.Pc(this.Da)) - }, - GB: function() { - if (this.B) - for (var a = this.B.Hx(), b = 0; b < a.length; b++) - (a[b]instanceof U || a[b]instanceof uc) && a[b].point && this.ya.push(a[b]) - }, - GF: ba("B"), - au: function(a) { - this.Of = a || "none" - }, - Qk: function(a) { - for (var b in a) { - if ("object" == typeof a[b]) - for (var c in a[b]) - this.j[b][c] = a[b][c]; - else - this.j[b] = a[b]; - a.closeControl === q && (this.j.forceCloseControl = q); - a.closeControl === t && (this.j.forceCloseControl = t); - switch (b) { - case "linksControl": - this.dispatchEvent(new P("onlinks_visible_changed")); - break; - case "clickOnRoad": - this.dispatchEvent(new P("onclickonroad_changed")); - break; - case "navigationControl": - this.dispatchEvent(new P("onnavigation_visible_changed")); - break; - case "indoorSceneSwitchControl": - this.dispatchEvent(new P("onindoor_default_switch_mode_changed")); - break; - case "albumsControl": - this.dispatchEvent(new P("onalbums_visible_changed")); - break; - case "albumsControlOptions": - this.dispatchEvent(new P("onalbums_options_changed")); - break; - case "copyrightControlOptions": - this.dispatchEvent(new P("oncopyright_options_changed")); - break; - case "closeControl": - this.dispatchEvent(new P("onclose_options_changed")); - break; - case "indoorExitControl": - this.dispatchEvent(new P("onindoorexit_options_changed")); - break; - case "indoorFloorControl": - this.dispatchEvent(new P("onindoorfloor_options_changed")) - } - } - }, - Ek: function() { - this.Dl.style.visibility = "hidden" - }, - Ry: function() { - this.Dl.style.visibility = "visible" - }, - cX: function() { - this.j.enableScrollWheelZoom = q - }, - NW: function() { - this.j.enableScrollWheelZoom = t - }, - show: function() { - this.j.visible = q - }, - U: function() { - this.j.visible = t - }, - er: function() { - return Ua() && !H() && "javascript" != this.j.panoramaRenderer ? "flashRender" : !H() && Ob() ? "cvsRender" : "cssRender" - }, - Ga: function(a) { - this.Je[a.ld] = a - }, - Qb: function(a) { - delete this.Je[a] - }, - kE: function() { - return this.j.visible - }, - fh: function() { - return new O(this.C.clientWidth,this.C.clientHeight) - }, - La: w("C"), - yL: function() { - var a = B.vg("baidumap", "?") - , b = this.Xb(); - if (b) { - var b = { - panotype: this.ft(), - heading: this.Ea().heading, - pitch: this.Ea().pitch, - pid: b, - panoid: b, - from: "api" - }, c; - for (c in b) - a += c + "=" + b[c] + "&" - } - return a.slice(0, -1) - }, - Px: function() { - this.Qk({ - copyrightControlOptions: { - logoVisible: t - } - }) - }, - NF: function() { - this.Qk({ - copyrightControlOptions: { - logoVisible: q - } - }) - }, - aC: function(a) { - function b(a, b) { - return function() { - a.xr.push({ - iN: b, - hN: arguments - }) - } - } - for (var c = a.getPanoMethodList(), e = "", f = 0, g = c.length; f < g; f++) - e = c[f], - this[e] = b(this, e); - this.Sg.push(a) - }, - rF: function(a) { - for (var b = this.Sg.length; b--; ) - this.Sg[b] === a && this.Sg.splice(b, 1) - }, - FF: u() - }); - var ce = Oa.prototype; - T(ce, { - setId: ce.vc, - setPosition: ce.sa, - setPov: ce.Pc, - setZoom: ce.Qc, - setOptions: ce.Qk, - getId: ce.Xb, - getPosition: ce.ga, - getPov: ce.Ea, - getZoom: ce.fa, - getLinks: ce.OX, - getBaiduMapUrl: ce.yL, - hideMapLogo: ce.Px, - showMapLogo: ce.NF, - enableDoubleClickZoom: ce.W2, - disableDoubleClickZoom: ce.J2, - enableScrollWheelZoom: ce.cX, - disableScrollWheelZoom: ce.NW, - show: ce.show, - hide: ce.U, - addPlugin: ce.aC, - removePlugin: ce.rF, - getVisible: ce.kE, - addOverlay: ce.Ga, - removeOverlay: ce.Qb, - getSceneType: ce.ft, - setPanoramaPOIType: ce.au, - exitInter: ce.Vo, - setInteractiveState: ce.FF - }); - T(window, { - BMAP_PANORAMA_POI_HOTEL: "hotel", - BMAP_PANORAMA_POI_CATERING: "catering", - BMAP_PANORAMA_POI_MOVIE: "movie", - BMAP_PANORAMA_POI_TRANSIT: "transit", - BMAP_PANORAMA_POI_INDOOR_SCENE: "indoor_scene", - BMAP_PANORAMA_POI_NONE: "none", - BMAP_PANORAMA_INDOOR_SCENE: "inter", - BMAP_PANORAMA_STREET_SCENE: "street" - }); - function de() { - z.lang.Ca.call(this); - this.ld = "PanoramaOverlay_" + this.aa; - this.P = s; - this.Qa = q - } - z.lang.ta(de, z.lang.Ca, "PanoramaOverlayBase"); - z.extend(de.prototype, { - E3: w("ld"), - na: function() { - aa("initialize\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - remove: function() { - aa("remove\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - Nf: function() { - aa("_setOverlayProperty\u65b9\u6cd5\u672a\u5b9e\u73b0") - } - }); - function ee(a, b) { - de.call(this); - var c = { - position: s, - altitude: 2, - displayDistance: q - }, b = b || {}, e; - for (e in b) - c[e] = b[e]; - this.Lb = c.position; - this.Ij = a; - this.xq = c.altitude; - this.zR = c.displayDistance; - this.UF = c.color; - this.kM = c.hoverColor; - this.backgroundColor = c.backgroundColor; - this.jK = c.backgroundHoverColor; - this.borderColor = c.borderColor; - this.oK = c.borderHoverColor; - this.fontSize = c.fontSize; - this.padding = c.padding; - this.pE = c.imageUrl; - this.size = c.size; - this.xe = c.image; - this.width = c.width; - this.height = c.height; - this.HY = c.imageData; - this.borderWidth = c.borderWidth - } - z.lang.ta(ee, de, "PanoramaLabel"); - z.extend(ee.prototype, { - j3: w("borderWidth"), - getImageData: w("HY"), - zm: w("UF"), - y3: w("kM"), - f3: w("backgroundColor"), - g3: w("jK"), - h3: w("borderColor"), - i3: w("oK"), - w3: w("fontSize"), - F3: w("padding"), - z3: w("pE"), - cb: w("size"), - zx: w("xe"), - sa: function(a) { - this.Lb = a; - this.Nf("position", a) - }, - ga: w("Lb"), - dd: function(a) { - this.Ij = a; - this.Nf("content", a) - }, - xk: w("Ij"), - AF: function(a) { - this.xq = a; - this.Nf("altitude", a) - }, - Yo: w("xq"), - Ea: function() { - var a = this.ga() - , b = s - , c = s; - this.P && (c = this.P.ga()); - if (a && c) - if (a.pb(c)) - b = this.P.Ea(); - else { - b = {}; - b.heading = fe(a.lng - c.lng, a.lat - c.lat) || 0; - var a = b - , c = this.Yo() - , e = this.Xn(); - a.pitch = Math.round(180 * (Math.atan(c / e) / Math.PI)) || 0 - } - return b - }, - Xn: function() { - var a = 0, b, c; - this.P && (b = this.P.ga(), - (c = this.ga()) && !c.pb(b) && (a = S.$o(b, c))); - return a - }, - U: function() { - aa("hide\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - show: function() { - aa("show\u65b9\u6cd5\u672a\u5b9e\u73b0") - }, - Nf: u() - }); - var ge = ee.prototype; - T(ge, { - setPosition: ge.sa, - getPosition: ge.ga, - setContent: ge.dd, - getContent: ge.xk, - setAltitude: ge.AF, - getAltitude: ge.Yo, - getPov: ge.Ea, - show: ge.show, - hide: ge.U - }); - function he(a, b) { - de.call(this); - var c = { - icon: "", - title: "", - panoInfo: s, - altitude: 2 - }, b = b || {}, e; - for (e in b) - c[e] = b[e]; - this.Lb = a; - this.gI = c.icon; - this.DJ = c.title; - this.xq = c.altitude; - this.OT = c.panoInfo; - this.Da = { - heading: 0, - pitch: 0 - } - } - z.lang.ta(he, de, "PanoramaMarker"); - z.extend(he.prototype, { - sa: function(a) { - this.Lb = a; - this.Nf("position", a) - }, - ga: w("Lb"), - Ec: function(a) { - this.DJ = a; - this.Nf("title", a) - }, - gp: w("DJ"), - Rb: function(a) { - this.gI = icon; - this.Nf("icon", a) - }, - ap: w("gI"), - AF: function(a) { - this.xq = a; - this.Nf("altitude", a) - }, - Yo: w("xq"), - $D: w("OT"), - Ea: function() { - var a = s; - if (this.P) { - var a = this.P.ga() - , b = this.ga() - , a = fe(b.lng - a.lng, b.lat - a.lat); - isNaN(a) && (a = 0); - a = { - heading: a, - pitch: 0 - } - } else - a = this.Da; - return a - }, - Nf: u() - }); - var ie = he.prototype; - T(ie, { - setPosition: ie.sa, - getPosition: ie.ga, - setTitle: ie.Ec, - getTitle: ie.gp, - setAltitude: ie.AF, - getAltitude: ie.Yo, - getPanoInfo: ie.$D, - getIcon: ie.ap, - setIcon: ie.Rb, - getPov: ie.Ea - }); - function fe(a, b) { - var c = 0; - if (0 !== a && 0 !== b) { - var c = 180 * (Math.atan(a / b) / Math.PI) - , e = 0; - 0 < a && 0 > b && (e = 90); - 0 > a && 0 > b && (e = 180); - 0 > a && 0 < b && (e = 270); - c = (c + 90) % 90 + e - } else - 0 === a ? c = 0 > b ? 180 : 0 : 0 === b && (c = 0 < a ? 90 : 270); - return Math.round(c) - } - function Na(a) { - if ("boolean" === typeof je) - return je; - if (a === t || !window.WebGLRenderingContext) - return je = t; - if (z.platform.Jm) { - a = 0; - try { - a = navigator.userAgent.split("Android ")[1].charAt(0) - } catch (b) {} - if (5 > a) - return je = t - } - var a = document.createElement("canvas") - , c = s; - try { - c = a.getContext("webgl") - } catch (e) { - je = t - } - return je = c === s ? t : q - } - var je; - function ke() { - if ("boolean" === typeof le) - return le; - le = q; - if (z.platform.zE) - return q; - var a = navigator.userAgent; - return -1 < a.indexOf("Chrome") || -1 < a.indexOf("SAMSUNG-GT-I9508") ? q : le = t - } - var le; - function ec(a, b) { - this.P = a || s; - var c = this; - c.P && c.ba(); - K.load("pservice", function() { - c.SQ() - }); - "api" == (b || {}).of ? Ra(Fa) : Ra(Ga); - this.xd = { - getPanoramaById: [], - getPanoramaByLocation: [], - getVisiblePOIs: [], - getRecommendPanosById: [], - getPanoramaVersions: [], - checkPanoSupportByCityCode: [], - getPanoramaByPOIId: [], - getCopyrightProviders: [] - } - } - B.Tm(function(a) { - "flashRender" !== a.er() && new ec(a,{ - of: "api" - }) - }); - z.extend(ec.prototype, { - ba: function() { - function a(a) { - if (a) { - if (a.id != b.jw) { - b.wO(a.id); - b.ea = a; - ke() || b.dispatchEvent(new P("onthumbnail_complete")); - b.Za != s && (b.vl = b._position); - for (var c in a) - if (a.hasOwnProperty(c)) - switch (b["_" + c] = a[c], - c) { - case "position": - b.Lb = a[c]; - break; - case "id": - b.Za = a[c]; - break; - case "links": - b.bo = a[c]; - break; - case "zoom": - b.Mc = a[c] - } - if (b.vl) { - var g = b.vl - , i = b._position; - c = g.lat; - var k = i.lat - , m = Pb(k - c) - , g = Pb(i.lng - g.lng); - c = Math.sin(m / 2) * Math.sin(m / 2) + Math.cos(Pb(c)) * Math.cos(Pb(k)) * Math.sin(g / 2) * Math.sin(g / 2); - b.wH = 6371E3 * 2 * Math.atan2(Math.sqrt(c), Math.sqrt(1 - c)) - } - c = new P("ondataload"); - c.data = a; - b.dispatchEvent(c); - b.dispatchEvent(new P("onposition_changed")); - b.dispatchEvent(new P("onlinks_changed")); - b.dispatchEvent(new P("oncopyright_changed"), { - copyright: a.copyright - }); - a.bm && b.j.closeControl ? z.D.show(b.WR) : z.D.U(b.WR) - } - } else - b.Za = b.ul, - b.Lb = b.vl, - b.dispatchEvent(new P("onnoresult")) - } - var b = this.P - , c = this; - b.addEventListener("id_changed", function() { - c.ep(b.Xb(), a) - }); - b.addEventListener("iid_changed", function() { - c.Tg(ec.el + "qt=idata&iid=" + b.CA + "&fn=", function(b) { - if (b && b.result && 0 == b.result.error) { - var b = b.content[0].interinfo - , f = {}; - f.bm = b.BreakID; - for (var g = b.Defaultfloor, i = s, k = 0; k < b.Floors.length; k++) - if (b.Floors[k].Floor == g) { - i = b.Floors[k]; - break - } - f.id = i.StartID || i.Points[0].PID; - c.ep(f.id, a, f) - } - }) - }); - b.addEventListener("position_changed_inner", function() { - c.kj(b.ga(), a) - }) - }, - ep: function(a, b) { - this.xd.getPanoramaById.push(arguments) - }, - kj: function(a, b, c) { - this.xd.getPanoramaByLocation.push(arguments) - }, - lE: function(a, b, c, e) { - this.xd.getVisiblePOIs.push(arguments) - }, - Kx: function(a, b) { - this.xd.getRecommendPanosById.push(arguments) - }, - Jx: function(a) { - this.xd.getPanoramaVersions.push(arguments) - }, - nC: function(a, b) { - this.xd.checkPanoSupportByCityCode.push(arguments) - }, - Ix: function(a, b) { - this.xd.getPanoramaByPOIId.push(arguments) - }, - CL: function(a) { - this.xd.getCopyrightProviders.push(arguments) - } - }); - var ne = ec.prototype; - T(ne, { - getPanoramaById: ne.ep, - getPanoramaByLocation: ne.kj, - getPanoramaByPOIId: ne.Ix - }); - function dc(a) { - Mc.call(this); - "api" == (a || {}).of ? Ra(Aa) : Ra(Ba) - } - dc.OG = B.vg("pano", "tile/"); - dc.prototype = new Mc; - dc.prototype.getTilesUrl = function(a, b) { - var c = dc.OG[(a.x + a.y) % dc.OG.length] + "?udt=20150114&qt=tile&styles=pl&x=" + a.x + "&y=" + a.y + "&z=" + b; - z.ca.ia && 6 >= z.ca.ia && (c += "&color_dep=32"); - return c - } - ; - dc.prototype.zt = ca(q); - oe.Wd = new S; - function oe() {} - z.extend(oe, { - OW: function(a, b, c) { - c = z.lang.Nc(c); - b = { - data: b - }; - "position_changed" == a && (b.data = oe.Wd.xj(new Q(b.data.mercatorX,b.data.mercatorY))); - c.dispatchEvent(new P("on" + a), b) - } - }); - var pe = oe; - T(pe, { - dispatchFlashEvent: pe.OW - }); - var qe = { - KP: 50 - }; - qe.Ou = B.vg("pano")[0]; - qe.Mu = { - width: 220, - height: 60 - }; - z.extend(qe, { - tM: function(a, b, c, e) { - if (!b || !c || !c.lngLat || !c.panoInstance) - e(); - else { - this.jo === l && (this.jo = new ec(s,{ - of: "api" - })); - var f = this; - this.jo.nC(b, function(b) { - b ? f.jo.kj(c.lngLat, qe.KP, function(b) { - if (b && b.id) { - var g = b.id - , m = b.rh - , b = b.th - , n = ec.Wd.kh(c.lngLat) - , o = f.AS(n, { - x: m, - y: b - }) - , m = f.PL(g, o, 0, qe.Mu.width, qe.Mu.height); - a.content = f.BS(a.content, m, c.titleTip, c.beforeDomId); - a.addEventListener("open", function() { - ia.M(z.Fc("infoWndPano"), "click", function() { - c.panoInstance.vc(g); - c.panoInstance.show(); - c.panoInstance.Pc({ - heading: o, - pitch: 0 - }) - }) - }) - } - e() - }) : e() - }) - } - }, - BS: function(a, b, c, e) { - var c = c || "", f; - !e || !a.split(e)[0] ? (e = a, - a = "") : (e = a.split(e)[0], - f = e.lastIndexOf("<"), - e = a.substring(0, f), - a = a.substring(f)); - f = []; - var g = qe.Mu.width - , i = qe.Mu.height; - f.push(e); - f.push("
    "); - f.push("" + c + "\u5916\u666f"); - f.push("
    \u8fdb\u5165\u5168\u666f>>"); - f.push("
    "); - f.push(a); - return f.join("") - }, - AS: function(a, b) { - var c = 90 - 180 * Math.atan2(a.y - b.y, a.x - b.x) / Math.PI; - 0 > c && (c += 360); - return c - }, - PL: function(a, b, c, e, f) { - var g = { - panoId: a, - panoHeading: b || 0, - panoPitch: c || 0, - width: e, - height: f - }; - return (qe.Ou + "?qt=pr3d&fovy=75&quality=80&panoid={panoId}&heading={panoHeading}&pitch={panoPitch}&width={width}&height={height}").replace(/\{(.*?)\}/g, function(a, b) { - return g[b] - }) - } - }); - var te = document, ue = Math, ve = te.createElement("div").style, we; - a: { - for (var xe = ["t", "webkitT", "MozT", "msT", "OT"], ye, ze = 0, Ae = xe.length; ze < Ae; ze++) - if (ye = xe[ze] + "ransform", - ye in ve) { - we = xe[ze].substr(0, xe[ze].length - 1); - break a - } - we = t - } - var Be = we ? "-" + we.toLowerCase() + "-" : "" - , De = Ce("transform") - , Ee = Ce("transitionProperty") - , Fe = Ce("transitionDuration") - , Ge = Ce("transformOrigin") - , He = Ce("transitionTimingFunction") - , Ie = Ce("transitionDelay") - , Sd = /android/gi.test(navigator.appVersion) - , Je = /iphone|ipad/gi.test(navigator.appVersion) - , Ke = /hp-tablet/gi.test(navigator.appVersion) - , Le = Ce("perspective")in ve - , Me = "ontouchstart"in window && !Ke - , Ne = we !== t - , Oe = Ce("transition")in ve - , Pe = "onorientationchange"in window ? "orientationchange" : "resize" - , Qe = Me ? "touchstart" : "mousedown" - , Re = Me ? "touchmove" : "mousemove" - , Se = Me ? "touchend" : "mouseup" - , Te = Me ? "touchcancel" : "mouseup" - , Ue = we === t ? t : { - "": "transitionend", - webkit: "webkitTransitionEnd", - Moz: "transitionend", - O: "otransitionend", - ms: "MSTransitionEnd" - }[we] - , Ve = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(a) { - return setTimeout(a, 1) - } - , We = window.cancelRequestAnimationFrame || window.U5 || window.webkitCancelRequestAnimationFrame || window.mozCancelRequestAnimationFrame || window.oCancelRequestAnimationFrame || window.msCancelRequestAnimationFrame || clearTimeout - , Xe = Le ? " translateZ(0)" : ""; - function Ye(a, b) { - var c = this, e; - c.zn = "object" == typeof a ? a : te.getElementById(a); - c.zn.style.overflow = "hidden"; - c.Nb = c.zn.children[0]; - c.options = { - kp: q, - xn: q, - x: 0, - y: 0, - Go: q, - LV: t, - iy: q, - OE: q, - Yk: q, - wi: t, - n0: 0, - Pw: t, - Mx: q, - ii: q, - xi: q, - AD: Sd, - Qx: Je, - kX: Je && Le, - xF: "", - zoom: t, - $k: 1, - aq: 4, - QW: 2, - qP: "scroll", - iu: t, - Uy: 1, - CN: s, - uN: function(a) { - a.preventDefault() - }, - FN: s, - tN: s, - EN: s, - sN: s, - oy: s, - GN: s, - xN: s, - zp: s, - HN: s, - yp: s - }; - for (e in b) - c.options[e] = b[e]; - c.x = c.options.x; - c.y = c.options.y; - c.options.Yk = Ne && c.options.Yk; - c.options.ii = c.options.kp && c.options.ii; - c.options.xi = c.options.xn && c.options.xi; - c.options.zoom = c.options.Yk && c.options.zoom; - c.options.wi = Oe && c.options.wi; - c.options.zoom && Sd && (Xe = ""); - c.Nb.style[Ee] = c.options.Yk ? Be + "transform" : "top left"; - c.Nb.style[Fe] = "0"; - c.Nb.style[Ge] = "0 0"; - c.options.wi && (c.Nb.style[He] = "cubic-bezier(0.33,0.66,0.66,1)"); - c.options.Yk ? c.Nb.style[De] = "translate(" + c.x + "px," + c.y + "px)" + Xe : c.Nb.style.cssText += ";position:absolute;top:" + c.y + "px;left:" + c.x + "px"; - c.options.wi && (c.options.AD = q); - c.refresh(); - c.ba(Pe, window); - c.ba(Qe); - !Me && "none" != c.options.qP && (c.ba("DOMMouseScroll"), - c.ba("mousewheel")); - c.options.Pw && (c.XV = setInterval(function() { - c.PQ() - }, 500)); - this.options.Mx && (Event.prototype.stopImmediatePropagation || (document.body.removeEventListener = function(a, b, c) { - var e = Node.prototype.removeEventListener; - a === "click" ? e.call(document.body, a, b.iM || b, c) : e.call(document.body, a, b, c) - } - , - document.body.addEventListener = function(a, b, c) { - var e = Node.prototype.addEventListener; - a === "click" ? e.call(document.body, a, b.iM || (b.iM = function(a) { - a.RZ || b(a) - } - ), c) : e.call(document.body, a, b, c) - } - ), - c.ba("click", document.body, q)) - } - Ye.prototype = { - enabled: q, - x: 0, - y: 0, - yj: [], - scale: 1, - HC: 0, - IC: 0, - We: [], - wf: [], - fC: s, - cz: 0, - handleEvent: function(a) { - switch (a.type) { - case Qe: - if (!Me && 0 !== a.button) - break; - this.aw(a); - break; - case Re: - this.zT(a); - break; - case Se: - case Te: - this.lv(a); - break; - case Pe: - this.zB(); - break; - case "DOMMouseScroll": - case "mousewheel": - this.eV(a); - break; - case Ue: - this.$U(a); - break; - case "click": - this.$Q(a) - } - }, - PQ: function() { - !this.oh && (!this.al && !(this.Yl || this.Ky == this.Nb.offsetWidth * this.scale && this.Ip == this.Nb.offsetHeight * this.scale)) && this.refresh() - }, - Sv: function(a) { - var b; - this[a + "Scrollbar"] ? (this[a + "ScrollbarWrapper"] || (b = te.createElement("div"), - this.options.xF ? b.className = this.options.xF + a.toUpperCase() : b.style.cssText = "position:absolute;z-index:100;" + ("h" == a ? "height:7px;bottom:1px;left:2px;right:" + (this.xi ? "7" : "2") + "px" : "width:7px;bottom:" + (this.ii ? "7" : "2") + "px;top:2px;right:1px"), - b.style.cssText += ";pointer-events:none;" + Be + "transition-property:opacity;" + Be + "transition-duration:" + (this.options.kX ? "350ms" : "0") + ";overflow:hidden;opacity:" + (this.options.Qx ? "0" : "1"), - this.zn.appendChild(b), - this[a + "ScrollbarWrapper"] = b, - b = te.createElement("div"), - this.options.xF || (b.style.cssText = "position:absolute;z-index:100;background:rgba(0,0,0,0.5);border:1px solid rgba(255,255,255,0.9);" + Be + "background-clip:padding-box;" + Be + "box-sizing:border-box;" + ("h" == a ? "height:100%" : "width:100%") + ";" + Be + "border-radius:3px;border-radius:3px"), - b.style.cssText += ";pointer-events:none;" + Be + "transition-property:" + Be + "transform;" + Be + "transition-timing-function:cubic-bezier(0.33,0.66,0.66,1);" + Be + "transition-duration:0;" + Be + "transform: translate(0,0)" + Xe, - this.options.wi && (b.style.cssText += ";" + Be + "transition-timing-function:cubic-bezier(0.33,0.66,0.66,1)"), - this[a + "ScrollbarWrapper"].appendChild(b), - this[a + "ScrollbarIndicator"] = b), - "h" == a ? (this.fM = this.gM.clientWidth, - this.yY = ue.max(ue.round(this.fM * this.fM / this.Ky), 8), - this.xY.style.width = this.yY + "px") : (this.iP = this.jP.clientHeight, - this.L0 = ue.max(ue.round(this.iP * this.iP / this.Ip), 8), - this.K0.style.height = this.L0 + "px"), - this.AB(a, q)) : this[a + "ScrollbarWrapper"] && (Ne && (this[a + "ScrollbarIndicator"].style[De] = ""), - this[a + "ScrollbarWrapper"].parentNode.removeChild(this[a + "ScrollbarWrapper"]), - this[a + "ScrollbarWrapper"] = s, - this[a + "ScrollbarIndicator"] = s) - }, - zB: function() { - var a = this; - setTimeout(function() { - a.refresh() - }, Sd ? 200 : 0) - }, - Ar: function(a, b) { - this.al || (a = this.kp ? a : 0, - b = this.xn ? b : 0, - this.options.Yk ? this.Nb.style[De] = "translate(" + a + "px," + b + "px) scale(" + this.scale + ")" + Xe : (a = ue.round(a), - b = ue.round(b), - this.Nb.style.left = a + "px", - this.Nb.style.top = b + "px"), - this.x = a, - this.y = b, - this.AB("h"), - this.AB("v")) - }, - AB: function(a, b) { - var c = "h" == a ? this.x : this.y; - this[a + "Scrollbar"] && (c *= this[a + "ScrollbarProp"], - 0 > c ? (this.options.AD || (c = this[a + "ScrollbarIndicatorSize"] + ue.round(3 * c), - 8 > c && (c = 8), - this[a + "ScrollbarIndicator"].style["h" == a ? "width" : "height"] = c + "px"), - c = 0) : c > this[a + "ScrollbarMaxScroll"] && (this.options.AD ? c = this[a + "ScrollbarMaxScroll"] : (c = this[a + "ScrollbarIndicatorSize"] - ue.round(3 * (c - this[a + "ScrollbarMaxScroll"])), - 8 > c && (c = 8), - this[a + "ScrollbarIndicator"].style["h" == a ? "width" : "height"] = c + "px", - c = this[a + "ScrollbarMaxScroll"] + (this[a + "ScrollbarIndicatorSize"] - c))), - this[a + "ScrollbarWrapper"].style[Ie] = "0", - this[a + "ScrollbarWrapper"].style.opacity = b && this.options.Qx ? "0" : "1", - this[a + "ScrollbarIndicator"].style[De] = "translate(" + ("h" == a ? c + "px,0)" : "0," + c + "px)") + Xe) - }, - $Q: function(a) { - if (a.XR === q) - return this.YB = a.target, - this.sx = Date.now(), - q; - if (this.YB && this.sx) { - if (600 < Date.now() - this.sx) - return this.sx = this.YB = s, - q - } else { - for (var b = a.target; b != this.Nb && b != document.body; ) - b = b.parentNode; - if (b == document.body) - return q - } - for (b = a.target; 1 != b.nodeType; ) - b = b.parentNode; - b = b.tagName.toLowerCase(); - if ("select" != b && "input" != b && "textarea" != b) - return a.stopImmediatePropagation ? a.stopImmediatePropagation() : a.RZ = q, - a.stopPropagation(), - a.preventDefault(), - this.sx = this.YB = s, - t - }, - aw: function(a) { - var b = Me ? a.touches[0] : a, c, e; - if (this.enabled) { - this.options.uN && this.options.uN.call(this, a); - (this.options.wi || this.options.zoom) && this.FJ(0); - this.al = this.Yl = this.oh = t; - this.RC = this.QC = this.vw = this.uw = this.XC = this.WC = 0; - this.options.zoom && (Me && 1 < a.touches.length) && (e = ue.abs(a.touches[0].pageX - a.touches[1].pageX), - c = ue.abs(a.touches[0].pageY - a.touches[1].pageY), - this.p0 = ue.sqrt(e * e + c * c), - this.qy = ue.abs(a.touches[0].pageX + a.touches[1].pageX - 2 * this.iG) / 2 - this.x, - this.ty = ue.abs(a.touches[0].pageY + a.touches[1].pageY - 2 * this.jG) / 2 - this.y, - this.options.zp && this.options.zp.call(this, a)); - if (this.options.iy && (this.options.Yk ? (c = getComputedStyle(this.Nb, s)[De].replace(/[^0-9\-.,]/g, "").split(","), - e = +(c[12] || c[4]), - c = +(c[13] || c[5])) : (e = +getComputedStyle(this.Nb, s).left.replace(/[^0-9-]/g, ""), - c = +getComputedStyle(this.Nb, s).top.replace(/[^0-9-]/g, "")), - e != this.x || c != this.y)) - this.options.wi ? this.$d(Ue) : We(this.fC), - this.yj = [], - this.Ar(e, c), - this.options.oy && this.options.oy.call(this); - this.ww = this.x; - this.xw = this.y; - this.lu = this.x; - this.mu = this.y; - this.rh = b.pageX; - this.th = b.pageY; - this.startTime = a.timeStamp || Date.now(); - this.options.FN && this.options.FN.call(this, a); - this.ba(Re, window); - this.ba(Se, window); - this.ba(Te, window) - } - }, - zT: function(a) { - var b = Me ? a.touches[0] : a - , c = b.pageX - this.rh - , e = b.pageY - this.th - , f = this.x + c - , g = this.y + e - , i = a.timeStamp || Date.now(); - this.options.tN && this.options.tN.call(this, a); - if (this.options.zoom && Me && 1 < a.touches.length) - f = ue.abs(a.touches[0].pageX - a.touches[1].pageX), - g = ue.abs(a.touches[0].pageY - a.touches[1].pageY), - this.o0 = ue.sqrt(f * f + g * g), - this.al = q, - b = 1 / this.p0 * this.o0 * this.scale, - b < this.options.$k ? b = 0.5 * this.options.$k * Math.pow(2, b / this.options.$k) : b > this.options.aq && (b = 2 * this.options.aq * Math.pow(0.5, this.options.aq / b)), - this.rp = b / this.scale, - f = this.qy - this.qy * this.rp + this.x, - g = this.ty - this.ty * this.rp + this.y, - this.Nb.style[De] = "translate(" + f + "px," + g + "px) scale(" + b + ")" + Xe, - this.options.HN && this.options.HN.call(this, a); - else { - this.rh = b.pageX; - this.th = b.pageY; - if (0 < f || f < this.he) - f = this.options.Go ? this.x + c / 2 : 0 <= f || 0 <= this.he ? 0 : this.he; - if (g > this.sf || g < this.qd) - g = this.options.Go ? this.y + e / 2 : g >= this.sf || 0 <= this.qd ? this.sf : this.qd; - this.WC += c; - this.XC += e; - this.uw = ue.abs(this.WC); - this.vw = ue.abs(this.XC); - 6 > this.uw && 6 > this.vw || (this.options.OE && (this.uw > this.vw + 5 ? (g = this.y, - e = 0) : this.vw > this.uw + 5 && (f = this.x, - c = 0)), - this.oh = q, - this.Ar(f, g), - this.QC = 0 < c ? -1 : 0 > c ? 1 : 0, - this.RC = 0 < e ? -1 : 0 > e ? 1 : 0, - 300 < i - this.startTime && (this.startTime = i, - this.lu = this.x, - this.mu = this.y), - this.options.EN && this.options.EN.call(this, a)) - } - }, - lv: function(a) { - if (!(Me && 0 !== a.touches.length)) { - var b = this, c = Me ? a.changedTouches[0] : a, e, f, g = { - Ba: 0, - time: 0 - }, i = { - Ba: 0, - time: 0 - }, k = (a.timeStamp || Date.now()) - b.startTime; - e = b.x; - f = b.y; - b.$d(Re, window); - b.$d(Se, window); - b.$d(Te, window); - b.options.sN && b.options.sN.call(b, a); - if (b.al) - e = b.scale * b.rp, - e = Math.max(b.options.$k, e), - e = Math.min(b.options.aq, e), - b.rp = e / b.scale, - b.scale = e, - b.x = b.qy - b.qy * b.rp + b.x, - b.y = b.ty - b.ty * b.rp + b.y, - b.Nb.style[Fe] = "200ms", - b.Nb.style[De] = "translate(" + b.x + "px," + b.y + "px) scale(" + b.scale + ")" + Xe, - b.al = t, - b.refresh(), - b.options.yp && b.options.yp.call(b, a); - else { - if (b.oh) { - if (300 > k && b.options.iy) { - g = e ? b.BI(e - b.lu, k, -b.x, b.Ky - b.Cu + b.x, b.options.Go ? b.Cu : 0) : g; - i = f ? b.BI(f - b.mu, k, -b.y, 0 > b.qd ? b.Ip - b.An + b.y - b.sf : 0, b.options.Go ? b.An : 0) : i; - e = b.x + g.Ba; - f = b.y + i.Ba; - if (0 < b.x && 0 < e || b.x < b.he && e < b.he) - g = { - Ba: 0, - time: 0 - }; - if (b.y > b.sf && f > b.sf || b.y < b.qd && f < b.qd) - i = { - Ba: 0, - time: 0 - } - } - g.Ba || i.Ba ? (c = ue.max(ue.max(g.time, i.time), 10), - b.options.iu && (g = e - b.ww, - i = f - b.xw, - ue.abs(g) < b.options.Uy && ue.abs(i) < b.options.Uy ? b.scrollTo(b.ww, b.xw, 200) : (g = b.vJ(e, f), - e = g.x, - f = g.y, - c = ue.max(g.time, c))), - b.scrollTo(ue.round(e), ue.round(f), c)) : b.options.iu ? (g = e - b.ww, - i = f - b.xw, - ue.abs(g) < b.options.Uy && ue.abs(i) < b.options.Uy ? b.scrollTo(b.ww, b.xw, 200) : (g = b.vJ(b.x, b.y), - (g.x != b.x || g.y != b.y) && b.scrollTo(g.x, g.y, g.time))) : b.lo(200) - } else { - if (Me) - if (b.VK && b.options.zoom) - clearTimeout(b.VK), - b.VK = s, - b.options.zp && b.options.zp.call(b, a), - b.zoom(b.rh, b.th, 1 == b.scale ? b.options.QW : 1), - b.options.yp && setTimeout(function() { - b.options.yp.call(b, a) - }, 200); - else if (this.options.Mx) { - for (e = c.target; 1 != e.nodeType; ) - e = e.parentNode; - f = e.tagName.toLowerCase(); - "select" != f && "input" != f && "textarea" != f ? (f = te.createEvent("MouseEvents"), - f.initMouseEvent("click", q, q, a.view, 1, c.screenX, c.screenY, c.clientX, c.clientY, a.ctrlKey, a.altKey, a.shiftKey, a.metaKey, 0, s), - f.XR = q, - e.dispatchEvent(f)) : e.focus() - } - b.lo(400) - } - b.options.GN && b.options.GN.call(b, a) - } - } - }, - lo: function(a) { - var b = 0 <= this.x ? 0 : this.x < this.he ? this.he : this.x - , c = this.y >= this.sf || 0 < this.qd ? this.sf : this.y < this.qd ? this.qd : this.y; - if (b == this.x && c == this.y) { - if (this.oh && (this.oh = t, - this.options.oy && this.options.oy.call(this)), - this.ii && this.options.Qx && ("webkit" == we && (this.gM.style[Ie] = "300ms"), - this.gM.style.opacity = "0"), - this.xi && this.options.Qx) - "webkit" == we && (this.jP.style[Ie] = "300ms"), - this.jP.style.opacity = "0" - } else - this.scrollTo(b, c, a || 0) - }, - eV: function(a) { - var b = this, c, e; - if ("wheelDeltaX"in a) - c = a.wheelDeltaX / 12, - e = a.wheelDeltaY / 12; - else if ("wheelDelta"in a) - c = e = a.wheelDelta / 12; - else if ("detail"in a) - c = e = 3 * -a.detail; - else - return; - if ("zoom" == b.options.qP) { - if (e = b.scale * Math.pow(2, 1 / 3 * (e ? e / Math.abs(e) : 0)), - e < b.options.$k && (e = b.options.$k), - e > b.options.aq && (e = b.options.aq), - e != b.scale) - !b.cz && b.options.zp && b.options.zp.call(b, a), - b.cz++, - b.zoom(a.pageX, a.pageY, e, 400), - setTimeout(function() { - b.cz--; - !b.cz && b.options.yp && b.options.yp.call(b, a) - }, 400) - } else - c = b.x + c, - e = b.y + e, - 0 < c ? c = 0 : c < b.he && (c = b.he), - e > b.sf ? e = b.sf : e < b.qd && (e = b.qd), - 0 > b.qd && b.scrollTo(c, e, 0) - }, - $U: function(a) { - a.target == this.Nb && (this.$d(Ue), - this.MB()) - }, - MB: function() { - var a = this, b = a.x, c = a.y, e = Date.now(), f, g, i; - a.Yl || (a.yj.length ? (f = a.yj.shift(), - f.x == b && f.y == c && (f.time = 0), - a.Yl = q, - a.oh = q, - a.options.wi) ? (a.FJ(f.time), - a.Ar(f.x, f.y), - a.Yl = t, - f.time ? a.ba(Ue) : a.lo(0)) : (i = function() { - var k = Date.now(), m; - if (k >= e + f.time) { - a.Ar(f.x, f.y); - a.Yl = t; - a.options.zZ && a.options.zZ.call(a); - a.MB() - } else { - k = (k - e) / f.time - 1; - g = ue.sqrt(1 - k * k); - k = (f.x - b) * g + b; - m = (f.y - c) * g + c; - a.Ar(k, m); - if (a.Yl) - a.fC = Ve(i) - } - } - , - i()) : a.lo(400)) - }, - FJ: function(a) { - a += "ms"; - this.Nb.style[Fe] = a; - this.ii && (this.xY.style[Fe] = a); - this.xi && (this.K0.style[Fe] = a) - }, - BI: function(a, b, c, e, f) { - var b = ue.abs(a) / b - , g = b * b / 0.0012; - 0 < a && g > c ? (c += f / (6 / (6.0E-4 * (g / b))), - b = b * c / g, - g = c) : 0 > a && g > e && (e += f / (6 / (6.0E-4 * (g / b))), - b = b * e / g, - g = e); - return { - Ba: g * (0 > a ? -1 : 1), - time: ue.round(b / 6.0E-4) - } - }, - Zj: function(a) { - for (var b = -a.offsetLeft, c = -a.offsetTop; a = a.offsetParent; ) - b -= a.offsetLeft, - c -= a.offsetTop; - a != this.zn && (b *= this.scale, - c *= this.scale); - return { - left: b, - top: c - } - }, - vJ: function(a, b) { - var c, e, f; - f = this.We.length - 1; - c = 0; - for (e = this.We.length; c < e; c++) - if (a >= this.We[c]) { - f = c; - break - } - f == this.HC && (0 < f && 0 > this.QC) && f--; - a = this.We[f]; - e = (e = ue.abs(a - this.We[this.HC])) ? 500 * (ue.abs(this.x - a) / e) : 0; - this.HC = f; - f = this.wf.length - 1; - for (c = 0; c < f; c++) - if (b >= this.wf[c]) { - f = c; - break - } - f == this.IC && (0 < f && 0 > this.RC) && f--; - b = this.wf[f]; - c = (c = ue.abs(b - this.wf[this.IC])) ? 500 * (ue.abs(this.y - b) / c) : 0; - this.IC = f; - f = ue.round(ue.max(e, c)) || 200; - return { - x: a, - y: b, - time: f - } - }, - ba: function(a, b, c) { - (b || this.Nb).addEventListener(a, this, !!c) - }, - $d: function(a, b, c) { - (b || this.Nb).removeEventListener(a, this, !!c) - }, - NC: ga(2), - refresh: function() { - var a, b, c, e = 0; - b = 0; - this.scale < this.options.$k && (this.scale = this.options.$k); - this.Cu = this.zn.clientWidth || 1; - this.An = this.zn.clientHeight || 1; - this.sf = -this.options.n0 || 0; - this.Ky = ue.round(this.Nb.offsetWidth * this.scale); - this.Ip = ue.round((this.Nb.offsetHeight + this.sf) * this.scale); - this.he = this.Cu - this.Ky; - this.qd = this.An - this.Ip + this.sf; - this.RC = this.QC = 0; - this.options.CN && this.options.CN.call(this); - this.kp = this.options.kp && 0 > this.he; - this.xn = this.options.xn && (!this.options.LV && !this.kp || this.Ip > this.An); - this.ii = this.kp && this.options.ii; - this.xi = this.xn && this.options.xi && this.Ip > this.An; - a = this.Zj(this.zn); - this.iG = -a.left; - this.jG = -a.top; - if ("string" == typeof this.options.iu) { - this.We = []; - this.wf = []; - c = this.Nb.querySelectorAll(this.options.iu); - a = 0; - for (b = c.length; a < b; a++) - e = this.Zj(c[a]), - e.left += this.iG, - e.top += this.jG, - this.We[a] = e.left < this.he ? this.he : e.left * this.scale, - this.wf[a] = e.top < this.qd ? this.qd : e.top * this.scale - } else if (this.options.iu) { - for (this.We = []; e >= this.he; ) - this.We[b] = e, - e -= this.Cu, - b++; - this.he % this.Cu && (this.We[this.We.length] = this.he - this.We[this.We.length - 1] + this.We[this.We.length - 1]); - b = e = 0; - for (this.wf = []; e >= this.qd; ) - this.wf[b] = e, - e -= this.An, - b++; - this.qd % this.An && (this.wf[this.wf.length] = this.qd - this.wf[this.wf.length - 1] + this.wf[this.wf.length - 1]) - } - this.Sv("h"); - this.Sv("v"); - this.al || (this.Nb.style[Fe] = "0", - this.lo(400)) - }, - scrollTo: function(a, b, c, e) { - var f = a; - this.stop(); - f.length || (f = [{ - x: a, - y: b, - time: c, - TZ: e - }]); - a = 0; - for (b = f.length; a < b; a++) - f[a].TZ && (f[a].x = this.x - f[a].x, - f[a].y = this.y - f[a].y), - this.yj.push({ - x: f[a].x, - y: f[a].y, - time: f[a].time || 0 - }); - this.MB() - }, - disable: function() { - this.stop(); - this.lo(0); - this.enabled = t; - this.$d(Re, window); - this.$d(Se, window); - this.$d(Te, window) - }, - enable: function() { - this.enabled = q - }, - stop: function() { - this.options.wi ? this.$d(Ue) : We(this.fC); - this.yj = []; - this.Yl = this.oh = t - }, - zoom: function(a, b, c, e) { - var f = c / this.scale; - this.options.Yk && (this.al = q, - e = e === l ? 200 : e, - a = a - this.iG - this.x, - b = b - this.jG - this.y, - this.x = a - a * f + this.x, - this.y = b - b * f + this.y, - this.scale = c, - this.refresh(), - this.x = 0 < this.x ? 0 : this.x < this.he ? this.he : this.x, - this.y = this.y > this.sf ? this.sf : this.y < this.qd ? this.qd : this.y, - this.Nb.style[Fe] = e + "ms", - this.Nb.style[De] = "translate(" + this.x + "px," + this.y + "px) scale(" + c + ")" + Xe, - this.al = t) - } - }; - function Ce(a) { - if ("" === we) - return a; - a = a.charAt(0).toUpperCase() + a.substr(1); - return we + a - } - ve = s; - function Ze(a) { - this.j = { - anchor: Yb, - offset: new O(0,0), - maxWidth: "100%", - imageHeight: 80 - }; - var a = a || {}, b; - for (b in a) - this.j[b] = a[b]; - this.Ll = new ec(s,{ - of: "api" - }); - this.bk = []; - this.P = s; - this.ig = { - height: this.j.imageHeight, - width: this.j.imageHeight * $e - }; - this.Rc = this.BB = this.bm = this.Zc = s - } - var af = [0, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 4, 5, 5, 5, 6, 6, 7, 8, 8, 8, 9, 10] - , bf = "\u5176\u4ed6 \u6b63\u95e8 \u623f\u578b \u8bbe\u65bd \u6b63\u95e8 \u9910\u996e\u8bbe\u65bd \u5176\u4ed6\u8bbe\u65bd \u6b63\u95e8 \u8bbe\u65bd \u89c2\u5f71\u5385 \u5176\u4ed6\u8bbe\u65bd".split(" "); - B.Tm(function(a) { - var b = s; - a.addEventListener("position_changed", function() { - a.j.visible && a.j.albumsControl === q && (b ? b.Ey(a.Xb()) : (b = new Ze(a.j.albumsControlOptions), - b.na(a))) - }); - a.addEventListener("albums_visible_changed", function() { - a.j.albumsControl === q ? (b ? b.Ey(a.Xb()) : (b = new Ze(a.j.albumsControlOptions), - b.na(a)), - b.show()) : b.U() - }); - a.addEventListener("albums_options_changed", function() { - b && b.Qk(a.j.albumsControlOptions) - }); - a.addEventListener("visible_changed", function() { - b && (a.kE() ? a.j.albumsControl === q && (b.C.style.visibility = "visible") : b.C.style.visibility = "hidden") - }) - }); - var $e = 1.8; - H() && ($e = 1); - z.extend(Ze.prototype, { - Qk: function(a) { - for (var b in a) - this.j[b] = a[b]; - a = this.j.imageHeight + "px"; - this.uc(this.j.anchor); - this.C.style.width = isNaN(Number(this.j.maxWidth)) === q ? this.j.maxWidth : this.j.maxWidth + "px"; - this.C.style.height = a; - this.gk.style.height = a; - this.Rh.style.height = a; - this.ig = { - height: this.j.imageHeight, - width: this.j.imageHeight * $e - }; - this.fk.style.height = this.ig.height - 6 + "px"; - this.fk.style.width = this.ig.width - 6 + "px"; - this.Ey(this.P.Xb(), q) - }, - na: function(a) { - this.P = a; - this.ls(); - this.yQ(); - this.OY(); - this.Ey(a.Xb()) - }, - ls: function() { - var a = this.j.imageHeight + "px"; - this.C = L("div"); - var b = this.C.style; - b.cssText = "background:rgb(37,37,37);background:rgba(37,37,37,0.9);"; - b.position = "absolute"; - b.zIndex = "2000"; - b.width = isNaN(Number(this.j.maxWidth)) === q ? this.j.maxWidth : this.j.maxWidth + "px"; - b.padding = "8px 0"; - b.visibility = "hidden"; - b.height = a; - this.gk = L("div"); - b = this.gk.style; - b.position = "absolute"; - b.overflow = "hidden"; - b.width = "100%"; - b.height = a; - this.Rh = L("div"); - b = this.Rh.style; - b.height = a; - this.gk.appendChild(this.Rh); - this.C.appendChild(this.gk); - this.P.C.appendChild(this.C); - this.fk = L("div", { - "class": "pano_photo_item_seleted" - }); - this.fk.style.height = this.ig.height - 6 + "px"; - this.fk.style.width = this.ig.width - 6 + "px"; - this.uc(this.j.anchor) - }, - RH: function(a) { - for (var b = this.bk, c = b.length - 1; 0 <= c; c--) - if (b[c].panoId == a) - return c; - return -1 - }, - Ey: function(a, b) { - if (b || !this.bk[this.Zc] || !(this.bk[this.Zc].panoId == a && 3 !== this.bk[this.Zc].recoType)) { - var c = this - , e = this.RH(a); - !b && -1 !== e && this.bk[e] && 3 !== this.bk[e].recoType ? this.Mp(e) : this.dY(function(a) { - for (var b = {}, e, k, m = t, n = [], o = 0, p = a.length; o < p; o++) - e = a[o].catlog, - k = a[o].floor, - l !== e && ("" === e && l !== k ? (m = q, - b[k] || (b[k] = []), - b[k].push(a[o])) : (b[af[e]] || (b[af[e]] = []), - b[af[e]].push(a[o]))); - for (var v in b) - m ? n.push({ - data: v + "F", - index: v - }) : n.push({ - data: bf[v], - index: v - }); - c.jH = b; - c.Ji = n; - c.Il(a); - 0 == a.length ? c.U() : c.show() - }) - } - }, - vW: function() { - if (!this.Gi) { - var a = this.SX(this.Ji) - , b = L("div"); - b.style.cssText = ["width:" + 134 * this.Ji.length + "px;", "overflow:hidden;-ms-user-select:none;-moz-user-select:none;-webkit-user-select:none;"].join(""); - b.innerHTML = a; - a = L("div"); - a.appendChild(b); - a.style.cssText = "position:absolute;top:-25px;background:rgb(37,37,37);background:rgba(37,37,37,0.9);border-bottom:1px solid #4e596a;width:100%;line-height:25px;height:25px;overflow:scroll;outline:0"; - new Ye(a,{ - Go: t, - iy: q, - ii: t, - xi: t, - xn: t, - OE: q, - Pw: q, - Mx: q - }); - this.C.appendChild(a); - for (var c = this, e = b.getElementsByTagName("span"), f = 0, g = e.length; f < g; f++) - b = e[f], - z.M(b, "click", function() { - if (this.getAttribute("dataindex")) { - c.Il(c.jH[this.getAttribute("dataindex")]); - for (var a = 0, b = e.length; a < b; a++) - e[a].style.color = "#FFFFFF"; - this.style.color = "#3383FF" - } - }); - this.Gi = a - } - }, - sW: function() { - if (this.Gi) - a = this.AL(this.Ji), - this.OQ.innerHTML = a; - else { - var a = this.AL(this.Ji) - , b = L("ul") - , c = this; - b.style.cssText = "list-style: none;padding:0px;margin:0px;display:block;width:60px;position:absolute;top:7px"; - b.innerHTML = a; - z.M(b, "click", function(a) { - if (a = (a.srcElement || a.target).getAttribute("dataindex")) { - c.Il(c.jH[a]); - for (var e = b.getElementsByTagName("li"), f = 0, g = e.length; f < g; f++) - e[f].childNodes[0].getAttribute("dataindex") === a ? z.D.Ua(e[f], "pano_catlogLiActive") : z.D.Pb(e[f], "pano_catlogLiActive") - } - }); - var a = L("div") - , e = L("a") - , f = L("span") - , g = L("a") - , i = L("span") - , k = ["background:url(" + G.qa + "panorama/catlog_icon.png) no-repeat;", "display:block;width:10px;height:7px;margin:0 auto;"].join(""); - f.style.cssText = k + "background-position:-18px 0;"; - e.style.cssText = "background:#1C1C1C;display:block;position:absolute;width:58px;"; - i.style.cssText = k + "background-position:0 0;"; - g.style.cssText = "background:#1C1C1C;display:block;position:absolute;width:58px;"; - g.style.top = this.j.imageHeight - 7 + "px"; - a.style.cssText = "position:absolute;top:0px;left:0px;width:60px;"; - e.appendChild(f); - g.appendChild(i); - z.M(e, "mouseover", function() { - var a = parseInt(b.style.top, 10); - 7 !== a && (f.style.backgroundPosition = "-27px 0"); - new tb({ - Ic: 60, - kc: ub.Ks, - duration: 300, - va: function(c) { - b.style.top = a + (7 - a) * c + "px" - } - }) - }); - z.M(e, "mouseout", function() { - f.style.backgroundPosition = "-18px 0" - }); - z.M(g, "mouseover", function() { - var a = parseInt(b.style.top, 10) - , e = c.j.imageHeight - 14; - if (!(parseInt(b.offsetHeight, 10) < e)) { - var f = e - parseInt(b.offsetHeight, 10) + 7; - f !== a && (i.style.backgroundPosition = "-9px 0"); - new tb({ - Ic: 60, - kc: ub.Ks, - duration: 300, - va: function(c) { - b.style.top = a + (f - a) * c + "px" - } - }) - } - }); - z.M(g, "mouseout", function() { - i.style.backgroundPosition = "0 0" - }); - a.appendChild(e); - a.appendChild(g); - e = L("div"); - e.style.cssText = ["position:absolute;z-index:2001;left:20px;", "height:" + this.j.imageHeight + "px;", "width:62px;overflow:hidden;background:rgb(37,37,37);background:rgba(37,37,37,0.9);"].join(""); - e.appendChild(b); - e.appendChild(a); - this.Gi = e; - this.OQ = b; - this.C.appendChild(e) - } - }, - tW: function() { - if (this.Ji && !(0 >= this.Ji.length)) { - var a = L("div"); - a.innerHTML = this.hA; - a.style.cssText = "position:absolute;background:#252525"; - this.C.appendChild(a); - this.Os = a; - this.Rc.jg.style.left = this.ig.width + 8 + "px"; - this.Gi && (this.Gi.style.left = parseInt(this.Gi.style.left, 10) + this.ig.width + 8 + "px"); - var b = this; - z.M(a, "click", function() { - b.P.vc(b.gX) - }) - } - }, - Il: function(a) { - this.bk = a; - this.j.showCatalog && (0 < this.Ji.length ? (Ua() ? this.sW() : this.vW(), - this.Rc.offsetLeft = 60) : (this.Os && (this.C.removeChild(this.Os), - this.Os = s, - this.Rc.jg.style.left = "0px"), - this.Gi && (this.C.removeChild(this.Gi), - this.Gi = s), - this.Rc.offsetLeft = 0)); - var b = this.LX(a); - Ua() && (this.Ji && 0 < this.Ji.length && this.j.showExit && this.hA) && (this.Rc.offsetLeft += this.ig.width + 8, - this.Os ? this.Os.innerHTML = this.hA : this.tW()); - this.Rh.innerHTML = b; - this.Rh.style.width = (this.ig.width + 8) * a.length + 8 + "px"; - a = this.C.offsetWidth; - b = this.Rh.offsetWidth; - this.Rc.Vs && (b += this.Rc.Vs()); - b < a - 2 * this.Rc.Ai - this.Rc.offsetLeft ? this.C.style.width = b + this.Rc.offsetLeft + "px" : (this.C.style.width = isNaN(Number(this.j.maxWidth)) === q ? this.j.maxWidth : this.j.maxWidth + "px", - b < this.C.offsetWidth - 2 * this.Rc.Ai - this.Rc.offsetLeft && (this.C.style.width = b + this.Rc.offsetLeft + "px")); - this.Rc.refresh(); - this.BB = this.Rh.children; - this.Rh.appendChild(this.fk); - this.fk.style.left = "-100000px"; - a = this.RH(this.P.Xb(), this.Y1); - -1 !== a && this.Mp(a) - }, - SX: function(a) { - for (var b = "", c, e = 0, f = a.length; e < f; e++) - c = '
    ' + a[e].data + "
    ", - b += c; - return b - }, - AL: function(a) { - for (var b = "", c, e = 0, f = a.length; e < f; e++) - c = '
  • ' + a[e].data + "
  • ", - b += c; - return b - }, - LX: function(a) { - for (var b, c, e, f, g = [], i = this.ig.height, k = this.ig.width, m = 0; m < a.length; m++) - b = a[m], - recoType = b.recoType, - e = b.panoId, - f = b.name, - c = b.heading, - b = b.pitch, - c = qe.PL(e, c, b, 198, 108), - b = '' + f + '' + f + "", - 3 === recoType ? Ua() ? (this.hA = b, - this.gX = e, - a.splice(m, 1), - m--) : (b = '' + f + '
    ', - g.push(b)) : g.push(b); - return g.join("") - }, - dY: function(a) { - var b = this - , c = this.P.Xb(); - c && this.Ll.Kx(c, function(e) { - b.P.Xb() === c && a(e) - }) - }, - uc: function(a) { - if (!Wa(a) || isNaN(a) || a < Wb || 3 < a) - a = this.defaultAnchor; - var b = this.C - , c = this.j.offset.width - , e = this.j.offset.height; - b.style.left = b.style.top = b.style.right = b.style.bottom = "auto"; - switch (a) { - case Wb: - b.style.top = e + "px"; - b.style.left = c + "px"; - break; - case Xb: - b.style.top = e + "px"; - b.style.right = c + "px"; - break; - case Yb: - b.style.bottom = e + "px"; - b.style.left = c + "px"; - break; - case 3: - b.style.bottom = e + "px", - b.style.right = c + "px" - } - }, - yQ: function() { - this.wQ() - }, - wQ: function() { - var a = this; - z.M(this.C, "touchstart", function(a) { - a.stopPropagation() - }); - z.M(this.gk, "click", function(b) { - if ((b = (b.srcElement || b.target).getAttribute("data-index")) && b != a.Zc) - a.Mp(b), - a.P.vc(a.bk[b].panoId) - }); - z.M(this.Rh, "mouseover", function(b) { - b = (b.srcElement || b.target).getAttribute("data-index"); - b !== s && a.BK(b, q) - }); - this.P.addEventListener("size_changed", function() { - isNaN(Number(a.j.maxWidth)) && a.Qk({ - maxWidth: a.j.maxWidth - }) - }) - }, - Mp: function(a) { - this.fk.style.left = this.BB[a].offsetLeft + 8 + "px"; - this.fk.setAttribute("data-index", this.BB[a].getAttribute("data-index")); - this.Zc = a; - this.BK(a) - }, - BK: function(a, b) { - var c = this.ig.width + 8 - , e = 0; - this.Rc.Vs && (e = this.Rc.Vs() / 2); - var f = this.gk.offsetWidth - 2 * e - , g = this.Rh.offsetLeft || this.Rc.x - , g = g - e - , i = -a * c; - i > g && this.Rc.scrollTo(i + e); - c = i - c; - g -= f; - c < g && (!b || b && 8 < i - g) && this.Rc.scrollTo(c + f + e) - }, - OY: function() { - this.Rc = H() ? new Ye(this.gk,{ - Go: t, - iy: q, - ii: t, - xi: t, - xn: t, - OE: q, - Pw: q, - Mx: q - }) : new cf(this.gk) - }, - U: function() { - this.C.style.visibility = "hidden" - }, - show: function() { - this.C.style.visibility = "visible" - } - }); - function cf(a) { - this.C = a; - this.Vg = a.children[0]; - this.Pr = s; - this.Ai = 20; - this.offsetLeft = 0; - this.na() - } - cf.prototype = { - na: function() { - this.Vg.style.position = "relative"; - this.refresh(); - this.ls(); - this.$l() - }, - refresh: function() { - this.ho = this.C.offsetWidth - this.Vs(); - this.aB = -(this.Vg.offsetWidth - this.ho - this.Ai); - this.Ev = this.Ai + this.offsetLeft; - this.Vg.style.left = this.Ev + "px"; - this.Vg.children[0] && (this.Pr = this.Vg.children[0].offsetWidth); - this.jg && (this.jg.children[0].style.marginTop = this.Hr.children[0].style.marginTop = this.jg.offsetHeight / 2 - this.jg.children[0].offsetHeight / 2 + "px") - }, - Vs: function() { - return 2 * this.Ai - }, - ls: function() { - this.Tv = L("div"); - this.Tv.innerHTML = ''; - this.jg = this.Tv.children[0]; - this.Hr = this.Tv.children[1]; - this.C.appendChild(this.Tv); - this.jg.children[0].style.marginTop = this.Hr.children[0].style.marginTop = this.jg.offsetHeight / 2 - this.jg.children[0].offsetHeight / 2 + "px" - }, - $l: function() { - var a = this; - z.M(this.jg, "click", function() { - a.scrollTo(a.Vg.offsetLeft + a.ho) - }); - z.M(this.Hr, "click", function() { - a.scrollTo(a.Vg.offsetLeft - a.ho) - }) - }, - aV: function() { - z.D.Pb(this.jg, "pano_arrow_disable"); - z.D.Pb(this.Hr, "pano_arrow_disable"); - var a = this.Vg.offsetLeft; - a >= this.Ev && z.D.Ua(this.jg, "pano_arrow_disable"); - a - this.ho <= this.aB && z.D.Ua(this.Hr, "pano_arrow_disable") - }, - scrollTo: function(a) { - a = a < this.Vg.offsetLeft ? Math.ceil((a - this.Ai - this.ho) / this.Pr) * this.Pr + this.ho + this.Ai - 8 : Math.ceil((a - this.Ai) / this.Pr) * this.Pr + this.Ai; - a < this.aB ? a = this.aB : a > this.Ev && (a = this.Ev); - var b = this.Vg.offsetLeft - , c = this; - new tb({ - Ic: 60, - kc: ub.Ks, - duration: 300, - va: function(e) { - c.Vg.style.left = b + (a - b) * e + "px" - }, - finish: function() { - c.aV() - } - }) - } - }; - B.Map = Ka; - B.Hotspot = ib; - B.MapType = id; - B.Point = J; - B.Pixel = Q; - B.Size = O; - B.Bounds = fb; - B.TileLayer = Mc; - B.Projection = jc; - B.MercatorProjection = S; - B.PerspectiveProjection = hb; - B.Copyright = function(a, b, c) { - this.id = a; - this.bb = b; - this.content = c - } - ; - B.Overlay = mc; - B.Label = uc; - B.GroundOverlay = vc; - B.PointCollection = zc; - B.Marker = U; - B.CanvasLayer = Cc; - B.Icon = qc; - B.IconSequence = sc; - B.Symbol = rc; - B.Polyline = Gc; - B.Polygon = Fc; - B.InfoWindow = tc; - B.Circle = Hc; - B.Control = Vb; - B.NavigationControl = jb; - B.GeolocationControl = Zb; - B.OverviewMapControl = lb; - B.CopyrightControl = $b; - B.ScaleControl = kb; - B.MapTypeControl = mb; - B.CityListControl = ac; - B.PanoramaControl = cc; - B.TrafficLayer = Vc; - B.CustomLayer = nb; - B.ContextMenu = fc; - B.MenuItem = ic; - B.LocalSearch = cb; - B.TransitRoute = Kd; - B.DrivingRoute = Nd; - B.WalkingRoute = Od; - B.RidingRoute = Pd; - B.Autocomplete = Zd; - B.RouteSearch = Td; - B.Geocoder = Ud; - B.LocalCity = Wd; - B.Geolocation = Geolocation; - B.Convertor = lc; - B.BusLineSearch = Yd; - B.Boundary = Xd; - B.VectorCloudLayer = Tc; - B.VectorTrafficLayer = Uc; - B.Panorama = Oa; - B.PanoramaLabel = ee; - B.PanoramaService = ec; - B.PanoramaCoverageLayer = dc; - B.PanoramaFlashInterface = oe; - function T(a, b) { - for (var c in b) - a[c] = b[c] - } - T(window, { - BMap: B, - _jsload2: function(a, b) { - ia.Wy.ZY && ia.Wy.set(a, b); - K.WV(a, b) - }, - BMAP_API_VERSION: "2.0" - }); - var X = Ka.prototype; - T(X, { - getBounds: X.ve, - getCenter: X.Ka, - getMapType: X.oa, - getSize: X.cb, - setSize: X.Ce, - getViewport: X.ht, - getZoom: X.fa, - centerAndZoom: X.Fd, - panTo: X.qi, - panBy: X.Ag, - setCenter: X.Zf, - setCurrentCity: X.DF, - setMapType: X.Dg, - setViewport: X.yh, - setZoom: X.Qc, - highResolutionEnabled: X.Sx, - zoomTo: X.Gg, - zoomIn: X.kG, - zoomOut: X.lG, - addHotspot: X.Cw, - removeHotspot: X.VZ, - clearHotspots: X.dm, - checkResize: X.ZV, - addControl: X.Aw, - removeControl: X.VN, - getContainer: X.La, - addContextMenu: X.yo, - removeContextMenu: X.Cp, - addOverlay: X.Ga, - removeOverlay: X.Qb, - clearOverlays: X.yK, - openInfoWindow: X.pc, - closeInfoWindow: X.Yc, - pointToOverlayPixel: X.Xe, - overlayPixelToPoint: X.JN, - getInfoWindow: X.hh, - getOverlays: X.Hx, - getPanes: function() { - return { - floatPane: this.Yd.BD, - markerMouseTarget: this.Yd.RE, - floatShadow: this.Yd.sL, - labelPane: this.Yd.KE, - markerPane: this.Yd.fN, - markerShadow: this.Yd.gN, - mapPane: this.Yd.Et, - vertexPane: this.Yd.nP - } - }, - addTileLayer: X.Oe, - removeTileLayer: X.Yf, - pixelToPoint: X.xb, - pointToPixel: X.$b, - setFeatureStyle: X.Lp, - selectBaseElement: X.j5, - setMapStyle: X.Zt, - enable3DBuilding: X.Ro, - disable3DBuilding: X.KW, - getPanorama: X.tm, - initIndoorLayer: X.PY, - setNormalMapDisplay: X.D_ - }); - var df = id.prototype; - T(df, { - getTileLayer: df.oY, - getMinZoom: df.bp, - getMaxZoom: df.sm, - getProjection: df.wm, - getTextColor: df.zm, - getTips: df.gt - }); - T(window, { - BMAP_NORMAL_MAP: La, - BMAP_PERSPECTIVE_MAP: Qa, - BMAP_SATELLITE_MAP: Ya, - BMAP_HYBRID_MAP: Sa - }); - var ef = S.prototype; - T(ef, { - lngLatToPoint: ef.kh, - pointToLngLat: ef.xj - }); - var ff = hb.prototype; - T(ff, { - lngLatToPoint: ff.kh, - pointToLngLat: ff.xj - }); - var gf = fb.prototype; - T(gf, { - equals: gf.pb, - containsPoint: gf.js, - containsBounds: gf.kW, - intersects: gf.ot, - extend: gf.extend, - getCenter: gf.Ka, - isEmpty: gf.tj, - getSouthWest: gf.Ve, - getNorthEast: gf.Rf, - toSpan: gf.YF - }); - var hf = mc.prototype; - T(hf, { - isVisible: hf.jh, - show: hf.show, - hide: hf.U - }); - mc.getZIndex = mc.Ck; - var jf = gb.prototype; - T(jf, { - openInfoWindow: jf.pc, - closeInfoWindow: jf.Yc, - enableMassClear: jf.gj, - disableMassClear: jf.MW, - show: jf.show, - hide: jf.U, - getMap: jf.Dx, - addContextMenu: jf.yo, - removeContextMenu: jf.Cp - }); - var kf = U.prototype; - T(kf, { - setIcon: kf.Rb, - getIcon: kf.ap, - setPosition: kf.sa, - getPosition: kf.ga, - setOffset: kf.Ze, - getOffset: kf.Sf, - getLabel: kf.VD, - setLabel: kf.dn, - setTitle: kf.Ec, - setTop: kf.ui, - enableDragging: kf.Wb, - disableDragging: kf.TC, - setZIndex: kf.Sp, - getMap: kf.Dx, - setAnimation: kf.bn, - setShadow: kf.Oy, - hide: kf.U, - setRotation: kf.Op, - getRotation: kf.TL - }); - T(window, { - BMAP_ANIMATION_DROP: 1, - BMAP_ANIMATION_BOUNCE: 2 - }); - var lf = uc.prototype; - T(lf, { - setStyle: lf.Md, - setStyles: lf.ti, - setContent: lf.dd, - setPosition: lf.sa, - getPosition: lf.ga, - setOffset: lf.Ze, - getOffset: lf.Sf, - setTitle: lf.Ec, - setZIndex: lf.Sp, - getMap: lf.Dx, - getContent: lf.xk - }); - var mf = qc.prototype; - T(mf, { - setImageUrl: mf.mO, - setSize: mf.Ce, - setAnchor: mf.uc, - setImageOffset: mf.Yt, - setImageSize: mf.w_, - setInfoWindowAnchor: mf.z_, - setPrintImageUrl: mf.K_ - }); - var nf = tc.prototype; - T(nf, { - redraw: nf.je, - setTitle: nf.Ec, - setContent: nf.dd, - getContent: nf.xk, - getPosition: nf.ga, - enableMaximize: nf.dh, - disableMaximize: nf.kx, - isOpen: nf.Xa, - setMaxContent: nf.$t, - maximize: nf.hy, - enableAutoPan: nf.Ls - }); - var of = oc.prototype; - T(of, { - getPath: of.Ue, - setPath: of.ke, - setPositionAt: of.gn, - getStrokeColor: of.jY, - setStrokeWeight: of.Rp, - getStrokeWeight: of.WL, - setStrokeOpacity: of.Pp, - getStrokeOpacity: of.kY, - setFillOpacity: of.Xt, - getFillOpacity: of.HX, - setStrokeStyle: of.Qp, - getStrokeStyle: of.VL, - getFillColor: of.GX, - getBounds: of.ve, - enableEditing: of.mf, - disableEditing: of.LW, - getEditing: of.DX - }); - var pf = Hc.prototype; - T(pf, { - setCenter: pf.Zf, - getCenter: pf.Ka, - getRadius: pf.RL, - setRadius: pf.xf - }); - var qf = Fc.prototype; - T(qf, { - getPath: qf.Ue, - setPath: qf.ke, - setPositionAt: qf.gn - }); - var rf = ib.prototype; - T(rf, { - getPosition: rf.ga, - setPosition: rf.sa, - getText: rf.eE, - setText: rf.cu - }); - J.prototype.equals = J.prototype.pb; - Q.prototype.equals = Q.prototype.pb; - O.prototype.equals = O.prototype.pb; - T(window, { - BMAP_ANCHOR_TOP_LEFT: Wb, - BMAP_ANCHOR_TOP_RIGHT: Xb, - BMAP_ANCHOR_BOTTOM_LEFT: Yb, - BMAP_ANCHOR_BOTTOM_RIGHT: 3 - }); - var sf = Vb.prototype; - T(sf, { - setAnchor: sf.uc, - getAnchor: sf.HD, - setOffset: sf.Ze, - getOffset: sf.Sf, - show: sf.show, - hide: sf.U, - isVisible: sf.jh, - toString: sf.toString - }); - var tf = jb.prototype; - T(tf, { - getType: tf.ip, - setType: tf.hn - }); - T(window, { - BMAP_NAVIGATION_CONTROL_LARGE: 0, - BMAP_NAVIGATION_CONTROL_SMALL: 1, - BMAP_NAVIGATION_CONTROL_PAN: 2, - BMAP_NAVIGATION_CONTROL_ZOOM: 3 - }); - var uf = lb.prototype; - T(uf, { - changeView: uf.se, - setSize: uf.Ce, - getSize: uf.cb - }); - var vf = kb.prototype; - T(vf, { - getUnit: vf.sY, - setUnit: vf.LF - }); - T(window, { - BMAP_UNIT_METRIC: "metric", - BMAP_UNIT_IMPERIAL: "us" - }); - var wf = $b.prototype; - T(wf, { - addCopyright: wf.Bw, - removeCopyright: wf.qF, - getCopyright: wf.pm, - getCopyrightCollection: wf.PD - }); - T(window, { - BMAP_MAPTYPE_CONTROL_HORIZONTAL: bc, - BMAP_MAPTYPE_CONTROL_DROPDOWN: 1, - BMAP_MAPTYPE_CONTROL_MAP: 2 - }); - var xf = Mc.prototype; - T(xf, { - getMapType: xf.oa, - getCopyright: xf.pm, - isTransparentPng: xf.zt - }); - var yf = fc.prototype; - T(yf, { - addItem: yf.Dw, - addSeparator: yf.bC, - removeSeparator: yf.sF - }); - var zf = ic.prototype; - T(zf, { - setText: zf.cu - }); - var Af = W.prototype; - T(Af, { - getStatus: Af.xm, - setSearchCompleteCallback: Af.JF, - getPageCapacity: Af.qf, - setPageCapacity: Af.Np, - setLocation: Af.fn, - disableFirstResultSelection: Af.UC, - enableFirstResultSelection: Af.oD, - gotoPage: Af.Am, - searchNearby: Af.Jp, - searchInBounds: Af.an, - search: Af.search - }); - T(window, { - BMAP_STATUS_SUCCESS: 0, - BMAP_STATUS_CITY_LIST: 1, - BMAP_STATUS_UNKNOWN_LOCATION: sd, - BMAP_STATUS_UNKNOWN_ROUTE: 3, - BMAP_STATUS_INVALID_KEY: 4, - BMAP_STATUS_INVALID_REQUEST: 5, - BMAP_STATUS_PERMISSION_DENIED: td, - BMAP_STATUS_SERVICE_UNAVAILABLE: 7, - BMAP_STATUS_TIMEOUT: ud - }); - T(window, { - BMAP_POI_TYPE_NORMAL: 0, - BMAP_POI_TYPE_BUSSTOP: 1, - BMAP_POI_TYPE_BUSLINE: 2, - BMAP_POI_TYPE_SUBSTOP: 3, - BMAP_POI_TYPE_SUBLINE: 4 - }); - T(window, { - BMAP_TRANSIT_POLICY_RECOMMEND: 0, - BMAP_TRANSIT_POLICY_LEAST_TIME: 4, - BMAP_TRANSIT_POLICY_LEAST_TRANSFER: 1, - BMAP_TRANSIT_POLICY_LEAST_WALKING: 2, - BMAP_TRANSIT_POLICY_AVOID_SUBWAYS: 3, - BMAP_TRANSIT_POLICY_FIRST_SUBWAYS: 5, - BMAP_LINE_TYPE_BUS: 0, - BMAP_LINE_TYPE_SUBWAY: 1, - BMAP_LINE_TYPE_FERRY: 2, - BMAP_LINE_TYPE_TRAIN: 3, - BMAP_LINE_TYPE_AIRPLANE: 4, - BMAP_LINE_TYPE_COACH: 5 - }); - T(window, { - BMAP_TRANSIT_TYPE_POLICY_TRAIN: 0, - BMAP_TRANSIT_TYPE_POLICY_AIRPLANE: 1, - BMAP_TRANSIT_TYPE_POLICY_COACH: 2 - }); - T(window, { - BMAP_INTERCITY_POLICY_LEAST_TIME: 0, - BMAP_INTERCITY_POLICY_EARLY_START: 1, - BMAP_INTERCITY_POLICY_CHEAP_PRICE: 2 - }); - T(window, { - BMAP_TRANSIT_TYPE_IN_CITY: 0, - BMAP_TRANSIT_TYPE_CROSS_CITY: 1 - }); - T(window, { - BMAP_TRANSIT_PLAN_TYPE_ROUTE: 0, - BMAP_TRANSIT_PLAN_TYPE_LINE: 1 - }); - var Bf = Jd.prototype; - T(Bf, { - clearResults: Bf.Pe - }); - Ld = Kd.prototype; - T(Ld, { - setPolicy: Ld.bu, - toString: Ld.toString, - setPageCapacity: Ld.Np, - setIntercityPolicy: Ld.oO, - setTransitTypePolicy: Ld.xO - }); - T(window, { - BMAP_DRIVING_POLICY_DEFAULT: 0, - BMAP_DRIVING_POLICY_AVOID_HIGHWAYS: 3, - BMAP_DRIVING_POLICY_AVOID_CONGESTION: 5, - BMAP_DRIVING_POLICY_FIRST_HIGHWAYS: 4 - }); - T(window, { - BMAP_MODE_DRIVING: "driving", - BMAP_MODE_TRANSIT: "transit", - BMAP_MODE_WALKING: "walking", - BMAP_MODE_NAVIGATION: "navigation" - }); - var Cf = Td.prototype; - T(Cf, { - routeCall: Cf.gO - }); - T(window, { - BMAP_HIGHLIGHT_STEP: 1, - BMAP_HIGHLIGHT_ROUTE: 2 - }); - T(window, { - BMAP_ROUTE_TYPE_DRIVING: wd, - BMAP_ROUTE_TYPE_WALKING: vd, - BMAP_ROUTE_TYPE_RIDING: xd - }); - T(window, { - BMAP_ROUTE_STATUS_NORMAL: yd, - BMAP_ROUTE_STATUS_EMPTY: 1, - BMAP_ROUTE_STATUS_ADDRESS: 2 - }); - var Df = Nd.prototype; - T(Df, { - setPolicy: Df.bu - }); - var Ef = Zd.prototype; - T(Ef, { - show: Ef.show, - hide: Ef.U, - setTypes: Ef.KF, - setLocation: Ef.fn, - search: Ef.search, - setInputValue: Ef.Ly - }); - T(nb.prototype, {}); - var Ff = Xd.prototype; - T(Ff, { - get: Ff.get - }); - T(dc.prototype, {}); - T(db.prototype, {}); - T(window, { - BMAP_POINT_DENSITY_HIGH: 200, - BMAP_POINT_DENSITY_MEDIUM: Yc, - BMAP_POINT_DENSITY_LOW: 50 - }); - T(window, { - BMAP_POINT_SHAPE_STAR: 1, - BMAP_POINT_SHAPE_WATERDROP: 2, - BMAP_POINT_SHAPE_CIRCLE: wc, - BMAP_POINT_SHAPE_SQUARE: 4, - BMAP_POINT_SHAPE_RHOMBUS: 5 - }); - T(window, { - BMAP_POINT_SIZE_TINY: 1, - BMAP_POINT_SIZE_SMALLER: 2, - BMAP_POINT_SIZE_SMALL: 3, - BMAP_POINT_SIZE_NORMAL: xc, - BMAP_POINT_SIZE_BIG: 5, - BMAP_POINT_SIZE_BIGGER: 6, - BMAP_POINT_SIZE_HUGE: 7 - }); - T(window, { - BMap_Symbol_SHAPE_CAMERA: 11, - BMap_Symbol_SHAPE_WARNING: 12, - BMap_Symbol_SHAPE_SMILE: 13, - BMap_Symbol_SHAPE_CLOCK: 14, - BMap_Symbol_SHAPE_POINT: 9, - BMap_Symbol_SHAPE_PLANE: 10, - BMap_Symbol_SHAPE_CIRCLE: 1, - BMap_Symbol_SHAPE_RECTANGLE: 2, - BMap_Symbol_SHAPE_RHOMBUS: 3, - BMap_Symbol_SHAPE_STAR: 4, - BMap_Symbol_SHAPE_BACKWARD_CLOSED_ARROW: 5, - BMap_Symbol_SHAPE_FORWARD_CLOSED_ARROW: 6, - BMap_Symbol_SHAPE_BACKWARD_OPEN_ARROW: 7, - BMap_Symbol_SHAPE_FORWARD_OPEN_ARROW: 8 - }); - T(window, { - BMAP_CONTEXT_MENU_ICON_ZOOMIN: gc, - BMAP_CONTEXT_MENU_ICON_ZOOMOUT: hc - }); - T(window, { - BMAP_SYS_DRAWER: Ja, - BMAP_SVG_DRAWER: 1, - BMAP_VML_DRAWER: 2, - BMAP_CANVAS_DRAWER: 3, - BMAP_SVG_DRAWER_FIRST: 4 - }); - B.vV(); - B.Q0(); -} -)() diff --git a/static/BMap/js/map_city.js b/static/BMap/js/map_city.js deleted file mode 100644 index 97cc86d..0000000 --- a/static/BMap/js/map_city.js +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 离线地图城市坐标 - * 文本文件必须以UTF-8编码存储,建议用Notepad++编辑 - * 格式:城市名称 经度 纬度 - */ -var offlinemap_cities = [ - ['北京', 116.427265, 39.918698] - ,['上海', 121.472724, 31.239761] - ,['武汉', 114.28398, 30.601327] - ,['成都', 104.070606, 30.59138] - ,['广州', 113.270404, 23.159763] - ,['重庆', 106.595635, 29.619598] -]; - - -/* 城市数据映射 - * - */ -var offlinemap_cityobj = new Object(); -for(var i=0; i'); - //加载扩展函数 - // document.write(''); - //加载城市坐标 - // document.write(''); -})(); -/////////////////////////////////////////////////////////////////// diff --git a/static/BMap/js/map_plus.js b/static/BMap/js/map_plus.js deleted file mode 100644 index 83e2e7b..0000000 --- a/static/BMap/js/map_plus.js +++ /dev/null @@ -1,4 +0,0 @@ -/* - * 离线地图扩展功能函数 - */ - diff --git a/static/BMap/js/modules b/static/BMap/js/modules deleted file mode 100644 index e8a66db..0000000 --- a/static/BMap/js/modules +++ /dev/null @@ -1,7 +0,0 @@ -_jsload&&_jsload('map', 'BMap.register(function(cL){if(cL.config&&cL.config.isOverviewMap){return}if(cL.isLoaded()){bk(cL)}else{cL.addEventListener("load",function(){bk(this)})}cL.cityName="\u4e2d\u56fd";var T={};T.enableRequest=true;T.request=function(){if(T.enableRequest){T.enableRequest=false;setTimeout(function(){T._request()},500)}};T._request=function(){var cN=cL.getBounds(),cP=cL.getZoom(),cM=ba.convertLL2MC(cN.getSouthWest()),cO=ba.convertLL2MC(cN.getNorthEast());bb.request(function(cQ){T.enableRequest=true;if(cQ&&cQ.current_city&&cQ.current_city["name"]){cL.cityName=cQ.current_city["name"];aZ(cL)}},{qt:"cen",b:cM.lng+","+cM.lat+";"+cO.lng+","+cO.lat,l:cP},"","",true)};cL.addEventListener("load",function(cM){T.request()});cL.addEventListener("moveend",function(cM){T.request()});cL.addEventListener("zoomend",function(cM){T.request()})});function bk(cL){if(cL.temp.copyadded){return}cL.temp.copyadded=true;var cN=new aH(81,2);if(aA()){if(cL.highResolutionEnabled()){cN.width=148;fontSize="21px"}else{cN.width=72;cN.height=0}}var cM=new am({offset:cN,printable:true});cL.cpyCtrl=cM;aZ(cL);cL.addEventListener("maptypechange",function(){aZ(cL)});cL.addControl(cM);var T=new b1();T._opts={printable:true};cL.addControl(T);cL.addEventListener("resize",function(){if(this.getSize().width>=220&&cL.getSize().height>=100){T.show();cM.setOffset(cN)}else{T.hide();cM.setOffset(new aH(4,2))}});if(cL.getSize().width>=220&&cL.getSize().height>=100){T.show()}else{T.hide();cM.setOffset(new aH(4,2))}if(cL.highResolutionEnabled()){T.setOffset(new aH(3,2))}}function aZ(T){var cR="11px",cQ=T.cityName||"\u4e2d\u56fd",cN=T.getMapType(),cS=["\u5e38\u5dde\u5e02","\u6210\u90fd\u5e02","\u5927\u8fde\u5e02","\u91cd\u5e86\u5e02","\u5357\u4eac\u5e02","\u5357\u660c\u5e02","\u6b66\u6c49\u5e02"],cM=[],cP,cO="color:#fff;font-size:"+cR+";text-shadow:0 1px 3px black";switch(cN){case BMAP_SATELLITE_MAP:case BMAP_HYBRID_MAP:cM=[\'© 2013 Baidu - Data © \'];cM.push(\'NavInfo & \');for(var cL in cS){if(cS[cL]==cQ){cP=true;break}}if(cP){cM.push(\'yootu\')}else{cM.push(\'CenNavi\')}cM.push(\' & \u9053\u9053\u901a\');cM.push(" , Image © DigitalGlobe & ");cM.push(\'chinasiwei\');break;case BMAP_PERSPECTIVE_MAP:cM=[\'© 2013 Baidu - Data © \',\'\u90fd\u5e02\u5708\'];break;default:cM=[\'© 2013 Baidu - Data © \'];cM.push(\'NavInfo & \');for(var cL in cS){if(cS[cL]==cQ){cP=true;break}}if(cP){cM.push(\'yootu\')}else{cM.push(\'CenNavi\')}cM.push(\' & \u9053\u9053\u901a\');cM.push("");break}cM=cM.join("");}function b1(T){this.defaultAnchor=BMAP_ANCHOR_BOTTOM_LEFT;this.defaultOffset=new aH(1,0);this.IMG_URL=cc.imgPath+(aA()?"copyright_logo_s.png":"copyright_logo.png")}b1.prototype=new cp();b1.prototype.initialize=function(cL){this._map=cL;var cM=aa("div");cM.style.height="32px";var T=aa("a",{title:"\u5230\u767e\u5ea6\u5730\u56fe\u67e5\u770b\u6b64\u533a\u57df",target:"_blank",href:"http://map.baidu.com/?sr=1"});T.style.outline="none";if(a8.browser.ie==6){T.innerHTML="
    "}else{T.innerHTML=""}if(aA()){if(this._map.highResolutionEnabled()){cM.style.height="50px";T.href="#";this.IMG_URL=cc.imgPath+"copyright_logo_hd.png";T.innerHTML=""}else{cM.style.height="25px";T.href="#";T.innerHTML=""}}cM.appendChild(T);return cM};a8.extend(bz.prototype,{_draw:function(){this._bind()},_bind:function(){var T=this;T._watchSize=function(){var cM=T.getSize();if(T.width!=cM.width||T.height!=cM.height){var cO=new aH(T.width,T.height);var cQ=new bg("onbeforeresize");cQ.size=cO;T.dispatchEvent(cQ);T._updateCenterPoint((cM.width-T.width)/2,(cM.height-T.height)/2);T.maskLayer.style.width=(T.width=cM.width)+"px";T.maskLayer.style.height=(T.height=cM.height)+"px";var cN=new bg("onresize");cN.size=cM;T.dispatchEvent(cN);var cL=parseInt(T.platform.style.left)||0;var cP=parseInt(T.platform.style.top)||0;if(T.currentOperation!=0&&(T.offsetX!=cL||T.offsetY!=cP)){T._setPlatformPosition(cL,cP)}}};a8.on(T.maskLayer,"mouseover",function(cL){T.dispatchEvent(new bg("onmouseover"))});a8.on(T.maskLayer,"mouseout",function(cL){T.dispatchEvent(new bg("onmouseout"))})},_setPlatformPosition:function(T,cN,cL,cM){if(isNaN(T)||isNaN(cN)){return}if(this.offsetX==T&&this.offsetY==cN){return}this._updateCenterPoint(this.offsetX-T,this.offsetY-cN,cL);T=Math.round(T);cN=Math.round(cN);this.offsetX=T;this.offsetY=cN;this.platform.style.left=T+"px";this.platform.style.top=cN+"px";this.maskLayer.style.left=-T+"px";this.maskLayer.style.top=-cN+"px";if(cM!=false){this.dispatchEvent(new bg("onmoving"))}},panTo:function(cL,cN){if(!(cL instanceof cd)){return}var cM=this.pointToPixel(cL);var T=Math.round(this.width/2);var cO=Math.round(this.height/2);cN=cN||{};if(Math.abs(T-cM.x)>this.width||Math.abs(cO-cM.y)>this.height||cN.noAnimation){this._panTo(T-cM.x,cO-cM.y,cL)}else{this._panBy(T-cM.x,cO-cM.y,{duration:cN.duration})}},_panTo:function(cL,T,cN){var cM=this.temp;if(cM.operating==true){return}if(cM.dragAni){cM.dragAni.stop()}this.dispatchEvent(new bg("onmovestart"));this._setPlatformPosition(this.offsetX+cL,this.offsetY+T,cN);this.dispatchEvent(new bg("onmoveend"))},panBy:function(cL,T,cM){cL=Math.round(cL)||0;T=Math.round(T)||0;cM=cM||{};if(Math.abs(cL)<=this.width&&Math.abs(T)<=this.height&&(!cM.noAnimation)){this._panBy(cL,T)}else{this._panTo(cL,T)}},_panBy:function(cL,T,cO){if(this.temp.operating==true){return}cO=cO||{};this.dispatchEvent(new bg("onmovestart"));var cN=this,cM=cN.temp;cM.pl=cN.offsetX;cM.pt=cN.offsetY;if(cM.tlPan){cM.tlPan.cancel()}if(cM.dragAni){cM.dragAni.stop()}cM.tlPan=new g({fps:cO.fps||cN.config.fps,duration:cO.duration||cN.config.actionDuration,transition:cO.transition||aw.easeInOutQuad,render:function(cP){this.terminative=cN.temp.operating;if(cN.temp.operating){return}cN._setPlatformPosition(cM.pl+Math.ceil(cL*cP),cM.pt+Math.ceil(T*cP))},finish:function(cP){cN.dispatchEvent(new bg("onmoveend"));cN.temp.tlPan=false;if(cN.temp.stopArrow==true){cN.temp.stopArrow=false;if(cN.temp.arrow!=0){cN._arrow()}}}})}});'); -_jsload&&_jsload('oppc', 'function cH(){this._container=null}BMap.register(function(cL){if(cL.config.isOverviewMap){return}var T=new cH();at(cL.container,T.render(cL.config.defaultCursor));T._container=cL.container.lastChild;cL.temp.zoomer=T});cH.prototype.render=function(cL){var T=[\'");return T.join("")};cH.prototype.action=function(cS,cT){if(cH._timeline){return}var cR=this._container;if(!cR){return}var c0=cT;var cM=60;var cZ=120;var cU=4/3,cO=Math.ceil((c0?cM:cZ)/2),cP=Math.max(15,cO/cU),cQ=cR.style;cQ.width=cO*2+"px";cQ.height=cP*2+"px";cQ.visibility="visible";var cW=cR.children;if(c0){cW[0].style.backgroundPosition="0 0";cW[1].style.backgroundPosition="-7px 0";cW[2].style.backgroundPosition="0 -7px";cW[3].style.backgroundPosition="-7px -7px"}else{cW[0].style.backgroundPosition="-7px -7px";cW[1].style.backgroundPosition="0 -7px";cW[2].style.backgroundPosition="-7px 0";cW[3].style.backgroundPosition="0 0"}cW=null;var cY=cS.x-cO;var cX=cS.y-cP;if(isNaN(cY)||isNaN(cX)){return}cQ.left=cY+"px";cQ.top=cX+"px";var cL=Math.ceil((c0?cZ:cM)/2);var cN=Math.max(15,cL/cU);cL=cL-cO;cN=Math.ceil(cN-cP);var cV=this;var T=cV._container.style;if(cH._timeline){cH._timeline.end()}cH._timeline=new g({fps:20,duration:240,transition:aw.easeInQuad,delay:100,render:function(c2){if(c2<0.1){return}var c3=Math.ceil(cL*c2);var c1=Math.ceil(cN*c2);T.width=(cO+c3)*2+"px";T.height=(cP+c1)*2+"px";T.left=cY-c3+"px";T.top=cX-c1+"px"},finish:function(){cH._timeline=false;setTimeout(function(){cQ.visibility="hidden"},300)}})};BMap.register(function(cP){var cO=cP;var cN=cP.platform;function cQ(c0,cW){var cS=c0.srcElement||c0.target,cZ=c0.offsetX||c0.layerX||0,cY=c0.offsetY||c0.layerY||0,cV=null,cU=null;if(cS.nodeType!=1){cS=cS.parentNode}while(cS&&cS!=cO.container){if(cS.guid){if(a8.lang.instance(cS.guid) instanceof Y){cV=a8.lang.instance(cS.guid)}if(a8.lang.instance(cS.guid) instanceof bP){cU=a8.lang.instance(cS.guid)}}if(!(cS.clientWidth==0&&cS.clientHeight==0&&cS.offsetParent&&cS.offsetParent.nodeName=="TD")&&cS.namespaceURI!="http://www.w3.org/2000/svg"){cZ+=cS.offsetLeft||0;cY+=cS.offsetTop||0}else{if(cS.namespaceURI=="http://www.w3.org/2000/svg"&&BMap.DrawerSelector){var cT=BMap.DrawerSelector.getDrawer(cO);var cR=cT.getPalette();if(navigator.userAgent.indexOf("Opera")>-1&&cS.tagName!="svg"){var c1=a8.lang.instance(cS.guid);if(c1){var cX=c1.getBounds();cZ=cZ+cO.pointToPixel(cX.getSouthWest()).x;cY=cY+cO.pointToPixel(cX.getNorthEast()).y}break}if(cR&&(!a8.browser.ie||(a8.browser.ie==9&&cS.nodeName.toLowerCase()=="svg"))){cZ+=parseFloat(cR.style.left)+cO.offsetX;cY+=parseFloat(cR.style.top)+cO.offsetY}if(a8.browser.ie==9&&cS.nodeName.toLowerCase()!="svg"){cZ+=cO.offsetX;cY+=cO.offsetY;break}if(!a8.browser.ie){break}}}cS=cS.offsetParent}cW.offsetX=cZ;cW.offsetY=cY;cW.pixel=new bu(cZ,cY);cW.point=cO.pixelToPoint(cW.pixel);cW.overlay=cV;cW.infoWindow=cU;return cW}cP.container.onselectstart=function(){return false};a8.on(cO.platform,"mousemove",function(cR){if(cO.currentOperation==0){cO.dispatchEvent(cQ(cR,new bg("onmousemove").inherit(cR)))}});a8.on(cO.platform,"mousedown",function(cV){if(!cO.config.enableMouseDown){return}var cV=window.event||cV;if(!a8.browser.ie){cC(cV)}var cT=cO.temp;cT.operating=true;var cS=cV.srcElement||cV.target;if(cT.dragAni){cT.dragAni.stop()}cT.tpx=cV.clientX||cV.pageX||0;cT.tpy=cV.clientY||cV.pageY||0;var cR=cS;while(cR){if(cR==cO.container){break}if(a8.dom.hasClass(cR,"BMap_Marker")){cT.operating=false;var cU=a8.lang.instance(cR.guid);if(cU instanceof ad&&cU._config.clickable==true||cU._config.enableDragging==true){return}}cR=cR.parentNode}if(cS.nodeType!=1){cS=cS.parentNode}if(a8.browser.ie&&cO.maskLayer.setCapture){cO.maskLayer.setCapture()}cO.dispatchEvent(cQ(cV,new bg("onmousedown").inherit(cV)));if(cO.config.enableDragging&&!(cO.currentOperation&bn.drag)&&cV.button!=2){cT.mx=cT.tpx;cT.my=cT.tpy;cT.pl=cO.offsetX;cT.pt=cO.offsetY;cO.currentOperation|=bn.drag;if(cO.temp.curSpots.length==0){cO.platform.style.cursor=cO.config.draggingCursor}else{cO.platform.style.cursor="pointer"}}});a8.on(document,"mousemove",function(cU){var cU=window.event||cU;if(!a8.browser.ie){cC(cU)}var cT=cO.temp;var cR=cU.clientX||cU.pageX||0;var cX=cU.clientY||cU.pageY||0;if(cT.tpx||cT.tpy){cT.mox=cR-cT.tpx;cT.moy=cX-cT.tpy}var cV=aE(),cW=(cV-cT.lastLoadTileTime)>40;if(cV-cT.lastDomMoveTime<18){return}if(cW){cT.lastLoadTileTime=cV}cT.lastDomMoveTime=cV;if(cO.currentOperation&bn.drag&&cO.config.enableDragging){var cS=cO.platform.style;if(cS.cursor.replace(/"|\s/g,"")!=cO.config.draggingCursor){cS.cursor=cO.config.draggingCursor}if(!cT._moved){cO.dispatchEvent(cQ(cU,new bg("ondragstart").inherit(cU)));cO.dispatchEvent(new bg("onmovestart"));cT.dragStartPos=new bu(cR,cX);cT.dragStartTime=cV}if(cT.mx==0&&cT.my==0&&cO.temp.keyboardDrag){cT.mx=cR;cT.my=cX;cT.pl=cO.offsetX;cT.pt=cO.offsetY}if(cR-cT.mx!=0||cX-cT.my!=0){cO.temp._moved=true;cO.dispatchEvent(cQ(cU,new bg("ondragging").inherit(cU)));cO._setPlatformPosition(cT.pl+cR-cT.mx,cT.pt+cX-cT.my,null,cW)}}});a8.on(document,"mouseup",function(cU){if(a8.browser.ie&&cO.maskLayer.releaseCapture){cO.maskLayer.releaseCapture()}var cS=cO.temp;if(cS.preEnableClickPan){cO.enableClickPan(true)}var cU=window.event||cU,cR=cU.clientX||cU.pageX,cV=cU.clientY||cU.pageY;if(cO.currentOperation&bn.drag&&cO.config.enableDragging){cO.currentOperation^=bn.drag;if(cS.curSpots.length==0){cO.platform.style.cursor=cO.config.defaultCursor}else{cO.platform.style.cursor="pointer"}if(cO.temp._moved){var cT=cQ(cU,new bg("ondragend").inherit(cU));cO.dispatchEvent(cT);cO._processInertialDragging(new bu(cR,cV))}cS._moved=false}cS.operating=false;if(cU.button==2){cS.tpx=null;cS.tpy=null;cS.mox=0;cS.moy=0}});function cM(cU){var cT=cO.temp,cS=!cT.mox&&!cT.moy;if(cT.rightDblclickTimer){clearTimeout(cT.rightDblclickTimer);cT.rightDblclickTimer=null;if(cS){cO.dispatchEvent(cQ(cU,new bg("onrightclick").inherit(cU)));cO.currentOperation|=bn.dblclick;cO.dispatchEvent(cQ(cU,new bg("onrightdblclick").inherit(cU)));cO.currentOperation^=bn.dblclick}}else{if(cS){cO.dispatchEvent(cQ(cU,new bg("onrightclick").inherit(cU)))}var cR=cQ(cU,new bg("onrightclickex").inherit(cU));cT.rightDblclickTimer=setTimeout(function(){cT.rightDblclickTimer=null;if(cS){cO.dispatchEvent(cR)}},cO.config.clickInterval)}}if(a8.browser.firefox>=4){a8.on(cO.container,"mouseup",function(cR){if(cR.button==2){cM(cR)}});a8.on(cO.container,"contextmenu",function(cR){co(cR)})}else{a8.on(cO.container,"contextmenu",function(cR){cM(cR);co(cR)})}var T=new Date();function cL(cU){if(cO.config.enableWheelZoom){var cT=cO.temp;if(cT.dragAni){cT.dragAni.stop()}cO.currentOperation|=bn.mousewheel;var cU=window.event||cU;cO.lastLevel=cO.zoomLevel;var cS=new bg("onmousewheel");cS.trend=cU.wheelDelta>=0||cU.detail<0;var cR=new Date();if(cS.trend==true&&cO.zoomLevel==cO.getMapType().getMaxZoom()||cS.trend==false&&cO.zoomLevel==cO.getMapType().getMinZoom()||cR-T<220){cO.currentOperation^=bn.mousewheel;cC(cU);return}T=cR;cQ(cU,cS.inherit(cU));cO.dispatchEvent(cS);cO.currentOperation^=bn.mousewheel;cC(cU)}}a8.on(cO.container,"mousewheel",cL);if(window.addEventListener){cO.container.addEventListener("DOMMouseScroll",cL,false)}a8.on(cO.platform,"click",function(cV){var cT=new bg("onclick"),cU=new bg("onclickex"),cS=cO.temp;cQ(cV,cT.inherit(cV));cQ(cV,cU.inherit(cV));if(!cO.currentOperation){var cR=!cS.mox&&!cS.moy;if(cR){cO.dispatchEvent(cT)}if(!cS._clickTimer){cS._clickTimer=setTimeout(function(){cS._clickTimer=null;if(cR){cO.dispatchEvent(cU)}},cO.config.clickInterval)}}cS.tpx=null;cS.tpy=null;cS.mox=0;cS.moy=0});a8.on(cO.platform,"dblclick",function(cS){if(!cO.currentOperation){cO.currentOperation|=bn.dblclick;if(a8.browser.ie){cO.dispatchEvent(cQ(cS,new bg("onclick").inherit(cS)))}var cR=cO.temp;if(cR._clickTimer){clearTimeout(cR._clickTimer);cR._clickTimer=null}cO.dispatchEvent(cQ(cS,new bg("ondblclick").inherit(cS)));cO.currentOperation^=bn.dblclick}});a8.on(document,"mousedown",function(cT){var cT=window.event||cT;var cS=cT.srcElement||cT.target;var cR=cO.temp;if(cR.canKeyboard){cR.canKeyboard=a8.dom.contains(cP.container,cS)}else{cR.canKeyboard=a8.dom.contains(cP.platform,cS)}})});bz.prototype._processInertialDragging=function(c2){var c5=this;if(!c5.config.enableInertialDragging){c5.dispatchEvent(new bg("onmoveend"));return}var cT=c5.temp;var cL=aE();if(cL-cT.lastDomMoveTime>100){c5.dispatchEvent(new bg("onmoveend"));cT._moved=false;return}else{var c3=cT.dragStartPos,cW=c2,T=ct(c3,cW),c0=[cW.x-c3.x>0?1:-1,cW.y-c3.y>0?1:-1],cN=(cL-cT.dragStartTime)/1000,cR=T/cN/2,cS=0.5,c1=cR/(2*cS),cZ=0.4*c1*cR/1000,cQ=Math.abs(c3.x-cW.x),cP=Math.abs(c3.y-cW.y),cX=0,cU=0;if(cP==0){cX=cQ}else{var cO=Math.abs(c3.x-cW.x)/Math.abs(c3.y-cW.y);cU=Math.round(Math.sqrt(cZ*cZ/(1+cO*cO)));cX=Math.round(cO*cU)}if(c0[0]==-1){cX=-cX}if(c0[1]==-1){cU=-cU}if(cT.dragAni){cT.dragAni.stop()}var cM=cR/1000,cY=c5.offsetX,cV=c5.offsetY,c4=false;cT.dragAni=new g({duration:c1,fps:30,transition:function(c6){var c6=c6*cM/(2*cS);return cM*c6-cS*c6*c6},render:function(c6){c6=c6*(4*cS)/(cM*cM);c4=!c4;c5._setPlatformPosition(cY+Math.round(c6*cX),cV+Math.round(c6*cU),null,c4)},finish:function(){cT.dragAni=null;c5._setPlatformPosition(cY+Math.round(cX),cV+Math.round(cU));c5.dispatchEvent(new bg("onmoveend"))},onStop:function(c6){cT.dragAni=null;c6=c6*(4*cS)/(cM*cM);c5._setPlatformPosition(cY+Math.round(c6*cX),cV+Math.round(c6*cU));setTimeout(function(){c5.dispatchEvent(new bg("onmoveend"))},1)}})}};BMap.register(function(cL){var T=cL;a8.on(document,"keydown",function(cM){if(T.temp.stopArrow==true){T.temp.stopArrow=false}if(T.config.enableKeyboard&&T.temp.canKeyboard){var cM=window.event||cM;switch(cM.keyCode||cM.which){case 43:case 189:case 109:T.temp.operating=true;T.dispatchEvent(new bg("onminuspress"));break;case 43:case 61:case 187:case 107:T.temp.operating=true;T.dispatchEvent(new bg("onpluspress"));break;case 33:T.temp.operating=false;T.temp.stopArrow=true;T.panBy(0,Math.round(T.height*0.8));co(cM);break;case 34:T.temp.operating=false;T.temp.stopArrow=true;T.panBy(0,-Math.round(T.height*0.8));co(cM);break;case 35:T.temp.operating=false;T.temp.stopArrow=true;T.panBy(-Math.round(T.width*0.8),0);co(cM);break;case 36:T.temp.operating=false;T.temp.stopArrow=true;T.panBy(Math.round(T.width*0.8),0);co(cM);break;case 37:T.temp.operating=true;T.temp.arrow|=1;T._arrow();co(cM);break;case 38:T.temp.operating=true;T.temp.arrow|=2;T._arrow();co(cM);break;case 39:T.temp.operating=true;T.temp.arrow|=4;T._arrow();co(cM);break;case 40:T.temp.operating=true;T.temp.arrow|=8;T._arrow();co(cM);break}}});a8.on(document,"keyup",function(cM){if(T.config.enableKeyboard){var cM=window.event||cM;switch(cM.keyCode||cM.which){case 37:T.temp.arrow=T.temp.arrow&~1;if(T.temp.arrow!=0){T._arrow()}break;case 38:T.temp.arrow=T.temp.arrow&~2;if(T.temp.arrow!=0){T._arrow()}break;case 39:T.temp.arrow=T.temp.arrow&~4;if(T.temp.arrow!=0){T._arrow()}break;case 40:T.temp.arrow=T.temp.arrow&~8;if(T.temp.arrow!=0){T._arrow()}break}}T.temp.operating=false});bz.prototype._arrow=function(){if(this._arrow.occurrent&&this._arrow._lastArrow==this.temp.arrow&&this.temp.stopArrow==true){return}var cM=this;var cO=cM.temp.arrow;cM._arrow._lastArrow=cO;cM._arrow.interval=30;cM._arrow.duration=999;cM._arrow.dx=cM._arrow.dy=0;if(cO&1){cM._arrow.dx=1}if(cO&2){cM._arrow.dy=1}if(cO&4){cM._arrow.dx=-1}if(cO&8){cM._arrow.dy=-1}if(cO&1&&cO&4){cM._arrow.dx=0}if(cO&2&&cO&8){cM._arrow.dy=0}if(!cM._arrow.occurrent){cM._arrow.occurrent=true;cM._arrow.time=aE();cM._arrow.beginTime=cM._arrow.time;cM.dispatchEvent(new bg("onmovestart"));var cN=new g({fps:cM._arrow.interval,duration:cM._arrow.duration,transition:aw.linear,render:function(cV){var cQ=cM._arrow;var cT=cM.temp.arrow;if(cM._arrow._lastArrow!=cT){cM._arrow._lastArrow=cT;if(cT&1){cQ.dx=1}if(cT&2){cQ.dy=1}if(cT&4){cQ.dx=-1}if(cT&8){cQ.dy=-1}if(cT&1&&cT&4){cQ.dx=0}if(cT&2&&cT&8){cQ.dy=0}}if(cM.temp.stopArrow==true){cQ.dx=0;cQ.dy=0}var cU=aE();var cS=Math.pow((cU-cQ.beginTime)/cQ.duration,2);if(!cM.temp.arrow){cQ.occurrent=false;cN.terminative=true;cM._arrow.time=aE();setTimeout(function(){cM.dispatchEvent(new bg("onmoveend"))},40)}var cW=(cU-cQ.time);var cR=cQ.dx*cW*cS>=0?Math.ceil(cQ.dx*cW*cS):Math.floor(cQ.dx*cW*cS);var cP=cQ.dy*cW*cS>=0?Math.ceil(cQ.dy*cW*cS):Math.floor(cQ.dy*cW*cS);if(cR!=0&&cP!=0){cR=Math.round(cR*0.7);cP=Math.round(cP*0.7)}cQ.time=cU;cM._setPlatformPosition(cM.offsetX+cR,cM.offsetY+cP)},finish:function(){cM._arrow.time=aE();setTimeout(function(){cM._arrowPan()},cM._arrow.interval)}})}};bz.prototype._arrowPan=function(){var cP=this;var cN=cP._arrow;if(cP.temp.stopArrow){cN.dx=0;cN.dy=0}if(!cP.temp.arrow){cN.occurrent=false;cP.dispatchEvent(new bg("onmoveend"));return}var cQ=aE();var cR=(cQ-cN.time);var cO=Math.ceil(cN.dx*cR);var cM=Math.ceil(cN.dy*cR);cN.time=cQ;cP._setPlatformPosition(cP.offsetX+cO,cP.offsetY+cM);setTimeout(function(){cP._arrowPan()},cN.interval)}});'); -_jsload&&_jsload('tile', 'a8.extend(bR.prototype,{initialize:function(){var T=this,cL=T.map;cL.addEventListener("loadcode",function(){T.loadTiles()});cL.addEventListener("addtilelayer",function(cM){T.addTileLayer(cM)});cL.addEventListener("removetilelayer",function(cM){T.removeTileLayer(cM)});cL.addEventListener("setmaptype",function(cM){T.setMapType(cM)});cL.addEventListener("zoomstartcode",function(cM){T._zoom(cM)});T._addOtherEvt(cL)},loadTiles:function(){var T=this;if(a8.browser.ie){try{document.execCommand("BackgroundImageCache",false,true)}catch(cL){}}if(T.zoomsDiv){a8.dom.hide(T.zoomsDiv)}if(!this.loaded){T.initMapTypeTiles();this.loaded=true}T.moveGridTiles()},_asyncLoadTiles:function(){var T=this,cL=T.map;T._addOtherEvt(cL);T.loadTiles()},_addOtherEvt:function(cL){var T=this;cL.addEventListener("mousewheel",function(cM){T.mouseWheel(cM)});cL.addEventListener("dblclick",function(cM){T.dblClick(cM)});cL.addEventListener("rightdblclick",function(cM){T.dblClick(cM)});cL.addEventListener("minuspress",function(cM){T.keypress(cM)});cL.addEventListener("pluspress",function(cM){T.keypress(cM)});cL.addEventListener("moving",function(cM){T.moveGridTiles()});cL.addEventListener("resize",function(cM){T.moveGridTiles()})},addTileLayer:function(cN){var cM=this;var T=cN.target;for(var cL=0;cL0){c0._diff++}else{c0._diff--}}if(this._zTimeLine&&this._zTimeLine.schedule==0){this._zTimeLine.stop();this._zTimeLine=null;cQ=c0._diff}if((!cM||cM.width==0&&cM.height==0)&&c1.enableContinuousZoom){cZ.temp.zoomer.action(cN,cQ>0?true:false)}var cR=Math.pow(2,cQ);var cL=this.zoomsDiv;var cS=cL.style;cS.visibility="";var cW=cL.children.length;for(var cV=cW-1;cV>-1;cV--){var cT={};var cU=cL.children[cV].style;cT.top=parseInt(cU.top)||0;cT.left=parseInt(cU.left)||0;cT.width=parseInt(cU.width);cT.height=parseInt(cU.height);cT.dw=cT.width*cR-cT.width;cT.dh=cT.height*cR-cT.height;cT.dx=(cT.left-cY.x)*cR-(cT.left-cY.x);cT.dy=(cT.top-cY.y)*cR-(cT.top-cY.y);cX[cV]=cT}cL._ol=parseInt(cL.style.left);cL._ot=parseInt(cL.style.top);if(this._zTimeLine){this._zTimeLine.stop();this._zTimeLine=null}this._zTimeLine=new g({fps:20,duration:c1.enableContinuousZoom?c1.zoomerDuration:1,transition:aw.easeInQuad,render:function(c4){if(c4<0.1){return}for(var c3=cX.length-1;c3>-1;c3--){var c5=cX[c3];if(cL.children[c3]){var c2=cL.children[c3].style;c2.top=Math.round(c5.top+c5.dy*c4)+"px";c2.left=Math.round(c5.left+c5.dx*c4)+"px";c2.width=Math.ceil(c5.width+c5.dw*c4)+"px";c2.height=Math.ceil(c5.height+c5.dh*c4)+"px"}}if(cP||cO){cS.left=cL._ol-(cP*c4)+"px";cS.top=cL._ot-(cO*c4)+"px"}},finish:function(){c0.moveGridTiles();if(cZ.overlayDiv){if(a8.browser.ie&&a8.browser.ie<8||document.compatMode=="BackCompat"){a8.dom.show(cZ.overlayDiv)}else{setTimeout(function(){a8.dom.show(cZ.overlayDiv)},100)}}c0._normalLayerContainer.style.visibility="";c0._mapTypeLayerContainer.style.visibility="";delete c0._diff;cZ.dispatchEvent(new bg("onzoomend"));cL=null;c0._zTimeLine=null}})},setMapType:function(cQ){var cN=this;var cP=cN.map;this._showAvatarDivs(true);cP.addEventListener("tilesloaded",function(){setTimeout(function(){cN._removeAvatarDivs()},200);cP.removeEventListener("tilesloaded",arguments.callee)});for(var cM in this.mapTiles){this.hideTile(this.mapTiles[cM])}for(var cM in this.bufferTiles){this.hideTile(this.bufferTiles[cM])}var cO=this.mapTypeLayers;for(var cL=0,T=cO.length;cL=0?cL-cN:0;cO=cO-cN>=0?cO-cN:0;cM=cM-cN>=0?cM-cN:0}this._container.style.width=cQ+"px";this._container.style.height=cL+"px";this._zoomDom.style.height=cO+"px";this._zoomDom.style.width=cQ+"px";this._btnZoomOut.style.top=cO-21+"px";this._sliderDom.style.height=cM+"px";this._sliderBaseDom.style.height=cM+"px";if(this._opts.type==BMAP_NAVIGATION_CONTROL_ZOOM){this._zoomDom.children[0].style.left=this._zoomDom.children[1].style.left="0"}else{this._zoomDom.children[0].style.left=this._zoomDom.children[1].style.left=""}},_getControlHeight:function(cL){var T=62;if(!this._opts.showZoomInfo||this._map.getMapType()==BMAP_PERSPECTIVE_MAP){T=37}var cM=[{width:T,height:204,zoomHeight:159,zoomWidth:37,sliderHeight:120,sliderCHeight:120},{width:37,height:97,zoomHeight:42,zoomWidth:37,sliderHeight:0,sliderCHeight:0},{width:37,height:57,zoomHeight:0,zoomWidth:0,sliderHeight:0,sliderCHeight:0},{width:22,height:42,zoomHeight:42,zoomWidth:18,sliderHeight:0,sliderCHeight:0}];return cM[cL]},_generateHtml:function(){var T=[];T.push(this._generatePanHtml());T.push(this._generateZoomContainerHtml());return T.join("")},_generatePanHtml:function(){var T=\'
    \';return T},_generateZoomContainerHtml:function(){var T=\'
    \'+this._generateZoomHtml()+this._generateSliderHtml()+this._generateZoomBalloonHtml()+"
    ";return T},_generateZoomHtml:function(){var T=\'
    \';return T},_generateSliderHtml:function(){var T=\'
    \';return T},_generateZoomBalloonHtml:function(){var T=\'
    \';return T},_getElementByClassNamePattern:function(cO){var cN=this._getElementByClassNamePattern;if(typeof(cN.cache)==="undefined"){cN.cache=me._container.getElementsByTagName("*")}var cL=cN.cache,cM=null,T=cL.length,cP=null;for(cM=0;cM=BMAP_NAVIGATION_CONTROL_LARGE&&T<=BMAP_NAVIGATION_CONTROL_ZOOM){this._opts.type=T}else{this._opts.type=BMAP_NAVIGATION_CONTROL_LARGE}if(!this._map||!this._container){return}var cL=this._container;cL.className=cL.className.replace(/BMap_stdMpType[0-3]*/,"BMap_stdMpType"+this._opts.type);this._setSliderHeight();if(T!=BMAP_NAVIGATION_CONTROL_LARGE){a8.dom.removeClass(cL.children[1].children[2],"hvr")}this.setAnchor(this._opts.anchor)},getType:function(){return this._opts.type},_bind:function(){var cR=this;var cQ=cR._container;a8.on(this._zoomDom,"mouseover",function(){if(!cR._isShowLevelHint){return}cR._msover=true;if(cR._hideTimerId){clearTimeout(cR._hideTimerId);cR._hideTimerId=null}cR._showLevelHint()});a8.on(this._zoomDom,"mouseout",function(){if(!cR._isShowLevelHint){return}if(cR._hideTimerId){clearTimeout(cR._hideTimerId)}cR._msover=false;cR._hideTimerId=setTimeout(function(){cR._hideLevelHint();cR._hideTimerId=null},1000)});a8.on(cQ.children[0],"mouseover",function(){cR._hideLevelHint(true)});a8.on(cQ.children[0].children[0],"click",function(){cR._panBy(0,Math.round(cR._map.height/3))});a8.on(cQ.children[0].children[1],"click",function(){cR._panBy(Math.round(cR._map.width/3),0)});a8.on(cQ.children[0].children[2],"click",function(){cR._panBy(-Math.round(cR._map.width/3),0)});a8.on(cQ.children[0].children[3],"click",function(){cR._panBy(0,-Math.round(cR._map.height/3))});a8.on(cQ.children[0].children[0],"mouseover",function(){cR._panBtnContainer.style.backgroundPosition="0 -44px"});a8.on(cQ.children[0].children[1],"mouseover",function(){cR._panBtnContainer.style.backgroundPosition="0 -176px"});a8.on(cQ.children[0].children[2],"mouseover",function(){cR._panBtnContainer.style.backgroundPosition="0 -88px"});a8.on(cQ.children[0].children[3],"mouseover",function(){cR._panBtnContainer.style.backgroundPosition="0 -132px"});a8.on(cR._panBtnContainer,"mouseout",function(){cR._panBtnContainer.style.backgroundPosition="0 0"});var cO=cQ.children[1].children;a8.on(cO[0],"click",function(){cR._zoomIn()});a8.on(cO[1],"click",function(){cR._zoomOut()});for(var cM=0;cM<5;cM++){a8.on(cQ.children[0].children[cM],"mouseup",function(cT){if((cR._map.currentOperation&bn.stdMapCtrlDrag)==0&&(cR._map.currentOperation&bn.drag)==0){aP(cT)}});a8.on(cQ.children[0].children[cM],"contextmenu",function(cT){cC(cT)});a8.on(cQ.children[0].children[cM],"click",function(cT){cC(cT)})}a8.on(cO[0],"mouseup",function(cT){if((cR._map.currentOperation&bn.stdMapCtrlDrag)==0&&(cR._map.currentOperation&bn.drag)==0){aP(cT)}});a8.on(cO[1],"mouseup",function(cT){if((cR._map.currentOperation&bn.stdMapCtrlDrag)==0&&(cR._map.currentOperation&bn.drag)==0){aP(cT)}});a8.on(cO[0],"contextmenu",function(cT){cC(cT)});a8.on(cO[1],"contextmenu",function(cT){cC(cT)});var cS=cQ.children[1].children[2].children[2];a8.on(cS,"mouseup",function(cT){if((cR._map.currentOperation&bn.stdMapCtrlDrag)==0&&(cR._map.currentOperation&bn.drag)==0){aP(cT)}});a8.on(cO[0],"click",function(cT){aP(cT)});a8.on(cO[1],"click",function(cT){aP(cT)});a8.on(cO[0],"mouseover",function(){cO[0].style.backgroundPosition="0 -243px"});a8.on(cO[0],"mouseout",function(){if((cR._map.currentOperation&bn.stdMapCtrlDrag)==0){cO[0].style.backgroundPosition="0 -221px"}});a8.on(cO[1],"mouseover",function(){cO[1].style.backgroundPosition="0 -287px"});a8.on(cO[1],"mouseout",function(){if((cR._map.currentOperation&bn.stdMapCtrlDrag)==0){cO[1].style.backgroundPosition="0 -265px"}});a8.on(cS,"click",function(cT){aP(cT)});var cP=cQ.children[1].children[2].children[3];a8.on(cP,"mouseup",function(cT){if(cT.button==2){aP(cT)}});a8.on(cP,"contextmenu",function(cT){cC(cT)});a8.on(this._zoomDom.children[3].children[0],"click",function(cT){cR._map.zoomTo(18)});a8.on(this._zoomDom.children[3].children[1],"click",function(cT){cR._map.zoomTo(12)});a8.on(this._zoomDom.children[3].children[2],"click",function(cT){cR._map.zoomTo(8)});a8.on(this._zoomDom.children[3].children[3],"click",function(cT){cR._map.zoomTo(4)});a8.on(cS,"mousedown",function(cU){cU=window.event||cU;var cT=cU.layerY||cU.offsetY||0;var cV=0;cV=(cR._maxZoom+1)-Math.round(cR._totalZoomLv*parseFloat(cT/(cR._totalZoomLv*cR._sliderInterval)));cR._map.zoomTo(cV)});a8.on(cP,"mouseover",function(){a8.dom.addClass(cP,"h")});a8.on(cP,"mouseout",function(){if((cR._map.currentOperation&bn.stdMapCtrlDrag)==0){a8.dom.removeClass(cP,"h")}});var cN=function(cT){var cT=window.event||cT;if(cT.button==2){return}if((a8.browser.ie&&cT.button!=1)){return}if(cP.setCapture){cP.setCapture()}cR._map.currentOperation|=bn.stdMapCtrlDrag;cR._bind.my=cT.pageY||cT.clientY||0;if(!a8.browser.opera){cR._setSliderBarCursor(cc.draggingCursor)}a8.on(document,"mousemove",T);a8.on(document,"mouseup",cL);aP(cT);return cC(cT)};var T=function(cU){if((cR._map.currentOperation&bn.stdMapCtrlDrag)!=0){var cU=window.event||cU;var cV=cU.pageY||cU.clientY;var cT=cR._curBarY+cV-cR._bind.my;if(cTcR._maxBarY){cT=cR._maxBarY}}cP.style.top=cT+"px";cR._sliderBotDom.style.top=cT+"px";cR._sliderBotDom.style.height=parseInt(cR._sliderBaseDom.style.height)-cT+4+"px"}};var cL=function(cU){if((cR._map.currentOperation&bn.stdMapCtrlDrag)!=0){var cT=a8.g(cP);cR._curBarY=parseInt(cT.style.top);a8.dom.removeClass(cP,"h");cR._map.currentOperation&=~bn.stdMapCtrlDrag;if(cQ&&cP&&cP.releaseCapture){cP.releaseCapture()}if(!a8.browser.opera){cR._setSliderBarCursor(cc.defaultCursor)}var cV=(cR._maxZoom+1)-Math.round(parseFloat(cR._curBarY-cR._minBarY)/parseFloat(cR._maxBarY-cR._minBarY)*(cR._totalZoomLv-1)+1);cR._map.zoomTo(cV);a8.un(document,"mousemove",T);a8.un(document,"mouseup",cL)}};a8.on(cP,"mousedown",cN)},_setSliderBarCursor:function(T){this._container.children[1].children[2].children[3].style.cursor=T},_panBy:function(cL,T){this._map.panBy(cL,T)},_zoomIn:function(){this._map.zoomIn()},_zoomOut:function(){this._map.zoomOut()},_setSliderZoomLv:function(cL){if(!this._container||this.getType()!=BMAP_NAVIGATION_CONTROL_LARGE){return}var T=(this._maxZoom-cL)*this._sliderInterval+this._minBarY;this._curBarY=T>this._maxBarY?this._maxBarY:T"+T.content+""},getDom:function(cN){var cM=cp.prototype.getDom.call(this);if(!ch(cN)){return cM}else{if(cM){for(var cL=0,T=cM.children.length;cLthis._maxZoom){return this._maxZoom}else{return cL}}return -1},_render:function(){cp.prototype._render.call(this);var T=a8.browser.ie!=false?" BMap_ie"+a8.browser.ie:"";var cL=this._container;cL.innerHTML=this._generateHTML();a8.dom.addClass(cL,"BMap_omCtrl"+T);this._omCanvas=cL.children[0].children[0];this._omMapContainer=this._omCanvas.children[0];this._omViewMv=this._omCanvas.children[1];this._omViewMvInn=this._omViewMv.children[0];this._omBtn=cL.children[1];this.setSize(this._opts.size);this._omViewMv.style.cursor=cc.defaultCursor},_generateHTML:function(){var T=[\'
    \',\'
    \',\'
    \',\'
    \'];return T.join("")},_bind:function(){var T=this;a8.on(this._omBtn,"click",function(){T.changeView()});if(a8.browser.ie){a8.on(this._omBtn,"dblclick",function(){T.changeView()})}if(!a8.browser.ie||a8.browser.ie>6){this._omBtn.onmouseover=function(cL){a8.dom.addClass(T._omBtn,"hover")};this._omBtn.onmouseout=function(cL){a8.dom.removeClass(T._omBtn,"hover")}}a8.on(this._omViewMv,"mousedown",function(cL){if(T._omViewMv&&ch(T._omViewMv._drag)&&T._omViewMv._drag=="true"){return}cL=window.event||cL;if(cL.button==2){return}T._omViewMv._drag="true";var cL=window.event||cL;if(T._omViewMv.setCapture){T._omViewMv.setCapture()}T._bind.iniX=parseInt(aJ(T._omViewMv).left);T._bind.iniY=parseInt(aJ(T._omViewMv).top);T._bind.mx=cL.pageX||cL.clientX;T._bind.my=cL.pageY||cL.clientY;T._bind.i=0;T._bind.j=0;T._setViewMvCursor(cc.draggingCursor);aP(cL);return cC(cL)});a8.on(document,"mousemove",function(cR){if(T._omViewMv&&T._omViewMv._drag=="true"){var cR=window.event||cR;var cL=cR.pageX||cR.clientX;var cS=cR.pageY||cR.clientY;T._bind.curX=T._bind.iniX+cL-T._bind.mx;T._bind.curY=T._bind.iniY+cS-T._bind.my;var cQ=3;T._bind._moveX=0;T._bind._moveY=0;if(T._bind.curX<=0){T._bind._moveX=cQ}if(T._bind.curY<=0){T._bind._moveY=cQ}if(T._bind.curX+T._omViewMv.offsetWidth>=T._overviewMap.width){T._bind._moveX=-cQ}if(T._bind.curY+T._omViewMv.offsetHeight>=T._overviewMap.height){T._bind._moveY=-cQ}T._omViewMv.style.left=T._bind.curX+"px";T._omViewMv.style.top=T._bind.curY+"px";if((T._bind._moveX!=0||T._bind._moveY!=0)&&!T._bind.intervalId){T._bind._mapMoving=true;var cP=T._overviewMap.offsetX;var cN=T._overviewMap.offsetY;var cO=cP+T._bind._moveX;var cM=cN+T._bind._moveY;T._overviewMap._setPlatformPosition(cO,cM);T._bind.intervalId=setInterval(function(){var cU=T._bind._moveX!=0?(T._bind._moveX>0?T._bind.i+=cQ:T._bind.i-=cQ):T._bind.i;var cT=T._bind._moveY!=0?(T._bind._moveY>0?T._bind.j+=cQ:T._bind.j-=cQ):T._bind.j;T._overviewMap._setPlatformPosition(cO+cU,cM+cT)},30)}if(T._bind._moveX==0&&T._bind._moveY==0){clearInterval(T._bind.intervalId);delete T._bind.intervalId;T._bind.i=0;T._bind.j=0}aP(cR);return cC(cR)}});a8.on(document,"mouseup",function(cO){if(T._omViewMv&&T._omViewMv._drag=="true"){T._omViewMv._drag="";T._setViewMvCursor(cc.defaultCursor);if(T._omViewMv.releaseCapture){T._omViewMv.releaseCapture()}if(T._bind.initX==T._bind.curX&&T._bind.initY==T._bind.curY){aP(cO);return cC(cO)}T._currentOp="dragView";T._overviewMap.config.enableMouseDown=false;T._map.temp.operating=true;if(!ch(T._bind.curX)||!ch(T._bind.curY)){return}var cN=T._bind.curX+parseInt(T._omViewMv.style.width)/2+1;var cM=T._bind.curY+parseInt(T._omViewMv.style.height)/2+1;delete T._bind.curX;delete T._bind.curY;var cL=T._overviewMap.pixelToPoint({x:cN,y:cM},T._overviewMap.zoomLevel);T._map.temp.operating=false;if(T._bind._mapMoving==true){clearInterval(T._bind.intervalId);delete T._bind.intervalId;T._bind._mapMoving=false}T._map.temp.operating=true;setTimeout(function(){T._map.temp.operating=false;T._map.panTo(cL)},50);aP(cO);return cC(cO)}})},_initOverviewMap:function(){if(this._overviewInitialized==true){return}var cM=this;var cN=cM._map;cN.addEventListener("resize",function(){if(cM._overviewMap!=null){cM._overviewMap.setCenter(cN.getCenter())}if(cM._omView!=null){cM._omView.setPosition(cN.getCenter());cM._setRatio()}cM.setAnchor(cM._opts.anchor)});if(this._opts.isOpen==false){return}if(!this._binded){cN.addEventListener("loadcode",function(){cM._onMainZoomEnd()});cN.addEventListener("moving",function(){cM._moveView()});cN.addEventListener("moveend",function(cO){cM._onMainMoveEnd(cO)});cN.addEventListener("zoomend",function(cO){cM._onMainZoomEnd(cO)});cN.addEventListener("maptypechange",function(cO){cM._setRatio()});this._binded=true}var T=cN.getCenter();this._minZoom=BMAP_NORMAL_MAP.getMinZoom();this._maxZoom=BMAP_NORMAL_MAP.getMaxZoom();this._curOMZoomLevel=this._getCurOMZoomLevel();this._overviewMap=new bz(this._omMapContainer,{isOverviewMap:true});this._overviewMap.disableDoubleClickZoom();this._overviewMap.centerAndZoom(T,this._curOMZoomLevel);this._omView=new n({point:cN.getCenter(),lineStroke:1,lineColor:"#6688cc"});this._overviewMap.addOverlay(this._omView);this._omView.getContainer().innerHTML=\'
    \';this._omViewInn=this._omView.getContainer().children[0];var cL=this._omView.getContainer().style;cL.borderLeftColor="#84b0df";cL.borderTopColor="#adcff4";cL.borderRightColor="#274b8b";cL.borderBottomColor="#274b8b";this._setRatio();this._overviewMap.addEventListener("dragend",function(){cM._currentOp="dragMap";cN.panTo(cM._overviewMap.getCenter())});this._overviewMap.addEventListener("moveend",function(){cM._onViewMapMoveEnd()});this._overviewMap.addEventListener("mousedown",function(cO){cM._temp._downX=cO.offsetX;cM._temp._downY=cO.offsetY});this._overviewMap.addEventListener("resize",function(cO){if(cM._map&&cM._overviewMap){cM._overviewMap.setCenter(cM._map.getCenter())}cM._setRatio()});this._overviewInitialized=true},_setViewMvCursor:function(T){this._omViewMv.style.cursor=T},setAnchor:function(cO){cp.prototype.setAnchor.call(this,cO);if(!this._map){return}if(a8.browser.ie){var cR=this._map.width;var cN=this._map.height;var cL=this._opts.size.width;var cP=this._opts.size.height;var cM=this._opts.offset.width;var T=this._opts.offset.height;if(this._opts.isOpen==false){cL=this._btnWidth;cP=this._btnHeight}var cQ=this._container;switch(cO){case BMAP_ANCHOR_TOP_RIGHT:cQ.style.right="auto";cQ.style.left=cR-cL-cM+"px";break;case BMAP_ANCHOR_BOTTOM_LEFT:cQ.style.bottom="auto";cQ.style.top=cN-cP-T+"px";break;case BMAP_ANCHOR_BOTTOM_RIGHT:cQ.style.bottom="auto";cQ.style.right="auto";cQ.style.top=cN-cP-T+"px";cQ.style.left=cR-cL-cM+"px";break;default:break}}this._setQuad();this._redraw()},changeView:function(){this.changeView._running=true;this._opts.isOpen=!this._opts.isOpen;if(!this._container){this.changeView._running=false;return}var cP=this._container;var T=this._opts.size.width;var cM=this._opts.size.height;var cO=this._btnWidth;var cL=this._btnHeight;var cN=this;if(!this._opts.isOpen){this.changeView._preBtnTop=this._omBtn.style.top;this.changeView._preBtnLeft=this._omBtn.style.left;new g({fps:25,duration:120,transition:aw.easeInCubic,render:function(cQ){cP.style.width=(T-Math.ceil((T-cO)*cQ))+"px";cP.style.height=(cM-Math.ceil((cM-cL)*cQ))+"px";if(a8.browser.ie){cN._omBtn.style.top=(cN._quad==3||cN._quad==4)?parseInt(cP.style.height)-cL+"px":"0";cN._omBtn.style.left=(cN._quad==1||cN._quad==4)?parseInt(cP.style.width)-cO+"px":"0";if(cN._opts.anchor>=0&&cN._opts.anchor<=BMAP_ANCHOR_BOTTOM_RIGHT){if(cN._quad==3||cN._quad==4){cP.style.top=cN._map.height-parseInt(cP.style.height)-cN._opts.offset.height+"px"}if(cN._quad==1||cN._quad==4){cP.style.left=cN._map.width-parseInt(cP.style.width)-cN._opts.offset.width+"px"}}}cN.dispatchEvent(new bg("onviewchanging"))},finish:function(){if(a8.browser.ie){cN._omBtn.style.left="0";cN._omBtn.style.top="0";if(cN._opts.anchor>=0&&cN._opts.anchor<=BMAP_ANCHOR_BOTTOM_RIGHT){if(cN._quad==3||cN._quad==4){cP.style.top=cN._map.height-cN._btnHeight-cN._opts.offset.height+"px"}if(cN._quad==1||cN._quad==4){cP.style.left=cN._map.width-cN._btnWidth-cN._opts.offset.width+"px"}}}cN._redraw();a8.dom.addClass(cN._omBtn,"BMap_omBtnClosed");var cQ=new bg("onviewchanged");cQ.isOpen=cN._opts.isOpen;cN.dispatchEvent(cQ);cN.changeView._running=false}})}else{if(this._overviewInitialized==false){this._initOverviewMap()}new g({fps:40,duration:120,transition:aw.easeOutCubic,render:function(cQ){cP.style.width=(Math.ceil(T*cQ))+"px";cP.style.height=(Math.ceil(cM*cQ))+"px";if(a8.browser.ie){cN._omBtn.style.top=(cN._quad==3||cN._quad==4)?parseInt(cP.style.height)-cL+"px":"0";cN._omBtn.style.left=(cN._quad==1||cN._quad==4)?parseInt(cP.style.width)-cO+"px":"0";if(cN._opts.anchor>=0&&cN._opts.anchor<=BMAP_ANCHOR_BOTTOM_RIGHT){if(cN._quad==3||cN._quad==4){cP.style.top=cN._map.height-parseInt(cP.style.height)-cN._opts.offset.height+"px"}if(cN._quad==1||cN._quad==4){cP.style.left=cN._map.width-parseInt(cP.style.width)-cN._opts.offset.width+"px"}}}cN.dispatchEvent(new bg("onviewchanging"))},finish:function(){if(cN._opts.anchor>=0&&cN._opts.anchor<=BMAP_ANCHOR_BOTTOM_RIGHT){if(a8.browser.ie){if(cN._quad==3||cN._quad==4){cP.style.top=cN._map.height-cM-cN._opts.offset.height+"px"}if(cN._quad==1||cN._quad==4){cP.style.left=cN._map.width-T-cN._opts.offset.width+"px"}}}cN._redraw();cN._setBtnPosition();a8.dom.removeClass(cN._omBtn,"BMap_omBtnClosed");var cQ=new bg("onviewchanged");cQ.isOpen=cN._opts.isOpen;cN.dispatchEvent(cQ);cN.changeView._running=false}})}},_setRatio:function(){if(!this._map){return}var cQ=this._map.zoomLevel;var cS=this._map.pixelToPoint({x:0,y:0},cQ);var cN=this._map.pixelToPoint({x:this._map.width,y:this._map.height},cQ);var cL=this._overviewMap.pixelToPoint({x:0,y:0},this._curOMZoomLevel);var cM=this._overviewMap.pixelToPoint({x:this._overviewMap.width,y:this._overviewMap.height},this._curOMZoomLevel);this._wRatio=(cN.lng-cS.lng)/(cM.lng-cL.lng);this._hRatio=(cN.lat-cS.lat)/(cM.lat-cL.lat);if(this._wRatio>=1||this._hRatio>=1){this._omViewMv.style.display="none";this._omView.hide()}else{var cO=parseInt(this._overviewMap.width);var T=parseInt(this._overviewMap.height);var cR=Math.round(cO*this._wRatio);var cP=Math.round(T*this._hRatio);if(this._map.getMapType()==BMAP_PERSPECTIVE_MAP){cP=T*0.35}this._omView.show();this._omView.setDimension(cR,cP);this._omViewMv.style.display=""}this._setOMViewMvPos()},_setOMViewMvPos:function(){if(!this._omView||!this._omView.getContainer()){return}if(this._wRatio>=1||this._hRatio>=1){this._omViewMv.style.display="none";return}var cL=this._omView.getContainer().style;this._omViewMv.style.display="";this._omViewMv.style.width=cL.width;this._omViewMv.style.height=cL.height;var T=parseInt(cL.width)-2;var cM=parseInt(cL.height)-2;T=T<0?0:T;cM=cM<0?0:cM;this._omViewMvInn.style.width=T+"px";this._omViewMvInn.style.height=cM+"px";this._omViewInn.style.width=this._omViewMvInn.style.width;this._omViewInn.style.height=this._omViewMvInn.style.height;this._omViewMv.style.left=parseInt(cL.left)+this._overviewMap.offsetX+"px";this._omViewMv.style.top=parseInt(cL.top)+this._overviewMap.offsetY+"px"},setSize:function(cM){if(!(cM instanceof aH)){cM=new aH(150,150)}var cL=cM.width;var cN=cM.height;cL=cL>0?cL:150;cN=cN>0?cN:150;cM.width=cL;cM.height=cN;this._opts.size=cM;if(!this._container){return}if(this.changeView._running==true){var T=arguments;var cO=this;setTimeout(function(){T.callee.call(cO,cM)},120);return}N(this._container,[cL,cN]);var cO=this;setTimeout(function(){if(cO._overviewMap&&cO._map){cO._overviewMap.setCenter(cO._map.getCenter())}},100);this.setAnchor(this._opts.anchor);this.dispatchEvent(new bg("resize"))},setOffset:function(T){if(!(T instanceof aH)){return}cp.prototype.setOffset.call(this,T);if(!this._container){return}if(T.width!=0||T.height!=0){a8.dom.addClass(this._container,"withOffset")}else{a8.dom.removeClass(this._container,"withOffset")}},_redraw:function(){if(!this._omCanvas){return}var cM=this._opts.size.width;var cP=this._opts.size.height;var cR=this._opts.padding;var T=this._borderWidth;var cN=0;var cQ=0;var cL=0;var cO=0;this._omCanvas.style.left=this._omCanvas.style.top=this._omCanvas.style.right=this._omCanvas.style.bottom="auto";this._omBtn.style.left=this._omBtn.style.top=this._omBtn.style.right=this._omBtn.style.bottom="auto";if(this._opts.offset.width==0&&this._opts.offset.height==0){switch(this._opts.anchor){case BMAP_ANCHOR_TOP_LEFT:this._omCanvas.style.left="0px";this._omCanvas.style.top="0px";break;case BMAP_ANCHOR_TOP_RIGHT:this._omCanvas.style.left=cR+"px";this._omCanvas.style.top="0px";break;case BMAP_ANCHOR_BOTTOM_LEFT:this._omCanvas.style.top=cR+"px";this._omCanvas.style.left="0px";break;case BMAP_ANCHOR_BOTTOM_RIGHT:this._omCanvas.style.top=cR+"px";this._omCanvas.style.left=cR+"px";break;default:break}cN=cM-T;cQ=cP-T;cL=cN-cR-2*T;cO=cQ-cR-2*T;if(a8.browser.ie&&document.compatMode=="BackCompat"){cN=cN+1;cQ=cQ+1;cL=cL+2;cO=cO+2}}else{this._omCanvas.style.left=this._omCanvas.style.top=this._omCanvas.style.right=this._omCanvas.style.bottom=cR+"px";cN=cM-2*T;cQ=cP-2*T;cL=cN-2*cR-2*T;cO=cQ-2*cR-2*T;if(this._opts.offset.width!=0||this._opts.offset.height!=0){a8.dom.addClass(this._container,"withOffset")}if(a8.browser.ie&&document.compatMode=="BackCompat"){cN=cN+2;cQ=cQ+2;cL=cL+2;cO=cO+2}}if(cN>0&&cQ>0){N(this._container.children[0],[cN,cQ])}if(cL>0&&cO>0){N(this._omCanvas,[cL,cO])}this._setBtnPosition();a8.dom.removeClass(this._omBtn,"BMap_omBtnClosed");if(!this._opts.isOpen){this._container.style.width=this._btnWidth+"px";this._container.style.height=this._btnHeight+"px";if(a8.browser.ie){this.changeView._preBtnTop=this._omBtn.style.top;this.changeView._preBtnLeft=this._omBtn.style.left;this._omBtn.style.left="0";this._omBtn.style.top="0"}a8.dom.addClass(this._omBtn,"BMap_omBtnClosed")}},_setQuad:function(){var cL=this._container;if(!cL){return}var T=this._quad;switch(this._opts.anchor){case BMAP_ANCHOR_TOP_LEFT:this._quad=2;break;case BMAP_ANCHOR_TOP_RIGHT:this._quad=1;break;case BMAP_ANCHOR_BOTTOM_LEFT:this._quad=3;break;case BMAP_ANCHOR_BOTTOM_RIGHT:this._quad=4;break;default:break}a8.dom.removeClass(cL,"quad"+T);a8.dom.addClass(cL,"quad"+this._quad)},_setBtnPosition:function(){if(!a8.browser.ie){switch(this._quad){case 2:this._omBtn.style.top="0";this._omBtn.style.left="0";break;case 1:this._omBtn.style.top="0";this._omBtn.style.right="0";break;case 4:this._omBtn.style.bottom="0";this._omBtn.style.right="0";break;case 3:this._omBtn.style.bottom="0";this._omBtn.style.left="0";break;default:break}}else{var cN=this._btnWidth;var cL=this._btnHeight;var T=this._opts.size.width;var cM=this._opts.size.height;this._omBtn.style.left="auto";this._omBtn.style.top="auto";this._omBtn.style.right="auto";this._omBtn.style.bottom="auto";switch(this._quad){case 2:this._omBtn.style.left="0px";this._omBtn.style.top="0px";break;case 1:this._omBtn.style.left=T-cN+"px";this._omBtn.style.top="0px";break;case 4:this._omBtn.style.top=cM-cL+"px";this._omBtn.style.left=T-cN+"px";break;case 3:this._omBtn.style.left="0px";this._omBtn.style.top=cM-cL+"px";break;default:break}}},_moveView:function(){if(this._omView){this._omView.setPosition(this._map.getCenter())}},_onMainMoveEnd:function(T){switch(this._currentOp){case"dragMap":this._setOMViewMvPos();this._currentOp="";break;case"dragView":this._omViewMv.style.display="none";this._overviewMap.panTo(this._map.getCenter(),{duration:90});this._currentOp="";break;default:if(this._overviewMap){this._overviewMap.panTo(this._map.getCenter(),{duration:90})}break}},_onMainZoomEnd:function(){if(!this._overviewMap){return}var T=this;T._curOMZoomLevel=T._getCurOMZoomLevel();setTimeout(function(){T._overviewMap.centerAndZoom(T._map.getCenter(),T._curOMZoomLevel);T._omView.setPosition(T._map.getCenter());T._setRatio()},100)},_onViewMapMoveEnd:function(){if(this._currentOp!="dragMap"){this._setOMViewMvPos();this._overviewMap.config.enableMouseDown=true}},remove:function(){cp.prototype.remove.call(this);this._omCanvas=null;this._omMapContainer=null;this._omView=null;this._omViewInn=null;this._omViewMv=null;this._omViewMvInn=null;this._omBtn=null;this._overviewInitialized=false;this._overviewMap=null},isOpen:function(){if(!this._container){return false}return this._opts.isOpen}});function N(cM,T){var cL=cM.style;cL.width=T[0]+"px";cL.height=T[1]+"px"}a8.object.extend(bK.prototype,{_asyncDraw:function(){if(this._map){this._i(this._map)}},initialize:function(T){cp.prototype.initialize.call(this,T);this._render();this._setParam();this._updateScale();this._bind(T);return this._container},_setParam:function(){this._numberArray={us:[5280*5000,5280*2500,5280*2000,5280*1000,5280*500,5280*200,5280*100,5280*50,5280*25,5280*20,5280*10,5280*5,5280*2,5280,2000,1000,500,200,100,50,20,10,5],metric:[10000000,5000000,2000000,1000000,500000,200000,100000,50000,25000,20000,10000,5000,2000,1000,500,200,100,50,20,10,5,2,1]}},_bind:function(cL){var T=this;cL.addEventListener("zoomend",function(){T._updateScale()});cL.addEventListener("moveend",function(){T._updateScale()});cL.addEventListener("maptypechange",function(){T.setColor(T._map.getMapType().getTextColor())})},_render:function(){cp.prototype._render.call(this);a8.dom.addClass(this._container,"BMap_scaleCtrl");this._container.innerHTML=this._generateHTML();this.setColor(this._map.getMapType().getTextColor());this._scaleText=this._container.children[0];cp.prototype._setPosition.call(this)},_generateHTML:function(){var cL=cc.imgPath+"mapctrls.png";var T=\'
    \';return T},setColor:function(T){this._opts.color=T+"";if(!this._container){return}this._container.children[0].style.backgroundColor="transparent";this._container.children[0].style.color=T;for(var cM=1,cL=this._container.children.length;cM=cM?this._units[this._opts.unit].u2:this._units[this._opts.unit].u1;if(cN>=cM){cN=Math.round(cN/cM)}this._setScaleText(cN,cS);if(Math.round(T)%2!=0&&a8.browser.ie==6){T=T+1}this._container.style.width=Math.round(T)+"px";if(this._map.mapType==BMAP_PERSPECTIVE_MAP){this._container.style.width=Math.round(T)*3+"px";this._setScaleText(cN*3,cS)}},_convertUnit:function(T,cL){cL=cL||"metric";if(this._units[cL]){return T*this._units[cL].conv}return T}});a8.extend(aL.prototype,{_asyncDraw:function(){if(this._map){this._i(this._map)}},initialize:function(T){this._initParams();cp.prototype.initialize.call(this,T);cp.prototype._render.call(this);cp.prototype._setPosition.call(this);switch(this._opts.type){case BMAP_MAPTYPE_CONTROL_DROPDOWN:this._createBtnsDropDown();break;default:this._createBtnsDefault()}this._bind();this._draw();return this._container},_initParams:function(){this._mapTypeRel=[[BMAP_HYBRID_MAP,BMAP_SATELLITE_MAP,true]];this._btnDoms=[];this._lblDoms=[]},_createBtnsDefault:function(){var cL=this._opts.mapTypes;for(var cN=0;cN";cU.onclick=function(){cS._map.setMapType(cS._getProperMapType(cM))};cU.onmouseover=function(cV){if(cL._hideLabelTimer){clearTimeout(cL._hideLabelTimer);cL._hideLabelTimer=null}a8.dom.show(this);aP(cV)};cU.onmouseout=function(){var cV=this;if(cL._hideLabelTimer){clearTimeout(cL._hideLabelTimer);cL._hideLabelTimer=null}cL._hideLabelTimer=setTimeout(function(){if(cV){a8.dom.hide(cV)}},1000)};cL._lblDom=this._lblDoms[cQ]=cU;cL.appendChild(cU);cL._labelDom=cU},_createBtnsDropDown:function(){var cN=aa("div");cw(cN);cN.title="\u66f4\u6539\u5730\u56fe\u7c7b\u578b";var cP=cN.style;cP.font="bold 12px/1.5em "+cc.fontFamily;cP.background="#fff";cP.boxShadow="2px 2px 3px rgba(0, 0, 0, 0.35)";cP.padding="0 6px";cP.border="1px solid #8ba4dc";cN.innerHTML=\'\u25bc\'+this._map.getMapType().getName();this._mainBtn=cN;var cL=aa("div");cw(cL);dropDownStyle=cL.style;dropDownStyle.position="relative";dropDownStyle.zIndex="-1";dropDownStyle.background="#fff";dropDownStyle.display="none";dropDownStyle.borderLeft=dropDownStyle.borderRight=dropDownStyle.borderBottom="1px solid #8ba4dc";var T=this._opts.mapTypes;for(var cM=0;cM";var cS=this;cM.onclick=function(){cS._map.setMapType(cS._getProperMapType(cN))};T.appendChild(cM);this._lblDoms[cQ]=cM;var cR=this._getParentMapType(cN);var cP=this._getMapTypeIndex(cR);var cL=this._btnDoms[cP];cL._childMapType=cN;cL._lblDom=cM},_getBtnNum:function(){var T=0;for(var cL=0;cL\u25bc\'+this._map.getMapType().getName();var T=this._btnDoms[cN];if(T&&T._childMapType&&T._lblDom){a8.dom.show(T._lblDom);cO=T._lblDom.getElementsByTagName("span")[0];cO.checked="";b2.dom.removeClass(cO,"checked")}}else{if(this._btnDoms[cN]&&this._btnDoms[cN]._childMapType==cP){cL=true;this._mainBtn.innerHTML=\'\u25bc\'+this._getParentMapType(cP).getName();var cQ=this._btnDoms[cN]._lblDom;if(cQ){a8.dom.show(cQ);cO=cQ.getElementsByTagName("span")[0];cO.checked="checked";b2.dom.addClass(cO,"checked")}}else{if(this._btnDoms[cN]){var cQ=this._btnDoms[cN]._lblDom;if(cQ){a8.dom.hide(cQ)}}}}}if(!cM&&!cL){this._mainBtn.innerHTML=\'\u25bc\'+this._map.getMapType().getName()}},remove:function(){this._btnDoms=this._lblDoms=[];this._mainBtn=null;cp.prototype.remove.call(this)}});'); -_jsload&&_jsload('menu', 'a8.object.extend(cz.prototype,{initialize:function(cO,cL){if(this._container){return false}this._map=cO;this._overlay=cL||null;this._render();var cN=this;var cP=cO.config.defaultCursor;if(cL&&cL._config.clickable){cP="pointer"}this._container.style.cursor=cP;if(this._shadow){this._shadow.style.cursor=cP}a8.on(document,"mousedown",function(cR){if(!cN._container){return}cN.hide()});a8.on(this._container,"click",function(cR){cN.hide();aP(cR)});var cQ=this._opts.container;if(!cQ){cQ=cO.container}if(!this._overlay){cO.addEventListener("rightclickex",function(cR){if(!cN._container||cR.overlay||cR.infoWindow){return}cN._showMenu(cR)})}else{this._overlay.addEventListener("rightclick",function(cR){if(!cN._container){return}cN._showMenu(cR)})}for(var cM=0,T=this._items.length;cM")}}this._updateShadowSize()},_draw:function(){if(this._map){this.initialize(this._map,this._overlay);if(this._isOpen){this._isOpen=false;this.show()}}},remove:function(){if(this._container){this._container.parentNode.removeChild(this._container);this._container=null}if(this._shadow){this._shadow.parentNode.removeChild(this._shadow);this._shadow=null}for(var cL=0,T=this._items.length;cL");this._container.className="BMap_contextMenu";var T=this._container.style;T.font="12px "+cc.fontFamily;if(a8.browser.ie<9){this._shadow=at(this._map.container,"
    ")}else{T.boxShadow=T.MozBoxShadow=T.WebkitBoxShadow="1px 2px 6px #666"}return this._container},addItem:function(cM){if(!cM||cM._type!="menuitem"||cM._text==""||cM._width<=0){return}for(var cL=0,T=this._items.length;cL1){this._items[this._items.length-2]._type=="menuitem"&&a8.dom.removeClass(this._items[this._items.length-2].getDom(),"BMap_cmLstItem")}else{this._items[0]._type=="menuitem"&&a8.dom.addClass(this._items[0].getDom(),"BMap_cmFstItem")}this._updateShadowSize()},removeItem:function(cM){if(!cM||cM._type!="menuitem"){return}for(var cL=0,T=this._items.length;cL0){this._items[this._items.length-1]._type=="menuitem"&&a8.dom.addClass(this._items[this._items.length-1].getDom(),"BMap_cmLstItem")}this._updateShadowSize()},addSeparator:function(){this._items.push({_type:"divider",_dIndex:this._dividers.length});this._dividers.push({dom:null});if(!this._container){return}var T="
    ";this._dividers[this._dividers.length-1].dom=at(this._container,T);this._updateShadowSize()},removeSeparator:function(cL){if(!this._dividers[cL]){return}if(this._dividers[cL].dom&&this._dividers[cL].dom.parentNode){this._dividers[cL].dom.parentNode.removeChild(this._dividers[cL].dom)}for(var cM=0,T=this._items.length;cMcL){this._items[cM]._dIndex--}}this._dividers.splice(cL,1);this._updateShadowSize()},setPosition:function(T,cL){this._left=T;this._top=cL;this._container.style.left=T+"px";this._container.style.top=cL+"px";if(this._shadow){this._shadow.style.left=T+1+"px";this._shadow.style.top=cL+2+"px"}},show:function(){if(this._isOpen==true){return}if(this._rItems.length==0){return}this._isOpen=true;if(this._container){this._container.style.visibility="visible"}if(this._shadow){this._shadow.style.visibility="visible"}var T=new bg("onopen");T.point=this.curPoint;T.pixel=this.curPixel;this.dispatchEvent(T)},hide:function(){if(this._isOpen==false){return}this._isOpen=false;if(this._container){this._container.style.visibility="hidden"}if(this._shadow){this._shadow.style.visibility="hidden"}var T=new bg("onclose");T.point=this.curPoint;T.pixel=this.curPixel;this.dispatchEvent(T)},setCursor:function(T){if(!T){return}this._opts.cursor=T;if(this._container){this._container.style.cursor=this._opts.cursor}if(this._shadow){this._shadow.style.cursor=this._opts.cursor}},_updateShadowSize:function(){if(this._container&&this._shadow){this._shadow.style.width=this._container.offsetWidth+"px";this._shadow.style.height=this._container.offsetHeight+"px"}},_showMenu:function(cP){if(this._rItems.length==0){return}var cM=this;cM.curPixel=cP.pixel;cM.curPoint=cM._map.pixelToPoint(cM.curPixel);var cL=cM.getDom().offsetHeight;var T=cM.getDom().offsetWidth;var cO=cP.pixel.x;var cN=cP.pixel.y;if(cP.pixel.x+T>this._map.width){cO=cP.pixel.x-T}if(cP.pixel.y+cL>this._map.height){cN=cP.pixel.y-cL}cM.setPosition(cO,cN);cM.show()}});a8.object.extend(be.prototype,{initialize:function(T,cL){if(this._container){return false}this._map=T;this._contextmenu=cL;if(cL.getDom()){this._render();this._bind();if(!this._enabled){this._enabled=true;this.disable()}}return true},remove:function(){var T=this;if(this._container){this._container.parentNode.removeChild(this._container);this._container=null}this._contextmenu=null;this._map=null},_draw:function(){if(this._contextmenu&&this._map){this.initialize(this._map,this._contextmenu)}},_render:function(){var T=""+this._text+"";this._container=at(this._contextmenu.getDom(),T);var cL=this._container.style;cL.padding="2px 6px";cL.margin="0 2px";cL.fontSize="12px";cL.MozUserSelect="none";cL.lineHeight="17px";cL.width=this._opts.width+"px";if(this._enabled){cL.color="#000";cL.cursor="pointer"}else{cL.color="#aaa";cL.cursor=this._map.config.defaultCursor}return this._container},_bind:function(){var T=this;a8.on(this._container,"click",function(cL){if(!T._enabled){aP(cL);return}if(T._callback&&T._callback.call){T._callback.call(T,T._contextmenu.curPoint,T._contextmenu.curPixel,T._contextmenu._overlay)}});a8.on(this._container,"mousedown",function(cL){aP(cL)});a8.on(this._container,"mouseover",function(){if(!T._enabled){return}T._container.style.color="#6688cc"});a8.on(this._container,"mouseout",function(){if(!T._enabled){return}T._container.style.color="#000"})},setText:function(T){if(!T){return}this._text=T+"";if(this._container){this._container.innerHTML=""+this._text+""}},enable:function(){this._enabled=true;if(this._container){this._container.style.color="#000";this._container.style.cursor="pointer"}},disable:function(){this._enabled=false;if(this._container){this._container.style.color="#aaa";this._container.style.cursor=this._map.config.defaultCursor}}});'); -_jsload&&_jsload('marker', 'a8.extend(Y.prototype,{initialize:function(T){this.map=T;this._addDom();this._bind();if(this._menu){this._menu.initialize(this.map,this)}this.domElement.guid=this.guid;a8.lang.Class.call(this,this.guid);if(!this._visible){a8.dom.hide(this.domElement)}return this.domElement},_bind:function(){if(!this.domElement){return}var T=this;var cM=this.map;function cL(cR,cQ){var cP=cR.srcElement||cR.target;var cO=cR.clientX||cR.pageX;var cT=cR.clientY||cR.pageY;if(cR&&cQ&&cO&&cT&&cP){var cS=a8.dom.getPosition(cM.container);var cN=cG();cQ.pixel=new bu(cO-cS.left+cN[1],cT-cS.top+cN[0]);cQ.point=cM.pixelToPoint(cQ.pixel);return cQ}else{return cQ}}a8.on(this.domElement,"mouseover",function(cN){if(!T._dragstarted){T.dispatchEvent(cL(cN,new bg("onmouseover").inherit(cN)))}});a8.on(this.domElement,"mouseout",function(cN){if(!T._dragstarted){T.dispatchEvent(cL(cN,new bg("onmouseout").inherit(cN)))}});if(T._config.clickable){a8.on(this.domElement,"touchstart",function(cN){T._bind._touchStartPos=new bu(cN.changedTouches[0].clientX,cN.changedTouches[0].clientY)});a8.on(this.domElement,"touchend",function(cP){var cO=aE(),cN=new bu(cP.changedTouches[0].clientX,cP.changedTouches[0].clientY);if(Math.abs(cN.x-T._bind._touchStartPos.x)>10||Math.abs(cN.y-T._bind._touchStartPos.y)>10){T._bind._touchStartPos=null;return}T.dispatchEvent(cL(cP,new bg("onclick").inherit(cP)));if(cO-T._dblclickTime=4&&cN.button==2&&T._config.clickable){T.dispatchEvent(cL(cN,new bg("onrightclick").inherit(cN)))}})},hide:function(){if(this._visible==false){return}this._visible=false;bG.prototype.hide.call(this);if(this.infoWindow&&this.infoWindow.overlay&&this.infoWindow.overlay==this){this.closeInfoWindow()}},show:function(){if(this._visible==true){return}this._visible=true;bG.prototype.show.call(this)},setConfig:function(cL){if(!cL){return}for(var T in cL){if(typeof(this._config[T])==typeof(cL[T])){this._config[T]=cL[T]}}},setZIndex:function(T){var cL=this;cL.zIndex=T;cL._updateDomZIndex()},_updateDomZIndex:function(){var cL=this,T;if(ch(cL.zIndex)){T=cL.zIndex}else{T=0;if(cL.map&&cL.getPosition()){var cM=cL.getPosition()?cL.getPosition().lat:0;T=bG.getZIndex(cM)+(cL._config.baseZIndex||0)}}if(cL.domElement){cL.domElement.style.zIndex=T}},addContextMenu:function(T){this._menu=T;if(this.map){T.initialize(this.map,this)}},removeContextMenu:function(){this._menu.remove();this._menu=null}});var bj=new M(cc.imgPath+"marker_red_hd.png",new aH(47,50),{anchor:new aH(20,50),infoWindowAnchor:new aH(20,0)});var ah=3;var bx=4;ad.TOP_ZINDEX=bG.getZIndex(-90)+1000000;ad.DRAG_ZINDEX=ad.TOP_ZINDEX+1000000;ad._getAnimationName=function(cM){if(ad._cssAniNames[cM]){return ad._cssAniNames[cM]}var cN=ad._cssAniNames[cM]=["BMap_"+Math.round(Math.random()*10000),"BMap_"+Math.round(Math.random()*10000)];var T=b0[cM];var cL=ad._styleElement;if(!cL){cL=ad._styleElement=aa("style",{type:"text/css"});document.getElementsByTagName("head")[0].appendChild(cL)}cL.textContent+=ad._generateAniCSS(T.iconAnis,cN[0])+ad._generateAniCSS(T.shadowAnis,cN[1]);return ad._cssAniNames[cM]};ad._generateAniCSS=function(cM,cL){var T=["@-webkit-keyframes "+cL+" {\\n"];a8.array.each(cM,function(cN){T.push(cN.percent*100,"% { ");T.push("-webkit-transform: translate(",cN.translate[0],"px,",cN.translate[1],"px); ");T.push("-webkit-animation-timing-function: ",cN.timingFunc,"; ");T.push("}\\n")});T.push("}\\n");return T.join("")};ad._addDragCrossImg=function(cL,T){if(!ad._dragCrossImg){ad._dragCrossImg=aa("img",{src:cc.imgPath+"drag_cross.png",width:13,height:9});ad._dragCrossImg.style.position="absolute";if(a8.browser.ie==6){delete ad._dragCrossImg;var cN=ad._dragCrossImg=aa("div");var cM=cN.style;cM.position="absolute";cM.width="13px";cM.height="9px";cM.filter=\'progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=image,src="\'+cc.imgPath+\'drag_cross.png")\'}}var cM=ad._dragCrossImg.style;cM.left=cL.width-6+"px";cM.top=cL.height-5+"px";T.appendChild(ad._dragCrossImg)};ad._removeDragCrossImg=function(){if(ad._dragCrossImg&&ad._dragCrossImg.parentNode){ad._dragCrossImg.parentNode.removeChild(ad._dragCrossImg)}};ad._cssAniNames=[];ad._aniEndHandler=function(){this.style.WebkitAnimation=""};a8.extend(ad.prototype,{initialize:function(T){this._initParam();Y.prototype.initialize.call(this,T);if(!this._visible){a8.dom.hide(this.siblingElement)}if(T.highResolutionEnabled()&&this._config.icon==au){this._config.icon=bj}this.setPosition(this.point);this.setIcon(this._config.icon);this.setShadow(this._config.shadow);if(this._config.label&&this._cfgLabelEvent){this._config.label.addEventListener("remove",this._cfgLabelEvent)}this.setLabel(this._config.label);this.setTitle(this._config.title);this._initDrag();return this.domElement},_initParam:function(){if(this._init){return}this._init=true;this.domElement=null;this.shadowElement=null;this.siblingElement=null;this.iconDom=null;this._isDragging=false},_addDom:function(){var T=this.map.getPanes();this.domElement=at(T.markerMouseTarget,this._msTargetRender());this.siblingElement=at(T.markerPane,this._markerRender());this.siblingElement.guid=this.guid},_msTargetRender:function(){var T=[\'\');return T.join("")},_markerRender:function(){var T=[\'\');return T.join("")},_shadowRender:function(){var T=[\'\');return T.join("")},draw:function(){if(!this.domElement){return}var T=this._getPixPos();this.domElement.style.left=T[0].x+"px";this.domElement.style.top=T[0].y+"px";if(this.siblingElement){this.siblingElement.style.left=T[0].x+"px";this.siblingElement.style.top=T[0].y+"px"}if(this.shadowElement){this.shadowElement.style.left=T[1].x+"px";this.shadowElement.style.top=T[1].y+"px"}if(this.infoWindow!=null&&this.infoWindow.isOpen()){this.infoWindow.setPosition()}this._updateDomZIndex()},_getPixPos:function(){var cP=this._config.offset||new aH(0,0);var T=this._config.icon.anchor||new aH(0,0);var cL=this.map.pointToOverlayPixel(this.getPosition());var cO=new bu(cL.x+cP.width-T.width,cL.y+cP.height-T.height);var cN=[cO];if(this._config.shadow){var cQ=this._config.shadow.anchor||new aH(0,0),cM=new bu(cL.x+cP.width-cQ.width,cL.y+cP.height-cQ.height);cN[1]=cM}return cN},_draw:function(){if(this.map){this.domElement=this.initialize(this.map);if(this._animation){this.setAnimation(this._animation);delete this._animation}}else{delete this._animation}},remove:function(){this.setAnimation(null);if(this.siblingElement&&this.siblingElement.parentNode){this.siblingElement.parentNode.removeChild(this.siblingElement)}if(this.shadowElement&&this.shadowElement.parentNode){this.shadowElement.parentNode.removeChild(this.shadowElement)}if(this.infoWindow&&this.infoWindow.overlay&&this.infoWindow.overlay===this){this.closeInfoWindow();this.infoWindow=null}this.siblingElement=null;this.shadowElement=null;this.iconDom=null;this.shadowDom=null;if(this._config.label){var T=this._config.label;T.removeEventListener("remove",this._cfgLabelEvent);a8.lang.decontrol(T.guid);T.setMarker(null);T.domElement=null;T=this._config.label=null}Y.prototype.remove.call(this)},hide:function(){Y.prototype.hide.call(this);if(this.domElement){a8.dom.hide(this.domElement)}if(this.siblingElement){a8.dom.hide(this.siblingElement)}if(this.shadowElement){a8.dom.hide(this.shadowElement)}},show:function(){Y.prototype.show.call(this);if(this.domElement){a8.dom.show(this.domElement)}if(this.siblingElement){a8.dom.show(this.siblingElement)}if(this.shadowElement){a8.dom.show(this.shadowElement)}},setIcon:function(cM){if(!(cM instanceof M)){return}this._config.icon=cM;if(!this.map||!this.domElement||!this.siblingElement){return}var cO=this.map;try{if(this.iconDom){this.siblingElement.removeChild(this.iconDom);this.iconDom=null}this.domElement.style.width=cM.size.width+"px";this.domElement.style.height=cM.size.height+"px"}catch(cN){}if(this._config.icon){var T=this.iconDom=aa("div");var cL=T.style;cL.position="absolute";cL.padding=cL.margin="0";cL.width=cM.size.width+"px";cL.height=cM.size.height+"px";cL.overflow="hidden";T.innerHTML=cM.getHTML();T.galleryImg=false;this.siblingElement.appendChild(this.iconDom)}this.draw()},setShadow:function(cL){if(!(cL instanceof M)){return}this._config.shadow=cL;if(!this.map||!this.domElement||!this.siblingElement){return}if(!this.shadowElement){this.shadowElement=at(this.map.getPanes().markerShadow,this._shadowRender())}var cN=this.map;try{if(this.shadowDom){this.shadowElement.removeChild(this.shadowDom);this.shadowDom=null}this.shadowElement.style.width=cL.size.width+"px";this.shadowElement.style.height=cL.size.height+"px"}catch(cM){}if(this._config.shadow){var cO=this.shadowDom=aa("div");var T=cO.style;T.position="absolute";T.padding=T.margin="0";T.width=cL.size.width+"px";T.height=cL.size.height+"px";T.overflow="hidden";cO.innerHTML=cL.getHTML();cO.galleryImg=false;this.shadowElement.appendChild(this.shadowDom)}this.draw()},setLabel:function(T){if(!(T instanceof ag)){return}this._config.label=T;var cM=this;if(!this._config.label._binded){this._config.label._binded=true;this._cfgLabelEvent=function(){cM._config.label=null};this._config.label.addEventListener("remove",this._cfgLabelEvent)}if(!this.map){return}T._i(this.map);if(T.domElement){this.siblingElement.appendChild(T.domElement)}else{T.domElement=at(this.domElement,T.render());T.domElement.guid=T.guid}var cL=T.domElement.style;cL.left=(T._config.offset.width)+"px";cL.top=(T._config.offset.height)+"px";T.setMarker(this)},_initDrag:function(){if(!this.domElement||this.domElement._binded){return}this.domElement._binded=true;var cQ=this.map,cN=this,T=0,cR=0,cM=0,cP={x:0,y:0};function cO(cT,cS){cS.pixel=cT.pixel;cS.point=cT.point;return cS}function cL(cU){var cT=cU.clientX,cS=cU.clientY;if(cU.changedTouches){cT=cU.changedTouches[0].clientX;cS=cU.changedTouches[0].clientY}return new bu(cT,cS)}this.dragStart=function(cU){if(!cN._config.enableDragging){return}if(cU.button==2){return}cN._isDragging=true;var cT=cQ.pointToPixel(cN.point);var cS=cL(cU);T=cS.x-cT.x;cR=cS.y-cT.y;cM=aE();cN.map.temp._draggingMarker=cN;a8.on(document,"mousemove",cN.dragIng);a8.on(document,"mouseup",cN.dragEnd);a8.on(document,"touchmove",cN.dragIng);a8.on(document,"touchend",cN.dragEnd);if(cN.domElement&&cN.domElement.setCapture){cN.domElement.setCapture()}cN.domElement.style.cursor=cN._config.draggingCursor;if(cU.type=="touchstart"){aP(cU)}};this.dragIng=function(cW){if(!cN._isDragging){return}var cT=cL(cW);var cU=new bu((cT.x-T),(cT.y-cR));cP=cU;cN._draggingMovePixel=cU;if((cN._config.restrictDraggingArea&&(cU.x>15&&cU.x30&&cU.y=cN.map.width-20||cU.y<=50||cU.y>=cN.map.height-10){if(cU.x<=20){cN._panByX=8}else{if(cU.x>=cN.map.width-20){cN._panByX=-8}}if(cU.y<=50){cN._panByY=8}else{if(cU.y>=cN.map.height-10){cN._panByY=-8}}if(!cN._draggingMoveTimer){cN._draggingMoveTimer=setInterval(function(){cQ.panBy(cN._panByX,cN._panByY,{noAnimation:true});var cX=cQ.pixelToPoint(cN._draggingMovePixel);cN.setPosition(cX)},30)}}else{if(cN._draggingMoveTimer){clearInterval(cN._draggingMoveTimer);cN._draggingMoveTimer=null}cN.setPosition(cS)}if(!cN._dragstarted){cN.dispatchEvent(cO(cV,new bg("ondragstart")));cN._dragstarted=true;if(cN._config.raiseOnDrag){cN.setAnimation(ah);ad._addDragCrossImg(cN._config.icon.anchor,cN.siblingElement)}}cN.dispatchEvent(cO(cV,new bg("ondragging")))}};this.dragEnd=function(cS){if(cN.domElement&&cN.domElement.releaseCapture){cN.domElement.releaseCapture()}cN._isDragging=false;cN.map.temp._draggingMarker=null;a8.un(document,"mousemove",cN.dragIng);a8.un(document,"mouseup",cN.dragEnd);a8.un(document,"touchmove",cN.dragIng);a8.un(document,"touchend",cN.dragEnd);T=cR=0;if(cN._draggingMoveTimer){clearInterval(cN._draggingMoveTimer);cN._draggingMoveTimer=null}if(aE()-cM>=100&&(cP.x>2||cP.y>2)){cN._dragstarted=false;cN.dispatchEvent(cO({pixel:cN.map.pointToPixel(cN.getPosition()),point:cN.getPosition()},new bg("ondragend")));if(cN._config.raiseOnDrag){cN.setAnimation(bx);ad._removeDragCrossImg()}cP.x=cP.y=0}cN._updateDomZIndex();if(cN.domElement){cN.domElement.style.cursor=cN._config.clickable?"pointer":""}};a8.on(this.domElement,"mousedown",this.dragStart);a8.on(this.domElement,"touchstart",this.dragStart)},setPosition:function(T){if(T instanceof cd){this.point=this._config.point=new cd(T.lng,T.lat);this.draw()}},_updateDomZIndex:function(){var cL=this,T;if(cL._isDragging==true){T=ad.DRAG_ZINDEX}else{if(cL._config.isTop==true){T=ad.TOP_ZINDEX+(cL._addi||0)}else{if(ch(cL.zIndex)){T=cL.zIndex}else{T=0;if(cL.map&&cL.getPosition()){T=bG.getZIndex(cL.getPosition().lat)+cL._config.baseZIndex}}}}if(cL.domElement){cL.domElement.style.zIndex=T}if(cL.siblingElement){cL.siblingElement.style.zIndex=T}},setTop:function(cL,T){this._config.isTop=!!cL;if(cL){this._addi=T||0}this._updateDomZIndex()},setTitle:function(T){this._config.title=T+"";if(this.domElement){this.domElement.title=this._config.title}},setOffset:function(T){if(!(T instanceof aH)){return}this._config.offset=T;this.setPosition(this.getPosition())},setAnimation:function(cM){if(!this.iconDom){return}this._clearAnimation(cM!=null);var T=b0[cM];if(!T){return}var cL=T?T.options.useJS:false;(!aA()||cL)?this._execJSAnimation(cM):this._execCSSAnimation(cM)},_clearAnimation:function(cL){this._clearCSSAni(this.iconDom);this._clearCSSAni(this.shadowDom);if(cL){if(this._aniObj){this._aniObj.stop();this._aniObj=null}this.iconDom.style.top=this.iconDom.style.left="0px";if(this.shadowDom){this.shadowDom.style.top=this.shadowDom.style.left="0px"}}else{if(this._aniObj){var T=this;this._aniObj.setFinishCallback(function(){T._aniObj=null})}}},_execCSSAnimation:function(cL){var T=b0[cL];var cM=ad._getAnimationName(cL);this._setCSSAniStyle(this.iconDom,cM[0],T);this._setCSSAniStyle(this.shadowDom,cM[1],T)},_clearCSSAni:function(T){if(T){T.style.WebkitAnimation="";a8.un(T,"webkitAnimationEnd",ad._aniEndHandler)}},_setCSSAniStyle:function(cM,cL,T){if(cM){a8.on(cM,"webkitAnimationEnd",ad._aniEndHandler);cM.style.WebkitAnimation=cL+" "+T.options.duration+"ms"+(T.options.loop==g.INFINITE?" infinite":"")}},_execJSAnimation:function(cO){var cQ=this.iconDom.style;var T=false;var cN;if(this.shadowDom){T=true;cN=this.shadowDom.style}var cL=b0[cO];var cS=this;var cR=cL.iconAnis.length,cV=cL.options.duration,cU=cS._aniObj=new g({duration:0,delay:g.INFINITE});var cT=cL.iconAnis;var cM=cL.shadowAnis;cQ.top=cT[0].translate[1]+"px";if(T){cN.left=cM[0].translate[0]+"px";cN.top=cM[0].translate[1]+"px"}for(var cP=1;cP0){var T=["\');if(this.printImageUrl){T.push(\'\')}return T.join("")}else{return[\'\'].join("")}};a8.extend(ag.prototype,{_addDom:function(){var cL=this._config;var cN=this.content;var T=aa("label",{"class":"BMapLabel",unselectable:"on"});if(cL.title){T.title=cL.title}var cM=T.style;cM.position="absolute";cM.MozUserSelect="none";if(cL.width==0||cL.width=="auto"){cM.display="inline"}else{cM.width=cL.width+"px";cM.display="block";cM.overflow="hidden"}if(cL.clickable=="true"){cM.cursor="pointer"}else{if(!a8.browser.ie){cM.cursor="inherit"}}T.innerHTML=cN;this.map.getPanes().labelPane.appendChild(T);this.domElement=T;this.setStyle(cL.styles);return T},setPosition:function(T){if(T instanceof cd&&!this.getMarker()){this.point=this._config.position=new cd(T.lng,T.lat);this.draw()}},draw:function(){if(this.domElement&&this.getPosition()&&!this.getMarker()){var cL=this._config.offset||new aH(0,0);var T=this.map.pointToOverlayPixel(this.getPosition());this.domElement.style.left=(T.x+cL.width)+"px";this.domElement.style.top=(T.y+cL.height)+"px";this._updateDomZIndex()}},_draw:function(){if(this.map&&!this._marker){this.domElement=this.initialize(this.map);this.draw()}},setContent:function(T){this.content=T;if(this.domElement){this.domElement.innerHTML=T}},setOpacity:function(cL){if(cL>=0&&cL<=1){this._config.opacity=cL}if(this.domElement){var T=this.domElement.style;T.opacity=cL;T.filter="alpha(opacity="+(cL*100)+")"}},setOffset:function(T){if(!(T instanceof aH)){return}this._config.offset=new aH(T.width,T.height);if(this.getMarker()&&this.domElement){this.domElement.style.left=T.width+"px";this.domElement.style.top=T.height+"px"}else{this.draw()}},setStyle:function(T){T=T||{};this._config.styles=a8.extend(this._config.styles,T);if(this.domElement){for(var cM in T){try{this.domElement.style[cM]=T[cM]}catch(cL){}}}},setTitle:function(T){this._config.title=T+"";if(this.domElement){this.domElement.title=this._config.title}}});'); -_jsload&&_jsload('infowindow', 'a8.extend(bP.prototype,{initialize:function(cL){var cM=this.map=cL.map;this.overlay=cL;this.render();this._bind();if(this._config.enableMaximize){this.enableMaximize()}else{this.disableMaximize()}this.setTitle(this._config.title);this.setContent(this.content,true);if(this._config.ifMaxScene){this.setMaxScene(true)}this.redraw(null,true);var T=cM.infoWindowDoms;if(T){if(cL instanceof ad){T.marker=cL}else{T.marker=null}}},render:function(){var cQ=this.map,cN=this,cL=cQ.infoWindowDoms,cR=cN.IMG_PATH;if(!cL){cL=cQ.infoWindowDoms={};cQ.infoWindow=cQ.infoWindowDoms;var cM=[\'");cM.push(\'");cL.popDom=at(cQ.platform,cM.join(""));cL.shadowDom=cL.popDom.previousSibling;cL.popDivs=cL.popDom.children;cL.shadowDivs=cL.shadowDom.getElementsByTagName("div");cL.contentMain=cL.popDivs[8];cL.titleDiv=at(cL.popDivs[8],\'
    \');cL.contentDiv=at(cL.popDivs[8],\'
    \');cL.maxContentDiv=at(cL.popDivs[8],\'\');var T=10;if(a8.platform.isIphone||a8.platform.isAndroid){T=20}var cO=\'\';cL.closeButton=at(cL.popDom,cO);var cP=\'\';cL.maxButton=at(cL.popDom,cP);this._mendIE6(cL)}cL.guid=cL.popDom.guid=this.guid},_mendIE6:function(cN){if(!a8.browser.ie||a8.browser.ie>6){return}var cM=cN.popDom.getElementsByTagName("IMG");for(var cL=0;cL=4){a8.on(cO,"mouseup",function(cS){if(cS.button==2){co(cS)}})}if(window.addEventListener){cO.addEventListener("DOMMouseScroll",aP,false)}var T=function(cT){var cS=cQ.map.infoWindowDoms.maxButton;if(!cQ.isWinMax){cQ.maximize()}else{cQ.restore()}co(cT)};cN.maxButton.onclick=T;if(aA()){a8.on(cM,"touchend",cL);a8.on(cN.maxButton,"touchend",T)}cO=cM=cN=null},_setWinSize:function(cT,cS){var c3=this._config;cT=cT||c3.width;cS=cS||c3.height;if(cS<0){cS=0}var cN=c3.offset.width;var cR=c3.offset.height;var c2=[25,-1,25,-1,25,-1,25,34];var cM=[25,-1,25,-1,25,-1,25,50];c2[1]=cT-c2[0]-c2[2];if(a8.browser.ie&&document.compatMode!="CSS1Compat"){c2[3]=cT}else{c2[3]=cT-2}c2[5]=cT-c2[4]-c2[6];cM[1]=cM[0];cM[3]=cS-cM[0]-cM[4];if(a8.browser.ie&&document.compatMode!="CSS1Compat"){cM[5]=cM[4]}else{cM[5]=cM[4]-1}var c4=[0,c2[0],cT-c2[2],0,0,c2[4],cT-c2[6],Math.ceil((cT-c2[7])/2)];var cY=[0,0,0,cM[0],cS-c2[4],cS-c2[4],cS-c2[4],cS-c2[4]];var cL=this._allPopLeft=cN-Math.round((cT-c2[7])/2);var cZ=this._allPopTop=cR-cS-24;var c5=Math.floor((cS+cM[7])/2.03)+30;var cP=[70,-1,70,-1,-1,-1,50,-1,140,-1,70];var cX=[30,30,30,25,25,25,60,60,60,60,60];cP[7]=Math.round((cT+80-(cP[6]+cP[8]+cP[10])-50)/2);cP[9]=cP[7]+50;var c1=cP[6]+cP[7]+cP[8]+cP[9]+cP[10];cP[1]=c1-cP[0]-cP[2]-29;cP[5]=cP[3]=c5-cX[0]-cX[6]+70;cX[3]=cX[4]=cX[5]=c5-cX[0]-cX[6];cP[4]=(cP[0]+cP[1]+cP[2]+cX[3]+29)-cP[5]-cP[3];var T=[c5-60-1,c5-60-1+cP[0],c5-60-1+cP[0]+cP[1],29,29+cP[3],29+cP[3]+cP[4],0,cP[6],cP[6]+cP[7],cP[6]+cP[7]+cP[8],cP[6]+cP[7]+cP[8]+cP[9]];var cW=[0,0,0,cX[0],cX[0],cX[0],cX[0]+cX[3],cX[0]+cX[3],cX[0]+cX[3],cX[0]+cX[3],cX[0]+cX[3]];this._allShadowLeft=cN-cP[6]-cP[7]-70;this._allShadowTop=cR-c5+30;var cO=323-c5+90;shadowRightImageLeft=740+cO;var c0=function(c6){return"overflow: hidden; z-index: 1; position: absolute; left:"+c4[c6]+"px; top:"+cY[c6]+"px; width:"+c2[c6]+"px; height:"+cM[c6]+"px"};var cU=function(c6){return"overflow: hidden; z-index: 1; position: absolute; left:"+T[c6]+"px; top:"+cW[c6]+"px; width:"+cP[c6]+"px; height:"+cX[c6]+"px;"};var cQ=this.map.infoWindowDoms;if(cQ&&cQ.popDivs){for(var cV=0;cV<8;cV++){cQ.popDivs[cV].style.cssText=c0(cV)}}if(cQ&&cQ.shadowDivs){for(var cV=0;cV730){T=730}}this._config.width=T;if(this._isMyDom()&&this.isOpen()){var cL=this;this.redraw(function(){cL.setPanToWithDelay()})}},setHeight:function(T){T=T*1;if(!T&&T!=0||isNaN(T)||T<0){return}if(T!=0){if(T<60){T=60}if(T>650){T=650}}this._config.height=T;var cM=this.map;if(this._isMyDom()&&this.isOpen()){if(this._config.width!=0){cM.infoWindowDoms.contentDiv.style.width=this._config.width+"px"}var cL=this;this.redraw(function(){cL.setPanToWithDelay()})}},setMaxWidth:function(T){T=T*1;if(!T&&T!=0||isNaN(T)||T<0){return}if(T!=0){if(T<220){T=220}if(T>730){T=730}}this._config.maxWidth=T;if(this.isWinMax){this.redraw()}},setTitle:function(cN){this._config.title=cN;if(!this._isMyDom()){return}var cM=this.map;var cL=cM.infoWindowDoms.titleDiv;if(!cN){a8.dom.hide(cL)}else{if(b3(cN)){cL.innerHTML=cN}else{cL.innerHTML="";cL.appendChild(cN)}a8.dom.show(cL)}var T=this;this.redraw(function(){T.setPanToWithDelay()})},setContent:function(cN,cP){this.content=cN;if(!this._isMyDom()){return}if(this.isWinMax){return}var cO=this.map;var cL=cO.infoWindowDoms.contentDiv;var T=cO.infoWindowDoms.maxContentDiv;if(b3(cN)){cL.innerHTML=cN}else{cL.innerHTML="";cL.appendChild(cN)}if(this._config.width!=0){cL.style.width=this._config.width+"px"}T.style.display="none";cL.style.display="";if(!cP){var cM=this;this.redraw(function(){cM.setPanToWithDelay()})}},setMaxContent:function(cL){if(!cL){cL=this._config.maxContent}else{this._config.maxContent=cL}var cM=this.map;if(!this._isMyDom()){return}var T=cM.infoWindowDoms;T.maxContentDiv.innerHTML=cL;if(!this.isWinMax){return}T.contentDiv.style.display="none";T.maxContentDiv.style.display=""},redraw:function(cU,cQ){if(!this._isMyDom()){return}if(!cQ&&!this.isOpen()){return}var cM=this,cP=1,cN=cM.map.infoWindowDoms,cL=0;cU=cU||function(){};if(cN.titleDiv.style.display!="none"){cL=24}var cO=7,cT=20;if(a8.platform.isIphone||a8.platform.isAndroid){cO=-1;cT=25}if(this.isWinMax){cS=cM._config.maxWidth;setTimeout(function(){var cW=cL+cN.maxContentDiv.scrollHeight;cW=cW>cM.map.height?cM.map.height-60:cW;cS=cS<220?220:cS;cS=cS>600?600:cS;cW=cW<55?55:cW;cW=cW>440?440:cW;cM._setWinSize(cS+32,cW+32);cN.contentMain.style.width=cS+"px";cN.contentMain.style.height=cW+"px";cN.closeButton.style.left=cS+cO+"px";cN.maxButton.style.left=cS-cT+cO+"px";cN.contentMain.style.overflow="hidden";cM.dispatchEvent(new bg("onresize"));cU()},cP)}else{var cV=cN.contentDiv.style,cR=cN.titleDiv.style,T=cN.contentMain.style;cV.width=T.width=cR.width="auto";cV.height=T.height=cR.height="auto";cV.whiteSpace="nowrap";if(cN.popDom.style.display=="none"){this.show()}cN.popDom.style.visibility="hidden";cN.shadowDom.style.visibility="hidden";var cS=cN.contentMain.clientWidth||0;cS=cM._config.width==0?cS:cM._config.width;cS=cS<220?220:cS;cS=cS>600?600:cS;T.width=cS+"px";h=cN.contentMain.scrollHeight||0;h=cM._config.height==0?h:cM._config.height;cM._setWinSize(cS+32,h+32);setTimeout(function(){cV.whiteSpace="";if(cM._config.width==0){T.overflowX="hidden"}else{T.overflowX="auto"}if(cM._config.height==0){T.overflowY="hidden"}else{T.overflowY="auto"}h=cN.contentMain.scrollHeight||0;h=cM._config.height==0?h:cM._config.height;h=h<55?55:h;h=h>440?440:h;cM._setWinSize(cS+32,h+32);cN.popDom.style.visibility="";cN.shadowDom.style.visibility="";T.height=h+"px";cN.closeButton.style.left=cS+cO+"px";cN.maxButton.style.left=cS-cT+cO+"px";cM.dispatchEvent(new bg("onresize"));cU()},cP)}},setPosition:function(){if(!this._isMyDom()){return}var T=this.map.infoWindowDoms,cL=this.overlay,cN=this.map.pointToOverlayPixel(cL.getPosition()),cM=cL.getIcon(),cO=new bu(cN.x-cM.anchor.width+cM.infoWindowAnchor.width+cL.getOffset().width,cN.y-cM.anchor.height+cM.infoWindowAnchor.height+cL.getOffset().height);T.popDom.style.left=this._allPopLeft+cO.x+"px";T.popDom.style.top=this._allPopTop+cO.y+"px";T.shadowDom.style.left=this._allShadowLeft+cO.x+"px";T.shadowDom.style.top=this._allShadowTop+cO.y+"px"},setPanToWithDelay:function(T){var cL=this;setTimeout(function(){cL.setPanTo()},T||200)},setPanTo:function(){if(!this.overlay||!this.overlay.getPosition()||!this._config.enableAutoPan||!this._isMyDom()){return}var c0=this.map;var cS=c0.infoWindowDoms;var cM=cS.popDivs;var c1=cS.popDom;if(!cM||!c1){return}var cN=parseInt(cM[3].style.width)+2;var cX=parseInt(cM[1].style.height)+parseInt(cM[3].style.height)+parseInt(cM[7].style.height);var cV=parseInt(c1.style.left)+this.map.offsetX;var cP=parseInt(c1.style.top)+this.map.offsetY;var cR=new bu(cV,cP);var cQ=new bu(cN+cV,cX+cP);if(this._config.height!=0&&document.all){if(!c0.temp.infoKey){c0.temp.infoKey=-1}var cY=-c0.temp.infoKey;c0.temp.infoKey=-c0.temp.infoKey}var cY=0;var cW=0;var T=10;var cL=this._config.margin[0];var cO=this._config.margin[1];var cZ=this._config.margin[2];var cT=this._config.margin[3];if(cR.xc0.width-cO){cY=c0.width-cQ.x-cO}if(cQ.y>c0.height-cZ){cW=c0.height-cQ.y-cZ}this._loadCollisions();var cU=this._config.collisions;if(cR.xc0.width-cU[1][0]&&cR.y=cN){cY=-cQ.x+c0.width-cU[1][0]}else{cW=-cR.y+cU[1][1];if(c0.width-cU[0][0]-cU[1][0]c0.height-cU[3][1]){if(Math.abs(-cR.x+cU[3][0])=cN){cY=-cR.x+cU[3][0]}else{cW=-cQ.y+c0.height-cU[3][1]}if(c0.height-cU[0][1]-cU[3][1]c0.width-cU[2][0]&&cQ.y>c0.height-cU[2][1]){if(Math.abs(-cQ.x+c0.width-cU[2][0])=cN){cY=-cQ.x+c0.width-cU[2][0]}else{if(c0.height-cU[1][1]-cU[2][1]>=cX){cW=-cQ.y+c0.height-cU[2][1]}else{cW=-cR.y+cU[1][1]}if(c0.width-cU[0][0]-cU[2][0]cX[0]?cQ:cX[0],cN>cX[1]?cN:cX[1]]}},enableMaximize:function(){this._config.enableMaximize=true;if(this._isMyDom()){this.map.infoWindowDoms.maxButton.style.display="block"}},disableMaximize:function(){this._config.enableMaximize=false;if(this._isMyDom()){this.map.infoWindowDoms.maxButton.style.display="none"}},show:function(){if(!this._isMyDom()){return}var cL=this.map.infoWindowDoms;if(cL.popDom.style.display!="none"){return}if(cJ(this.content)){cL.contentDiv.appendChild(this.content)}if(cJ(this._config.title)){cL.titleDiv.appendChild(this._config.title)}a8.dom.show(cL.popDom);a8.dom.show(cL.shadowDom);var T=new bg("onopen");T.point=this.getPosition();this.dispatchEvent(T);this.redraw()},hide:function(){if(!this._isMyDom()){return false}var cL=this.map.infoWindowDoms;if(cL.popDom.style.display=="none"){return false}if(this._config.onClosing()==false){return false}if(cJ(this.content)){cL.contentDiv.removeChild(this.content)}if(cJ(this._config.title)){cL.titleDiv.removeChild(this._config.title)}a8.dom.hide(cL.popDom);a8.dom.hide(cL.shadowDom);if(this.isWinMax){this.isWinMax=false;cL.maxContentDiv.style.display="none";cL.contentDiv.style.display="";cL.maxButton.src=this.IMG_PATH+"iw_plus1d3.gif"}var T=new bg("onclose");T.point=this.getPosition();this.dispatchEvent(T);if(this.map.temp._clickCloseBindTimer){clearTimeout(this.map.temp._clickCloseBindTimer);this.map.temp._clickCloseBindTimer=null}else{this.map.removeEventListener("click",this.map.temp._clickCloseHandler);this.map.temp._clickCloseBinded=false}a8.lang.decontrol(this.guid);return true},maximize:function(){if(!this.map||!this.isOpen()||!this._config.enableMaximize||this.isWinMax){return}if(!this._isMyDom()){return}var cL=this.map.infoWindowDoms.maxButton;var T=this;T.isWinMax=true;cL.src=T.IMG_PATH+"iw_minus1d3.gif";T.setMaxContent();T.map.infoWindowDoms.maxContentDiv.style.display="block";T.redraw();T.dispatchEvent(new bg("onmaximize"));T.setPanToWithDelay()},restore:function(){if(!this.map||!this.isOpen()||!this.isWinMax){return}if(!this._isMyDom()){return}this.isWinMax=false;var T=this;var cL=T.map.infoWindowDoms.maxButton;cL.src=T.IMG_PATH+"iw_plus1d3.gif";T.setContent(this.content,true);T.map.infoWindowDoms.maxContentDiv.style.display="none";T.redraw();T.dispatchEvent(new bg("onrestore"));T.setPanToWithDelay()},_revert:function(){if(!this._isMyDom()){return}this.isWinMax=false;var T=this.map.infoWindowDoms;T.titleDiv.innerHTML="";T.contentDiv.innerHTML="";T.maxContentDiv.innerHTML="";T.maxButton.src=this.IMG_PATH+"iw_plus1d3.gif"},_setOverflow:function(){var cM=this.map;if(!this._isMyDom()){return}var cL=cM.infoWindowDoms,T=cL.contentMain.style;cL._overflowX=T.overflowX;cL._overflowY=T.overflowY;T.overflowX="hidden";T.overflowY="hidden"},_resetOverflow:function(){var cM=this.map;if(!this._isMyDom()||!cM.infoWindowDoms._overflowX||!cM.infoWindowDoms._overflowY){return}var cL=cM.infoWindowDoms,T=cL.contentMain.style;T.overflowX=cL._overflowX;T.overflowY=cL._overflowY;delete cL._overflowX;delete cL._overflowY},isOpen:function(){if(!this.map){return false}var T=this.map.temp.infoWin;if(!T){return false}if(!this._isMyDom()){return false}if(T&&T.overlay===this.overlay&&this.map.infoWindowDoms&&this.map.infoWindowDoms.popDom.style.display=="none"){return false}else{return true}},setMaxScene:function(cL){var cM=this;if(!this._isMyDom()){return}var T=cM.map.infoWindowDoms;T.maxButton.style.display="block";var cN=T.maxButton;if(!!cL==!!this.isWinMax){return}if(cL){cM.isWinMax=true;cN.src=cM.IMG_PATH+"iw_minus1d3.gif";cM.setMaxContent();T.maxContentDiv.style.display="block"}else{cM.isWinMax=false;cN.src=cM.IMG_PATH+"iw_plus1d3.gif";cM.setContent(this.content,true);T.maxContentDiv.style.display="none"}this.redraw()},_draw:function(){if(this._visible==true&&this.overlay){this.overlay.openInfoWindow(this)}},_isMyDom:function(){return(this.map&&this.map.infoWindowDoms&&this.map.infoWindowDoms.guid==this.guid)}});Y.prototype.openInfoWindow=function(cN){var cM=this.map;if(!cM||!this.domElement||this.isVisible()==false||!cN instanceof bP){return}var cL=cM.temp;if(cL.infoWin&&cL.infoWin.overlay&&cL.infoWin.overlay._fromMap){cM.closeInfoWindow()}if(cL.infoWin===cN&&cL.infoWin.isOpen()&&cL.infoWin.overlay===this){cN.setPanToWithDelay();return}cM.closeInfoWindow();this.infoWindow=cN;if(cL.infoWin==null||cL.infoWin!=cN){if(cM.infoWindowDoms){cM.infoWindowDoms.closeButton.onclick=null;cM.infoWindowDoms.maxButton.onclick=null}cL.infoWin=cN;cN.initialize(this)}else{cN.redraw(null,true)}a8.lang.Class.call(cN,cN.guid);if(!cL._clickCloseHandler){cL._clickCloseHandler=function(cO){if(!cO.overlay){if(cM.temp.infoWin&&cM.temp.infoWin._config.enableCloseOnClick){cM.closeInfoWindow();cM.removeEventListener("click",arguments.callee);cL._clickCloseBinded=false}}}}if(!cL._clickCloseBinded){cL._clickCloseBindTimer=setTimeout(function(){cM.addEventListener("click",cL._clickCloseHandler);cL._clickCloseBinded=true;cL._clickCloseBindTimer=null},200)}if(cL._infoWin){delete cL._infoWin}cN.overlay=this;var T=cM.infoWindowDoms;this.map.getPanes().floatPane.appendChild(T.popDom);this.map.getPanes().floatShadow.appendChild(T.shadowDom);cN.setPanToWithDelay();this.dispatchEvent(new bg("oninfowindowopen"))};Y.prototype.closeInfoWindow=function(){if(!this.map||!this.map.infoWindowDoms){return}var cL=this;if(cL.infoWindow&&cL.infoWindow.guid==cL.map.infoWindowDoms.guid){try{if(cL.infoWindow.hide()==true){cL.dispatchEvent(new bg("oninfowindowclose"));cL.map.temp.infoWin=cL.infoWindow=null}}catch(T){}}};'); \ No newline at end of file