diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 00000000..03199551 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: # Replace with a single Patreon username +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: ['https://www.lovebing.net/images/mm_reward_qrcode_1571759075068.png'] diff --git a/.gitignore b/.gitignore index 35a70833..c1ebad20 100644 --- a/.gitignore +++ b/.gitignore @@ -1,10 +1,56 @@ -node_modules/ -android/build/ -android/.idea/ -android/gradle/ -android/gradlew -android/gradlew.bat -android/local.properties +# OSX +# .DS_Store + +# Xcode +# +build/ +*.pbxuser +!default.pbxuser +*.mode1v3 +!default.mode1v3 +*.mode2v3 +!default.mode2v3 +*.perspectivev3 +!default.perspectivev3 +xcuserdata +*.xccheckout +*.moved-aside +DerivedData +*.hmap +*.ipa +*.xcuserstate +project.xcworkspace +Pods/ +# Android/IntelliJ +# +build/ .idea +.gradle +local.properties +*.iml + +# node.js +# +node_modules/ npm-debug.log +yarn-error.log + +# BUCK +buck-out/ +\.buckd/ +*.keystore + +# fastlane +# +# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the +# screenshots whenever they are needed. +# For more information about the recommended setup visit: +# https://docs.fastlane.tools/best-practices/source-control/ + +*/fastlane/report.xml +*/fastlane/Preview.html +*/fastlane/screenshots + +# Bundle artifact +*.jsbundle diff --git a/.npmignore b/.npmignore index db2ba253..a84b83a3 100644 --- a/.npmignore +++ b/.npmignore @@ -1,11 +1,13 @@ node_modules/ android/build/ android/.idea/ -android/gradle/ -android/gradlew -android/gradlew.bat +android/.gradle/ android/local.properties .DS_Store .idea npm-debug.log -demo \ No newline at end of file +example +package-lock.json +.git +.gitignore +.yarn-metadata.json diff --git a/.yarn-metadata.json b/.yarn-metadata.json new file mode 100644 index 00000000..6e90d6db --- /dev/null +++ b/.yarn-metadata.json @@ -0,0 +1,45 @@ +{ + "manifest": { + "name": "react-native-baidu-map", + "version": "1.0.2", + "description": "Baidu Map SDK modules and view for React Native(Android & IOS), support react native 0.57+. 百度地图 React Native 模块,支持 react native 0.57+,已更新到最新的百度地图SDK版本。", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/lovebing/react-native-baidu-map.git" + }, + "keywords": [ + "Baidu Map", + "React Native" + ], + "author": { + "name": "lovebing" + }, + "license": "MIT", + "bugs": { + "url": "https://github.com/lovebing/react-native-baidu-map/issues" + }, + "homepage": "https://github.com/lovebing/react-native-baidu-map#readme", + "devDependencies": { + "react": "16.6.1", + "react-native": "^0.57.5" + }, + "_registry": "npm", + "_loc": "/Users/lovebing/Library/Caches/Yarn/v1/npm-react-native-baidu-map-1.0.2-fa4f71f3-d352-42af-8c90-47f3abc5dacb-1549651247170/package.json", + "readmeFilename": "README.md", + "readme": "# react-native-baidu-map [![npm version](https://img.shields.io/npm/v/react-native-baidu-map.svg?style=flat)](https://www.npmjs.com/package/react-native-baidu-map)\n\nBaidu Map SDK modules and view for React Native(Android & IOS), support react native 0.57+\n\n百度地图 React Native 模块,支持 react native 0.57+,已更新到最新的百度地图SDK版本。\n\nMarker icon 的实现参考了 https://github.com/react-native-community/react-native-maps 的相关代码。\n\n![Android](https://raw.githubusercontent.com/lovebing/react-native-baidu-map/master/images/android.jpg)\n![IOS](https://raw.githubusercontent.com/lovebing/react-native-baidu-map/master/images/ios.jpg)\n### 环境要求\n1.JS\n- node: 8.0 及以上\n\n2.Android\n- Android SDK: api 28 及上以上\n- gradle: 4.6\n- Android Studio: 3.1.3 及以上\n\n3.IOS\n- XCode: 8.0 及以上\n\n### JS模块安装\n npm install react-native-baidu-map --save\n### 原生模块导入\n\n#### Android Studio\n\n1.导入\n\n方法一:\n`react-native link react-native-baidu-map`\n\n方法二:使用 mavenCentral,编辑 app/build.gradle,添加依赖\n```groovy\nrepositories {\n mavenCentral()\n}\ndependencies {\n implementation 'org.lovebing.reactnative:baidu-map:1.0.1'\n}\n```\n方法三:使用本地 aar (打包后生成)\n- 在 app/libs 目录下添加 baidu-map-release.aar\n- 编辑 app/build.gradle,添加依赖\n```groovy\nandroid {\n repositories {\n flatDir {\n dirs 'libs'\n }\n }\n}\ndependencies {\n implementation fileTree(dir: \"libs\", include: [\"*.jar\", \"*.aar\"])\n}\n```\n2.编辑 MainApplication.java,添加 BaiduMapPackage\n\n```java\npublic class MainApplication extends Application implements ReactApplication {\n @Override\n protected List getPackages() {\n return Arrays.asList(\n new MainReactPackage(), new BaiduMapPackage()\n );\n }\n}\n```\n\n#### IOS/Xcode (重构中)\n- Project navigator->Libraries->Add Files to 选择 react-native-baidu-map/ios/RCTBaiduMap.xcodeproj\n- Project navigator->Build Phases->Link Binary With Libraries 加入 libRCTBaiduMap.a\n- Project navigator->Build Settings->Search Paths, Framework search paths 添加 react-native-baidu-map/ios/lib,Header search paths 添加 react-native-baidu-map/ios/RCTBaiduMap\n- 添加依赖, react-native-baidu-map/ios/lib 下的全部 framwordk, CoreLocation.framework和QuartzCore.framework、OpenGLES.framework、SystemConfiguration.framework、CoreGraphics.framework、Security.framework、libsqlite3.0.tbd(xcode7以前为 libsqlite3.0.dylib)、CoreTelephony.framework 、libstdc++.6.0.9.tbd(xcode7以前为libstdc++.6.0.9.dylib)\n- 添加 BaiduMapAPI_Map.framework/Resources/mapapi.bundle\n\n- 其它一些注意事项可参考百度地图LBS文档\n\n##### AppDelegate.m init 初始化\n #import \"RCTBaiduMapViewManager.h\"\n - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions\n {\n ...\n [RCTBaiduMapViewManager initSDK:@\"api key\"];\n ...\n }\n\n### Usage 使用方法\n\n import { MapView, MapTypes, Geolocation, Overelay } from 'react-native-baidu-map\n\n#### MapView Props 属性\n| Prop | Type | Default | Description\n| ----------------------- |:-----:| :-------:| -------\n| zoomControlsVisible | bool | true | Android only\n| trafficEnabled | bool | false |\n| baiduHeatMapEnabled | bool | false |\n| mapType | number| 1 |\n| zoom | number| 10 |\n| center | object| null | {latitude: 0, longitude: 0}\n| onMapStatusChangeStart | func | undefined| Android only\n| onMapStatusChange | func | undefined|\n| onMapStatusChangeFinish | func | undefined| Android only\n| onMapLoaded | func | undefined|\n| onMapClick | func | undefined|\n| onMapDoubleClick | func | undefined|\n| onMarkerClick | func | undefined|\n| onMapPoiClick | func | undefined|\n\n#### Overelay 覆盖物\n const { Marker, Arc, Circle, Polyline, Polygon, Text, InfoWindow } = Overelay;\n\n##### Marker Props 属性\n| Prop | Type | Default | Description\n| ----------------------- |:-----:| :-------:| -------\n| title | string| null |\n| location | object| {latitude: 0, longitude: 0} |\n| perspective | bool | null |\n| flat | bool | null |\n| rotate | float | 0 |\n| icon | any | null | icon图片,同 的 source 属性\n| alpha | float | 1 |\n\n##### Arc Props 属性\n| Prop | Type | Default | Description\n| ----------------------- |:-----:| :-------:| -------\n| color | string| AA00FF00 |\n| width | int | 4 |\n| poins | array | [{latitude: 0, longitude: 0}, {latitude: 0, longitude: 0}, {latitude: 0, longitude: 0}] | 数值长度必须为 3\n\n##### Circle Props 属性\n| Prop | Type | Default | Description\n| ----------------------- |:-----:| :-------:| -------\n| radius | int | 1400 |\n| fillColor | string| 000000FF |\n| stroke | object| {width: 5, color: 'AA000000'} |\n| center | object| {latitude: 0, longitude: 0} |\n\n##### Polyline Props 属性\n| Prop | Type | Default | Description\n| ----------------------- |:-----:| :-------:| -------\n| points | array | [{latitude: 0, longitude: 0}] |\n| color | string| AAFF0000 |\n\n##### Polygon Props 属性\n| Prop | Type | Default | Description\n| ----------------------- |:-----:| :-------:| -------\n| points | array | [{latitude: 0, longitude: 0}] |\n| fillColor | string| AAFFFF00 |\n| stroke | object| {width: 5, color: 'AA00FF00'} |\n\n\n##### Text Props 属性\n| Prop | Type | Default | Description\n| ----------------------- |:-----:| :-------:| -------\n| text | string| |\n| fontSize | int | |\n| fontColor | string| |\n| bgColor | string| |\n| rotate | float | |\n| location | object|{latitude: 0, longitude: 0}\n\n##### InfoWindow Props 属性\n| Prop | Type | Default | Description\n| ----------------------- |:-----:| :-------:| -------\n| location | object|{latitude: 0, longitude: 0}\n| visible | bool | false | 点击 marker 后才能设为 true \n\n\n \n \n \n \n \n \n \n \n \n\n\n#### Geolocation Methods\n\n| Method | Result\n| ------------------------- | -------\n| Promise reverseGeoCode(double lat, double lng) | `{\"address\": \"\", \"province\": \"\", \"cityCode\": \"\", \"city\": \"\", \"district\": \"\", \"streetName\": \"\", \"streetNumber\": \"\"}`\n| Promise reverseGeoCodeGPS(double lat, double lng) | `{\"address\": \"\", \"province\": \"\", \"cityCode\": \"\", \"city\": \"\", \"district\": \"\", \"streetName\": \"\", \"streetNumber\": \"\"}`\n| Promise geocode(String city, String addr) | {\"latitude\": 0.0, \"longitude\": 0.0}\n| Promise getCurrentPosition() | IOS: `{\"latitude\": 0.0, \"longitude\": 0.0, \"address\": \"\", \"province\": \"\", \"cityCode\": \"\", \"city\": \"\", \"district\": \"\", \"streetName\": \"\", \"streetNumber\": \"\"}` Android: `{\"latitude\": 0.0, \"longitude\": 0.0, \"direction\": -1, \"altitude\": 0.0, \"radius\": 0.0, \"address\": \"\", \"countryCode\": \"\", \"country\": \"\", \"province\": \"\", \"cityCode\": \"\", \"city\": \"\", \"district\": \"\", \"street\": \"\", \"streetNumber\": \"\", \"buildingId\": \"\", \"buildingName\": \"\"}`\n\n\n\n### 开发和测试说明\n根目录执行 `npm link`\n`cd example`\n`npm link react-native-baidu-map`\n", + "licenseText": "MIT License\n\nCopyright (c) 2016-present, lovebing.org.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE." + }, + "artifacts": [], + "remote": { + "type": "copy", + "registry": "npm", + "hash": "fa4f71f3-d352-42af-8c90-47f3abc5dacb-1549651247170", + "reference": "/usr/local/node/lib/node_modules/react-native-baidu-map" + }, + "registry": "npm", + "hash": "fa4f71f3-d352-42af-8c90-47f3abc5dacb-1549651247170" +} \ No newline at end of file diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..339ff989 --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2016-present, lovebing.org. + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. \ No newline at end of file diff --git a/README.md b/README.md index f626c85d..35acb159 100644 --- a/README.md +++ b/README.md @@ -1,60 +1,110 @@ # react-native-baidu-map [![npm version](https://img.shields.io/npm/v/react-native-baidu-map.svg?style=flat)](https://www.npmjs.com/package/react-native-baidu-map) -Baidu Map SDK modules and view for React Native(Android & IOS), support react native 0.40+ +1.0.x 分支:react-native-baidu-map-old [![npm version](https://img.shields.io/npm/v/react-native-baidu-map-old.svg?style=flat)](https://www.npmjs.com/package/react-native-baidu-map-old) -百度地图 React Native 模块,支持 react native 0.40+ +分支说明: +- master:支持 react-native 0.61 及以上版本,Android 使用 androidx +- 1.0.x:支持 react-native 0.60 及 0.50,Android 未使用 androidx + +Baidu Map SDK modules and views for React Native(Android & iOS), support react native 0.61.2+ + +百度地图 React Native 模块。 + +使用示例:https://github.com/lovebing/react-native-baidu-map-examples + +使用百度地图SDK最新版本。 +Android 版导入的 SDK 包含以下模块: +- 基础定位 +- 基础地图(含室内图) +- 检索功能、LBS云检索 +- 计算工具 + +### 在线交流 +QQ群:561086908 + +### 近期 TODO: +#### Android +- 完善坐标转换 +- 添加一些常用的方法 + +#### iOS +- 完善坐标标转换 +- 完善 Cluster(点聚合) +- 添加一些常用的方法 + +Marker icon 的实现参考了 https://github.com/react-native-community/react-native-maps 的相关代码。 ![Android](https://raw.githubusercontent.com/lovebing/react-native-baidu-map/master/images/android.jpg) -![IOS](https://raw.githubusercontent.com/lovebing/react-native-baidu-map/master/images/ios.jpg) +![iOS](https://raw.githubusercontent.com/lovebing/react-native-baidu-map/master/images/ios.jpg) + + +### Dev & Test 开发和测试说明 +react-native doesn't support symlinks. see https://stackoverflow.com/questions/44061155/react-native-npm-link-local-dependency-unable-to-resolve-module. Can't install local package by using `npm link`. + +react-native 不支持软链,参考: +https://stackoverflow.com/questions/44061155/react-native-npm-link-local-dependency-unable-to-resolve-module +所以不能使用 npm link 的方式安装本地的包 + + +### Environments 环境要求 +1.JS +- node: 12+ +- react-native: 0.50.+ +2.Android +- Android SDK: api 28+ +- gradle: 4.10.1 +- Android Studio: 3.1.3+ -### Install 安装 - npm install react-native-baidu-map --save -### Import 导入 +3.iOS +- XCode: 11.3+ -#### Android Studio -- settings.gradle ` -include ':react-native-baidu-map' -project(':react-native-baidu-map').projectDir = new File(settingsDir, '../node_modules/react-native-baidu-map/android')` -- build.gradle `compile project(':react-native-baidu-map')` +### 初始化 +#### Android +AndroidManifest.xml 设置 -- MainApplication`new BaiduMapPackage(getApplicationContext())` -- AndroidMainifest.xml `` +必要的权限 -#### Xcode -- Project navigator->Libraries->Add Files to 选择 react-native-baidu-map/ios/RCTBaiduMap.xcodeproj -- Project navigator->Build Phases->Link Binary With Libraries 加入 libRCTBaiduMap.a -- Project navigator->Build Settings->Search Paths, Framework search paths 添加 react-native-baidu-map/ios/lib,Header search paths 添加 react-native-baidu-map/ios/RCTBaiduMap -- 添加依赖, react-native-baidu-map/ios/lib 下的全部 framwordk, CoreLocation.framework和QuartzCore.framework、OpenGLES.framework、SystemConfiguration.framework、CoreGraphics.framework、Security.framework、libsqlite3.0.tbd(xcode7以前为 libsqlite3.0.dylib)、CoreTelephony.framework 、libstdc++.6.0.9.tbd(xcode7以前为libstdc++.6.0.9.dylib) -- 添加 BaiduMapAPI_Map.framework/Resources/mapapi.bundle +``` + + + + + +``` -- 其它一些注意事项可参考百度地图LBS文档 +application 下添加名为 com.baidu.lbsapi.API_KEY 的 meta,如 -##### AppDelegate.m init 初始化 - #import "RCTBaiduMapViewManager.h" - - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions - { - ... - [RCTBaiduMapViewManager initSDK:@"api key"]; - ... - } +``` + +``` + +#### iOS +使用 BaiduMapManager.initSDK 方法设置 api key,如 +``` +import { BaiduMapManager } from 'react-native-baidu-map' +BaiduMapManager.initSDK('sIMQlfmOXhQmPLF1QMh4aBp8zZO9Lb2A'); +``` ### Usage 使用方法 - import { MapView, MapTypes, MapModule, Geolocation } from 'react-native-baidu-map + import { MapView, MapTypes, Geolocation, Overlay, MapApp } from 'react-native-baidu-map' #### MapView Props 属性 -| Name | Type | Default | Extra +| Prop | Type | Default | Description | ----------------------- |:-----:| :-------:| ------- | zoomControlsVisible | bool | true | Android only | trafficEnabled | bool | false | | baiduHeatMapEnabled | bool | false | +| zoomGesturesEnabled | bool | true | 允许手势缩放 +| scrollGesturesEnabled | bool | true | 允许拖动 | mapType | number| 1 | | zoom | number| 10 | +| showsUserLocation | bool | false | 是否显示定位 +| locationData | object| null | 定位信息 {latitude: 0, longitude: 0} | center | object| null | {latitude: 0, longitude: 0} -| marker | object| null | {latitude: 0, longitude: 0, title: ''} -| markers | array | [] | [marker, maker] | onMapStatusChangeStart | func | undefined| Android only | onMapStatusChange | func | undefined| | onMapStatusChangeFinish | func | undefined| Android only @@ -64,20 +114,172 @@ project(':react-native-baidu-map').projectDir = new File(settingsDir, '../node_m | onMarkerClick | func | undefined| | onMapPoiClick | func | undefined| -#### MapModule Methods (Deprecated) - setMarker(double lat, double lng) - setMapType(int mapType) - moveToCenter(double lat, double lng, float zoom) - Promise reverseGeoCode(double lat, double lng) - Promise reverseGeoCodeGPS(double lat, double lng) - Promise geocode(String city, String addr), - Promise getCurrentPosition() +#### Overlay 覆盖物 + const { Marker, Cluster, Arc, Circle, Polyline, Polygon, InfoWindow, HeatMap } = Overlay; + +##### 颜色取值说明 +6 位(RRGGBB)或 8 位(AARRGGBB) + +##### Marker Props 属性 +| Prop | Type | Default | Description +| ----------------------- |:-----:| :-------:| ------- +| title | string| null | 如果没有 InfoWindow,将会根据 title 生成 InfoWindow +| titleOffsetY | int | -80 | title 作为 InfoWindow 展示的 y 轴偏移量,仅 Android +| location | object| {latitude: 0, longitude: 0} | +| perspective | bool | null | 仅 Android +| flat | bool | null | 仅 Android +| rotate | float | 0 | 旋转角度,仅 Android +| icon | any | null | icon图片,同 的 source 属性 +| alpha | float | 1 | 透明度,仅 Android +| animateType | string| | 动画效果:drop/grow/jump (iOS 仅支持 drop) +| pinColor | string| red | red/green/purple,大头针颜色,仅 iOS +| onClick | func | | 点击事件回调 +##### Cluster 点聚合 + +##### Arc Props 属性 +| Prop | Type | Default | Description +| ----------------------- |:-----:| :-------:| ------- +| stroke | width| {width: 5, color: 'AA000000'} | +| points | array| [{latitude: 0, longitude: 0}, {latitude: 0, longitude: 0}, {latitude: 0, longitude: 0}] | 数值长度必须为 3 +| dash | bool | false | 是否为虚线,仅 iOS + +##### Circle Props 属性 +| Prop | Type | Default | Description +| ----------------------- |:-----:| :-------:| ------- +| radius | int | 1400 | +| fillColor | string| 000000FF | +| stroke | object| {width: 5, color: 'AA000000'} | +| center | object| {latitude: 0, longitude: 0} | + +##### Polyline Props 属性 +| Prop | Type | Default | Description +| ----------------------- |:-----:| :-------:| ------- +| points | array | [{latitude: 0, longitude: 0}] | +| stroke | object| {width: 5, color: 'AA000000'} | + + +##### Polygon Props 属性 +| Prop | Type | Default | Description +| ----------------------- |:-----:| :-------:| ------- +| points | array | [{latitude: 0, longitude: 0}] | +| fillColor | string| AAFFFF00 | +| stroke | object| {width: 5, color: 'AA00FF00'} | + + +##### Text Props 属性 +| Prop | Type | Default | Description +| ----------------------- |:-----:| :-------:| ------- +| text | string| | +| fontSize | int | | +| fontColor | string| | +| bgColor | string| | +| rotate | float | | +| location | object|{latitude: 0, longitude: 0} + + +##### MarkerIcon 使用 View 作为 marker 的 icon + +##### InfoWindow Props 属性 +必须作为 Marker 的子组件 + +| Prop | Type | Default | Description +| ----------------------- |:-----:| :-------:| ------- +| offsetY | int | 0 | 相对于 point 在 y 轴的偏移量,仅 Android + +#### HeatMap Props 属性 + +| Prop | Type | Default | Description +| ----------------------- |:-----:| :-------:| ------- +| points | array | | +| gradient | object| { colors: ['66FF00', 'FF0000'], startPoints: [0.2, 1.0] } | 颜色渐变对象 + +```jsx + + + + + + + + + ABC + + + + + + + + + + + text + + +``` + +Marker 示例 +```jsx + + + + +``` + +Cluster 示例 + +```jsx + + + + + + + + + + +``` + +#### BaiduMapManager + +| Method | Description | Result +| ------------------------- | ---------------- | ------- +| void initSDK(string apiKey) | iOS 初始化 SDK | +| Promise hasLocationPermission | 是否有定位权限 | #### Geolocation Methods +| Method | Description | Result +| ------------------------- | ---------------- | ------- +| Promise reverseGeoCode(double lat, double lng) | | `{"address": "", "province": "", "cityCode": "", "city": "", "district": "", "streetName": "", "streetNumber": ""}` +| Promise reverseGeoCodeGPS(double lat, double lng) | | `{"address": "", "province": "", "cityCode": "", "city": "", "district": "", "streetName": "", "streetNumber": ""}` +| Promise geocode(String city, String addr) | | {"latitude": 0.0, "longitude": 0.0} +| Promise getCurrentPosition(String coorType) | coorType 可为 `bd09ll` 或 `gcj02`,默认 `bd09ll`|`{"latitude": 0.0, "longitude": 0.0, "address": "", "province": "", "cityCode": "", "city": "", "district": "", "streetName": "", "streetNumber": ""}` Android: `{"latitude": 0.0, "longitude": 0.0, "direction": -1, "altitude": 0.0, "radius": 0.0, "address": "", "countryCode": "", "country": "", "province": "", "cityCode": "", "city": "", "district": "", "street": "", "streetNumber": "", "buildingId": "", "buildingName": ""}` +| startLocating(function listener, String coorType) | 开始持续定位 | +| stopLocating | 停止持续定位 | + +#### GetDistance Methods | Method | Result | ------------------------- | ------- -| Promise reverseGeoCode(double lat, double lng) | `{"address": "", "province": "", "cityCode": "", "city": "", "district": "", "streetName": "", "streetNumber": ""}` -| Promise reverseGeoCodeGPS(double lat, double lng) | `{"address": "", "province": "", "cityCode": "", "city": "", "district": "", "streetName": "", "streetNumber": ""}` -| Promise geocode(String city, String addr) | {"latitude": 0.0, "longitude": 0.0} -| Promise getCurrentPosition() | IOS: `{"latitude": 0.0, "longitude": 0.0, "address": "", "province": "", "cityCode": "", "city": "", "district": "", "streetName": "", "streetNumber": ""}` Android: `{"latitude": 0.0, "longitude": 0.0, "direction": -1, "altitude": 0.0, "radius": 0.0, "address": "", "countryCode": "", "country": "", "province": "", "cityCode": "", "city": "", "district": "", "street": "", "streetNumber": "", "buildingId": "", "buildingName": ""}` +| Promise getLocationDistance({latitude: 0.0, longitude: 0.0}, {latitude: 0.0, longitude: 0.0}) | `{"distance": 0.0}` + +#### MapApp Methods 调起百度地图客户端 +| Method | Description +| ------------------------- | ------- +| openDrivingRoute({latitude: 0.0, longitude: 0.0, name: ''}, {latitude: 0.0, longitude: 0.0}, name: '') | 调起百度地图驾车规划 +| openTransitRoute({latitude: 0.0, longitude: 0.0, name: ''}, {latitude: 0.0, longitude: 0.0}, name: '') | 调起百度地图公交路线 +| openWalkNavi({latitude: 0.0, longitude: 0.0, name: ''}, {latitude: 0.0, longitude: 0.0}, name: '') | 调起百度地图步行路线 + +##### iOS +必须在 Info.plist 中进行如下配置,否则不能调起百度地图客户端 +``` +LSApplicationQueriesSchemes + + baidumap + +``` + +### 鸣谢 +[![jetbrains](https://raw.githubusercontent.com/lovebing/react-native-baidu-map/master/images/jetbrains.png)](https://www.jetbrains.com/?from=react-native-baidu-map) + diff --git a/android/build.gradle b/android/build.gradle index 71e16ca9..aec96cca 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,26 +1,41 @@ +def safeExtGet(prop, fallback) { + rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback +} + apply plugin: 'com.android.library' buildscript { repositories { + mavenLocal() + google() jcenter() + maven() { + url 'http://repo.lovebing.net/repository/maven-public/' + } } dependencies { - classpath 'com.android.tools.build:gradle:2.1.0' + classpath 'com.android.tools.build:gradle:3.3.0' + } +} - // NOTE: Do not place your application dependencies here; they belong - // in the individual module build.gradle files +repositories { + mavenLocal() + google() + jcenter() + maven { + url 'http://repo.lovebing.net/repository/maven-public/' } } android { - compileSdkVersion 23 - buildToolsVersion '25.0.0' + compileSdkVersion safeExtGet('compileSdkVersion', 28) + buildToolsVersion safeExtGet('buildToolsVersion', '28.0.3') defaultConfig { - minSdkVersion 16 - targetSdkVersion 23 + minSdkVersion safeExtGet('minSdkVersion', 21) + targetSdkVersion safeExtGet('targetSdkVersion', 28) versionCode 1 - versionName "1.0" + versionName "${version}" } buildTypes { release { @@ -28,9 +43,16 @@ android { proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } } dependencies { - compile 'com.facebook.react:react-native:+' - compile files('libs/BaiduLBS_Android.jar') + compileOnly 'com.facebook.react:react-native:0.62.2' + implementation files('libs/BaiduLBS_Android.jar') + compileOnly files('src/main/assets') } + diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 00000000..fbbd9f86 --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1 @@ +org.gradle.configureondemand=false \ No newline at end of file diff --git a/demo/android/gradle/wrapper/gradle-wrapper.jar b/android/gradle/wrapper/gradle-wrapper.jar similarity index 100% rename from demo/android/gradle/wrapper/gradle-wrapper.jar rename to android/gradle/wrapper/gradle-wrapper.jar diff --git a/demo/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties similarity index 79% rename from demo/android/gradle/wrapper/gradle-wrapper.properties rename to android/gradle/wrapper/gradle-wrapper.properties index 70b799b8..90ed3690 100644 --- a/demo/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Thu Sep 15 10:51:46 CST 2016 +#Sun Feb 10 00:56:31 CST 2019 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip diff --git a/android/gradlew b/android/gradlew new file mode 100755 index 00000000..9d82f789 --- /dev/null +++ b/android/gradlew @@ -0,0 +1,160 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/android/gradlew.bat b/android/gradlew.bat new file mode 100644 index 00000000..8a0b282a --- /dev/null +++ b/android/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/android/libs/BaiduLBS_Android.jar b/android/libs/BaiduLBS_Android.jar index 470ac8e5..72be0545 100644 Binary files a/android/libs/BaiduLBS_Android.jar and b/android/libs/BaiduLBS_Android.jar differ diff --git a/android/src/main/assets/SDK_Default_Icon_Car.png b/android/src/main/assets/SDK_Default_Icon_Car.png new file mode 100644 index 00000000..8cf8d781 Binary files /dev/null and b/android/src/main/assets/SDK_Default_Icon_Car.png differ diff --git a/android/src/main/assets/SDK_Default_Icon_End.png b/android/src/main/assets/SDK_Default_Icon_End.png new file mode 100644 index 00000000..8da052b8 Binary files /dev/null and b/android/src/main/assets/SDK_Default_Icon_End.png differ diff --git a/android/src/main/assets/SDK_Default_Icon_Passenger.png b/android/src/main/assets/SDK_Default_Icon_Passenger.png new file mode 100644 index 00000000..d6e40f94 Binary files /dev/null and b/android/src/main/assets/SDK_Default_Icon_Passenger.png differ diff --git a/android/src/main/assets/SDK_Default_Icon_Start.png b/android/src/main/assets/SDK_Default_Icon_Start.png new file mode 100644 index 00000000..ae7d70b6 Binary files /dev/null and b/android/src/main/assets/SDK_Default_Icon_Start.png differ diff --git a/android/src/main/assets/SDK_Default_Route_Texture_Bule_Arrow.png b/android/src/main/assets/SDK_Default_Route_Texture_Bule_Arrow.png new file mode 100644 index 00000000..2e84a9cd Binary files /dev/null and b/android/src/main/assets/SDK_Default_Route_Texture_Bule_Arrow.png differ diff --git a/android/src/main/assets/SDK_Default_Traffic_Texture_Congestion.png b/android/src/main/assets/SDK_Default_Traffic_Texture_Congestion.png new file mode 100644 index 00000000..e30cdeaf Binary files /dev/null and b/android/src/main/assets/SDK_Default_Traffic_Texture_Congestion.png differ diff --git a/android/src/main/assets/SDK_Default_Traffic_Texture_SevereCongestion.png b/android/src/main/assets/SDK_Default_Traffic_Texture_SevereCongestion.png new file mode 100644 index 00000000..8cbf51c1 Binary files /dev/null and b/android/src/main/assets/SDK_Default_Traffic_Texture_SevereCongestion.png differ diff --git a/android/src/main/assets/SDK_Default_Traffic_Texture_Slow.png b/android/src/main/assets/SDK_Default_Traffic_Texture_Slow.png new file mode 100644 index 00000000..52ab2648 Binary files /dev/null and b/android/src/main/assets/SDK_Default_Traffic_Texture_Slow.png differ diff --git a/android/src/main/assets/SDK_Default_Traffic_Texture_Smooth.png b/android/src/main/assets/SDK_Default_Traffic_Texture_Smooth.png new file mode 100644 index 00000000..e4252dc4 Binary files /dev/null and b/android/src/main/assets/SDK_Default_Traffic_Texture_Smooth.png differ diff --git a/android/src/main/assets/cfg/a/CustomIndex b/android/src/main/assets/cfg/a/CustomIndex new file mode 100644 index 00000000..88f4a425 --- /dev/null +++ b/android/src/main/assets/cfg/a/CustomIndex @@ -0,0 +1 @@ +{"land":[8,72,73,74,75,76,77,78,79,2000,2001,2003,2004,2005,2006,2763,61194,71011,71012,71013],"green":[1536,1537,1538,1539,1540,1541,1542,1543,1544,1545,1546,1547,1548,1569,1550,1551,1552,1553,1554,1555,1556,2529,2530,2531,2532,2533,2534,2535,2536,2537,2538,2539,2540,2541,2542,2543,2544,2545,2546,2547,2548,2549,2550,2551,2552,2553,2554,2555,2556,2557,2558,20119,20120,20121,20122,20123,20124,20586,20587,20588,20589,20902,60006,60007,60290,61844,61845,61846,61847,61848,61849,61850,61851,61875,61876,61877,61878,61879,61880,61881,61882,61883,61884,61885,61886,61887,61888,61889,61890,61891,61892,61893,61894,61942,61943,61944,61945,61946,61947,61948,61949,61950,61951,61971,61972,61973,61974],"water":[1501,1502,1503,1504,1505,1506,1507,1508,1509,2509,2510,2511,2512,2513,2514,2515,2516,2517,2518,60001,1510,1511,1512,1513,1514,1515,1516,2519,2520,2521,2522,2523,2524,2525,2526,2527,2528,20582,20583,60003,1517,20584,20585,20900,20901,60004,60005,1517,1518,1519,1520,1521,1522,1523,1524,1525,1526,1527,1528,1529,1530,1531,1532,1533,2395,2403,60212,1535,20752,20754,20756,20758,20760],"building":[1605,1606,1607,1608,1609,2420,2765,2766,2767,2825,20590,20660,20763,20764,61735,61736,61737,61738,61739,61740,61838,61839,61840,61841,61842,61843,61895,61896,61897,61898,61899,61900,61901,61902,61903,61904,61905,61906,61907,61908,61909,61910,61911,61912,61913,61914,61915,61916,61917,61918,61965,61966,61967,61968,61969,61970,71163,71164,71165],"manmade":[1558,60052,60053,60054,60055,60056,60057,60058,60059,60060,60061,60062,60063,60064,60065,60066,60067,60068,60069,60070,60071,60072,60073,60074,60075,60076,60077,60078,60079,60080,60081,60082,60083,60084,60085,60086,60087,60088,60089,60090,60091,60092,60093,60094,60095,60096,60097,60098,60099,60100,60101,60102,60103,60104,60105,60106,60107,60108,60109,60110,60111,60112,60113,60114,60115,60116,60117,60118,60119,60120,60121,60122,60123,60124,60125,60126,60127,60128,60129,60130,60131,60132,60133,60134,60135,60136,60137,60138,60139,60140,60145,60146,60147,60148,60149,60150,60151,60152,60153,60154,60155,60161,60172,60173,60174,60175,60176,60177,60178,60179,60180,60181,60182,60183,60184,60185,60186,60216,60237,60295,60297,60420,60863,60938,60948,60954,60956,60958,60960,60962,60964,60966,60968,60970,60972,60974,60976,60978,60980,60982,60984,60986,60988,60990,60992,60994,60996,60998,61000,61002,61004,61006,61008,61010,61012,61014,61016,61018,61020,61022,61024,61026,61028,61030,61032,61034,61036,61038,61040,61042,61044,61046,61048,61050,61052,61054,61056,61058,61060,61062,61064,61066,61068,61070,61072,61074,61076,61078,61080,61082,61084,61086,61088,61090,61092,61094,61096,61098,61100,61102,61104,61106,61174,61176,61178,61953,62023,62025,62027,62205,62439,62443,69986,69996,69999,70029,70031,70033,70035,70037,70039,70041,70043,70045,70047,70049,70051,70053,70055,70057,70059,70061,70103,70105,70107,70109,70111,70113,70115,70117,70119,70121,70123,70125,70127,70129,70131,70133,70135,70137,70139,70141,70143,70145,70147,70149,70151,70153,70155,70157,70159,70161,70163,70165,70167,70169,70171,70173,70175,70177,70179,70181,70183,70185,70187,70189,70191,70193,70195,70197,70199,70201,70203,70205,70207,70209,70211,70213,70215,70218,70220,70222,70224,70226,70228,70230,70232,70234,70236,70238,70240,70242,70244,70246,70248,70250,70252,70254,70256,70258,70260,70262,70264,70266,70268,70270,70272,70274,70306,70308,70310,70312,70314,70316,70318,70320,70322,70324,70326,70328,70330,70332,70334,70336,70338,70340,70342,70344,70346,70348,70350,70352,70354,70356,70358,70360,70362,70364,70366,70368,70370,70372,70374,70376,70378,70380,70382,70384,70386,70388,70390,70392,70394,70396,70398,70400,70402,70404,70406,70408,70410,70412,70414,70416,70418,70420,70422,70424,70426,70428,70430,70432,70434,70436,70438,70440,70442,70444,70446,70448,70450,70452,70454,70456,70458,70460,70462,70464,70466,70468,70470,70472,70474,70533,70604,70606,70698,70700,70702,70704,70706,70708,70710,70712,70714,70716,70718,70720,70722,70724,70726,70728,70730,70732,70734,70736,70738,70740,70742,70744,70927,70930,70934,70937,70945,70949,70952,71009,71113,71116,71119,71128,71150,71153,71167,500001,500013,500015,500017,500019,500021,500022,500023,500024,500025,500026,500027,500028,500029,500030,500031,500032,500168,500170,500172,500174,500176,500178,500180,500186,500192,500194,500200,500202,500204,500206,500212,500214,500216,500218,500220,500226,500228,500230,500236,500238,500240,500242,500248,500250,500252,500258,500260,500262,500264,500266,500272,500274,500276,500278,500280,500282,500284,500290,500296,500298,500300,500302,500304,500306,500308,500310,500312,500314,500316,500318,500320,500322,500324,500326,500328,500330,500332,500334,500336,500338,500340,500342,500348,500350,500352,500358,500360,500362,500364,500370,500372,500378,500380,500386,500388,500390,500392,500398,500400,500402,500404,500406,500408,500410,500412,500414,500416,500418,500420,500422,500428,500430,500432,500434,500436,500442,500444,500446,500448,500450,500452,500454,500456,500462,500464,500466,500468,500470,500476,500478,500480,500482,500488,1570,1571,1572,1573,1574,1575,2929,2930,2931,1576,1577,1578,1579,1580,20892,20765,20891,20893,20894,20753,20755,20757,20759,20653,20761,1564,1565,1566,1567,1568,1549,2388,2389,2390,2391,2392,1559,1560,1561,1562,1563,1572,1603,1581,1582,1583,1584,1585,1586,1587,1588,1589,61196,1590,1591,1592,1593,1594,1595,1596,2933,2934,20903,20592,20904,20593,20905,20594,20906,20595,20907,20596,20908,20597,20909,20598,1602,1597,1598,1599,1600,1601,1602,2935,20591,2936,2937,2938,2939,2940,2941,2942,2943,1604,20777,20778,20779,20780,20781,20782,20783,20784,20785,2932,71281,71282,71283,71284],"boundary":[6,56,57,58,59,60,61,62,64,2007,2008,2009,2010,2011,2012,2013,2014,2015,2016,2017,2018,2019,2020,2021,2022,2393,2394,20417,20418,20419,20420,20421,20422,20423,20424,20425,20426,20427,20428,20429,20430,60287,60288,60289,71104],"highway":[2775,2776,2829,2830,20293,2777,2778,2831,2832,20297,2833,2834,2835,2836,2102,20535,2104,2103,20526,2104,2105,20525,2106,20524,2107,20523,2108,20274,20278,20521,2109,20530,2110,20529,2111,20528,2112,20527,2113,20273,20277,20522,2114,20534,2115,20533,2116,20532,2117,20531,2119,20520,61309,2120,20509,2121,2122,20508,2123,20507,2124,20506,2125,20272,20276,20514,2126,20513,2127,20512,2128,20511,2129,20510,2130,20271,20275,20519,2131,20518,2132,20517,2133,20516,2134,20515,60604,60605,60606,60607,60608,60724,60725,60726,60727,60728,60875,60876,60902,60903,62202,60609,60610,60611,60612,60613,60729,60730,60731,60732,60733,60877,60878,60904,60905,62433,60574,60575,60576,60577,60578,60694,60695,60696,60697,60698,60879,60906,62434,60559,60560,60561,60562,60563,60679,60680,60681,60682,60683,60880,60907,61723,61725,62435,60203,60594,60595,60596,60597,60598,60714,60715,60716,60717,60718,60882,60883,60909,60910,60589,60590,60591,60592,60593,60709,60710,60711,60712,60713,60886,60913,61198,61201,61204,61207,60584,60585,60586,60587,60588,60704,60705,60706,60707,60708,60824,60825,60826,60827,60828,60887,60914,60873,60900,61213,61210],"arterial":[2136,20505,2137,20494,2138,2139,20493,2140,20492,2141,20491,2142,20280,20282,20499,2143,20498,2144,20497,2145,20496,2146,20495,2147,20279,20281,20504,2148,20503,2149,20502,2150,20501,2151,20500,2153,20490,2154,20479,2155,2156,20478,2157,20477,2158,20476,2159,20484,2160,20483,2161,2162,2163,2164,2165,2166,2167,2168,20480,20481,20482,20483,20484,20485,20486,20487,20488,20489,60524,60525,60526,60527,60528,60644,60645,60646,60647,60648,60881,60908,62436,60579,60580,60581,60582,60583,60699,60700,60701,60702,60703,60884,60911,60534,60535,60536,60537,60538,60654,60655,60656,60657,60658,60885,60912,60584,60585,60586,60587,60588,60704,60705,60706,60707,60708,60887,60914,61199,61248,61197,61200,61229,61230,61231,61232,61202,61205,61208,61203,61206,61209,61212],"local":[1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,60529,60530,60531,60532,60533,60649,60650,60651,60652,60653,60770,60772,60773,60889,60916,62437,60499,60500,60501,60502,60503,60619,60620,60621,60622,60623,60740,60742,60743,60894,60921,60539,60540,60541,60542,60543,60659,60660,60661,60662,60663,60890,60917,60207,60504,60505,60506,60507,60508,60624,60625,60626,60627,60628,60745,60747,60748,60895,60922,60549,60550,60551,60552,60553,60669,60670,60671,60672,60673,60789,60790,60791,60792,60793,60896,60923,60509,60510,60511,60512,60513,60629,60630,60631,60632,60633,60750,60752,60753,61726,61727,61728,61746,61747,61748,61729,61730,61731,61749,61750,61751,61732,61733,61734,61752,61753,61754,61229,61230,61231,61232,60564,60565,60566,60567,60568,60684,60685,60686,60687,60688,60891,60918,60544,60545,60546,60547,60548,60664,60665,60666,60667,60668,60892,60919,60549,60550,60551,60552,60553,60669,60670,60671,60672,60673,60896,60923,61240,61239],"railway":[1801,1802,1803,1804,1805,70216,70517,70518,70519,70520,1811,1812,1813,1814,1815,1817,1818,1819,1820,1821,1825,20402,20403,20404,20405,20406,1822,1823,1824,211,514,515,516,517,2795,21211,21212,21213,21214,21215,21216,21217,21218,21219,21220,21221,21222,21223,21224,21225,21226,21227,21228,21229,21230,21231,21232,21233,21234,21235,21245,21246,21247],"subway":[1808,2824,20002,20003,20004,20005,20006,20007,20008,20009,20010,20011,20012,20013,20014,20015,20016,20017,20018,20019,20020,20021,20022,20023,20024,20025,20026,20027,20028,20029,20030,20031,20032,20033,20034,20035,20036,20037,20038,20039,20040,20041,20042,20043,20044,20045,20046,20047,20048,20049,20050,20051,20052,20053,20054,20055,20056,20057,20058,20059,20060,20061,20062,20063,20064,20065,20066,20067,20068,20069,20070,20071,20072,20073,20074,20075,20076,20077,20078,20079,20080,20081,20082,20083,20084,20087,20088,20089,20090,20091,20092,20097,20098,20099,20101,20102,20103,20104,20105,20154,20157,20159,20283,20284,20285,20286,20287,20290,20304,20305,20306,20311,20312,20313,20537,20911,21205,21206,21207,21210,60156,60157,60158,60159,60160,60162,60163,60164,60165,60166,60167,60168,60169,60170,60171,60187,60188,60189,60190,60191,60192,60193,60194,60195,60196,60197,60236,60294,60296,60419,60862,60937,60947,60953,60955,60957,60959,60961,60963,60965,60967,60969,60971,60973,60975,60977,60979,60981,60983,60985,60987,60989,60991,60993,60995,60997,60999,61001,61003,61005,61007,61009,61011,61013,61015,61017,61019,61021,61023,61025,61027,61029,61031,61033,61035,61037,61039,61041,61043,61045,61047,61049,61051,61053,61055,61057,61059,61061,61063,61065,61067,61069,61071,61073,61075,61077,61079,61081,61083,61085,61087,61089,61091,61093,61095,61097,61099,61101,61103,61105,61173,61175,61177,61952,62024,62026,62028,62204,62438,69985,69997,69998,70028,70030,70032,70034,70036,70038,70040,70042,70044,70046,70048,70050,70052,70054,70056,70058,70060,70102,70104,70106,70108,70110,70112,70114,70116,70118,70120,70122,70124,70126,70128,70130,70132,70134,70136,70138,70140,70142,70144,70146,70148,70150,70152,70154,70156,70158,70160,70162,70164,70166,70168,70170,70172,70174,70176,70178,70180,70182,70184,70186,70188,70190,70192,70194,70196,70198,70200,70202,70204,70206,70208,70210,70212,70214,70217,70219,70221,70223,70225,70227,70229,70231,70233,70235,70237,70239,70241,70243,70245,70247,70249,70251,70253,70255,70257,70259,70261,70263,70265,70267,70269,70271,70273,70305,70307,70309,70311,70313,70315,70317,70319,70321,70323,70325,70327,70329,70331,70333,70335,70337,70339,70341,70343,70345,70347,70349,70351,70353,70355,70357,70359,70361,70363,70365,70367,70369,70371,70373,70375,70377,70379,70381,70383,70385,70387,70389,70391,70393,70395,70397,70399,70401,70403,70405,70407,70409,70411,70413,70415,70417,70419,70421,70423,70425,70427,70429,70431,70433,70435,70437,70439,70441,70443,70445,70447,70449,70451,70453,70455,70457,70459,70461,70463,70465,70467,70469,70471,70473,70532,70603,70605,70697,70699,70701,70703,70705,70707,70709,70711,70713,70715,70717,70719,70721,70723,70725,70727,70729,70731,70733,70735,70737,70739,70741,70743,70926,70929,70933,70936,70944,70948,70951,71008,71112,71115,71118,71127,71149,71152,71166,71187,71190,71196,71207,71210,71213,71216,71219,71222,71225,71228,71231,71234,71237,71240,71243,71246,71260,71263,71266,71288,500000,500012,500014,500016,500018,500020,500167,500169,500171,500173,500175,500177,500179,500185,500191,500193,500199,500201,500203,500205,500211,500213,500215,500217,500219,500225,500227,500229,500235,500237,500239,500241,500247,500249,500251,500257,500259,500261,500263,500265,500271,500273,500275,500277,500279,500281,500283,500289,500295,500297,500299,500301,500303,500305,500307,500309,500311,500313,500315,500317,500319,500321,500323,500325,500327,500329,500331,500333,500335,500337,500339,500341,500347,500349,500351,500357,500359,500361,500363,500369,500371,500377,500379,500385,500387,500389,500391,500397,500399,500401,500403,500405,500407,500409,500411,500413,500415,500417,500419,500421,500427,500429,500431,500433,500435,500441,500443,500445,500447,500449,500451,500453,500455,500461,500463,500465,500467,500469,500475,500477,500479,500481,500487,500508,500514,500516,500518,500520,500522,500524,500526,500528,500530,500532,500534,500536,500538,500540,500542,500544,500546,500548,500550,500552,500554,500556,500558,500560,500566,500568,500570,500572,500574,500576,500578,500580,500582,500584,500590,500592,500594,500596,500598,500600,500602,500604,500606,500608,500610,500612,500614,500616,500618,500620,500622,500624,500626,500632,500634,500636,500638,500640,500642,500644,500646,500648,500650,500652,500654,500656,500658,500660,500662,500664,500666,500672,500674,500676,500678,500680,500682,500684,500686,500688,500690,500692,500694,500696,500698,500700,500702,500704,500706,500708,500710,500712,500714,500716,500718,500720,500722,500724,500726,500728,500734,500736,500738,500740,500742,500744,500746,500748,500750,500752,500754,500756,500758,500760,500762,500764,500770,500772,500774,500776,500778,500780,500782,500784,500786,500788,500790,500792,500794,500796,500798,500800,500802,500804,500806,500812,500814,500816,500818,500820,500822,500828,500830,500832,500834,500836,500838,500840,500842,500844,500846,500852,500854,500860,500862,500864,501045,501049,501053,501055,501057,501059,501063,501067,501069,501073,501077,501081,501085,501089],"subwaylabel":[70749,70750,70751,70752,70753,70754,70755,70756,70757,70758,70759,70760,70761,70762,70763,70764,70765,70766,70767,70768,70769,70770,70771,70772,70773,70774,70775,70776,70777,70778,70779,70780,70781,70782,70783,70784,70785,70786,70787,70788,70789,70790,70791,70792,70793,70794,70795,70796,70797,70798,70799,70800,70801,70802,70803,70804,70805,70806,70807,70808,70809,70810,70811,70812,70813,70814,70815,70816,70817,70818,70819,70820,70821,70822,70823,70824,70825,70826,70827,70828,70829,70830,70831,70832,70833,70834,70835,70836,70837,70838,70839,70840,70841,70842,70843,70844,70845,70846,70847,70848,70849,70850,70851,70852,70853,70854,70855,70856,70857,70858,70859,70860,70861,70862,70863,70864,70865,70866,70867,70868,70869,70870,70871,70928,70931,70935,70938,70946,70950,70953,71010,71114,71117,71120,71129,71151,71154,71162,71168,71189,71192,71198,71209,71212,71215,71218,71221,71224,71227,71230,71233,71236,71239,71242,71245,71248,71262,71265,71268,71290,212,518,519,2421,2423,2424,2425,2894,2901,20156,20158,20160,20161,20162,20163,20164,20165,20166,20167,20168,20169,20170,20171,20172,20173,20174,20175,20176,20177,20178,20179,20180,20181,20182,20183,20184,20185,20186,20187,20188,20189,20190,20191,20192,20193,20194,20195,20196,20197,20198,20199,20200,20201,20202,20203,20204,20205,20206,20207,20208,20209,20210,20211,20212,20213,20214,20215,20216,20217,20218,20219,20220,20221,20222,20223,20224,20225,20226,20227,20228,20229,20230,20231,20232,20233,20234,20235,20236,20237,20238,20239,20240,20241,20242,20243,20244,20245,20246,20247,20248,20249,20250,20251,20252,20253,20254,20255,20256,20257,20258,20259,20260,20261,20262,20263,20264,20265,20266,20288,20289,20301,20302,20303,20307,20308,20309,20310,60198,60199,60200,60201,60298,60299,60300,60301,60302,60303,60304,60305,60306,60307,60308,60309,60310,60311,60312,60313,60314,60315,60316,60317,60318,60319,60320,60321,60322,60323,60324,60325,60326,60327,60328,60329,60330,60331,60332,60333,60334,60335,60336,60337,60338,60339,60340,60341,60342,60343,60344,60345,60346,60939,60940,60941,60942,60949,60950,60951,60952,61107,61108,61109,61120,61121,61122,61123,61124,61125,61126,61127,61128,61129,61130,61131,61132,61133,61134,61135,61136,61137,61138,61139,61140,61141,61142,61143,61144,61145,61146,61147,61148,61149,61150,61151,61152,61153,61154,61155,61156,61157,61158,61159,61160,61161,61162,61163,61164,61165,61166,61167,61168,61169,61170,61171,61172,61173,61175,61177,61954,61955,61956,61957,62029,62030,62031,62032,62441,62442,69992,69993,69994,69995,70000,70001,70002,70003,70004,70005,70006,70007,70008,70009,70010,70011,70012,70013,70014,70015,70016,70017,70018,70019,70020,70021,70022,70023,70024,70025,70026,70027,70062,70063,70064,70065,70066,70067,70068,70069,70070,70071,70072,70073,70074,70075,70076,70077,70078,70079,70080,70081,70082,70083,70084,70085,70086,70087,70088,70089,70090,70091,70092,70093,70094,70095,70096,70097,70098,70099,70100,70101,70275,70276,70277,70278,70279,70280,70281,70282,70283,70284,70285,70286,70287,70288,70289,70290,70291,70292,70293,70294,70475,70476,70477,70478,70479,70480,70481,70482,70483,70484,70485,70486,70487,70488,70489,70490,70491,70492,70493,70494,70495,70496,70497,70498,70499,70500,70501,70502,70503,70504,70505,70506,70507,70508,70509,70510,70511,70512,70513,70514,70668,70669,70670,70671,70677,70678,70679,70680,70681,70682,70683,70684,70685,70686,70687,70688,70689,70690,70691,70692,70693,70694,70695,70696,70922,70923,70924,70925,71106,71107,71108,71109,71121,71122,71123,71124,71251,71252,71253,71254,500148,500149,500150,500151,500152,500153,500154,500155,500156,500157,500158,500159,500160,500161,500162,500163,500164,500165,500166,500181,500182,500187,500188,500195,500196,500207,500208,500221,500222,500231,500232,500243,500244,500253,500254,500267,500268,500285,500286,500291,500292,500343,500344,500353,500354,500365,500366,500373,500374,500381,500382,500393,500394,500423,500424,500437,500438,500457,500458,500471,500472,500483,500484,500489,500490,500491,500492,500493,500494,500495,500496,500497,500498,500499,500500,500501,500502,500503,500504,500505,500506,500507,500824,500825,500848,500849,500856,500857,500866,500867,500868,500869,500870,500871,500872,500873,500874,500875,500876,500877,500878,500879,500880,500881,500882,500883,500884,500885,500886,500887,500888,500889,500890,500891,500892,500893,500894,500895,500896,500897,520,2187,2188,2189,2190,2191,2192,2193,2194,2195,2196,2197,2198,2199,2200,2201,2202,2203,2204,2205,2206,2207,2208,2209,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,2221,2222,2223,2224,2225,2226,2227,2228,2229,2230,2231,2232,2233,2234,2235,2236,2237,2238,2239,2240,2241,2242,2243,2244,2245,2246,2247,2248,2249,2250,2251,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2290,2291,2292,2293,2294,2295,2296,2297,2298,2299,2300,2301,2302,2303,2304,2305,2306,2307,2308,2309,2310,2311,2312,2313,2314,2315,2316,2317,2318,2319,2320,2321,2322,2323,2324,2325,2326,2327,2328,2329,2330,2331,2332,2333,2334,2335,2336,2337,2338,2339,2340,2341,2342,2343,2344,2345,2346,2347,2348,2349,2350,2351,2352,2353,2354,2355,2356,2357,2358,2359,2360,2361,2362,2363,2364,2365,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2384,2385,2386,2406,2407,2408,2409,2410,2411,2412,2413,2414,2415,2416,2422,2426,2427,2428,2429,2430,2431,2432,2433,2434,2435,2436,2437,2438,2439,2440,2441,2442,2443,2444,2445,2446,2447,2448,2449,2450,2451,2452,2453,2454,2455,2456,2457,2458,2459,2460,2461,2462,2463,2464,2465,2466,2467,2468,2469,2470,2471,2472,2473,2474,2475,2476,2477,2478,2479,2480,2481,2482,2483,2484,2559,2601,2602,2603,2604,2605,2606,2607,2608,2609,2610,2611,2612,2613,2614,2615,2616,2617,2618,2619,2620,2621,2622,2623,2624,2625,2626,2627,2628,2629,2630,2631,2632,2633,2768,2796,2797,2798,2799,2800,2801,2802,2803,2804,2805,2806,2807,2808,2809,2810,2811,2812,2895,20106,20107,20108,20109,20110,20111,20112,20113,20114,20115,20116,20117,20118,20127,20128,20129,20130,20131,20132,20133,20134,20135,20136,20137,20138,20139,20140,20141,20142,20143,20144,20145,20146,20147,20148,20149,20150,20151,20152,20155,61124,61128,61132,61136,61140,61144,61148,61152,61156,61160,61164,61168,61172,61191,61192,61193,500183,500184,500189,500190,500197,500198,500209,500210,500223,500224,500233,500234,500245,500246,500255,500256,500269,500270,500287,500288,500293,500294,500345,500346,500355,500356,500367,500368,500375,500376,500383,500384,500395,500396,500425,500426,500439,500440,500459,500460,500473,500474,500485,500486,500512,500513,500564,500565,500588,500589,500630,500631,500670,500671,500732,500733,500768,500769,500810,500811,500826,500827,500850,500851,500858,500859],"districtlabel":[2,29,30,31,32,34,35,74,91,2396,2397,2398,2399,2400,2401,2402,2404,2405,60283,60284,60285,60286,61181,61182,61183,61184,62130,62131,62152,62153,62154,62155,62156,62157,62158,62159,62160,62161,62162,62163,62164,62165,62166,62167,62168,62169,62170,62171,62172,62173,62174,62175,62176,62177,62178,62179,62180,62181,62182,62183,62184,62185,62186,62187,62188,62189,62190,62191,62192,62193,62194,62195,62196,62197,62198,62199,62200,62201,62432,71062,71063,71064,71065,71066,71067,71068],"roadlabel":[2559,2560,2561,2562,2563,2564,2565,2566,2567,2568,2569,2570,2571,2572,2573,2574,2575,2576,2577,2578,2579,2580,2581,2582,2583,2584,2585,2586,2587,2588,2589,2590,2591,2592,2593,2594,2595,2186,20910],"highwaylabel":[221,536,537,894,895,897,898,20267,2596,2597,20268,2598,2599,2600,20269,20270,60794,60795,60796,60797,60798,60799,60800,60801,60802,60803,60809,60810,60811,60812,60813,60814,60815,60816,60817,60818,60819,60820,60821,60822,60823,60834,60835,60836,60837,60838,60839,60840,60841,60842,60843,60844,60845,60846,60847,60848,60849,60850,60851,60852,60853,61745,225,61224,61225,61226,70672,70673,70674,61214,61215,224,538,539,60021,60022,62203,61241,61242,61216,61217,61218,61219,61220,61221,61222,61223,61227,61228,61243,61244,61245,61246,61247,61248,61874],"arteriallabel":[60764,60765,60766,60767,60768,60819,60820,60821,60822,60823,60774,60775,60776,60777,60778,60824,60825,60826,60827,60828,225,61224,61225,61214,61215,71098,61216,61217,61218,61219,61220,61221,61222,61223,61227,61228,61239,61240,61243,61244,61245,61246,61247,61248,61874,1150,20126,61236,61237,61238,61250],"locallabel":[60739,60741,60744,60746,60749,60751,60769,60771,60779,60781,60780,60782,60783,60804,60805,60806,60807,60808,60784,60785,60786,60787,60788,60789,60790,60791,60792,60793,225,61224,61225,61214,61215,61216,61217,61218,61219,61220,61221,61222,61223,61227,61228,61239,61240,61243,61244,61245,61246,61247,61248,61874,1150,20126,61236,61237,61238,61250],"airportlabel":[210,510,511,512,513,2794,60020],"educationlabel":[19,185,186,187,188,189,190,191,192,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,2790,2791,2792,2896,20625,20629,20630,20635,20639,20645,20646,20647,20648,20774,20776,60032,60033,60035,60036,61317,1559,1560,1561,1562,1563],"scenicspotslabel":[17,154,155,156,157,158,159,160,161,162,163,164,165,166,422,423,424,425,426,427,428,429,2387,2784,2785,2786,2787,2788,20093,20094,20095,20096,20626,20627,20631,20636,20638,20640,20650,20661,20662,20663,20664,20665,20667,20681,20682,20683,20684,20685,20687,20698,20699,20700,20701,20702,20704,20711,20712,20713,20718,20719,20720,20721,20722,20724,20735,20736,20737,20738,20739,20741,20762,20875,20876,20877,20878,20879,20880,20881,20882,20884,20885,20886,20887,20888,20889,20890,21201,21202,21203,21204,21240,21241,21242,60023,60025,60027,60141,60142,60143,60144,61249,61251,61252,61253,61254,61255,61256,61257,61258,61259,61260,61261,61262,61263,61264,61265,61271,61272,61273,61274,61275,61276,61277,61278,61279,61280,61281,61282,61284,61285,61286,61287,61288,61289,61290,61291,61292,61294,61295,61296,61297,61298,61299,61300,61301,61302,61303,61304,61305,61306,61307,61756,61757,61832,61833,61958,61959,61960,61961,61962,61963,61964,61976,61977,61978,61979,61980,61981,61982,61983,61984,61985,61986,61987,61988,61989,61990,61991,61992,61993,61994,61995,61996,61997,61998,61999,62000,62001,62002,62003,62004,62005,62006,62007,62008,62009,62010,62011,62012,62013,62014,62015,62016,62017,62018,62019,62020,62021,62022,62036,62037,62038,62039,62040,62041,62042,62043,62044,62045,62046,62047,62048,62049,62050,62051,62052,62053,62054,62055,62056,62057,62058,62059,62060,62061,62062,62063,62064,62066,62067,62069,62070,62071,62072,62073,62074,62075,62076,62077,62078,62079,62080,62081,62082,62083,62084,62085,62086,62087,62088,62089,62090,62091,62092,62093,62094,62095,62096,62097,62098,62099,62100,62101,62102,62103,62104,62105,62106,62107,62108,62109,62110,62111,62112,62113,62114,62115,62116,62117,62118,62119,62120,62121,62122,62123,62124,62125,62126,62127,62128,62129,62133,62134,62135,62136,62137,62138,62139,62140,62141,62142,62143,62144,62145,62214,62215,62216,62217,62218,62219,62220,62221,62222,62223,62224,62225,62226,62227,62228,62229,62230,62231,62232,62233,62234,62235,62236,62237,62238,62239,62240,62241,62242,62243,62244,62245,62246,62247,62248,62249,62250,62251,62252,62253,62254,62255,62256,62257,62258,62259,62260,62261,62262,62263,62264,62265,62266,62267,62268,62269,62270,62271,62272,62273,62274,62275,62276,62277,62278,62279,62280,62281,62282,62283,62284,62285,62286,62287,62288,62289,62290,62291,62292,62293,62295,62296,62297,62298,62299,62300,62301,62302,62303,62304,62305,62306,62307,62308,62309,62310,62311,62312,62313,62314,62315,62316,62317,62318,62319,62320,62321,62322,62323,62324,62325,62326,62327,62328,62329,62330,62332,62333,62334,62335,62336,62337,62338,62339,62340,62341,62342,62343,62344,62345,62346,62347,62348,62349,62351,62352,62353,62354,62355,62356,62357,62358,62359,62360,62361,62362,62363,62364,62365,62366,62367,62368,62369,62370,62371,62372,62373,62374,62375,62376,62377,62378,62379,62380,62381,62382,62383,62384,62385,62386,62387,62388,62389,62390,62391,62392,62393,62394,62395,62396,62397,62398,62399,62400,62401,62402,62403,62404,62405,62406,62407,62408,62409,62410,62411,62412,62413,62414,62415,62416,62417,62418,62419,62420,62421,62422,62423,62424,62426,62429,62430,62444,62445,70889,70891,70894,70895,70896,70897,70898,70900,70901,70902,70903,70904,70905,70906,70907,70908,70909,70910,70960,70962,70964,70966,70968,70969,70970,70971,70972,70973,70976,70977,70979,70980,70982,70983,70984,70985,70986,70987,70988,70989,70990,500004,1570,1571,1572,1573,1574,1575,1576,1577,1578,1579,1580],"medicallabel":[20,193,194,195,196,197,198,199,200,201,202,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,969,970,971,972,973,2793,2897,2898,2899,2900,20618,20620,20644,61320,61321,61322,61323,61324,61325,61326,61327,61328,61329,61330,61331,61332,61333,61334,61335,61336,61337,61338,61339,61340,70914,70915,1603],"education":[1559,1560,1561,1562,1563,1572,19,185,186,187,188,189,190,191,192,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,2790,2791,2792,2896,20625,20629,20630,20635,20639,20645,20646,20647,20648,20774,20776,60032,60033,60035,60036,61317,1603],"medical":[1603,20,193,194,195,196,197,198,199,200,201,202,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,969,970,971,972,973,2793,2897,2898,2899,2900,20618,20620,20644,61320,61321,61322,61323,61324,61325,61326,61327,61328,61329,61330,61331,61332,61333,61334,61335,61336,61337,61338,61339,61340,70914,70915,71001,71006],"education":[1559,1560,1561,1562,1563,1572,19,185,186,187,188,189,190,191,192,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,2790,2791,2792,2896,20625,20629,20630,20635,20639,20645,20646,20647,20648,20774,20776,60032,60033,60035,60036,61317,61737,61738,61839,61840,61841,61842,61843,61903,61904,61905,61906,61907,61908,61909,61910,61967,61968,70995],"scenicspots":[1570,1571,1572,1573,1574,1575,2929,2930,2931,1576,1577,1578,1579,1580,20892,20765,20891,20893,20894,20753,20755,20757,20759,20653,20761,17,154,155,156,157,158,159,160,161,162,163,164,165,166,422,423,424,425,426,427,428,429,2387,2784,2785,2786,2787,2788,20093,20094,20095,20096,20626,20627,20631,20636,20638,20640,20650,20661,20662,20663,20664,20665,20667,20681,20682,20683,20684,20685,20687,20698,20699,20700,20701,20702,20704,20711,20712,20713,20718,20719,20720,20721,20722,20724,20735,20736,20737,20738,20739,20741,20762,20875,20876,20877,20878,20879,20880,20881,20882,20884,20885,20886,20887,20888,20889,20890,21201,21202,21203,21204,21240,21241,21242,60023,60025,60027,60141,60142,60143,60144,61249,61251,61252,61253,61254,61255,61256,61257,61258,61259,61260,61261,61262,61263,61264,61265,61271,61272,61273,61274,61275,61276,61277,61278,61279,61280,61281,61282,61284,61285,61286,61287,61288,61289,61290,61291,61292,61294,61295,61296,61297,61298,61299,61300,61301,61302,61303,61304,61305,61306,61307,61756,61757,61832,61833,61958,61959,61960,61961,61962,61963,61964,61976,61977,61978,61979,61980,61981,61982,61983,61984,61985,61986,61987,61988,61989,61990,61991,61992,61993,61994,61995,61996,61997,61998,61999,62000,62001,62002,62003,62004,62005,62006,62007,62008,62009,62010,62011,62012,62013,62014,62015,62016,62017,62018,62019,62020,62021,62022,62036,62037,62038,62039,62040,62041,62042,62043,62044,62045,62046,62047,62048,62049,62050,62051,62052,62053,62054,62055,62056,62057,62058,62059,62060,62061,62062,62063,62064,62066,62067,62069,62070,62071,62072,62073,62074,62075,62076,62077,62078,62079,62080,62081,62082,62083,62084,62085,62086,62087,62088,62089,62090,62091,62092,62093,62094,62095,62096,62097,62098,62099,62100,62101,62102,62103,62104,62105,62106,62107,62108,62109,62110,62111,62112,62113,62114,62115,62116,62117,62118,62119,62120,62121,62122,62123,62124,62125,62126,62127,62128,62129,62133,62134,62135,62136,62137,62138,62139,62140,62141,62142,62143,62144,62145,62214,62215,62216,62217,62218,62219,62220,62221,62222,62223,62224,62225,62226,62227,62228,62229,62230,62231,62232,62233,62234,62235,62236,62237,62238,62239,62240,62241,62242,62243,62244,62245,62246,62247,62248,62249,62250,62251,62252,62253,62254,62255,62256,62257,62258,62259,62260,62261,62262,62263,62264,62265,62266,62267,62268,62269,62270,62271,62272,62273,62274,62275,62276,62277,62278,62279,62280,62281,62282,62283,62284,62285,62286,62287,62288,62289,62290,62291,62292,62293,62295,62296,62297,62298,62299,62300,62301,62302,62303,62304,62305,62306,62307,62308,62309,62310,62311,62312,62313,62314,62315,62316,62317,62318,62319,62320,62321,62322,62323,62324,62325,62326,62327,62328,62329,62330,62332,62333,62334,62335,62336,62337,62338,62339,62340,62341,62342,62343,62344,62345,62346,62347,62348,62349,62351,62352,62353,62354,62355,62356,62357,62358,62359,62360,62361,62362,62363,62364,62365,62366,62367,62368,62369,62370,62371,62372,62373,62374,62375,62376,62377,62378,62379,62380,62381,62382,62383,62384,62385,62386,62387,62388,62389,62390,62391,62392,62393,62394,62395,62396,62397,62398,62399,62400,62401,62402,62403,62404,62405,62406,62407,62408,62409,62410,62411,62412,62413,62414,62415,62416,62417,62418,62419,62420,62421,62422,62423,62424,62426,62429,62430,62444,62445,70889,70891,70894,70895,70896,70897,70898,70900,70901,70902,70903,70904,70905,70906,70907,70908,70909,70910,70960,70962,70964,70966,70968,70969,70970,70971,70972,70973,70976,70977,70979,70980,70982,70983,70984,70985,70986,70987,70988,70989,70990,500004,61755,61792,61793,61794,61795,61796,61797,61823,61824,61825,61826,61827,61828,61829,61830,61831,61832,61833,61895,61896,61897,61898,61899,61900,61901,61902,61903,61904,61905,61906,61907,61908,61909,61910,61911,61912,61913,61914,61915,61916,61917,61918,61919,61920,61921,61922,61923,61924,61925,61926,61927,61928,61929,61930,61931,61932,61933,61934,61935,61936,61937,61938,61939,61940,61941,61958,61959,61960,61961,61962,61963,61964,61971,61972,61973,61974,61976,61977,61978,61979,61980,61981,61982,61983,61984,61985,61986,61987,61988,61989,61990,61991,61992,61993,61994,61995,61996,61997,61998,61999,62000,62001,62002,62003,62004,62005,62006,62007,62008,62009,62010,62011,62012,62013,62014,62015,62016,62017,62018,62019,62020,62021,62022,62036,62037,62038,62039,62040,62041,62042,62043,62044,62045,62046,62047,62048,62049,62050,62051,62052,62053,62054,62055,62056,62057,62058,62059,62060,62061,62062,62063,62064,62065,62066,62067,62068,62069,62070,62071,62072,62073,62074,62075,62076,62077,62078,62079,62080,62081,62082,62083,62084,62085,62086,62087,62088,62089,62090,62091,62092,62093,62094,62095,62096,62097,62098,62099,62100,62101,62102,62103,62104,62105,62106,62107,62108,62109,62110,62111,62112,62113,62114,62115,62116,62117,62118,62119,62120,62121,62122,62123,62124,62125,62126,62127,62128,62129,62133,62134,62135,62136,62137,62138,62139,62140,62141,62142,62143,62144,62145,62214,62215,62216,62217,62218,62219,62220,62221,62222,62223,62224,62225,62226,62227,62228,62229,62230,62231,62232,62233,62234,62235,62236,62237,62238,62239,62240,62241,62242,62243,62244,62245,62246,62247,62248,62249,62250,62251,62252,62253,62254,62255,62256,62257,62258,62259,62260,62261,62262,62263,62264,62265,62266,62267,62268,62269,62270,62271,62272,62273,62274,62275,62276,62277,62278,62279,62280,62281,62282,62283,62284,62285,62286,62287,62288,62289,62290,62291,62292,62293,62294,62295,62296,62297,62298,62299,62300,62301,62302,62303,62304,62305,62306,62307,62308,62309,62310,62311,62312,62313,62314,62315,62316,62317,62318,62319,62320,62321,62322,62323,62324,62325,62326,62327,62328,62329,62330,62331,62332,62333,62334,62335,62336,62337,62338,62339,62340,62341,62342,62343,62344,62345,62346,62347,62348,62349,62350,62351,62352,62353,62354,62355,62356,62357,62358,62359,62360,62361,62362,62363,62364,62365,62366,62367,62368,62369,62370,62371,62372,62373,62374,62375,62376,62377,62378,62379,62380,62381,62382,62383,62384,62385,62386,62387,62388,62389,62390,62391,62392,62393,62394,62395,62396,62397,62398,62399,62400,62401,62402,62403,62404,62405,62406,62407,62408,62409,62410,62411,62412,62413,62414,62415,62416,62417,62418,62419,62420,62421,62422,62423,62424,62426,62427,62428,62429,62430,62444,62445,70888,70889,70890,70891,70892,70893,70894,70895,70896,70897,70898,70899,70900,70901,70902,70903,70904,70905,70906,70907,70908,70909,70910,70911,70912,70913,70914,70915,70954,70960,70961,70962,70963,70964,70965,70966,70967,70968,70969,70970,70971,70972,70973,70974,70975,70976,70977,70978,70979,70980,70981,70982,70983,70984,70985,70986,70987,70988,70989,70990,71039,71040,71041,71042,71044,71046,71047,71049,71050,71052,71054,71056,71172,2932,70998,71003],"entertainment":[1581,1582,1583,1584,1585,1586,1587,1588,1589,61196,1590,1591,1592,1593,1594,1595,1596,2933,2934,20903,20592,20904,20593,20905,20594,20906,20595,20907,20596,20908,20597,20909,20598,1602,60204,60206,61822,61497],"subwaystation":[1558,60052,60053,60054,60055,60056,60057,60058,60059,60060,60061,60062,60063,60064,60065,60066,60067,60068,60069,60070,60071,60072,60073,60074,60075,60076,60077,60078,60079,60080,60081,60082,60083,60084,60085,60086,60087,60088,60089,60090,60091,60092,60093,60094,60095,60096,60097,60098,60099,60100,60101,60102,60103,60104,60105,60106,60107,60108,60109,60110,60111,60112,60113,60114,60115,60116,60117,60118,60119,60120,60121,60122,60123,60124,60125,60126,60127,60128,60129,60130,60131,60132,60133,60134,60135,60136,60137,60138,60139,60140,60145,60146,60147,60148,60149,60150,60151,60152,60153,60154,60155,60161,60172,60173,60174,60175,60176,60177,60178,60179,60180,60181,60182,60183,60184,60185,60186,60216,60237,60295,60297,60420,60863,60938,60948,60954,60956,60958,60960,60962,60964,60966,60968,60970,60972,60974,60976,60978,60980,60982,60984,60986,60988,60990,60992,60994,60996,60998,61000,61002,61004,61006,61008,61010,61012,61014,61016,61018,61020,61022,61024,61026,61028,61030,61032,61034,61036,61038,61040,61042,61044,61046,61048,61050,61052,61054,61056,61058,61060,61062,61064,61066,61068,61070,61072,61074,61076,61078,61080,61082,61084,61086,61088,61090,61092,61094,61096,61098,61100,61102,61104,61106,61174,61176,61178,61953,62023,62025,62027,62205,62439,62443,69986,69996,69999,70029,70031,70033,70035,70037,70039,70041,70043,70045,70047,70049,70051,70053,70055,70057,70059,70061,70103,70105,70107,70109,70111,70113,70115,70117,70119,70121,70123,70125,70127,70129,70131,70133,70135,70137,70139,70141,70143,70145,70147,70149,70151,70153,70155,70157,70159,70161,70163,70165,70167,70169,70171,70173,70175,70177,70179,70181,70183,70185,70187,70189,70191,70193,70195,70197,70199,70201,70203,70205,70207,70209,70211,70213,70215,70218,70220,70222,70224,70226,70228,70230,70232,70234,70236,70238,70240,70242,70244,70246,70248,70250,70252,70254,70256,70258,70260,70262,70264,70266,70268,70270,70272,70274,70306,70308,70310,70312,70314,70316,70318,70320,70322,70324,70326,70328,70330,70332,70334,70336,70338,70340,70342,70344,70346,70348,70350,70352,70354,70356,70358,70360,70362,70364,70366,70368,70370,70372,70374,70376,70378,70380,70382,70384,70386,70388,70390,70392,70394,70396,70398,70400,70402,70404,70406,70408,70410,70412,70414,70416,70418,70420,70422,70424,70426,70428,70430,70432,70434,70436,70438,70440,70442,70444,70446,70448,70450,70452,70454,70456,70458,70460,70462,70464,70466,70468,70470,70472,70474,70533,70604,70606,70698,70700,70702,70704,70706,70708,70710,70712,70714,70716,70718,70720,70722,70724,70726,70728,70730,70732,70734,70736,70738,70740,70742,70744,70927,70930,70934,70937,70945,70949,70952,71009,71113,71116,71119,71128,71150,71153,71167,71188,71191,71197,71208,71211,71214,71217,71220,71223,71226,71229,71232,71235,71238,71241,71244,71247,71261,71264,71267,71289,500001,500013,500015,500017,500019,500021,500022,500023,500024,500025,500026,500027,500028,500029,500030,500031,500032,500168,500170,500172,500174,500176,500178,500180,500186,500192,500194,500200,500202,500204,500206,500212,500214,500216,500218,500220,500226,500228,500230,500236,500238,500240,500242,500248,500250,500252,500258,500260,500262,500264,500266,500272,500274,500276,500278,500280,500282,500284,500290,500296,500298,500300,500302,500304,500306,500308,500310,500312,500314,500316,500318,500320,500322,500324,500326,500328,500330,500332,500334,500336,500338,500340,500342,500348,500350,500352,500358,500360,500362,500364,500370,500372,500378,500380,500386,500388,500390,500392,500398,500400,500402,500404,500406,500408,500410,500412,500414,500416,500418,500420,500422,500428,500430,500432,500434,500436,500442,500444,500446,500448,500450,500452,500454,500456,500462,500464,500466,500468,500470,500476,500478,500480,500482,500488,500509,500515,500517,500519,500521,500523,500525,500527,500529,500531,500533,500535,500537,500539,500541,500543,500545,500547,500549,500551,500553,500555,500557,500559,500561,500567,500569,500571,500573,500575,500577,500579,500581,500583,500585,500591,500593,500595,500597,500599,500601,500603,500605,500607,500609,500611,500613,500615,500617,500619,500621,50062,500625,500627,500633,500635,500637,500639,500641,500643,500645,500647,500649,500651,500653,500655,500657,500659,500661,500663,500665,500667,500673,500675,500677,500679,500681,500683,500685,500687,500689,500691,500693,500695,500697,500699,500701,500703,500705,500707,500709,500711,500713,500715,500717,500719,500721,500723,500725,500727,500729,500735,500737,500739,500741,500743,500745,500747,500749,500751,500753,500755,500757,500759,500761,500763,500765,500771,500773,500775,500777,500779,500781,500783,500785,500787,500789,500791,500793,500795,500797,500799,500801,500803,500805,500807,500813,500815,500817,500819,500821,500823,500829,500831,500833,500835,500837,500839,500841,500843,500845,500847,500853,500855,500861,500863,500865,501046,501050,501054,501056,501058,501060,501064,501068,501070,501074,501078,501082,501086,501090],"continent":[91],"country":[2404,2405,60285,60286],"province":[29,30,74,2396,2397,2399,2398,2400,2401],"city":[30,31,2396,2397,2398,2399,2400,2401,60283,60284,71063,71064,71065,71067,71068],"district":[32,76,71066],"town":[34],"highwayentrance":[224,538,539,60021,60022,62203],"arterialentrance":[224,538,539],"entertainmentlabel":[18,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,2789,20605,20610,20615,20637,20642,20643,20649,20651,20775,21243,21244,60012,60013,60014,60015,60024,60026,60037,61478,61479,61480,61481,61482,61483,61484,61485,61486,61487,61488,61489,61490,61491,61492,61493,61494,61495,61497,61498,61499,61758,61759,61760,61761,61762,61763,61764,61765,61766,61767,61768,61769,61770,61771,61772,61773,61774,61775,61776,61777,61778,61779,61780,61781,61782,61783,61786,61787,61788,61789,61790,61791,62065,62068,62428,70888,70899,70912,70913,70961,70965,70967,70974,70975,70978,1590,1591,1592,1593,1594,1595,1596,70600,70601,70602,70612],"grid":[],"poilabel":[1,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,384,385,386,387,388,389,390,391,392,393,394,395,396,397,398,399,400,401,402,403,404,405,406,407,408,409,410,411,412,413,414,415,416,417,418,419,420,421,422,423,424,425,426,427,428,429,430,431,432,433,434,435,436,437,438,439,440,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510,511,512,513,514,515,516,517,518,519,520,521,522,523,524,525,526,527,528,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,565,566,567,568,569,570,571,572,573,574,575,576,577,578,579,580,581,582,583,584,585,586,587,588,589,590,591,592,593,594,595,596,597,598,599,600,601,602,603,604,605,606,607,608,609,610,611,612,613,614,615,616,617,618,619,620,621,622,623,624,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,651,652,653,654,655,656,657,658,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,676,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,894,895,896,897,898,899,900,901,902,920,921,922,923,924,925,926,927,928,929,930,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,2187,2188,2189,2190,2191,2192,2193,2194,2195,2196,2197,2198,2199,2200,2201,2202,2203,2204,2205,2206,2207,2208,2209,2210,2211,2212,2213,2214,2215,2216,2217,2218,2219,2220,2221,2222,2223,2224,2225,2226,2227,2228,2229,2230,2231,2232,2233,2234,2235,2236,2237,2238,2239,2240,2241,2242,2243,2244,2245,2246,2247,2248,2249,2250,2251,2252,2253,2254,2255,2256,2257,2258,2259,2260,2261,2262,2263,2264,2265,2266,2267,2268,2269,2270,2271,2272,2273,2274,2275,2276,2277,2278,2279,2280,2281,2282,2283,2284,2285,2286,2287,2288,2289,2290,2291,2292,2293,2294,2295,2296,2297,2298,2299,2300,2301,2302,2303,2304,2305,2306,2307,2308,2309,2310,2311,2312,2313,2314,2315,2316,2317,2318,2319,2320,2321,2322,2323,2324,2325,2326,2327,2328,2329,2330,2331,2332,2333,2334,2335,2336,2337,2338,2339,2340,2341,2342,2343,2344,2345,2346,2347,2348,2349,2350,2351,2352,2353,2354,2355,2356,2357,2358,2359,2360,2361,2362,2363,2364,2365,2366,2367,2368,2369,2370,2371,2372,2373,2374,2375,2376,2377,2378,2379,2380,2381,2382,2383,2384,2385,2386,2387,2406,2407,2408,2409,2410,2411,2412,2413,2414,2415,2416,2417,2418,2419,2421,2422,2423,2424,2425,2426,2427,2428,2429,2430,2431,2432,2433,2434,2435,2436,2437,2438,2439,2440,2441,2442,2443,2444,2445,2446,2447,2448,2449,2450,2451,2452,2453,2454,2455,2456,2457,2458,2459,2460,2461,2462,2463,2464,2465,2466,2467,2468,2469,2470,2471,2472,2473,2474,2475,2476,2477,2478,2479,2480,2481,2482,2483,2484,2559,2601,2602,2603,2604,2605,2606,2607,2608,2609,2610,2611,2612,2613,2614,2615,2616,2617,2618,2619,2620,2621,2622,2623,2624,2625,2626,2627,2628,2629,2630,2631,2632,2633,2664,2665,2666,2667,2668,2669,2670,2671,2672,2673,2674,2675,2676,2677,2678,2679,2680,2681,2682,2683,2684,2685,2686,2687,2688,2689,2690,2691,2692,2693,2694,2695,2696,2697,2698,2699,2700,2701,2702,2703,2704,2705,2706,2707,2708,2709,2710,2711,2712,2713,2714,2715,2716,2717,2718,2719,2720,2721,2722,2723,2724,2725,2726,2727,2728,2729,2730,2731,2732,2733,2734,2735,2736,2737,2738,2739,2740,2741,2742,2743,2744,2745,2746,2747,2748,2749,2750,2751,2752,2753,2754,2755,2756,2757,2758,2759,2760,2761,2762,2764,2768,2769,2770,2771,2772,2773,2783,2784,2785,2786,2787,2788,2789,2790,2791,2792,2793,2794,2795,2796,2797,2798,2799,2800,2801,2802,2803,2804,2805,2806,2807,2808,2809,2810,2811,2812,2813,2814,2815,2816,2817,2818,2819,2820,2821,2822,2823,2894,2895,2896,2897,2898,2899,2900,2901,2902,2903,2904,2905,2906,2907,2908,2909,2910,2911,2912,2913,2914,2915,2916,2917,2918,2919,2920,2921,2922,2923,2924,2925,2926,2927,2928,2944,2945,2946,2947,2948,2949,2950,2951,20093,20094,20095,20096,20106,20107,20108,20109,20110,20111,20112,20113,20114,20115,20116,20117,20118,20127,20128,20129,20130,20131,20132,20133,20134,20135,20136,20137,20138,20139,20140,20141,20142,20143,20144,20145,20146,20147,20148,20149,20150,20151,20152,20155,20156,20158,20160,20161,20162,20163,20164,20165,20166,20167,20168,20169,20170,20171,20172,20173,20174,20175,20176,20177,20178,20179,20180,20181,20182,20183,20184,20185,20186,20187,20188,20189,20190,20191,20192,20193,20194,20195,20196,20197,20198,20199,20200,20201,20202,20203,20204,20205,20206,20207,20208,20209,20210,20211,20212,20213,20214,20215,20216,20217,20218,20219,20220,20221,20222,20223,20224,20225,20226,20227,20228,20229,20230,20231,20232,20233,20234,20235,20236,20237,20238,20239,20240,20241,20242,20243,20244,20245,20246,20247,20248,20249,20250,20251,20252,20253,20254,20255,20256,20257,20258,20259,20260,20261,20262,20263,20264,20265,20266,20288,20289,20291,20292,20301,20302,20303,20307,20308,20309,20310,20314,20315,20316,20317,20318,20319,20320,20321,20322,20323,20324,20325,20326,20327,20328,20329,20330,20331,20332,20333,20334,20335,20336,20337,20538,20539,20541,20599,20600,20601,20602,20603,20604,20605,20606,20607,20608,20609,20610,20611,20612,20613,20614,20615,20616,20617,20618,20619,20620,20621,20622,20623,20624,20625,20626,20627,20628,20629,20630,20631,20632,20633,20634,20635,20636,20637,20638,20639,20640,20641,20642,20643,20644,20645,20646,20647,20648,20649,20650,20651,20652,20661,20662,20663,20664,20665,20666,20667,20668,20669,20670,20671,20672,20673,20674,20675,20676,20677,20678,20679,20680,20681,20682,20683,20684,20685,20686,20687,20688,20689,20690,20691,20692,20693,20694,20695,20696,20697,20698,20699,20700,20701,20702,20703,20704,20705,20706,20707,20708,20709,20710,20711,20712,20713,20714,20715,20716,20717,20718,20719,20720,20721,20722,20723,20724,20725,20726,20727,20728,20729,20730,20731,20732,20733,20734,20735,20736,20737,20738,20739,20740,20741,20742,20743,20744,20745,20746,20747,20748,20749,20750,20751,20762,20766,20767,20768,20769,20770,20771,20772,20773,20774,20775,20776,20786,20787,20788,20789,20790,20791,20792,20847,20848,20849,20850,20851,20852,20853,20854,20855,20856,20857,20858,20859,20860,20861,20862,20863,20864,20865,20866,20867,20868,20869,20870,20871,20872,20873,20874,20875,20876,20877,20878,20879,20880,20881,20882,20883,20884,20885,20886,20887,20888,20889,20890,21201,21202,21203,21204,21211,21212,21213,21214,21215,21216,21217,21218,21219,21220,21221,21222,21223,21224,21225,21226,21227,21228,21229,21230,21231,21232,21233,21234,21235,21236,21237,21238,21239,21240,21241,21242,21243,21244,21245,21246,21247,59999,60008,60009,60010,60011,60012,60013,60014,60015,60016,60017,60018,60019,60020,60021,60022,60023,60024,60025,60026,60027,60028,60029,60030,60031,60032,60033,60034,60035,60036,60037,60141,60142,60143,60144,60198,60199,60200,60201,60202,60250,60251,60252,60298,60299,60300,60301,60302,60303,60304,60305,60306,60307,60308,60309,60310,60311,60312,60313,60314,60315,60316,60317,60318,60319,60320,60321,60322,60323,60324,60325,60326,60327,60328,60329,60330,60331,60332,60333,60334,60335,60336,60337,60338,60339,60340,60341,60342,60343,60344,60345,60346,60379,60380,60381,60382,60383,60384,60385,60386,60387,60388,60389,60390,60391,60392,60393,60394,60395,60396,60400,60401,60402,60403,60404,60405,60406,60407,60408,60409,60410,60411,60412,60413,60414,60415,60416,60867,60934,60939,60940,60941,60942,60949,60950,60951,60952,61107,61108,61109,61120,61121,61122,61123,61124,61125,61126,61127,61128,61129,61130,61131,61132,61133,61134,61135,61136,61137,61138,61139,61140,61141,61142,61143,61144,61145,61146,61147,61148,61149,61150,61151,61152,61153,61154,61155,61156,61157,61158,61159,61160,61161,61162,61163,61164,61165,61166,61167,61168,61169,61170,61171,61172,61191,61192,61193,61249,61251,61252,61253,61254,61255,61256,61257,61258,61259,61260,61261,61262,61263,61264,61265,61271,61272,61273,61274,61275,61276,61277,61278,61279,61280,61281,61282,61284,61285,61286,61287,61288,61289,61290,61291,61292,61294,61295,61296,61297,61298,61299,61300,61301,61302,61303,61304,61305,61306,61307,61308,61309,61310,61311,61312,61313,61314,61315,61316,61317,61320,61321,61322,61323,61324,61325,61326,61327,61328,61329,61330,61331,61332,61333,61334,61335,61336,61337,61338,61339,61340,61341,61342,61343,61344,61345,61346,61347,61348,61349,61350,61351,61352,61353,61354,61355,61356,61357,61358,61359,61360,61361,61362,61363,61364,61365,61366,61367,61368,61369,61370,61371,61372,61373,61374,61375,61376,61377,61378,61379,61380,61381,61382,61383,61384,61385,61386,61387,61388,61389,61390,61391,61392,61393,61394,61395,61396,61397,61398,61399,61400,61401,61402,61403,61404,61405,61406,61407,61408,61409,61410,61411,61412,61413,61414,61415,61416,61417,61418,61419,61420,61421,61422,61423,61424,61425,61426,61427,61428,61429,61430,61431,61432,61433,61434,61435,61436,61437,61438,61439,61440,61441,61442,61443,61444,61445,61446,61447,61448,61449,61450,61451,61452,61453,61454,61455,61456,61457,61458,61459,61460,61461,61462,61463,61464,61465,61466,61467,61468,61469,61470,61471,61472,61473,61474,61475,61476,61477,61478,61479,61480,61481,61482,61483,61484,61485,61486,61487,61488,61489,61490,61491,61492,61493,61494,61495,61496,61497,61498,61499,61500,61501,61502,61503,61504,61505,61506,61507,61508,61509,61510,61511,61512,61513,61514,61515,61516,61517,61518,61519,61520,61521,61522,61523,61524,61525,61526,61527,61528,61529,61530,61531,61532,61533,61534,61535,61536,61537,61538,61539,61540,61541,61542,61543,61544,61545,61546,61547,61548,61549,61550,61551,61552,61553,61554,61555,61556,61557,61558,61559,61560,61561,61562,61563,61564,61565,61566,61567,61568,61569,61570,61571,61572,61573,61574,61575,61576,61577,61578,61579,61580,61581,61582,61583,61584,61585,61586,61587,61588,61589,61590,61591,61592,61593,61594,61595,61596,61597,61598,61599,61600,61601,61602,61603,61604,61605,61606,61607,61608,61609,61610,61611,61612,61613,61614,61615,61616,61617,61618,61619,61620,61621,61622,61623,61624,61625,61626,61627,61628,61629,61630,61631,61632,61633,61634,61635,61636,61637,61638,61639,61640,61641,61642,61643,61644,61645,61646,61647,61648,61649,61650,61651,61652,61653,61654,61655,61656,61657,61658,61659,61660,61661,61662,61663,61664,61665,61666,61667,61668,61669,61670,61671,61672,61673,61674,61675,61676,61677,61678,61679,61680,61681,61682,61683,61684,61685,61686,61687,61688,61689,61690,61691,61692,61693,61694,61695,61696,61697,61698,61699,61700,61701,61702,61703,61704,61705,61706,61707,61708,61709,61710,61711,61712,61713,61714,61715,61716,61717,61718,61719,61720,61721,61722,61724,61735,61736,61737,61738,61739,61740,61755,61756,61757,61758,61759,61760,61761,61762,61763,61764,61765,61766,61767,61768,61769,61770,61771,61772,61773,61774,61775,61776,61777,61778,61779,61780,61781,61782,61783,61784,61785,61786,61787,61788,61789,61790,61791,61792,61793,61794,61795,61796,61797,61798,61799,61800,61801,61802,61803,61804,61805,61806,61807,61808,61809,61810,61811,61812,61813,61814,61815,61816,61817,61818,61819,61820,61821,61823,61824,61825,61826,61827,61828,61829,61830,61831,61832,61833,61838,61839,61840,61841,61842,61843,61844,61845,61846,61847,61848,61849,61850,61851,61875,61876,61877,61878,61879,61880,61881,61882,61883,61884,61885,61886,61887,61888,61889,61890,61891,61892,61893,61894,61895,61896,61897,61898,61899,61900,61901,61902,61903,61904,61905,61906,61907,61908,61909,61910,61911,61912,61913,61914,61915,61916,61917,61918,61919,61920,61921,61922,61923,61924,61925,61926,61927,61928,61929,61930,61931,61932,61933,61934,61935,61936,61937,61938,61939,61940,61941,61942,61943,61944,61945,61946,61947,61948,61949,61950,61951,61954,61955,61956,61957,61958,61959,61960,61961,61962,61963,61964,61965,61966,61967,61968,61969,61970,61971,61972,61973,61974,61976,61977,61978,61979,61980,61981,61982,61983,61984,61985,61986,61987,61988,61989,61990,61991,61992,61993,61994,61995,61996,61997,61998,61999,62000,62001,62002,62003,62004,62005,62006,62007,62008,62009,62010,62011,62012,62013,62014,62015,62016,62017,62018,62019,62020,62021,62022,62029,62030,62031,62032,62036,62037,62038,62039,62040,62041,62042,62043,62044,62045,62046,62047,62048,62049,62050,62051,62052,62053,62054,62055,62056,62057,62058,62059,62060,62061,62062,62063,62064,62065,62066,62067,62068,62069,62070,62071,62072,62073,62074,62075,62076,62077,62078,62079,62080,62081,62082,62083,62084,62085,62086,62087,62088,62089,62090,62091,62092,62093,62094,62095,62096,62097,62098,62099,62100,62101,62102,62103,62104,62105,62106,62107,62108,62109,62110,62111,62112,62113,62114,62115,62116,62117,62118,62119,62120,62121,62122,62123,62124,62125,62126,62127,62128,62129,62132,62133,62134,62135,62136,62137,62138,62139,62140,62141,62142,62143,62144,62145,62203,62214,62215,62216,62217,62218,62219,62220,62221,62222,62223,62224,62225,62226,62227,62228,62229,62230,62231,62232,62233,62234,62235,62236,62237,62238,62239,62240,62241,62242,62243,62244,62245,62246,62247,62248,62249,62250,62251,62252,62253,62254,62255,62256,62257,62258,62259,62260,62261,62262,62263,62264,62265,62266,62267,62268,62269,62270,62271,62272,62273,62274,62275,62276,62277,62278,62279,62280,62281,62282,62283,62284,62285,62286,62287,62288,62289,62290,62291,62292,62293,62294,62295,62296,62297,62298,62299,62300,62301,62302,62303,62304,62305,62306,62307,62308,62309,62310,62311,62312,62313,62314,62315,62316,62317,62318,62319,62320,62321,62322,62323,62324,62325,62326,62327,62328,62329,62330,62331,62332,62333,62334,62335,62336,62337,62338,62339,62340,62341,62342,62343,62344,62345,62346,62347,62348,62349,62350,62351,62352,62353,62354,62355,62356,62357,62358,62359,62360,62361,62362,62363,62364,62365,62366,62367,62368,62369,62370,62371,62372,62373,62374,62375,62376,62377,62378,62379,62380,62381,62382,62383,62384,62385,62386,62387,62388,62389,62390,62391,62392,62393,62394,62395,62396,62397,62398,62399,62400,62401,62402,62403,62404,62405,62406,62407,62408,62409,62410,62411,62412,62413,62414,62415,62416,62417,62418,62419,62420,62421,62422,62423,62424,62426,62427,62428,62429,62430,62441,62442,62444,62445,69987,69988,69990,69991,69992,69993,69994,69995,70000,70001,70002,70003,70004,70005,70006,70007,70008,70009,70010,70011,70012,70013,70014,70015,70016,70017,70018,70019,70020,70021,70022,70023,70024,70025,70026,70027,70062,70063,70064,70065,70066,70067,70068,70069,70070,70071,70072,70073,70074,70075,70076,70077,70078,70079,70080,70081,70082,70083,70084,70085,70086,70087,70088,70089,70090,70091,70092,70093,70094,70095,70096,70097,70098,70099,70100,70101,70275,70276,70277,70278,70279,70280,70281,70282,70283,70284,70285,70286,70287,70288,70289,70290,70291,70292,70293,70294,70475,70476,70477,70478,70479,70480,70481,70482,70483,70484,70485,70486,70487,70488,70489,70490,70491,70492,70493,70494,70495,70496,70497,70498,70499,70500,70501,70502,70503,70504,70505,70506,70507,70508,70509,70510,70511,70512,70513,70514,70515,70531,70607,70608,70609,70610,70611,70668,70669,70670,70671,70674,70677,70678,70679,70680,70681,70682,70683,70684,70685,70686,70687,70688,70689,70690,70691,70692,70693,70694,70695,70696,70888,70889,70890,70891,70893,70894,70895,70896,70897,70898,70899,70900,70901,70902,70903,70904,70905,70906,70907,70908,70909,70910,70911,70912,70913,70914,70915,70918,70919,70922,70923,70924,70925,70954,70960,70961,70962,70963,70964,70965,70966,70967,70968,70969,70970,70971,70972,70973,70974,70975,70976,70977,70978,70979,70980,70981,70982,70983,70984,70985,70986,70987,70988,70989,70990,71039,71040,71041,71042,71044,71046,71047,71049,71050,71052,71054,71056,71106,71107,71108,71109,71121,71122,71123,71124,71172,500002,500003,500004,500005,500006,500007,500008,500009,500010,500011,500034,500035,500036,500037,500038,500039,500040,500041,500042,500043,500044,500045,500046,500047,500048,500049,500050,500051,500052,500053,500054,500055,500056,500057,500058,500059,500060,500061,500062,500063,500064,500065,500066,500067,500068,500069,500070,500071,500072,500073,500074,500075,500076,500077,500078,500079,500080,500081,500082,500083,500084,500085,500086,500087,500088,500089,500090,500091,500092,500093,500094,500096,500097,500098,500099,500100,500101,500103,500104,500105,500106,500107,500108,500109,500110,500111,500112,500113,500114,500115,500116,500117,500118,500119,500120,500121,500122,500123,500124,500125,500126,500127,500128,500129,500130,500131,500132,500133,500134,500135,500136,500137,500138,500139,500140,500141,500142,500143,500144,500145,500146,500147,500148,500149,500150,500151,500152,500153,500154,500155,500156,500157,500158,500159,500160,500161,500162,500163,500164,500165,500166,500181,500182,500183,500184,500187,500188,500189,500190,500195,500196,500197,500198,500207,500208,500209,500210,500221,500222,500223,500224,500231,500232,500233,500234,500243,500244,500245,500246,500253,500254,500255,500256,500267,500268,500269,500270,500285,500286,500287,500288,500291,500292,500293,500294,500343,500344,500345,500346,500353,500354,500355,500356,500365,500366,500367,500368,500373,500374,500375,500376,500381,500382,500383,500384,500393,500394,500395,500396,500423,500424,500425,500426,500437,500438,500439,500440,500457,500458,500459,500460,500471,500472,500473,500474,500483,500484,500485,500486,500489,500490,500491,500492,500493,500494,500495,500496,500497,500498,500499,500500,500501,500502,500503,500504,500505,500506,500507,3,37,38,2774,20369,20370,20371,20372,20373,20374,20375,20376,20377,20378,20379,20380,20381,20382,20383,20384,20385,70888,70889,70890,70891,70892,70893,70894,70895,70896,70897,70898,70899,70900,70901,70902,70903,70904,70905,70906,70907,70908,70909,70910,70960,70961,70962,70963,70964,70965,70966,70967,70968,70969,70970,70971,70972,70973,70974,70975,70976,70977,70978,70979,70980,70981,70982,70983,70984,70985,70986,70987,70988,70989,70990],"estate":[1564,1565,1566,1567,1568,1549,2388,2389,2390,2391,2392,70999,71005,60209,1604],"shopping":[1581,1582,1583,1584,1585,1586,1587,1588,1589,61196,70996,1602,71004],"transportation":[2935,2936,2937,2938,2939,2940,2941,2942,70997,71002],"estatelabel":[238,2817,20634,61357,239,240,241,20628,20668,20688,20705,20725,20742,61313],"businesstowerlabel":[235,2814,236,2815,20633,61312,62132,237,2816],"companylabel":[242,243,572,573,574,575,576,577,244,20622,245,578,579,580,581,582,2818,20611,21239,61315,246,583,584,585,586,587,588,247,589,590,591,248,249,250,592,593,594,251,252,595,596,597,598,253,599,600,601,61353,254,61354,255,602,603,604,256,257,61355,258,259,260,261,262,60034,61356,70918],"governmentlabel":[263,2819,264,605,606,607,608,609,610,611,612,2820,2821,2822,2823,265,613,614,615,616,617,618,21237,21238,70954,266,619,620,621,622,623,624,625,626,627,628,629,630,631,61316,267,632,633,634,635,636,268,637,638,639,269,640,641,642,270,643,644,645,646,647,271,20600,1604],"restaurantlabel":[103,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,652,653,654,655,656,657,658,20317,20641,60031,61359,61360,61361,61362,61363,61364,61365,61366,61367,61368,61369,61370,61371,61372,61373,61374,61375,61376,61377,61378,61379,61380,61381,61382,61383,61384,61385,61386,61387,61388,70981,104,298,299,300,301,302,659,660,661,662,663,664,665,666,667,668,669,670,671,672,673,674,675,20318,60017,61389,61390,61391,61392,61393,61394,61395,61396,61397,61398,61399,61400,61401,61402,61403,61404,61405,61406,61407,61408,61409,61410,61411,70609,105,303,304,305,676,677,678,679,680,681,20319,61412,61413,61414,61415,61416,61417,61418,61419,61420,61421,106,306,307,308,309,310,682,683,20320,61422,61423,61424,61425,61426,61427,61428,61429,107,311,312,313,314,315,316,317,318,319,320,321,20321,61430,61431,61432,61433,61434,61435,61436,61437,61438,61439,61440,61441,108,322,323,324,325,326,327,328,20322,60018,60019,61442,61443,61444,61445,61446,61447,61448,61449,71039,71040,109,329,330,331,332,333,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,700,701,702,703,704,705,706,707,708,20604,20607,60016,61450,61451,61452,61453,61454,61455,61456,61457,61458,61459,61460,61461,61462,61463,61464,61465,61466,61467,61468,61469,61470,61471,61472,61473,61474,61475,61476,61477,61500,61501,61502,61503,71046,50000,50000,110,20606,966,20325,20541,20538,20539],"hotellabel":[111,334,335,336,337,338,339,709,710,711,712,713,714,715,716,717,718,719,720,721,722,723,724,725,726,727,728,729,730,731,732,733,734,735,736,737,738,739,740,741,742,743,744,745,746,747,748,749,750,751,752,753,754,755,756,757,758,759,760,761,762,763,764,765,766,767,768,769,770,771,772,773,774,775,776,777,778,779,780,781,782,783,784,785,786,787,788,789,790,791,792,793,794,795,796,797,798,799,800,801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826,827,828,829,830,831,832,833,834,835,836,837,838,839,840,841,842,843,844,845,846,847,848,849,850,851,852,853,854,855,856,857,858,859,860,861,862,863,864,865,866,867,868,869,870,871,872,873,874,875,876,877,878,879,880,881,882,883,884,885,886,887,888,889,890,891,892,893,20332,20632,61504,61505,61506,61507,61508,61509,61510,61511,61512,61513,61514,61515,61516,61517,61518,61519,61520,61521,61522,61523,61524,61525,61526,61527,61528,61529,61530,61531,61532,61533,61534,61535,61536,61537,61538,61539,61540,61541,61542,61543,61544,61545,61546,61547,61548,61549,61550,61551,61552,61553,61554,61555,61556,61557,61558,61559,61560,61561,61562,61563,61564,61565,61566,61567,61568,61569,61570,61571,61572,61573,61574,61575,61576,61577,61578,61579,61580,61581,61582,61583,61584,61585,61586,61587,61588,61589,61590,61591,61592,61593,61594,61595,61596,61597,61598,61599,61600,61601,61602,61603,61604,61605,61606,61607,61608,61609,61610,61611,61612,61613,61614,61615,61616,61617,61618,61619,61620,61621,61622,61623,61624,61625,61626,61627,61628,61629,61630,61631,61632,61633,61634,61635,61636,61637,61638,61639,61640,61641,61642,61643,61644,61645,61646,61647,61648,61649,61650,61651,61652,61653,61654,61655,61656,61657,61658,61659,61660,61661,61662,61663,61664,61665,61666,61667,61668,61669,61670,61671,61672,61673,61674,61675,61676,61677,61678,61679,61680,61681,61682,61683,61684,61685,61686,61687,61688,61689,61690,61691,61692,61693,61694,61695,112,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,20333,61696,61697,61698,61699,61700,61701,61702,61703,61704,61705,61706,61707,61708,61709,61710,61711,61712,61713,61714,61715,61716,61717,61718,113,20334,61719,114,20335,20621,61720,115,61721,116,61722,20336,20337],"shoppinglabel":[117,2783,60202,61496,71049,118,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,20624,119,383,384,385,386,60009,71047,120,387,388,389,390,391,392,60008,71050,71052,121,393,394,395,2769,122,123,124,125,126,127,128,129,130,20603,131,132,60011,133,134,135,20612,60010,70607,70608,70610,70611,500002,500009,500011],"lifeservicelabel":[136,20617,137,396,397,398,399,400,401,20608,138,402,403,404,405,406,407,408,409,410,411,412,413,62331,71041,139,20602,20680,20697,20717,20734,20751,61792,61793,61794,61795,61796,61797,140,20614,20673,20674,20691,20708,20728,20745,20770,20771,20772,20773,20787,20848,20855,20862,20869,61314,141,20601,500006,500007,142,20599,143,20609,144,414,415,416,145,417,418,419,420,421,146,147,148,149,150,151,152,20613,153,20676,20679,20693,20696,20710,20716,20730,20733,20747,20750,20789,20792,20850,20853,20857,20860,20864,20867,20871,20874,61311,61755,62427,500010],"carservicelabel":[203,204,71172,205,206,207,208,209],"transportationlabel":[211,514,515,516,517,2795,21211,21212,21213,21214,21215,21216,21217,21218,21219,21220,21221,21222,21223,21224,21225,21226,21227,21228,21229,21230,21231,21232,21233,21234,21235,21245,21246,21247,50014,213,521,522,523,2813,20678,20695,20715,20732,20749,20791,20852,20859,20866,20873,62350,214,524,525,526,2418,2419,2770,20291,20292,70531,215,216,20669,20677,20694,20714,20731,20748,20790,20851,20858,20865,20872,61310,217,20623,20675,20692,20709,20729,20746,20788,20849,20856,20863,20870,70911,218,527,528,529,530,531,532,533,534,535,2771,71042,71044,71054,71056,219,60030,220,221,536,537,894,895,896,61308,61309,70963,222,223,224,538,539,540,20652,20671,20672,20690,20707,20727,20744,20766,20767,20768,20769,20786,20847,20854,20861,20868,60021,60022,61784,61785,61798,61799,61800,61801,61802,61803,61804,61805,61806,61807,61808,61809,61810,61811,61812,61813,61814,61815,61816,61817,61818,61819,61820,61821,70919,225,2417,2772,62203,2773,71173,226],"financelabel":[227,541,542,543,544,545,546,547,548,549,550,551,552,553,554,555,556,557,558,559,560,561,562,563,564,20619,61341,61342,61343,61344,61345,61346,61347,61348,61349,61350,61351,61352,228,20616,229,230,231,565,566,567,568,569,570,571,232,233,60028,234,60029],"otherlabel":[28,272,273,274,275,648,649,650,651,897,898,899,900,901,902,20666,20670,20686,20689,20703,20706,20723,20726,20740,20743,20883,21236],"all":[]} \ No newline at end of file diff --git a/android/src/main/assets/cfg/a/DVDirectory.cfg b/android/src/main/assets/cfg/a/DVDirectory.cfg new file mode 100644 index 00000000..13e3d835 --- /dev/null +++ b/android/src/main/assets/cfg/a/DVDirectory.cfg @@ -0,0 +1 @@ +{"cities":[{"bb":-16777216,"bl":-16777216,"br":16777216,"bt":16777216,"c":[],"cl":0,"dom":1,"frc":1,"h":"qggl","i":1,"its":1,"l":4,"n":"ȫ","p":"quanguogailue","s":8845090,"v":485,"x":12128434,"y":4040943},{"4k":0,"bb":4757504,"bl":12849152,"br":13082624,"bt":4994048,"c":[],"cl":2,"dom":1,"frc":1,"h":"bj","i":131,"its":1,"l":12,"n":"","p":"beijing_131","s":90281277,"v":485,"x":12959247,"y":4825323},{"4k":0,"bb":3568640,"bl":13454336,"br":13582336,"bt":3724288,"c":[],"cl":2,"dom":1,"frc":1,"h":"sh","i":289,"its":1,"l":12,"n":"Ϻ","p":"shanghai_289","s":88587667,"v":485,"x":13523376,"y":3641154},{"4k":0,"bb":4631552,"bl":12992512,"br":13145088,"bt":4876288,"c":[],"cl":2,"dom":1,"frc":1,"h":"tj","i":332,"its":1,"l":12,"n":"","p":"tianjin_332","s":45766510,"v":485,"x":13049152,"y":4712625},{"4k":0,"bb":3249152,"bl":11720704,"br":12268544,"bt":3768320,"c":[],"cl":2,"dom":1,"frc":1,"h":"cq","i":132,"its":1,"l":12,"n":"","p":"chongqing_132","s":114685560,"v":485,"x":11862153,"y":3426984},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":3676160,"bl":12990464,"br":13124608,"bt":3812352,"c":[],"cl":2,"dom":1,"frc":1,"h":"hf","i":127,"its":1,"l":12,"n":"Ϸ","p":"hefei_127","s":20545513,"v":485,"x":13050653,"y":3717732},{"4k":0,"bb":3453952,"bl":12887040,"br":13108224,"bt":3646464,"c":[],"cl":2,"dom":1,"frc":1,"h":"aq","i":130,"its":0,"l":13,"n":"","p":"anqing_130","s":10000126,"v":485,"x":13031629,"y":3550022},{"4k":0,"bb":3833856,"bl":12995584,"br":13145088,"bt":3939328,"c":[],"cl":2,"dom":1,"frc":1,"h":"bb","i":126,"its":0,"l":13,"n":"","p":"bengbu_126","s":4092768,"v":485,"x":13068586,"y":3861452},{"4k":0,"bb":3602432,"bl":13028352,"br":13193216,"bt":3748864,"c":[],"cl":2,"dom":1,"frc":1,"h":"ch","i":251,"its":0,"l":13,"n":"","p":"chaohu_251","s":8604243,"v":485,"x":13124245,"y":3692063},{"4k":0,"bb":3426304,"bl":12985344,"br":13151232,"bt":3592192,"c":[],"cl":2,"dom":1,"frc":1,"h":"cz","i":299,"its":0,"l":14,"n":"","p":"chizhou_299","s":4114021,"v":485,"x":13079942,"y":3568097},{"4k":0,"bb":3721216,"bl":13042688,"br":13274112,"bt":3901440,"c":[],"cl":2,"dom":1,"frc":1,"h":"cz","i":189,"its":0,"l":13,"n":"","p":"chuzhou_189","s":10728747,"v":485,"x":13171827,"y":3780782},{"4k":0,"bb":3793920,"bl":12788736,"br":12985344,"bt":3950592,"c":[],"cl":2,"dom":1,"frc":1,"h":"fy","i":128,"its":0,"l":13,"n":"","p":"fuyang_128","s":7046862,"v":485,"x":12893223,"y":3858087},{"4k":0,"bb":3853312,"bl":12862464,"br":13006848,"bt":4015104,"c":[],"cl":2,"dom":1,"frc":1,"h":"bz","i":188,"its":0,"l":13,"n":"","p":"bozhou_188","s":5221196,"v":485,"x":12889289,"y":3984735},{"4k":0,"bb":3908608,"bl":12957696,"br":13032448,"bt":4039680,"c":[],"cl":2,"dom":0,"frc":1,"h":"hb","i":253,"its":0,"l":13,"n":"","p":"huaibei_253","s":2338079,"v":485,"x":13002800,"y":3999428},{"4k":0,"bb":3790848,"bl":12953600,"br":13049856,"bt":3873792,"c":[],"cl":2,"dom":1,"frc":1,"h":"hn","i":250,"its":0,"l":13,"n":"","p":"huainan_250","s":2577866,"v":485,"x":13025208,"y":3823291},{"4k":0,"bb":3404800,"bl":13046784,"br":13237248,"bt":3549184,"c":[],"cl":2,"dom":1,"frc":1,"h":"hs","i":252,"its":0,"l":13,"n":"ɽ","p":"huangshan_252","s":4806842,"v":485,"x":13174304,"y":3446430},{"4k":0,"bb":3611648,"bl":12843008,"br":13053952,"bt":3828736,"c":[],"cl":2,"dom":1,"frc":1,"h":"la","i":298,"its":0,"l":13,"n":"","p":"luan_298","s":10167541,"v":485,"x":12972123,"y":3706631},{"4k":0,"bb":3648512,"bl":13177856,"br":13236224,"bt":3713024,"c":[],"cl":2,"dom":1,"frc":1,"h":"mas","i":358,"its":0,"l":13,"n":"ɽ","p":"maanshan_358","s":2827154,"v":485,"x":13192978,"y":3698259},{"4k":0,"bb":3908608,"bl":12931072,"br":13158400,"bt":4092928,"c":[],"cl":2,"dom":1,"frc":1,"h":"sz","i":370,"its":0,"l":13,"n":"","p":"suzhou_370","s":7278444,"v":485,"x":13021233,"y":3958277},{"4k":0,"bb":3534848,"bl":13052928,"br":13155328,"bt":3629056,"c":[],"cl":2,"dom":1,"frc":1,"h":"tl","i":337,"its":0,"l":14,"n":"ͭ","p":"tongling_337","s":1473668,"v":485,"x":13115671,"y":3604196},{"4k":0,"bb":3564544,"bl":13132800,"br":13218816,"bt":3680256,"c":[],"cl":2,"dom":1,"frc":1,"h":"wh","i":129,"its":0,"l":12,"n":"ߺ","p":"wuhu_129","s":6257196,"v":485,"x":13179438,"y":3655140},{"4k":0,"bb":3475456,"bl":13132800,"br":13320192,"bt":3651584,"c":[],"cl":2,"dom":1,"frc":1,"h":"xc","i":190,"its":0,"l":13,"n":"","p":"xuancheng_190","s":7113980,"v":485,"x":13221024,"y":3603637}],"cl":1,"dom":1,"frc":1,"h":"","i":5,"its":0,"l":12,"n":"ʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":2883584,"bl":13178880,"br":13419520,"bt":3060736,"c":[],"cl":2,"dom":1,"frc":1,"h":"fz","i":300,"its":1,"l":12,"n":"","p":"fuzhou_300","s":24015765,"v":485,"x":13280899,"y":2990069},{"4k":0,"bb":2781184,"bl":12897280,"br":13109248,"bt":2985984,"c":[],"cl":2,"dom":1,"frc":1,"h":"ly","i":193,"its":0,"l":13,"n":"","p":"longyan_193","s":6725849,"v":485,"x":13027156,"y":2867451},{"4k":0,"bb":3011584,"bl":13025280,"br":13279232,"bt":3269632,"c":[],"cl":2,"dom":1,"frc":1,"h":"np","i":133,"its":0,"l":13,"n":"ƽ","p":"nanping_133","s":6882788,"v":485,"x":13156359,"y":3060182},{"4k":0,"bb":3016704,"bl":13197312,"br":13443072,"bt":3189760,"c":[],"cl":2,"dom":1,"frc":1,"h":"nd","i":192,"its":0,"l":14,"n":"","p":"ningde_192","s":7867492,"v":485,"x":13306479,"y":3063299},{"4k":0,"bb":2850816,"bl":13186048,"br":13328384,"bt":2951168,"c":[],"cl":2,"dom":1,"frc":1,"h":"pt","i":195,"its":1,"l":13,"n":"","p":"putian_195","s":3855727,"v":485,"x":13248747,"y":2913812},{"4k":0,"bb":2772992,"bl":13088768,"br":13255680,"bt":2972672,"c":[],"cl":2,"dom":1,"frc":1,"h":"qz","i":134,"its":1,"l":12,"n":"Ȫ","p":"quanzhou_134","s":25369782,"v":485,"x":13201907,"y":2846933},{"4k":0,"bb":2916352,"bl":12955648,"br":13211648,"bt":3121152,"c":[],"cl":2,"dom":1,"frc":1,"h":"sm","i":254,"its":1,"l":14,"n":"","p":"sanming_254","s":6755709,"v":485,"x":13096406,"y":3013437},{"4k":0,"bb":2782208,"bl":13123584,"br":13188096,"bt":2847744,"c":[],"cl":2,"dom":1,"frc":1,"h":"xm","i":194,"its":1,"l":12,"n":"","p":"xiamen_194","s":13209264,"v":485,"x":13146519,"y":2794850},{"4k":0,"bb":2681856,"bl":13014016,"br":13164544,"bt":2882560,"c":[],"cl":2,"dom":1,"frc":1,"h":"zz","i":255,"its":0,"l":12,"n":"","p":"zhangzhou_255","s":7993975,"v":485,"x":13097306,"y":2798911}],"cl":1,"dom":1,"frc":1,"h":"","i":6,"its":0,"l":12,"n":"ʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":4216832,"bl":11421696,"br":11642880,"bt":4419584,"c":[],"cl":2,"dom":1,"frc":1,"h":"lz","i":36,"its":0,"l":12,"n":"","p":"lanzhou_36","s":9487564,"v":485,"x":11559619,"y":4284497},{"4k":0,"bb":4195328,"bl":11528192,"br":11748352,"bt":4503552,"c":[],"cl":2,"dom":1,"frc":1,"h":"by","i":35,"its":0,"l":13,"n":"","p":"baiyin_35","s":3450625,"v":485,"x":11593403,"y":4350997},{"4k":0,"bb":4021248,"bl":11517952,"br":11761664,"bt":4282368,"c":[],"cl":2,"dom":1,"frc":1,"h":"dx","i":136,"its":0,"l":13,"n":"","p":"dingxi_136","s":5413357,"v":485,"x":11647780,"y":4218809},{"4k":0,"bb":3886080,"bl":11216896,"br":11663360,"bt":4220928,"c":[],"cl":2,"dom":1,"frc":1,"h":"gnzzzz","i":247,"its":0,"l":14,"n":"ϲ","p":"gannanzangzuzizhi_247","s":4390968,"v":485,"x":11456859,"y":4137657},{"4k":0,"bb":4785152,"bl":10891264,"br":10969088,"bt":4836352,"c":[],"cl":2,"dom":1,"frc":1,"h":"jyg","i":33,"its":0,"l":13,"n":"","p":"jiayuguan_33","s":625475,"v":485,"x":10942391,"y":4806167},{"4k":0,"bb":4556800,"bl":11290624,"br":11438080,"bt":4696064,"c":[],"cl":2,"dom":1,"frc":1,"h":"jc","i":34,"its":0,"l":13,"n":"","p":"jinchang_34","s":1119951,"v":485,"x":11376391,"y":4627122},{"4k":0,"bb":4568064,"bl":10277888,"br":11155456,"bt":5253120,"c":[],"cl":2,"dom":1,"frc":1,"h":"jq","i":37,"its":0,"l":13,"n":"Ȫ","p":"jiuquan_37","s":6142177,"v":485,"x":10965137,"y":4800459},{"4k":0,"bb":4131840,"bl":11430912,"br":11563008,"bt":4305920,"c":[],"cl":2,"dom":1,"frc":1,"h":"lxhzzz","i":182,"its":0,"l":13,"n":"Ļ","p":"linxiahuizuzizhi_182","s":2669782,"v":485,"x":11490222,"y":4221634},{"4k":0,"bb":3818496,"bl":11580416,"br":11866112,"bt":4077568,"c":[],"cl":2,"dom":1,"frc":1,"h":"ln","i":256,"its":0,"l":14,"n":"¤","p":"longnan_256","s":5889057,"v":485,"x":11680713,"y":3925616},{"4k":0,"bb":4123648,"bl":11726848,"br":12008448,"bt":4242432,"c":[],"cl":2,"dom":1,"frc":1,"h":"pl","i":359,"its":0,"l":13,"n":"ƽ","p":"pingliang_359","s":3405598,"v":485,"x":11874773,"y":4213703},{"4k":0,"bb":4171776,"bl":11840512,"br":12103680,"bt":4436992,"c":[],"cl":2,"dom":1,"frc":1,"h":"qy","i":135,"its":0,"l":13,"n":"","p":"qingyang_135","s":6129398,"v":485,"x":11982430,"y":4240415},{"4k":0,"bb":4015104,"bl":11641856,"br":11880448,"bt":4164608,"c":[],"cl":2,"dom":1,"frc":1,"h":"ts","i":196,"its":0,"l":13,"n":"ˮ","p":"tianshui_196","s":4323645,"v":485,"x":11770086,"y":4083435},{"4k":0,"bb":4379648,"bl":11335680,"br":11601920,"bt":4761600,"c":[],"cl":2,"dom":1,"frc":1,"h":"ww","i":118,"its":0,"l":13,"n":"","p":"wuwei_118","s":3710119,"v":485,"x":11426460,"y":4543603},{"4k":0,"bb":4498432,"bl":10841088,"br":11379712,"bt":4823040,"c":[],"cl":2,"dom":1,"frc":1,"h":"zy","i":117,"its":0,"l":13,"n":"Ҵ","p":"zhangye_117","s":4202214,"v":485,"x":11182856,"y":4684860}],"cl":1,"dom":1,"frc":1,"h":"","i":7,"its":0,"l":12,"n":"ʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":2556928,"bl":12574720,"br":12698624,"bt":2728960,"c":[],"cl":2,"dom":1,"frc":1,"h":"gz","i":257,"its":1,"l":12,"n":"","p":"guangzhou_257","s":57113024,"v":485,"x":12609501,"y":2631394},{"4k":0,"bb":2302976,"bl":12954624,"br":13057024,"bt":2381824,"c":[],"cl":2,"dom":0,"frc":1,"h":"dsq","i":120,"its":0,"l":13,"n":"ɳȺ","p":"dongshaqun_120","s":432139,"v":485,"x":12991306,"y":2333156},{"4k":0,"bb":2666496,"bl":12954624,"br":13048832,"bt":2765824,"c":[],"cl":2,"dom":1,"frc":1,"h":"cz","i":201,"its":0,"l":13,"n":"","p":"chaozhou_201","s":3024391,"v":485,"x":12983270,"y":2695083},{"4k":0,"bb":2574336,"bl":12637184,"br":12721152,"bt":2633728,"c":[],"cl":2,"dom":1,"frc":1,"h":"dg","i":119,"its":1,"l":12,"n":"ݸ","p":"dongguan_119","s":38602996,"v":485,"x":12663623,"y":2618335},{"4k":0,"bb":2572288,"bl":12511232,"br":12623872,"bt":2684928,"c":[],"cl":2,"dom":1,"frc":1,"h":"fs","i":138,"its":1,"l":13,"n":"ɽ","p":"foshan_138","s":40960418,"v":485,"x":12593536,"y":2618504},{"4k":0,"bb":2634752,"bl":12718080,"br":12869632,"bt":2832384,"c":[],"cl":2,"dom":1,"frc":1,"h":"hy","i":200,"its":0,"l":12,"n":"Դ","p":"heyuan_200","s":6948473,"v":485,"x":12769274,"y":2705589},{"4k":0,"bb":2540544,"bl":12669952,"br":12850176,"bt":2732032,"c":[],"cl":2,"dom":1,"frc":1,"h":"hz","i":301,"its":0,"l":12,"n":"","p":"huizhou_301","s":21363736,"v":485,"x":12737682,"y":2629201},{"4k":0,"bb":2428928,"bl":12468224,"br":12609536,"bt":2598912,"c":[],"cl":2,"dom":1,"frc":1,"h":"jm","i":302,"its":0,"l":13,"n":"","p":"jiangmen_302","s":11416806,"v":485,"x":12589095,"y":2565316},{"4k":0,"bb":2596864,"bl":12870656,"br":12985344,"bt":2709504,"c":[],"cl":2,"dom":1,"frc":1,"h":"jy","i":259,"its":0,"l":13,"n":"","p":"jieyang_259","s":4973674,"v":485,"x":12955416,"y":2682139},{"4k":0,"bb":2416640,"bl":12281856,"br":12434432,"bt":2580480,"c":[],"cl":2,"dom":1,"frc":1,"h":"mm","i":139,"its":0,"l":13,"n":"ï","p":"maoming_139","s":6755902,"v":485,"x":12349003,"y":2455917},{"4k":0,"bb":2660352,"bl":12836864,"br":13019136,"bt":2850816,"c":[],"cl":2,"dom":1,"frc":1,"h":"mz","i":141,"its":0,"l":13,"n":"÷","p":"meizhou_141","s":8277878,"v":485,"x":12927581,"y":2771573},{"4k":0,"bb":2670592,"bl":12460032,"br":12682240,"bt":2883584,"c":[],"cl":2,"dom":1,"frc":1,"h":"qy","i":197,"its":0,"l":13,"n":"Զ","p":"qingyuan_197","s":8443257,"v":485,"x":12586210,"y":2698142},{"4k":0,"bb":2620416,"bl":12941312,"br":13066240,"bt":2694144,"c":[],"cl":2,"dom":1,"frc":1,"h":"st","i":303,"its":0,"l":13,"n":"ͷ","p":"shantou_303","s":7422567,"v":485,"x":12989872,"y":2658431},{"4k":0,"bb":2569216,"bl":12792832,"br":12940288,"bt":2673664,"c":[],"cl":2,"dom":1,"frc":1,"h":"sw","i":339,"its":0,"l":14,"n":"β","p":"shanwei_339","s":3226967,"v":485,"x":12844383,"y":2590120},{"4k":0,"bb":2722816,"bl":12563456,"br":12774400,"bt":2922496,"c":[],"cl":2,"dom":1,"frc":1,"h":"sg","i":137,"its":0,"l":13,"n":"ع","p":"shaoguan_137","s":7481320,"v":485,"x":12646452,"y":2835071},{"4k":0,"bb":2523136,"bl":12654592,"br":12764160,"bt":2598912,"c":[],"cl":2,"dom":1,"frc":1,"h":"sz","i":340,"its":1,"l":12,"n":"","p":"shenzhen_340","s":47530326,"v":485,"x":12697742,"y":2560988},{"4k":0,"bb":2432000,"bl":12388352,"br":12510208,"bt":2577408,"c":[],"cl":2,"dom":1,"frc":1,"h":"yj","i":199,"its":0,"l":14,"n":"","p":"yangjiang_199","s":4368465,"v":485,"x":12466699,"y":2479199},{"4k":0,"bb":2540544,"bl":12362752,"br":12527616,"bt":2655232,"c":[],"cl":2,"dom":1,"frc":1,"h":"yf","i":258,"its":0,"l":13,"n":"Ƹ","p":"yunfu_258","s":3992866,"v":485,"x":12473614,"y":2605661},{"4k":0,"bb":2265088,"bl":12204032,"br":12366848,"bt":2487296,"c":[],"cl":2,"dom":1,"frc":1,"h":"zj","i":198,"its":0,"l":13,"n":"տ","p":"zhanjiang_198","s":8498974,"v":485,"x":12286021,"y":2409271},{"4k":0,"bb":2587648,"bl":12397568,"br":12567552,"bt":2785280,"c":[],"cl":2,"dom":1,"frc":1,"h":"zq","i":338,"its":0,"l":13,"n":"","p":"zhaoqing_338","s":7422388,"v":485,"x":12520436,"y":2621545},{"4k":0,"bb":2516992,"bl":12597248,"br":12657664,"bt":2589696,"c":[],"cl":2,"dom":1,"frc":1,"h":"zs","i":187,"its":1,"l":12,"n":"ɽ","p":"zhongshan_187","s":16832094,"v":485,"x":12623659,"y":2557831},{"4k":0,"bb":2468864,"bl":12585984,"br":12737536,"bt":2550784,"c":[],"cl":2,"dom":1,"frc":1,"h":"zh","i":140,"its":1,"l":13,"n":"麣","p":"zhuhai_140","s":10713840,"v":485,"x":12644164,"y":2528395}],"cl":1,"dom":1,"frc":1,"h":"","i":8,"its":0,"l":12,"n":"㶫ʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":2766848,"bl":12203008,"br":12412928,"bt":3028992,"c":[],"cl":2,"dom":1,"frc":1,"h":"gl","i":142,"its":0,"l":12,"n":"","p":"guilin_142","s":10058760,"v":485,"x":12278277,"y":2891750},{"4k":0,"bb":2597888,"bl":11627520,"br":12011520,"bt":2871296,"c":[],"cl":2,"dom":1,"frc":1,"h":"bs","i":203,"its":0,"l":13,"n":"ɫ","p":"baise_203","s":10225013,"v":485,"x":11869566,"y":2724709},{"4k":0,"bb":2361344,"bl":12116992,"br":12223488,"bt":2487296,"c":[],"cl":2,"dom":1,"frc":1,"h":"bh","i":295,"its":0,"l":13,"n":"","p":"beihai_295","s":3219970,"v":485,"x":12148051,"y":2434246},{"4k":0,"bb":2447360,"bl":11863040,"br":12036096,"bt":2659328,"c":[],"cl":2,"dom":0,"frc":1,"h":"cz","i":144,"its":0,"l":14,"n":"","p":"chongzuo_144","s":5261130,"v":485,"x":11952674,"y":2540952},{"4k":0,"bb":2573312,"bl":12156928,"br":12320768,"bt":2742272,"c":[],"cl":2,"dom":1,"frc":1,"h":"gg","i":341,"its":0,"l":13,"n":"","p":"guigang_341","s":5301966,"v":485,"x":12201371,"y":2629300},{"4k":0,"bb":2434048,"bl":11965440,"br":12091392,"bt":2541568,"c":[],"cl":2,"dom":0,"frc":1,"h":"fcg","i":204,"its":0,"l":15,"n":"Ǹ","p":"fangchenggang_204","s":2687421,"v":485,"x":12062759,"y":2458820},{"4k":0,"bb":2681856,"bl":11864064,"br":12152832,"bt":2933760,"c":[],"cl":2,"dom":0,"frc":1,"h":"hc","i":143,"its":0,"l":14,"n":"ӳ","p":"hechi_143","s":9521761,"v":485,"x":12032866,"y":2820782},{"4k":0,"bb":2694144,"bl":12309504,"br":12476416,"bt":2877440,"c":[],"cl":2,"dom":0,"frc":1,"h":"hz","i":260,"its":0,"l":14,"n":"","p":"hezhou_260","s":3322163,"v":485,"x":12420393,"y":2785558},{"4k":0,"bb":2648064,"bl":12069888,"br":12297216,"bt":2793472,"c":[],"cl":2,"dom":0,"frc":1,"h":"lb","i":202,"its":0,"l":14,"n":"","p":"laibin_202","s":4280543,"v":485,"x":12159448,"y":2706201},{"4k":0,"bb":2724864,"bl":12088320,"br":12266496,"bt":2988032,"c":[],"cl":2,"dom":1,"frc":1,"h":"lz","i":305,"its":0,"l":12,"n":"","p":"liuzhou_305","s":7395239,"v":485,"x":12180931,"y":2776093},{"4k":0,"bb":2520064,"bl":11948032,"br":12204032,"bt":2741248,"c":[],"cl":2,"dom":1,"frc":1,"h":"nn","i":261,"its":1,"l":12,"n":"","p":"nanning_261","s":31009301,"v":485,"x":12064168,"y":2593869},{"4k":0,"bb":2436096,"bl":12043264,"br":12231680,"bt":2578432,"c":[],"cl":2,"dom":1,"frc":1,"h":"qz","i":145,"its":0,"l":13,"n":"","p":"qinzhou_145","s":6293938,"v":485,"x":12096190,"y":2493771},{"4k":0,"bb":2568192,"bl":12281856,"br":12432384,"bt":2786304,"c":[],"cl":2,"dom":1,"frc":1,"h":"wz","i":304,"its":0,"l":13,"n":"","p":"wuzhou_304","s":4503863,"v":485,"x":12388396,"y":2673339},{"4k":0,"bb":2452480,"bl":12194816,"br":12346368,"bt":2631680,"c":[],"cl":2,"dom":1,"frc":1,"h":"yl","i":361,"its":0,"l":14,"n":"","p":"yulin_361","s":6653294,"v":485,"x":12264306,"y":2572258}],"cl":1,"dom":1,"frc":1,"h":"","i":9,"its":0,"l":12,"n":"׳","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":3003392,"bl":11813888,"br":11943936,"bt":3149824,"c":[],"cl":2,"dom":1,"frc":1,"h":"gy","i":146,"its":1,"l":12,"n":"","p":"guiyang_146","s":14189809,"v":485,"x":11870882,"y":3060846},{"4k":0,"bb":2900992,"bl":11716608,"br":11865088,"bt":3058688,"c":[],"cl":2,"dom":1,"frc":1,"h":"as","i":263,"its":0,"l":13,"n":"˳","p":"anshun_263","s":4293498,"v":485,"x":11794711,"y":3012219},{"4k":0,"bb":3024896,"bl":11533312,"br":11882496,"bt":3202048,"c":[],"cl":2,"dom":0,"frc":1,"h":"bjd","i":206,"its":0,"l":14,"n":"Ͻڵ","p":"bijiedi_206","s":9776284,"v":485,"x":11721033,"y":3142281},{"4k":0,"bb":2896896,"bl":11612160,"br":11769856,"bt":3095552,"c":[],"cl":2,"dom":1,"frc":1,"h":"lps","i":147,"its":0,"l":13,"n":"ˮ","p":"liupanshui_147","s":4156379,"v":485,"x":11670590,"y":3054083},{"4k":0,"bb":2894848,"bl":11944960,"br":12200960,"bt":3171328,"c":[],"cl":2,"dom":1,"frc":1,"h":"qdnmzdzzz","i":342,"its":0,"l":11,"n":"ǭ嶱","p":"qiandongnanmiaozudongzuzizhi_342","s":8046385,"v":485,"x":12021445,"y":3053001},{"4k":0,"bb":2865152,"bl":11824128,"br":12057600,"bt":3165184,"c":[],"cl":2,"dom":0,"frc":1,"h":"qnbyzmzzz","i":306,"its":0,"l":11,"n":"ǭϲ","p":"qiannanbuyizumiaozuzizhi_306","s":8652946,"v":485,"x":11970165,"y":3012314},{"4k":0,"bb":2810880,"bl":11636736,"br":11859968,"bt":3003392,"c":[],"cl":2,"dom":0,"frc":1,"h":"qxnbyzmzzz","i":343,"its":0,"l":11,"n":"ǭϲ","p":"qianxinanbuyizumiaozuzizhi_343","s":6003244,"v":485,"x":11678750,"y":2869250},{"4k":0,"bb":3119104,"bl":11995136,"br":12187648,"bt":3366912,"c":[],"cl":2,"dom":0,"frc":1,"h":"trd","i":205,"its":0,"l":14,"n":"ͭʵ","p":"tongrendi_205","s":7941367,"v":485,"x":12155781,"y":3195893},{"4k":0,"bb":3121152,"bl":11756544,"br":12047360,"bt":3384320,"c":[],"cl":2,"dom":1,"frc":1,"h":"zy","i":262,"its":0,"l":13,"n":"","p":"zunyi_262","s":12452262,"v":485,"x":11903929,"y":3195131}],"cl":1,"dom":1,"frc":1,"h":"","i":10,"its":0,"l":12,"n":"ʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":2202624,"bl":12253184,"br":12325888,"bt":2280448,"c":[],"cl":2,"dom":1,"frc":1,"h":"hk","i":125,"its":0,"l":13,"n":"","p":"haikou_125","s":7689131,"v":485,"x":12282523,"y":2262686},{"4k":0,"bb":397312,"bl":12086272,"br":13144064,"bt":2288640,"c":[],"cl":2,"dom":0,"frc":1,"h":"hnszxxjxzd","i":296,"its":0,"l":13,"n":"ʡֱϽؼλ","p":"hainanshengzhixiaxianjixingzhengdan_296","s":28722963,"v":485,"x":12204337,"y":2170840},{"4k":0,"bb":2037760,"bl":12126208,"br":12225536,"bt":2098176,"c":[],"cl":2,"dom":1,"frc":1,"h":"sy","i":121,"its":0,"l":12,"n":"","p":"sanya_121","s":3443883,"v":485,"x":12191644,"y":2054296}],"cl":1,"dom":1,"frc":1,"h":"","i":11,"its":0,"l":12,"n":"ʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":4474880,"bl":12637184,"br":12857344,"bt":4662272,"c":[],"cl":2,"dom":1,"frc":1,"h":"sjz","i":150,"its":1,"l":12,"n":"ʯׯ","p":"shijiazhuang_150","s":26906448,"v":485,"x":12748538,"y":4559724},{"4k":0,"bb":4586496,"bl":12664832,"br":12951552,"bt":4832256,"c":[],"cl":2,"dom":1,"frc":1,"h":"bd","i":307,"its":0,"l":13,"n":"","p":"baoding_307","s":21865928,"v":485,"x":12854318,"y":4677432},{"4k":0,"bb":4478976,"bl":12879872,"br":13131776,"bt":4687872,"c":[],"cl":2,"dom":1,"frc":1,"h":"cz","i":149,"its":0,"l":13,"n":"","p":"cangzhou_149","s":11601522,"v":485,"x":13007297,"y":4596606},{"4k":0,"bb":4866048,"bl":12903424,"br":13276160,"bt":5226496,"c":[],"cl":2,"dom":1,"frc":1,"h":"cd","i":207,"its":0,"l":14,"n":"е","p":"chengde_207","s":12129251,"v":485,"x":13130309,"y":4981756},{"4k":0,"bb":4282368,"bl":12631040,"br":12857344,"bt":4417536,"c":[],"cl":2,"dom":1,"frc":1,"h":"hd","i":151,"its":0,"l":13,"n":"","p":"handan_151","s":10149997,"v":485,"x":12746200,"y":4360331},{"4k":0,"bb":4421632,"bl":12823552,"br":12977152,"bt":4605952,"c":[],"cl":2,"dom":1,"frc":1,"h":"hs","i":208,"its":0,"l":13,"n":"ˮ","p":"hengshui_208","s":5917246,"v":485,"x":12877237,"y":4517087},{"4k":0,"bb":4620288,"bl":12925952,"br":13054976,"bt":4853760,"c":[],"cl":2,"dom":1,"frc":1,"h":"lf","i":191,"its":0,"l":13,"n":"ȷ","p":"langfang_191","s":10555888,"v":485,"x":12992591,"y":4769913},{"4k":0,"bb":4756480,"bl":13199360,"br":13344768,"bt":4928512,"c":[],"cl":2,"dom":1,"frc":1,"h":"qhd","i":148,"its":0,"l":12,"n":"ػʵ","p":"qinhuangdao_148","s":13145299,"v":485,"x":13314638,"y":4829708},{"4k":0,"bb":4680704,"bl":13081600,"br":13298688,"bt":4907008,"c":[],"cl":2,"dom":1,"frc":1,"h":"ts","i":265,"its":1,"l":13,"n":"ɽ","p":"tangshan_265","s":19958350,"v":485,"x":13156663,"y":4785770},{"4k":0,"bb":4379648,"bl":12663808,"br":12898304,"bt":4527104,"c":[],"cl":2,"dom":1,"frc":1,"h":"xt","i":266,"its":0,"l":13,"n":"̨","p":"xingtai_266","s":7982875,"v":485,"x":12747474,"y":4423807},{"4k":0,"bb":4774912,"bl":12670976,"br":12965888,"bt":5155840,"c":[],"cl":2,"dom":1,"frc":1,"h":"zjk","i":264,"its":0,"l":13,"n":"żҿ","p":"zhangjiakou_264","s":11141338,"v":485,"x":12790099,"y":4959124}],"cl":1,"dom":1,"frc":1,"h":"","i":12,"its":0,"l":12,"n":"ӱʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":5445632,"bl":13991936,"br":14499840,"bt":5859328,"c":[],"cl":2,"dom":1,"frc":1,"h":"heb","i":48,"its":1,"l":12,"n":"","p":"haerbin_48","s":30465991,"v":485,"x":14086779,"y":5718675},{"4k":0,"bb":5651456,"bl":13776896,"br":14004224,"bt":5990400,"c":[],"cl":2,"dom":1,"frc":1,"h":"dq","i":50,"its":0,"l":12,"n":"","p":"daqing_50","s":7243175,"v":485,"x":13927447,"y":5844942},{"4k":0,"bb":6571008,"bl":13490176,"br":14142464,"bt":7054336,"c":[],"cl":2,"dom":1,"frc":1,"h":"dxald","i":38,"its":0,"l":10,"n":"˰","p":"daxinganlingdi_38","s":4629243,"v":485,"x":13870692,"y":6757751},{"4k":0,"bb":5920768,"bl":14435328,"br":14753792,"bt":6134784,"c":[],"cl":2,"dom":1,"frc":1,"h":"hg","i":43,"its":0,"l":13,"n":"׸","p":"hegang_43","s":2842767,"v":485,"x":14505602,"y":5968657},{"4k":0,"bb":6006784,"bl":13887488,"br":14420992,"bt":6590464,"c":[],"cl":2,"dom":1,"frc":1,"h":"hh","i":39,"its":0,"l":14,"n":"ں","p":"heihe_39","s":7651553,"v":485,"x":14197287,"y":6456725},{"4k":0,"bb":5569536,"bl":14516224,"br":14912512,"bt":5849088,"c":[],"cl":2,"dom":1,"frc":1,"h":"jx","i":46,"its":0,"l":13,"n":"","p":"jixi_46","s":4314394,"v":485,"x":14580357,"y":5638357},{"4k":0,"bb":5741568,"bl":14416896,"br":15040512,"bt":6154240,"c":[],"cl":2,"dom":1,"frc":1,"h":"jms","i":42,"its":0,"l":12,"n":"ľ˹","p":"jiamusi_42","s":7952928,"v":485,"x":14508101,"y":5879000},{"4k":0,"bb":5348352,"bl":14274560,"br":14620672,"bt":5748736,"c":[],"cl":2,"dom":1,"frc":1,"h":"mdj","i":49,"its":0,"l":13,"n":"ĵ","p":"mudanjiang_49","s":5874245,"v":485,"x":14431502,"y":5522040},{"4k":0,"bb":5785600,"bl":13626368,"br":14102528,"bt":6233088,"c":[],"cl":2,"dom":1,"frc":1,"h":"qqhe","i":41,"its":0,"l":13,"n":"","p":"qiqihaer_41","s":9917369,"v":485,"x":13795365,"y":5969317},{"4k":0,"bb":5684224,"bl":14483456,"br":14688256,"bt":5805056,"c":[],"cl":2,"dom":1,"frc":1,"h":"qth","i":47,"its":0,"l":14,"n":"̨","p":"qitaihe_47","s":1356144,"v":485,"x":14584082,"y":5713696},{"4k":0,"bb":5715968,"bl":14545920,"br":14956544,"bt":6005760,"c":[],"cl":2,"dom":1,"frc":1,"h":"sys","i":45,"its":0,"l":13,"n":"˫Ѽɽ","p":"shuangyashan_45","s":3407447,"v":485,"x":14601428,"y":5854242},{"4k":0,"bb":5670912,"bl":13900800,"br":14312448,"bt":6092800,"c":[],"cl":2,"dom":1,"frc":1,"h":"sh","i":44,"its":0,"l":13,"n":"绯","p":"suihua_44","s":8352300,"v":485,"x":14135004,"y":5855176},{"4k":0,"bb":5827584,"bl":14208000,"br":14559232,"bt":6319104,"c":[],"cl":2,"dom":1,"frc":1,"h":"yc","i":40,"its":0,"l":14,"n":"","p":"yichun_40","s":3734875,"v":485,"x":14343343,"y":6030683}],"cl":1,"dom":1,"frc":1,"h":"","i":13,"its":0,"l":12,"n":"ʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":4039680,"bl":12548096,"br":12717056,"bt":4139008,"c":[],"cl":2,"dom":1,"frc":1,"h":"zz","i":268,"its":1,"l":12,"n":"֣","p":"zhengzhou_268","s":33176533,"v":485,"x":12649567,"y":4105840},{"4k":0,"bb":4166656,"bl":12649472,"br":12802048,"bt":4327424,"c":[],"cl":2,"dom":1,"frc":1,"h":"ay","i":267,"its":0,"l":12,"n":"","p":"anyang_267","s":6463479,"v":485,"x":12735044,"y":4289481},{"4k":0,"bb":4199424,"bl":12690432,"br":12776448,"bt":4283392,"c":[],"cl":2,"dom":1,"frc":1,"h":"hb","i":215,"its":0,"l":13,"n":"ױ","p":"hebi_215","s":2025936,"v":485,"x":12724387,"y":4241836},{"4k":0,"bb":4125696,"bl":12472320,"br":12554240,"bt":4177920,"c":[],"cl":2,"dom":0,"frc":1,"h":"jy","i":1277,"its":0,"l":13,"n":"Դ","p":"jiyuan_1277","s":1499088,"v":485,"x":12535733,"y":4149037},{"4k":0,"bb":4114432,"bl":12531712,"br":12652544,"bt":4207616,"c":[],"cl":2,"dom":1,"frc":1,"h":"jz","i":211,"its":0,"l":13,"n":"","p":"jiaozuo_211","s":4777925,"v":485,"x":12606908,"y":4169150},{"4k":0,"bb":4031488,"bl":12677120,"br":12832768,"bt":4143104,"c":[],"cl":2,"dom":1,"frc":1,"h":"kf","i":210,"its":0,"l":13,"n":"","p":"kaifeng_210","s":4961261,"v":485,"x":12725504,"y":4112520},{"4k":0,"bb":3926016,"bl":12631040,"br":12724224,"bt":4003840,"c":[],"cl":2,"dom":0,"frc":1,"h":"lh","i":344,"its":0,"l":13,"n":"","p":"luohe_344","s":2349970,"v":485,"x":12693146,"y":3949717},{"4k":0,"bb":3946496,"bl":12371968,"br":12578816,"bt":4150272,"c":[],"cl":2,"dom":1,"frc":1,"h":"ly","i":153,"its":0,"l":12,"n":"","p":"luoyang_153","s":22051712,"v":485,"x":12519129,"y":4088448},{"4k":0,"bb":3775488,"bl":12354560,"br":12670976,"bt":3979264,"c":[],"cl":2,"dom":1,"frc":1,"h":"ny","i":309,"its":0,"l":13,"n":"","p":"nanyang_309","s":17158077,"v":485,"x":12527475,"y":3871405},{"4k":0,"bb":3889152,"bl":12495872,"br":12656640,"bt":4051968,"c":[],"cl":2,"dom":1,"frc":1,"h":"pds","i":213,"its":0,"l":13,"n":"ƽɽ","p":"pingdingshan_213","s":6409885,"v":485,"x":12601567,"y":3974311},{"4k":0,"bb":4184064,"bl":12787712,"br":12926976,"bt":4305920,"c":[],"cl":2,"dom":1,"frc":1,"h":"py","i":209,"its":0,"l":12,"n":"","p":"puyang_209","s":3768642,"v":485,"x":12805878,"y":4243481},{"4k":0,"bb":3945472,"bl":12285952,"br":12472320,"bt":4152320,"c":[],"cl":2,"dom":1,"frc":1,"h":"smx","i":212,"its":0,"l":13,"n":"Ͽ","p":"sanmenxia_212","s":4152677,"v":485,"x":12379622,"y":4109213},{"4k":0,"bb":3965952,"bl":12782592,"br":12986368,"bt":4121600,"c":[],"cl":2,"dom":1,"frc":1,"h":"sq","i":154,"its":0,"l":13,"n":"","p":"shangqiu_154","s":8809345,"v":485,"x":12875663,"y":4061012},{"4k":0,"bb":4122624,"bl":12621824,"br":12805120,"bt":4254720,"c":[],"cl":2,"dom":1,"frc":1,"h":"xx","i":152,"its":0,"l":13,"n":"","p":"xinxiang_152","s":7129359,"v":485,"x":12683159,"y":4180929},{"4k":0,"bb":3660800,"bl":12658688,"br":12908544,"bt":3828736,"c":[],"cl":2,"dom":1,"frc":1,"h":"xy","i":214,"its":0,"l":13,"n":"","p":"xinyang_214","s":11721767,"v":485,"x":12698936,"y":3757298},{"4k":0,"bb":3963904,"bl":12587008,"br":12728320,"bt":4060160,"c":[],"cl":2,"dom":1,"frc":1,"h":"xc","i":155,"its":0,"l":13,"n":"","p":"xuchang_155","s":5021287,"v":485,"x":12674841,"y":4010266},{"4k":0,"bb":3878912,"bl":12700672,"br":12875776,"bt":4050944,"c":[],"cl":2,"dom":1,"frc":1,"h":"zk","i":308,"its":0,"l":13,"n":"ܿ","p":"zhoukou_308","s":8914459,"v":485,"x":12764507,"y":3954547},{"4k":0,"bb":3776512,"bl":12590080,"br":12827648,"bt":3943424,"c":[],"cl":2,"dom":0,"frc":1,"h":"zmd","i":269,"its":0,"l":13,"n":"פ","p":"zhumadian_269","s":7643963,"v":485,"x":12693783,"y":3874182}],"cl":1,"dom":1,"frc":1,"h":"","i":14,"its":0,"l":12,"n":"ʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":3210240,"bl":12456960,"br":12721152,"bt":3313664,"c":[],"cl":2,"dom":1,"frc":1,"h":"cs","i":158,"its":1,"l":12,"n":"ɳ","p":"changsha_158","s":36713941,"v":485,"x":12573153,"y":3258105},{"4k":0,"bb":2844672,"bl":12493824,"br":12718080,"bt":3085312,"c":[],"cl":2,"dom":1,"frc":1,"h":"cz","i":275,"its":0,"l":13,"n":"","p":"chenzhou_275","s":8637893,"v":485,"x":12581589,"y":2952699},{"4k":0,"bb":3279872,"bl":12300288,"br":12503040,"bt":3499008,"c":[],"cl":2,"dom":1,"frc":1,"h":"cd","i":219,"its":0,"l":12,"n":"","p":"changde_219","s":10124920,"v":485,"x":12435078,"y":3359518},{"4k":0,"bb":2994176,"bl":12417024,"br":12611584,"bt":3163136,"c":[],"cl":2,"dom":1,"frc":1,"h":"hy","i":159,"its":0,"l":13,"n":"","p":"hengyang_159","s":9686604,"v":485,"x":12532306,"y":3091415},{"4k":0,"bb":2963456,"bl":12110848,"br":12369920,"bt":3358720,"c":[],"cl":2,"dom":1,"frc":1,"h":"hh","i":363,"its":0,"l":13,"n":"","p":"huaihua_363","s":9288649,"v":485,"x":12245816,"y":3173822},{"4k":0,"bb":3129344,"bl":12331008,"br":12527616,"bt":3259392,"c":[],"cl":2,"dom":1,"frc":1,"h":"ld","i":221,"its":0,"l":13,"n":"¦","p":"loudi_221","s":5264023,"v":485,"x":12468039,"y":3191559},{"4k":0,"bb":2975744,"bl":12225536,"br":12479488,"bt":3187712,"c":[],"cl":2,"dom":1,"frc":1,"h":"sy","i":273,"its":0,"l":13,"n":"","p":"shaoyang_273","s":9309510,"v":485,"x":12409368,"y":3134396},{"4k":0,"bb":3145728,"bl":12468224,"br":12591104,"bt":3238912,"c":[],"cl":2,"dom":0,"frc":1,"h":"xt","i":313,"its":0,"l":13,"n":"̶","p":"xiangtan_313","s":5984381,"v":485,"x":12573737,"y":3208160},{"4k":0,"bb":3193856,"bl":12154880,"br":12290048,"bt":3436544,"c":[],"cl":2,"dom":0,"frc":1,"h":"xxtjzmzzz","i":274,"its":0,"l":14,"n":"","p":"xiangxitujiazumiaozuzizhi_274","s":5476312,"v":485,"x":12216945,"y":3268607},{"4k":0,"bb":3225600,"bl":12325888,"br":12574720,"bt":3422208,"c":[],"cl":2,"dom":0,"frc":1,"h":"yy","i":272,"its":0,"l":13,"n":"","p":"yiyang_272","s":6795708,"v":485,"x":12508180,"y":3299125},{"4k":0,"bb":2812928,"bl":12351488,"br":12520448,"bt":3088384,"c":[],"cl":2,"dom":1,"frc":1,"h":"yz","i":314,"its":0,"l":13,"n":"","p":"yongzhou_314","s":8034847,"v":485,"x":12425479,"y":3032799},{"4k":0,"bb":3281920,"bl":12503040,"br":12708864,"bt":3464192,"c":[],"cl":2,"dom":1,"frc":1,"h":"yy","i":220,"its":0,"l":13,"n":"","p":"yueyang_220","s":9366665,"v":485,"x":12594306,"y":3400824},{"4k":0,"bb":3338240,"bl":12211200,"br":12395520,"bt":3457024,"c":[],"cl":2,"dom":1,"frc":1,"h":"zjj","i":312,"its":0,"l":13,"n":"żҽ","p":"zhangjiajie_312","s":3575574,"v":485,"x":12299343,"y":3370210},{"4k":0,"bb":2985984,"bl":12575744,"br":12703744,"bt":3233792,"c":[],"cl":2,"dom":1,"frc":1,"h":"zz","i":222,"its":0,"l":13,"n":"","p":"zhuzhou_222","s":7740410,"v":485,"x":12594871,"y":3207895}],"cl":1,"dom":1,"frc":1,"h":"","i":15,"its":0,"l":12,"n":"ʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":3477504,"bl":12657664,"br":12812288,"bt":3658752,"c":[],"cl":2,"dom":1,"frc":1,"h":"wh","i":218,"its":1,"l":12,"n":"人","p":"wuhan_218","s":39604059,"v":485,"x":12725273,"y":3558756},{"4k":0,"bb":3484672,"bl":12746752,"br":12813312,"bt":3562496,"c":[],"cl":2,"dom":1,"frc":1,"h":"ez","i":122,"its":0,"l":14,"n":"","p":"ezhou_122","s":1865859,"v":485,"x":12790921,"y":3532802},{"4k":0,"bb":3368960,"bl":12063744,"br":12317696,"bt":3662848,"c":[],"cl":2,"dom":1,"frc":1,"h":"estjzmzzz","i":373,"its":0,"l":14,"n":"ʩ","p":"enshitujiazumiaozuzizhi_373","s":8182545,"v":485,"x":12189033,"y":3517581},{"4k":0,"bb":3446784,"bl":12735488,"br":12930048,"bt":3690496,"c":[],"cl":2,"dom":1,"frc":1,"h":"hg","i":271,"its":0,"l":14,"n":"Ƹ","p":"huanggang_271","s":11811110,"v":485,"x":12788396,"y":3540883},{"4k":0,"bb":3419136,"bl":12749824,"br":12860416,"bt":3525632,"c":[],"cl":2,"dom":1,"frc":1,"h":"hs","i":311,"its":0,"l":13,"n":"ʯ","p":"huangshi_311","s":4087196,"v":485,"x":12806938,"y":3508277},{"4k":0,"bb":3490816,"bl":12238848,"br":12672000,"bt":3723264,"c":[],"cl":2,"dom":0,"frc":1,"h":"hbszxxjxzd","i":345,"its":0,"l":13,"n":"ʡֱϽؼλ","p":"hubeishengzhixiaxianjixingzhengdan_345","s":5704234,"v":485,"x":12455557,"y":3607403},{"4k":0,"bb":3531776,"bl":12452864,"br":12635136,"bt":3690496,"c":[],"cl":2,"dom":1,"frc":1,"h":"jm","i":217,"its":0,"l":13,"n":"","p":"jingmen_217","s":6370245,"v":485,"x":12490833,"y":3615941},{"4k":0,"bb":3408896,"bl":12384256,"br":12701696,"bt":3567616,"c":[],"cl":2,"dom":1,"frc":1,"h":"jz","i":157,"its":0,"l":12,"n":"","p":"jingzhou_157","s":8064895,"v":485,"x":12495301,"y":3525648},{"4k":0,"bb":3676160,"bl":12182528,"br":12423168,"bt":3908608,"c":[],"cl":2,"dom":1,"frc":1,"h":"sy","i":216,"its":0,"l":13,"n":"ʮ","p":"shiyan_216","s":8406227,"v":485,"x":12334839,"y":3823705},{"4k":0,"bb":3652608,"bl":12549120,"br":12706816,"bt":3798016,"c":[],"cl":2,"dom":1,"frc":1,"h":"sz","i":371,"its":0,"l":13,"n":"","p":"suizhou_371","s":5573965,"v":485,"x":12622550,"y":3700859},{"4k":0,"bb":3640320,"bl":12331008,"br":12594176,"bt":3823616,"c":[],"cl":2,"dom":1,"frc":1,"h":"xf","i":156,"its":0,"l":12,"n":"","p":"xiangfan_156","s":10449494,"v":485,"x":12482289,"y":3742391},{"4k":0,"bb":3358720,"bl":12639232,"br":12800000,"bt":3521536,"c":[],"cl":2,"dom":1,"frc":1,"h":"xn","i":362,"its":0,"l":13,"n":"","p":"xianning_362","s":5400529,"v":485,"x":12727180,"y":3462453},{"4k":0,"bb":3530752,"bl":12614656,"br":12758016,"bt":3722240,"c":[],"cl":2,"dom":1,"frc":1,"h":"xg","i":310,"its":0,"l":13,"n":"Т","p":"xiaogan_310","s":7065473,"v":485,"x":12681984,"y":3601589},{"4k":0,"bb":3475456,"bl":12273664,"br":12478464,"bt":3686400,"c":[],"cl":2,"dom":1,"frc":1,"h":"yc","i":270,"its":0,"l":13,"n":"˲","p":"yichang_270","s":10619913,"v":485,"x":12389211,"y":3571525}],"cl":1,"dom":1,"frc":1,"h":"","i":16,"its":0,"l":12,"n":"ʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":5322752,"bl":13864960,"br":14149632,"bt":5632000,"c":[],"cl":2,"dom":1,"frc":1,"h":"cc","i":53,"its":1,"l":12,"n":"","p":"changchun_53","s":27629256,"v":485,"x":13951841,"y":5408059},{"4k":0,"bb":5471232,"bl":13541376,"br":13846528,"bt":5799936,"c":[],"cl":2,"dom":1,"frc":1,"h":"bc","i":51,"its":0,"l":13,"n":"׳","p":"baicheng_51","s":5415093,"v":485,"x":13675225,"y":5689688},{"4k":0,"bb":5038080,"bl":14040064,"br":14285824,"bt":5257216,"c":[],"cl":2,"dom":0,"frc":1,"h":"bs","i":57,"its":0,"l":13,"n":"ɽ","p":"baishan_57","s":3892558,"v":485,"x":14074329,"y":5124097},{"4k":0,"bb":5217280,"bl":13987840,"br":14252032,"bt":5537792,"c":[],"cl":2,"dom":1,"frc":1,"h":"jl","i":55,"its":0,"l":12,"n":"","p":"jilin_55","s":10657011,"v":485,"x":14088310,"y":5411378},{"4k":0,"bb":5177344,"bl":13897728,"br":14010368,"bt":5319680,"c":[],"cl":2,"dom":1,"frc":1,"h":"ly","i":183,"its":0,"l":13,"n":"Դ","p":"liaoyuan_183","s":2494486,"v":485,"x":13931797,"y":5266538},{"4k":0,"bb":5256192,"bl":13726720,"br":14003200,"bt":5460992,"c":[],"cl":2,"dom":1,"frc":1,"h":"sp","i":56,"its":0,"l":12,"n":"ƽ","p":"siping_56","s":5432819,"v":485,"x":13843452,"y":5308675},{"4k":0,"bb":5434368,"bl":13705216,"br":14049280,"bt":5678080,"c":[],"cl":2,"dom":1,"frc":1,"h":"sy","i":52,"its":0,"l":13,"n":"ԭ","p":"songyuan_52","s":6165370,"v":485,"x":13896307,"y":5614195},{"4k":0,"bb":4964352,"bl":13944832,"br":14111744,"bt":5286912,"c":[],"cl":2,"dom":1,"frc":1,"h":"th","i":165,"its":0,"l":13,"n":"ͨ","p":"tonghua_165","s":4980736,"v":485,"x":14020453,"y":5092491},{"4k":0,"bb":5132288,"bl":14190592,"br":14619648,"bt":5516288,"c":[],"cl":2,"dom":1,"frc":1,"h":"ybcxzzz","i":54,"its":0,"l":11,"n":"ӱ߳","p":"yanbianchaoxianzuzizhi_54","s":7275612,"v":485,"x":14417767,"y":5266979}],"cl":1,"dom":1,"frc":1,"h":"","i":17,"its":0,"l":12,"n":"ʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":3640320,"bl":13176832,"br":13275136,"bt":3822592,"c":[],"cl":2,"dom":1,"frc":1,"h":"nj","i":315,"its":1,"l":12,"n":"Ͼ","p":"nanjing_315","s":38641849,"v":485,"x":13225203,"y":3748900},{"4k":0,"bb":3630080,"bl":13262848,"br":13382656,"bt":3749888,"c":[],"cl":2,"dom":1,"frc":1,"h":"cz","i":348,"its":1,"l":12,"n":"","p":"changzhou_348","s":23459177,"v":485,"x":13356064,"y":3716504},{"4k":0,"bb":3834880,"bl":13160448,"br":13320192,"bt":4018176,"c":[],"cl":2,"dom":1,"frc":1,"h":"ha","i":162,"its":0,"l":12,"n":"","p":"huaian_162","s":12743209,"v":485,"x":13249618,"y":3953531},{"4k":0,"bb":4001792,"bl":13181952,"br":13342720,"bt":4157440,"c":[],"cl":2,"dom":1,"frc":1,"h":"lyg","i":347,"its":0,"l":12,"n":"Ƹ","p":"lianyungang_347","s":7602168,"v":485,"x":13272582,"y":4085419},{"4k":0,"bb":3690496,"bl":13381632,"br":13582336,"bt":3834880,"c":[],"cl":2,"dom":1,"frc":1,"h":"nt","i":161,"its":1,"l":12,"n":"ͨ","p":"nantong_161","s":26859830,"v":485,"x":13458552,"y":3738896},{"4k":0,"bb":3890176,"bl":13129728,"br":13267968,"bt":4062208,"c":[],"cl":2,"dom":1,"frc":1,"h":"sq","i":277,"its":0,"l":13,"n":"Ǩ","p":"suqian_277","s":7904567,"v":485,"x":13167242,"y":4000369},{"4k":0,"bb":3579904,"bl":13349888,"br":13513728,"bt":3745792,"c":[],"cl":2,"dom":1,"frc":1,"h":"sz","i":224,"its":1,"l":12,"n":"","p":"suzhou_224","s":53178559,"v":485,"x":13424106,"y":3650006},{"4k":0,"bb":3731456,"bl":13319168,"br":13421568,"bt":3902464,"c":[],"cl":2,"dom":1,"frc":1,"h":"tz","i":276,"its":0,"l":13,"n":"̩","p":"taizhou_276","s":11354118,"v":485,"x":13350650,"y":3800790},{"4k":0,"bb":3625984,"bl":13304832,"br":13426688,"bt":3739648,"c":[],"cl":2,"dom":1,"frc":1,"h":"wx","i":317,"its":1,"l":12,"n":"","p":"wuxi_317","s":33409166,"v":485,"x":13392937,"y":3684628},{"4k":0,"bb":3966976,"bl":12953600,"br":13211648,"bt":4132864,"c":[],"cl":2,"dom":1,"frc":1,"h":"xz","i":316,"its":0,"l":12,"n":"","p":"xuzhou_316","s":21593867,"v":485,"x":13057066,"y":4032807},{"4k":0,"bb":3816448,"bl":13298688,"br":13470720,"bt":4078592,"c":[],"cl":2,"dom":1,"frc":1,"h":"yc","i":223,"its":0,"l":12,"n":"γ","p":"yancheng_223","s":14457702,"v":485,"x":13377206,"y":3918849},{"4k":0,"bb":3769344,"bl":13249536,"br":13349888,"bt":3928064,"c":[],"cl":2,"dom":1,"frc":1,"h":"yz","i":346,"its":0,"l":13,"n":"","p":"yangzhou_346","s":14771798,"v":485,"x":13293904,"y":3792830},{"4k":0,"bb":3691520,"bl":13244416,"br":13358080,"bt":3783680,"c":[],"cl":2,"dom":1,"frc":1,"h":"zj","i":160,"its":0,"l":13,"n":"","p":"zhenjiang_160","s":12100558,"v":485,"x":13298752,"y":3767387}],"cl":1,"dom":1,"frc":1,"h":"","i":18,"its":0,"l":12,"n":"ʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":3249152,"bl":12851200,"br":12977152,"bt":3378176,"c":[],"cl":2,"dom":1,"frc":1,"h":"nc","i":163,"its":1,"l":12,"n":"ϲ","p":"nanchang_163","s":18014814,"v":485,"x":12898192,"y":3315314},{"4k":0,"bb":3041280,"bl":12867584,"br":13059072,"bt":3292160,"c":[],"cl":2,"dom":1,"frc":1,"h":"fz","i":226,"its":0,"l":13,"n":"","p":"fuzhou_226","s":6971221,"v":485,"x":12954062,"y":3222988},{"4k":0,"bb":2795520,"bl":12681216,"br":12986368,"bt":3123200,"c":[],"cl":2,"dom":1,"frc":1,"h":"gz","i":365,"its":0,"l":13,"n":"","p":"ganzhou_365","s":14593537,"v":485,"x":12795194,"y":2959921},{"4k":0,"bb":2976768,"bl":12672000,"br":12907520,"bt":3225600,"c":[],"cl":2,"dom":1,"frc":1,"h":"ja","i":318,"its":0,"l":13,"n":"","p":"jian_318","s":10033126,"v":485,"x":12801910,"y":3118785},{"4k":0,"bb":3319808,"bl":13020160,"br":13105152,"bt":3474432,"c":[],"cl":2,"dom":1,"frc":1,"h":"jdz","i":225,"its":0,"l":12,"n":"","p":"jingdezhen_225","s":2708480,"v":485,"x":13045112,"y":3389524},{"4k":0,"bb":3315712,"bl":12684288,"br":13015040,"bt":3492864,"c":[],"cl":2,"dom":1,"frc":1,"h":"jj","i":349,"its":0,"l":13,"n":"Ž","p":"jiujiang_349","s":10564942,"v":485,"x":12914091,"y":3445125},{"4k":0,"bb":3098624,"bl":12643328,"br":12722176,"bt":3230720,"c":[],"cl":2,"dom":1,"frc":1,"h":"px","i":350,"its":0,"l":13,"n":"Ƽ","p":"pingxiang_350","s":2559483,"v":485,"x":12675065,"y":3182257},{"4k":0,"bb":3204096,"bl":12939264,"br":13191168,"bt":3444736,"c":[],"cl":2,"dom":1,"frc":1,"h":"sr","i":364,"its":0,"l":13,"n":"","p":"shangrao_364","s":11685496,"v":485,"x":13130280,"y":3286655},{"4k":0,"bb":3170304,"bl":12744704,"br":12848128,"bt":3244032,"c":[],"cl":2,"dom":1,"frc":1,"h":"xy","i":164,"its":0,"l":13,"n":"","p":"xinyu_164","s":2298089,"v":485,"x":12793382,"y":3206619},{"4k":0,"bb":3172352,"bl":12678144,"br":12931072,"bt":3368960,"c":[],"cl":2,"dom":1,"frc":1,"h":"yc","i":278,"its":0,"l":13,"n":"˴","p":"yichun_278","s":10309484,"v":485,"x":12737614,"y":3206242},{"4k":0,"bb":3209216,"bl":12990464,"br":13078528,"bt":3308544,"c":[],"cl":2,"dom":0,"frc":1,"h":"yt","i":279,"its":0,"l":13,"n":"ӥ̶","p":"yingtan_279","s":2146682,"v":485,"x":13032956,"y":3262116}],"cl":1,"dom":1,"frc":1,"h":"","i":19,"its":0,"l":12,"n":"ʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":5013504,"bl":13628416,"br":13784064,"bt":5291008,"c":[],"cl":2,"dom":1,"frc":1,"h":"sy","i":58,"its":1,"l":12,"n":"","p":"shenyang_58","s":27084176,"v":485,"x":13741315,"y":5103986},{"4k":0,"bb":4838400,"bl":13601792,"br":13778944,"bt":5069824,"c":[],"cl":2,"dom":1,"frc":1,"h":"as","i":320,"its":0,"l":13,"n":"ɽ","p":"anshan_320","s":5794770,"v":485,"x":13692591,"y":5000938},{"4k":0,"bb":4957184,"bl":13758464,"br":14004224,"bt":5069824,"c":[],"cl":2,"dom":1,"frc":1,"h":"bx","i":227,"its":0,"l":12,"n":"Ϫ","p":"benxi_227","s":3300071,"v":485,"x":13778549,"y":5028203},{"4k":0,"bb":4925440,"bl":13230080,"br":13504512,"bt":5190656,"c":[],"cl":2,"dom":1,"frc":1,"h":"cy","i":280,"its":0,"l":13,"n":"","p":"chaoyang_280","s":5998133,"v":485,"x":13409390,"y":5069570},{"4k":0,"bb":4648960,"bl":13461504,"br":13753344,"bt":4869120,"c":[],"cl":2,"dom":1,"frc":1,"h":"dl","i":167,"its":1,"l":12,"n":"","p":"dalian_167","s":29336327,"v":485,"x":13538978,"y":4683029},{"4k":0,"bb":4793344,"bl":13734912,"br":13996032,"bt":5008384,"c":[],"cl":2,"dom":1,"frc":1,"h":"dd","i":282,"its":0,"l":12,"n":"","p":"dandong_282","s":6272515,"v":485,"x":13847372,"y":4857436},{"4k":0,"bb":5019648,"bl":13767680,"br":13970432,"bt":5204992,"c":[],"cl":2,"dom":1,"frc":1,"h":"fs","i":184,"its":0,"l":12,"n":"˳","p":"fushun_184","s":4149515,"v":485,"x":13799757,"y":5115277},{"4k":0,"bb":5087232,"bl":13471744,"br":13690880,"bt":5260288,"c":[],"cl":2,"dom":1,"frc":1,"h":"fx","i":59,"its":0,"l":14,"n":"","p":"fuxin_59","s":4041306,"v":485,"x":13545115,"y":5136296},{"4k":0,"bb":4832256,"bl":13271040,"br":13481984,"bt":5015552,"c":[],"cl":2,"dom":1,"frc":1,"h":"hld","i":319,"its":0,"l":13,"n":"«","p":"huludao_319","s":4960690,"v":485,"x":13452371,"y":4942605},{"4k":0,"bb":4944896,"bl":13438976,"br":13648896,"bt":5152768,"c":[],"cl":2,"dom":1,"frc":1,"h":"jz","i":166,"its":0,"l":13,"n":"","p":"jinzhou_166","s":4554229,"v":485,"x":13484681,"y":4998877},{"4k":0,"bb":4941824,"bl":13646848,"br":13770752,"bt":5075968,"c":[],"cl":2,"dom":1,"frc":1,"h":"ly","i":351,"its":1,"l":14,"n":"","p":"liaoyang_351","s":3312274,"v":485,"x":13712505,"y":5024558},{"4k":0,"bb":4931584,"bl":13522944,"br":13629440,"bt":5052416,"c":[],"cl":2,"dom":1,"frc":1,"h":"pj","i":228,"its":0,"l":13,"n":"̽","p":"panjin_228","s":5370607,"v":485,"x":13589726,"y":5002567},{"4k":0,"bb":5130240,"bl":13743104,"br":13928448,"bt":5358592,"c":[],"cl":2,"dom":0,"frc":1,"h":"tl","i":60,"its":0,"l":13,"n":"","p":"tieling_60","s":6020686,"v":485,"x":13786935,"y":5175882},{"4k":0,"bb":4827136,"bl":13565952,"br":13694976,"bt":4976640,"c":[],"cl":2,"dom":1,"frc":1,"h":"yk","i":281,"its":0,"l":13,"n":"Ӫ","p":"yingkou_281","s":4499178,"v":485,"x":13608007,"y":4936054}],"cl":1,"dom":1,"frc":1,"h":"","i":20,"its":0,"l":12,"n":"ʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":4779008,"bl":12303360,"br":12503040,"bt":5042176,"c":[],"cl":2,"dom":1,"frc":1,"h":"hhht","i":321,"its":1,"l":12,"n":"ͺ","p":"huhehaote_321","s":10962735,"v":485,"x":12440951,"y":4961799},{"4k":0,"bb":4469760,"bl":10817536,"br":11897856,"bt":5253120,"c":[],"cl":2,"dom":1,"frc":1,"h":"als","i":230,"its":0,"l":14,"n":"","p":"alashan_230","s":7942512,"v":485,"x":11770534,"y":4674264},{"4k":0,"bb":4874240,"bl":12162048,"br":12407808,"bt":5243904,"c":[],"cl":2,"dom":1,"frc":1,"h":"bt","i":229,"its":0,"l":12,"n":"ͷ","p":"baotou_229","s":9869047,"v":485,"x":12228223,"y":4934685},{"4k":0,"bb":4862976,"bl":11711488,"br":12235776,"bt":5202944,"c":[],"cl":2,"dom":1,"frc":1,"h":"byne","i":169,"its":0,"l":12,"n":"׶","p":"bayannaoer_169","s":8435886,"v":485,"x":11955189,"y":4947297},{"4k":0,"bb":5026816,"bl":12954624,"br":13469696,"bt":5630976,"c":[],"cl":2,"dom":1,"frc":1,"h":"cf","i":297,"its":0,"l":12,"n":"","p":"chifeng_297","s":13030361,"v":485,"x":13235547,"y":5171651},{"4k":0,"bb":4499456,"bl":11852800,"br":12409856,"bt":4968448,"c":[],"cl":2,"dom":1,"frc":1,"h":"eeds","i":283,"its":0,"l":12,"n":"˹","p":"eerduosi_283","s":13703727,"v":485,"x":12221783,"y":4782542},{"4k":0,"bb":5926912,"bl":12861440,"br":14035968,"bt":7012352,"c":[],"cl":2,"dom":1,"frc":1,"h":"hlbe","i":61,"its":0,"l":12,"n":"ױ","p":"hulunbeier_61","s":15759385,"v":485,"x":13333126,"y":6279265},{"4k":0,"bb":5169152,"bl":13274112,"br":13773824,"bt":5700608,"c":[],"cl":2,"dom":1,"frc":1,"h":"tl","i":64,"its":0,"l":12,"n":"ͨ","p":"tongliao_64","s":8570586,"v":485,"x":13611422,"y":5377940},{"4k":0,"bb":4700160,"bl":11866112,"br":11932672,"bt":4826112,"c":[],"cl":2,"dom":1,"frc":1,"h":"wh","i":123,"its":0,"l":13,"n":"ں","p":"wuhai_123","s":1192261,"v":485,"x":11888982,"y":4789144},{"4k":0,"bb":4861952,"bl":12282880,"br":12782592,"bt":5342208,"c":[],"cl":2,"dom":1,"frc":1,"h":"wlcb","i":168,"its":0,"l":12,"n":"첼","p":"wulanchabu_168","s":7437432,"v":485,"x":12594855,"y":4984080},{"4k":0,"bb":5069824,"bl":12374016,"br":13373440,"bt":5875712,"c":[],"cl":2,"dom":1,"frc":1,"h":"xlgl","i":63,"its":0,"l":11,"n":"ֹ","p":"xilinguole_63","s":10220699,"v":485,"x":12919227,"y":5426157},{"4k":0,"bb":5475328,"bl":13300736,"br":13765632,"bt":6020096,"c":[],"cl":2,"dom":0,"frc":1,"h":"xa","i":62,"its":0,"l":11,"n":"˰","p":"xingan_62","s":6386258,"v":485,"x":13589292,"y":5762674}],"cl":1,"dom":1,"frc":1,"h":"","i":21,"its":0,"l":12,"n":"ɹ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":4481024,"bl":11782144,"br":11897856,"bt":4677632,"c":[],"cl":2,"dom":1,"frc":1,"h":"yc","i":360,"its":0,"l":12,"n":"","p":"yinchuan_360","s":9617307,"v":485,"x":11826597,"y":4622375},{"4k":0,"bb":4171776,"bl":11724800,"br":11908096,"bt":4363264,"c":[],"cl":2,"dom":1,"frc":1,"h":"gy","i":246,"its":0,"l":13,"n":"ԭ","p":"guyuan_246","s":3742631,"v":485,"x":11827732,"y":4278232},{"4k":0,"bb":4640768,"bl":11798528,"br":11911168,"bt":4752384,"c":[],"cl":2,"dom":1,"frc":1,"h":"szs","i":335,"its":0,"l":13,"n":"ʯɽ","p":"shizuishan_335","s":2070658,"v":485,"x":11841713,"y":4698079},{"4k":0,"bb":4354048,"bl":11755520,"br":11985920,"bt":4591616,"c":[],"cl":2,"dom":1,"frc":1,"h":"wz","i":322,"its":0,"l":14,"n":"","p":"wuzhong_322","s":3836811,"v":485,"x":11822833,"y":4553416},{"4k":0,"bb":4292608,"bl":11610112,"br":11820032,"bt":4519936,"c":[],"cl":2,"dom":1,"frc":1,"h":"zw","i":181,"its":0,"l":14,"n":"","p":"zhongwei_181","s":2995899,"v":485,"x":11711309,"y":4483610}],"cl":1,"dom":1,"frc":1,"h":"","i":22,"its":0,"l":12,"n":"Ļ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":4306944,"bl":11233280,"br":11345920,"bt":4470784,"c":[],"cl":2,"dom":1,"frc":1,"h":"xn","i":66,"its":0,"l":12,"n":"","p":"xining_66","s":4362643,"v":485,"x":11330696,"y":4361026},{"4k":0,"bb":3808256,"bl":10796032,"br":11331584,"bt":4219904,"c":[],"cl":2,"dom":0,"frc":1,"h":"glzzzz","i":72,"its":0,"l":11,"n":"","p":"guoluozangzuzizhi_72","s":11672001,"v":485,"x":11160049,"y":4068648},{"4k":0,"bb":4376576,"bl":10919936,"br":11427840,"bt":4708352,"c":[],"cl":2,"dom":1,"frc":1,"h":"hbzzzz","i":67,"its":0,"l":11,"n":"","p":"haibeizangzuzizhi_67","s":7122857,"v":485,"x":11233081,"y":4407700},{"4k":0,"bb":4200448,"bl":11318272,"br":11474944,"bt":4434944,"c":[],"cl":2,"dom":1,"frc":1,"h":"hdd","i":69,"its":0,"l":11,"n":"","p":"haidongdi_69","s":4260496,"v":485,"x":11367014,"y":4345117},{"4k":0,"bb":4090880,"bl":11013120,"br":11333632,"bt":4447232,"c":[],"cl":2,"dom":0,"frc":1,"h":"hnzzzz","i":68,"its":0,"l":11,"n":"ϲ","p":"hainanzangzuzizhi_68","s":9185143,"v":485,"x":11201876,"y":4315366},{"4k":0,"bb":3834880,"bl":9978880,"br":11109376,"bt":4727808,"c":[],"cl":2,"dom":1,"frc":1,"h":"hxmgzzzzz","i":65,"its":0,"l":11,"n":"ɹ","p":"haiximengguzuzangzuzizhi_65","s":37773863,"v":485,"x":10839989,"y":4466394},{"4k":0,"bb":4014080,"bl":11208704,"br":11406336,"bt":4299776,"c":[],"cl":2,"dom":0,"frc":1,"h":"hnzzzz","i":70,"its":0,"l":11,"n":"ϲ","p":"huangnanzangzuzizhi_70","s":4634785,"v":485,"x":11357143,"y":4210539},{"4k":0,"bb":3688448,"bl":9953280,"br":10886144,"bt":4315136,"c":[],"cl":2,"dom":0,"frc":1,"h":"yszzzz","i":71,"its":0,"l":14,"n":"","p":"yushuzangzuzizhi_71","s":10447539,"v":485,"x":10799563,"y":3873278}],"cl":1,"dom":1,"frc":1,"h":"","i":23,"its":0,"l":12,"n":"ຣʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":4279296,"bl":12938240,"br":13109248,"bt":4489216,"c":[],"cl":2,"dom":1,"frc":1,"h":"jn","i":288,"its":1,"l":12,"n":"","p":"jinan_288","s":23384024,"v":485,"x":13024668,"y":4367676},{"4k":0,"bb":4370432,"bl":13053952,"br":13179904,"bt":4597760,"c":[],"cl":2,"dom":1,"frc":1,"h":"bz","i":235,"its":0,"l":12,"n":"","p":"binzhou_235","s":7137435,"v":485,"x":13133505,"y":4467148},{"4k":0,"bb":4331520,"bl":12887040,"br":13092864,"bt":4555776,"c":[],"cl":2,"dom":1,"frc":1,"h":"dz","i":372,"its":0,"l":12,"n":"","p":"dezhou_372","s":9738994,"v":485,"x":12953925,"y":4474579},{"4k":0,"bb":4405248,"bl":13148160,"br":13286400,"bt":4577280,"c":[],"cl":2,"dom":1,"frc":1,"h":"dy","i":174,"its":0,"l":12,"n":"Ӫ","p":"dongying_174","s":6175922,"v":485,"x":13211657,"y":4474396},{"4k":0,"bb":4078592,"bl":12782592,"br":12960768,"bt":4257792,"c":[],"cl":2,"dom":1,"frc":1,"h":"hz","i":353,"its":0,"l":13,"n":"","p":"heze_353","s":8937198,"v":485,"x":12856115,"y":4171574},{"4k":0,"bb":4065280,"bl":12898304,"br":13091840,"bt":4274176,"c":[],"cl":2,"dom":1,"frc":1,"h":"jn","i":286,"its":0,"l":13,"n":"","p":"jining_286","s":11071454,"v":485,"x":12979309,"y":4196147},{"4k":0,"bb":4274176,"bl":13061120,"br":13133824,"bt":4353024,"c":[],"cl":2,"dom":1,"frc":1,"h":"lw","i":124,"its":0,"l":13,"n":"","p":"laiwu_124","s":2310993,"v":485,"x":13100578,"y":4305364},{"4k":0,"bb":4245504,"bl":12833792,"br":12975104,"bt":4417536,"c":[],"cl":2,"dom":1,"frc":1,"h":"lc","i":366,"its":0,"l":12,"n":"ij","p":"liaocheng_366","s":7818453,"v":485,"x":12912298,"y":4338843},{"4k":0,"bb":4056064,"bl":13071360,"br":13271040,"bt":4304896,"c":[],"cl":2,"dom":1,"frc":1,"h":"ly","i":234,"its":0,"l":12,"n":"","p":"linyi_234","s":22173355,"v":485,"x":13176250,"y":4154108},{"4k":0,"bb":4210688,"bl":13304832,"br":13516800,"bt":4434944,"c":[],"cl":2,"dom":1,"frc":1,"h":"qd","i":236,"its":1,"l":12,"n":"ൺ","p":"qingdao_236","s":37797874,"v":485,"x":13401836,"y":4285189},{"4k":0,"bb":4133888,"bl":13203456,"br":13353984,"bt":4282368,"c":[],"cl":2,"dom":1,"frc":1,"h":"rz","i":173,"its":0,"l":12,"n":"","p":"rizhao_173","s":5702916,"v":485,"x":13306565,"y":4196491},{"4k":0,"bb":4225024,"bl":12918784,"br":13136896,"bt":4341760,"c":[],"cl":2,"dom":1,"frc":1,"h":"ta","i":325,"its":0,"l":13,"n":"̩","p":"taian_325","s":9046734,"v":485,"x":13035086,"y":4303515},{"4k":0,"bb":4236288,"bl":13155328,"br":13361152,"bt":4460544,"c":[],"cl":2,"dom":1,"frc":1,"h":"wf","i":287,"its":0,"l":12,"n":"Ϋ","p":"weifang_287","s":24735396,"v":485,"x":13265880,"y":4373425},{"4k":0,"bb":4368384,"bl":13490176,"br":13663232,"bt":4499456,"c":[],"cl":2,"dom":1,"frc":1,"h":"wh","i":175,"its":0,"l":13,"n":"","p":"weihai_175","s":10998434,"v":485,"x":13595391,"y":4485484},{"4k":0,"bb":4353024,"bl":13308928,"br":13574144,"bt":4619264,"c":[],"cl":2,"dom":1,"frc":1,"h":"yt","i":326,"its":1,"l":12,"n":"̨","p":"yantai_326","s":27263283,"v":485,"x":13520355,"y":4478575},{"4k":0,"bb":4067328,"bl":13003776,"br":13118464,"bt":4184064,"c":[],"cl":2,"dom":1,"frc":1,"h":"zz","i":172,"its":0,"l":13,"n":"ׯ","p":"zaozhuang_172","s":7078974,"v":485,"x":13061296,"y":4114535},{"4k":0,"bb":4264960,"bl":13085696,"br":13195264,"bt":4454400,"c":[],"cl":2,"dom":1,"frc":1,"h":"zb","i":354,"its":0,"l":12,"n":"Ͳ","p":"zibo_354","s":9598870,"v":485,"x":13142661,"y":4388086}],"cl":1,"dom":1,"frc":1,"h":"","i":24,"its":0,"l":12,"n":"ɽʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":4476928,"bl":12413952,"br":12598272,"bt":4614144,"c":[],"cl":2,"dom":1,"frc":1,"h":"ty","i":176,"its":1,"l":12,"n":"̫ԭ","p":"taiyuan_176","s":12531457,"v":485,"x":12529931,"y":4535569},{"4k":0,"bb":4251648,"bl":12466176,"br":12662784,"bt":4431872,"c":[],"cl":2,"dom":1,"frc":1,"h":"cz","i":356,"its":0,"l":12,"n":"","p":"changzhi_356","s":6229425,"v":485,"x":12592912,"y":4302899},{"4k":0,"bb":4702208,"bl":12532736,"br":12753920,"bt":4947968,"c":[],"cl":2,"dom":1,"frc":1,"h":"dt","i":355,"its":0,"l":12,"n":"ͬ","p":"datong_355","s":6628574,"v":485,"x":12613353,"y":4850173},{"4k":0,"bb":4166656,"bl":12461056,"br":12650496,"bt":4285440,"c":[],"cl":2,"dom":1,"frc":1,"h":"jc","i":290,"its":0,"l":13,"n":"","p":"jincheng_290","s":4646074,"v":485,"x":12563313,"y":4206695},{"4k":0,"bb":4364288,"bl":12402688,"br":12707840,"bt":4567040,"c":[],"cl":2,"dom":1,"frc":1,"h":"jz","i":238,"its":0,"l":13,"n":"","p":"jinzhong_238","s":6858126,"v":485,"x":12552450,"y":4509743},{"4k":0,"bb":4192256,"bl":12286976,"br":12532736,"bt":4405248,"c":[],"cl":2,"dom":1,"frc":1,"h":"lf","i":368,"its":0,"l":13,"n":"ٷ","p":"linfen_368","s":8009311,"v":485,"x":12415097,"y":4288128},{"4k":0,"bb":4376576,"bl":12286976,"br":12506112,"bt":4657152,"c":[],"cl":2,"dom":1,"frc":1,"h":"ll","i":327,"its":0,"l":14,"n":"","p":"lvliang_327","s":6903925,"v":485,"x":12373327,"y":4486172},{"4k":0,"bb":4707328,"bl":12456960,"br":12644352,"bt":4883456,"c":[],"cl":2,"dom":1,"frc":1,"h":"sz","i":237,"its":0,"l":13,"n":"˷","p":"shuozhou_237","s":4007922,"v":485,"x":12516820,"y":4742727},{"4k":0,"bb":4572160,"bl":12350464,"br":12688384,"bt":4791296,"c":[],"cl":2,"dom":1,"frc":1,"h":"xz","i":367,"its":0,"l":12,"n":"","p":"xinzhou_367","s":8721684,"v":485,"x":12550385,"y":4612464},{"4k":0,"bb":4505600,"bl":12570624,"br":12696576,"bt":4628480,"c":[],"cl":2,"dom":1,"frc":1,"h":"yq","i":357,"its":0,"l":13,"n":"Ȫ","p":"yangquan_357","s":2602245,"v":485,"x":12644594,"y":4533526},{"4k":0,"bb":4083712,"bl":12269568,"br":12478464,"bt":4252672,"c":[],"cl":2,"dom":1,"frc":1,"h":"yc","i":328,"its":0,"l":13,"n":"˳","p":"yuncheng_328","s":6545029,"v":485,"x":12358087,"y":4143555}],"cl":1,"dom":1,"frc":1,"h":"","i":25,"its":0,"l":12,"n":"ɽʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":3963904,"bl":11981824,"br":12226560,"bt":4106240,"c":[],"cl":2,"dom":1,"frc":1,"h":"xa","i":233,"its":1,"l":12,"n":"","p":"xian_233","s":28211872,"v":485,"x":12128454,"y":4040988},{"4k":0,"bb":3701760,"bl":12025856,"br":12269568,"bt":3984384,"c":[],"cl":2,"dom":1,"frc":1,"h":"ak","i":324,"its":0,"l":13,"n":"","p":"ankang_324","s":5893874,"v":485,"x":12137954,"y":3831013},{"4k":0,"bb":3948544,"bl":11834368,"br":12029952,"bt":4154368,"c":[],"cl":2,"dom":1,"frc":1,"h":"bj","i":171,"its":0,"l":12,"n":"","p":"baoji_171","s":6264311,"v":485,"x":11938466,"y":4053945},{"4k":0,"bb":3760128,"bl":11743232,"br":12055552,"bt":3989504,"c":[],"cl":2,"dom":1,"frc":1,"h":"hz","i":352,"its":0,"l":13,"n":"","p":"hanzhong_352","s":7455934,"v":485,"x":11914640,"y":3881567},{"4k":0,"bb":3885056,"bl":12087296,"br":12361728,"bt":4064256,"c":[],"cl":2,"dom":1,"frc":1,"h":"sl","i":285,"its":0,"l":13,"n":"","p":"shangluo_285","s":5151316,"v":485,"x":12239364,"y":3988197},{"4k":0,"bb":4113408,"bl":12087296,"br":12190720,"bt":4219904,"c":[],"cl":2,"dom":1,"frc":1,"h":"tc","i":232,"its":0,"l":13,"n":"ͭ","p":"tongchuan_232","s":1701231,"v":485,"x":12128563,"y":4126025},{"4k":0,"bb":4032512,"bl":12130304,"br":12313600,"bt":4256768,"c":[],"cl":2,"dom":1,"frc":1,"h":"wn","i":170,"its":0,"l":13,"n":"μ","p":"weinan_170","s":7658350,"v":485,"x":12191480,"y":4072478},{"4k":0,"bb":4031488,"bl":11983872,"br":12154880,"bt":4214784,"c":[],"cl":2,"dom":0,"frc":1,"h":"xy","i":323,"its":0,"l":13,"n":"","p":"xianyang_323","s":12105893,"v":485,"x":12102309,"y":4049630},{"4k":0,"bb":4186112,"bl":11984896,"br":12308480,"bt":4484096,"c":[],"cl":2,"dom":1,"frc":1,"h":"ya","i":284,"its":0,"l":13,"n":"Ӱ","p":"yanan_284","s":8206673,"v":485,"x":12189211,"y":4356543},{"4k":0,"bb":4388864,"bl":11940864,"br":12385280,"bt":4780032,"c":[],"cl":2,"dom":1,"frc":1,"h":"yl","i":231,"its":0,"l":12,"n":"","p":"yulin_231","s":10727446,"v":485,"x":12216466,"y":4593876}],"cl":1,"dom":1,"frc":1,"h":"","i":26,"its":0,"l":12,"n":"ʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":3493888,"bl":11468800,"br":11677696,"bt":3667968,"c":[],"cl":2,"dom":1,"frc":1,"h":"cd","i":75,"its":1,"l":12,"n":"ɶ","p":"chengdu_75","s":59315553,"v":485,"x":11585284,"y":3567299},{"4k":0,"bb":3558400,"bl":11191296,"br":11627520,"bt":4047872,"c":[],"cl":2,"dom":0,"frc":1,"h":"abzzqzzz","i":185,"its":0,"l":15,"n":"ӲǼ","p":"abazangzuqiangzuzizhi_185","s":6444640,"v":485,"x":11380447,"y":3728135},{"4k":0,"bb":3643392,"bl":11841536,"br":11997184,"bt":3838976,"c":[],"cl":2,"dom":1,"frc":1,"h":"bz","i":239,"its":0,"l":14,"n":"","p":"bazhong_239","s":5612045,"v":485,"x":11883644,"y":3723601},{"4k":0,"bb":3523584,"bl":11874304,"br":12085248,"bt":3785728,"c":[],"cl":2,"dom":0,"frc":1,"h":"dz","i":369,"its":0,"l":14,"n":"","p":"dazhou_369","s":7526982,"v":485,"x":11964137,"y":3638270},{"4k":0,"bb":3549184,"bl":11554816,"br":11709440,"bt":3702784,"c":[],"cl":2,"dom":1,"frc":1,"h":"dy","i":74,"its":0,"l":13,"n":"","p":"deyang_74","s":6916250,"v":485,"x":11622361,"y":3627752},{"4k":0,"bb":3223552,"bl":10838016,"br":11411456,"bt":4032512,"c":[],"cl":2,"dom":0,"frc":1,"h":"gzzzzz","i":73,"its":0,"l":15,"n":"β","p":"ganzizangzuzizhi_73","s":12219955,"v":485,"x":11351269,"y":3489052},{"4k":0,"bb":3484672,"bl":11794432,"br":11947008,"bt":3593216,"c":[],"cl":2,"dom":1,"frc":1,"h":"ga","i":241,"its":0,"l":13,"n":"㰲","p":"guangan_241","s":4681270,"v":485,"x":11871214,"y":3541176},{"4k":0,"bb":3679232,"bl":11645952,"br":11886592,"bt":3864576,"c":[],"cl":2,"dom":1,"frc":1,"h":"gy","i":329,"its":0,"l":13,"n":"Ԫ","p":"guangyuan_329","s":6183820,"v":485,"x":11783826,"y":3798100},{"4k":0,"bb":3281920,"bl":11456512,"br":11607040,"bt":3474432,"c":[],"cl":2,"dom":1,"frc":1,"h":"ls","i":79,"its":0,"l":13,"n":"ɽ","p":"leshan_79","s":5807368,"v":485,"x":11551963,"y":3425607},{"4k":0,"bb":2985984,"bl":11139072,"br":11565056,"bt":3394560,"c":[],"cl":2,"dom":1,"frc":1,"h":"lsyzzz","i":80,"its":0,"l":14,"n":"ɽ","p":"liangshanyizuzizhi_80","s":11336030,"v":485,"x":11385209,"y":3214652},{"4k":0,"bb":3186688,"bl":11705344,"br":11843584,"bt":3397632,"c":[],"cl":2,"dom":1,"frc":1,"h":"lz","i":331,"its":0,"l":14,"n":"","p":"luzhou_331","s":8283048,"v":485,"x":11738667,"y":3339250},{"4k":0,"bb":3405824,"bl":11449344,"br":11634688,"bt":3529728,"c":[],"cl":2,"dom":1,"frc":1,"h":"ms","i":77,"its":0,"l":13,"n":"üɽ","p":"meishan_77","s":5885028,"v":485,"x":11561223,"y":3492386},{"4k":0,"bb":3572736,"bl":11549696,"br":11770880,"bt":3878912,"c":[],"cl":2,"dom":1,"frc":1,"h":"my","i":240,"its":0,"l":12,"n":"","p":"mianyang_240","s":11018551,"v":485,"x":11653672,"y":3671857},{"4k":0,"bb":3540992,"bl":11738112,"br":11909120,"bt":3722240,"c":[],"cl":2,"dom":1,"frc":1,"h":"nc","i":291,"its":0,"l":13,"n":"ϳ","p":"nanchong_291","s":7977506,"v":485,"x":11813044,"y":3590306},{"4k":0,"bb":3378176,"bl":11608064,"br":11739136,"bt":3488768,"c":[],"cl":2,"dom":1,"frc":1,"h":"nj","i":248,"its":0,"l":13,"n":"ڽ","p":"neijiang_248","s":4103697,"v":485,"x":11695912,"y":3429133},{"4k":0,"bb":2990080,"bl":11258880,"br":11383808,"bt":3147776,"c":[],"cl":2,"dom":1,"frc":1,"h":"pzh","i":81,"its":0,"l":14,"n":"֦","p":"panzhihua_81","s":2469627,"v":485,"x":11324127,"y":3052807},{"4k":0,"bb":3505152,"bl":11695104,"br":11801600,"bt":3633152,"c":[],"cl":2,"dom":1,"frc":1,"h":"sn","i":330,"its":0,"l":12,"n":"","p":"suining_330","s":4479028,"v":485,"x":11755372,"y":3551098},{"4k":0,"bb":3336192,"bl":11347968,"br":11510784,"bt":3603456,"c":[],"cl":2,"dom":1,"frc":1,"h":"ya","i":76,"its":0,"l":13,"n":"Ű","p":"yaan_76","s":3621048,"v":485,"x":11468242,"y":3480229},{"4k":0,"bb":3209216,"bl":11534336,"br":11729920,"bt":3389440,"c":[],"cl":2,"dom":1,"frc":1,"h":"yb","i":186,"its":0,"l":13,"n":"˱","p":"yibin_186","s":7349555,"v":485,"x":11649662,"y":3324141},{"4k":0,"bb":3345408,"bl":11583488,"br":11719680,"bt":3436544,"c":[],"cl":2,"dom":1,"frc":1,"h":"zg","i":78,"its":0,"l":13,"n":"Թ","p":"zigong_78","s":3470382,"v":485,"x":11664727,"y":3398547},{"4k":0,"bb":3440640,"bl":11598848,"br":11773952,"bt":3565568,"c":[],"cl":2,"dom":1,"frc":1,"h":"zy","i":242,"its":0,"l":13,"n":"","p":"ziyang_242","s":6083558,"v":485,"x":11647963,"y":3499239}],"cl":1,"dom":1,"frc":1,"h":"","i":27,"its":0,"l":12,"n":"Ĵʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":3385344,"bl":9991168,"br":10311680,"bt":3618816,"c":[],"cl":2,"dom":1,"frc":1,"h":"ls","i":100,"its":0,"l":13,"n":"","p":"lasa_100","s":3779530,"v":485,"x":10143660,"y":3437317},{"4k":0,"bb":3440640,"bl":8727552,"br":9611264,"bt":4257792,"c":[],"cl":2,"dom":1,"frc":1,"h":"ald","i":103,"its":0,"l":11,"n":"","p":"alidi_103","s":5602540,"v":485,"x":9033918,"y":3534102},{"4k":0,"bb":3283968,"bl":10419200,"br":11034624,"bt":3819520,"c":[],"cl":2,"dom":0,"frc":1,"h":"cdd","i":99,"its":0,"l":15,"n":"","p":"changdudi_99","s":5906413,"v":485,"x":10818907,"y":3629222},{"4k":0,"bb":3173376,"bl":10259456,"br":10994688,"bt":3569664,"c":[],"cl":2,"dom":1,"frc":1,"h":"lzd","i":98,"its":0,"l":11,"n":"֥","p":"linzhidi_98","s":3455179,"v":485,"x":10505019,"y":3438953},{"4k":0,"bb":3474432,"bl":9467904,"br":10578944,"bt":4342784,"c":[],"cl":2,"dom":0,"frc":1,"h":"nqd","i":101,"its":0,"l":14,"n":"","p":"naqudi_101","s":9816369,"v":485,"x":10248183,"y":3672219},{"4k":0,"bb":3085312,"bl":10027008,"br":10505216,"bt":3461120,"c":[],"cl":2,"dom":0,"frc":1,"h":"snd","i":97,"its":0,"l":11,"n":"ɽϵ","p":"shannandi_97","s":3558140,"v":485,"x":10217258,"y":3384056},{"4k":0,"bb":3130368,"bl":9144320,"br":10058752,"bt":3716096,"c":[],"cl":2,"dom":0,"frc":1,"h":"rkzd","i":102,"its":0,"l":14,"n":"տ","p":"rikazedi_102","s":7704579,"v":485,"x":9895063,"y":3389320}],"cl":1,"dom":1,"frc":1,"h":"","i":28,"its":0,"l":12,"n":"","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":5270528,"bl":9661440,"br":9906176,"bt":5593088,"c":[],"cl":2,"dom":1,"frc":1,"h":"wlmq","i":92,"its":1,"l":12,"n":"³ľ","p":"wulumuqi_92","s":9216385,"v":485,"x":9754269,"y":5409691},{"4k":0,"bb":4761600,"bl":8686592,"br":9362432,"bt":5230592,"c":[],"cl":2,"dom":0,"frc":1,"h":"aksd","i":85,"its":0,"l":12,"n":"յ","p":"akesudi_85","s":6030530,"v":485,"x":8935353,"y":5009764},{"4k":0,"bb":5592064,"bl":9521152,"br":10139648,"bt":6274048,"c":[],"cl":2,"dom":1,"frc":1,"h":"altd","i":96,"its":0,"l":13,"n":"̩","p":"aletaidi_96","s":5132225,"v":485,"x":9812684,"y":6050051},{"4k":0,"bb":4226048,"bl":9181184,"br":10450944,"bt":5369856,"c":[],"cl":2,"dom":1,"frc":1,"h":"byglmgzz","i":86,"its":0,"l":11,"n":"ɹ","p":"bayinguolengmengguzizhi_86","s":7939007,"v":485,"x":9590454,"y":5097890},{"4k":0,"bb":5436416,"bl":8893440,"br":9330688,"bt":5653504,"c":[],"cl":2,"dom":1,"frc":1,"h":"betlmgzz","i":88,"its":0,"l":11,"n":"ɹ","p":"boertalamengguzizhi_88","s":1846600,"v":485,"x":9136431,"y":5577250},{"4k":0,"bb":5298176,"bl":9527296,"br":10196992,"bt":5668864,"c":[],"cl":2,"dom":1,"frc":1,"h":"cjhzzz","i":93,"its":0,"l":13,"n":"","p":"changjihuizuzizhi_93","s":5484271,"v":485,"x":9719947,"y":5438089},{"4k":0,"bb":4947968,"bl":10149888,"br":10731520,"bt":5606400,"c":[],"cl":2,"dom":1,"frc":1,"h":"hmd","i":91,"its":0,"l":13,"n":"ܵ","p":"hamidi_91","s":3642513,"v":485,"x":10411021,"y":5255998},{"4k":0,"bb":4049920,"bl":8616960,"br":9454592,"bt":4787200,"c":[],"cl":2,"dom":0,"frc":1,"h":"htd","i":82,"its":0,"l":13,"n":"","p":"hetiandi_82","s":5043863,"v":485,"x":8897738,"y":4429897},{"4k":0,"bb":4200448,"bl":8289280,"br":8892416,"bt":4877312,"c":[],"cl":2,"dom":1,"frc":1,"h":"ksd","i":83,"its":0,"l":12,"n":"ʲ","p":"kashidi_83","s":8029594,"v":485,"x":8459955,"y":4762725},{"4k":0,"bb":5452800,"bl":9412608,"br":9578496,"bt":5784576,"c":[],"cl":2,"dom":1,"frc":1,"h":"klmy","i":95,"its":0,"l":13,"n":"","p":"kelamayi_95","s":1628061,"v":485,"x":9450656,"y":5683314},{"4k":0,"bb":4504576,"bl":8181760,"br":8781824,"bt":5044224,"c":[],"cl":2,"dom":0,"frc":1,"h":"kzlskekzzz","i":84,"its":0,"l":11,"n":"տ¶","p":"kezilesukeerkezizizhi_84","s":2923290,"v":485,"x":8479646,"y":4797955},{"4k":0,"bb":5356544,"bl":9156608,"br":9723904,"bt":5950464,"c":[],"cl":2,"dom":1,"frc":1,"h":"tcd","i":94,"its":0,"l":12,"n":"ǵ","p":"tachengdi_94","s":7742175,"v":485,"x":9238182,"y":5870117},{"4k":0,"bb":5012480,"bl":9713664,"br":10233856,"bt":5381120,"c":[],"cl":2,"dom":1,"frc":1,"h":"tlfd","i":89,"its":0,"l":13,"n":"³","p":"tulufandi_89","s":2379669,"v":485,"x":9929357,"y":5276094},{"4k":0,"bb":4783104,"bl":8756224,"br":9765888,"bt":5529600,"c":[],"cl":2,"dom":0,"frc":1,"h":"xjwwezzqzxxjxzd","i":87,"its":0,"l":13,"n":"½ֱϽؼλ","p":"xinjiangweiwuerzizhiquzhixiaxianjixingzhengdan_87","s":1906798,"v":485,"x":9260975,"y":5156288},{"4k":0,"bb":5171200,"bl":8924160,"br":9491456,"bt":5567488,"c":[],"cl":2,"dom":1,"frc":1,"h":"ylhskzz","i":90,"its":0,"l":11,"n":"","p":"yilihasakezizhi_90","s":5153052,"v":485,"x":9053790,"y":5423584}],"cl":1,"dom":1,"frc":1,"h":"","i":29,"its":0,"l":12,"n":"½ά","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":2783232,"bl":11373568,"br":11542528,"bt":3048448,"c":[],"cl":2,"dom":1,"frc":1,"h":"km","i":104,"its":1,"l":12,"n":"","p":"kunming_104","s":28838913,"v":485,"x":11435821,"y":2862927},{"4k":0,"bb":2750464,"bl":10919936,"br":11139072,"bt":2963456,"c":[],"cl":2,"dom":1,"frc":1,"h":"bs","i":112,"its":0,"l":13,"n":"ɽ","p":"baoshan_112","s":4828233,"v":485,"x":11039493,"y":2871929},{"4k":0,"bb":2762752,"bl":11212800,"br":11409408,"bt":3043328,"c":[],"cl":2,"dom":1,"frc":1,"h":"cxyzzz","i":105,"its":0,"l":13,"n":"","p":"chuxiongyizuzizhi_105","s":7281689,"v":485,"x":11302848,"y":2863778},{"4k":0,"bb":2816000,"bl":11005952,"br":11249664,"bt":3067904,"c":[],"cl":2,"dom":1,"frc":1,"h":"dlbzzz","i":111,"its":0,"l":14,"n":"","p":"dalibaizuzizhi_111","s":7398232,"v":485,"x":11162596,"y":2932491},{"4k":0,"bb":2716672,"bl":10857472,"br":10991616,"bt":2899968,"c":[],"cl":2,"dom":0,"frc":1,"h":"dhdzjpzzz","i":116,"its":0,"l":14,"n":"º徰","p":"dehongdaizujingpozuzizhi_116","s":3100973,"v":485,"x":10975266,"y":2789038},{"4k":0,"bb":3087360,"bl":10976256,"br":11167744,"bt":3387392,"c":[],"cl":2,"dom":1,"frc":1,"h":"dqzzzz","i":115,"its":0,"l":14,"n":"","p":"diqingzangzuzizhi_115","s":2733625,"v":485,"x":11099728,"y":3206834},{"4k":0,"bb":2548736,"bl":11332608,"br":11610112,"bt":2830336,"c":[],"cl":2,"dom":1,"frc":1,"h":"hhhnzyzzz","i":107,"its":0,"l":11,"n":"ӹ","p":"honghehanizuyizuzizhi_107","s":8838211,"v":485,"x":11508573,"y":2659713},{"4k":0,"bb":2978816,"bl":11063296,"br":11301888,"bt":3220480,"c":[],"cl":2,"dom":1,"frc":1,"h":"lj","i":114,"its":0,"l":13,"n":"","p":"lijiang_114","s":4463432,"v":485,"x":11158143,"y":3086669},{"4k":0,"bb":2624512,"bl":10984448,"br":11194368,"bt":2863104,"c":[],"cl":2,"dom":1,"frc":1,"h":"lc","i":110,"its":0,"l":14,"n":"ٲ","p":"lincang_110","s":5145731,"v":485,"x":11141636,"y":2721816},{"4k":0,"bb":2924544,"bl":10924032,"br":11094016,"bt":3279872,"c":[],"cl":2,"dom":0,"frc":1,"h":"njlszzz","i":113,"its":0,"l":14,"n":"ŭ","p":"nujianglisuzuzizhi_113","s":1659997,"v":485,"x":11005519,"y":2958484},{"4k":0,"bb":2498560,"bl":11038720,"br":11392000,"bt":2837504,"c":[],"cl":2,"dom":1,"frc":1,"h":"pe","i":108,"its":0,"l":14,"n":"ն","p":"puer_108","s":7849939,"v":485,"x":11240814,"y":2589148},{"4k":0,"bb":2778112,"bl":11471872,"br":11670528,"bt":3111936,"c":[],"cl":2,"dom":1,"frc":1,"h":"qj","i":249,"its":0,"l":12,"n":"","p":"qujing_249","s":9468970,"v":485,"x":11555387,"y":2918272},{"4k":0,"bb":2577408,"bl":11530240,"br":11823104,"bt":2792448,"c":[],"cl":2,"dom":0,"frc":1,"h":"wszzmzzz","i":177,"its":0,"l":14,"n":"ɽ׳","p":"wenshanzhuangzumiaozuzizhi_177","s":7092837,"v":485,"x":11606072,"y":2660262},{"4k":0,"bb":2393088,"bl":11125760,"br":11338752,"bt":2567168,"c":[],"cl":2,"dom":1,"frc":1,"h":"xsbndzzz","i":109,"its":0,"l":14,"n":"˫ɴ","p":"xishuangbannadaizuzizhi_109","s":3469020,"v":485,"x":11221599,"y":2496994},{"4k":0,"bb":2653184,"bl":11274240,"br":11484160,"bt":2852864,"c":[],"cl":2,"dom":1,"frc":1,"h":"yx","i":106,"its":0,"l":13,"n":"Ϫ","p":"yuxi_106","s":6165379,"v":485,"x":11416289,"y":2779266},{"4k":0,"bb":3046400,"bl":11452416,"br":11724800,"bt":3313664,"c":[],"cl":2,"dom":1,"frc":1,"h":"zt","i":336,"its":0,"l":13,"n":"ͨ","p":"zhaotong_336","s":8266268,"v":485,"x":11546551,"y":3146717}],"cl":1,"dom":1,"frc":1,"h":"","i":30,"its":0,"l":12,"n":"ʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":5217424,"bl":13988219,"br":14251713,"bt":5536780,"c":[{"4k":0,"bb":3379200,"bl":13174784,"br":13440000,"bt":3556352,"c":[],"cl":2,"dom":1,"frc":1,"h":"hz","i":179,"its":1,"l":12,"n":"","p":"hangzhou_179","s":50965764,"v":485,"x":13376654,"y":3517776},{"4k":0,"bb":3529728,"bl":13274112,"br":13414400,"bt":3635200,"c":[],"cl":2,"dom":1,"frc":1,"h":"hz","i":294,"its":0,"l":12,"n":"","p":"huzhou_294","s":8236488,"v":485,"x":13368987,"y":3597484},{"4k":0,"bb":3513344,"bl":13391872,"br":13531136,"bt":3615744,"c":[],"cl":2,"dom":1,"frc":1,"h":"jx","i":334,"its":1,"l":13,"n":"","p":"jiaxing_334","s":20819017,"v":485,"x":13443316,"y":3578520},{"4k":0,"bb":3294208,"bl":13273088,"br":13447168,"bt":3442688,"c":[],"cl":2,"dom":1,"frc":1,"h":"jh","i":333,"its":1,"l":12,"n":"","p":"jinhua_333","s":19451820,"v":485,"x":13319970,"y":3365440},{"4k":0,"bb":3259392,"bl":13138944,"br":13287424,"bt":3419136,"c":[],"cl":2,"dom":1,"frc":1,"h":"qz","i":243,"its":0,"l":12,"n":"","p":"quzhou_243","s":6034681,"v":485,"x":13233890,"y":3347356},{"4k":0,"bb":3155968,"bl":13213696,"br":13408256,"bt":3349504,"c":[],"cl":2,"dom":1,"frc":1,"h":"ls","i":292,"its":0,"l":13,"n":"ˮ","p":"lishui_292","s":6820940,"v":485,"x":13350636,"y":3288181},{"4k":0,"bb":3335168,"bl":13456384,"br":13617152,"bt":3540992,"c":[],"cl":2,"dom":1,"frc":1,"h":"nb","i":180,"its":1,"l":12,"n":"","p":"ningbo_180","s":32149783,"v":485,"x":13531775,"y":3466674},{"4k":0,"bb":3383296,"bl":13345792,"br":13496320,"bt":3519488,"c":[],"cl":2,"dom":1,"frc":1,"h":"sx","i":293,"its":0,"l":13,"n":"","p":"shaoxing_293","s":16491714,"v":485,"x":13423604,"y":3483319},{"4k":0,"bb":3228672,"bl":13390848,"br":13580288,"bt":3398656,"c":[],"cl":2,"dom":1,"frc":1,"h":"tz","i":244,"its":1,"l":13,"n":"̨","p":"taizhou_244","s":15373466,"v":485,"x":13517359,"y":3312057},{"4k":0,"bb":3105792,"bl":13317120,"br":13512704,"bt":3306496,"c":[],"cl":2,"dom":1,"frc":1,"h":"wz","i":178,"its":1,"l":12,"n":"","p":"wenzhou_178","s":30658143,"v":485,"x":13437061,"y":3228867},{"4k":0,"bb":3424256,"bl":13528064,"br":13692928,"bt":3599360,"c":[],"cl":2,"dom":1,"frc":1,"h":"zs","i":245,"its":0,"l":12,"n":"ɽ","p":"zhoushan_245","s":4360731,"v":485,"x":13604986,"y":3480850}],"cl":1,"dom":1,"frc":1,"h":"","i":31,"its":0,"l":12,"n":"㽭ʡ","p":"","s":102400,"v":485,"x":14116241,"y":5386659},{"bb":-16777216,"bl":-16777216,"br":16777216,"bt":16777216,"c":[],"cl":2,"dom":1,"frc":2,"gs":102537926,"gv":79,"h":"qqgl","i":9999,"its":1,"l":4,"n":"ȫ","p":"quanqiugailue","s":102537926,"v":79,"x":-8240271,"y":4952993},{"4k":0,"bb":2511872,"bl":12670976,"br":12747776,"bt":2564096,"c":[],"cl":2,"dom":1,"frc":2,"gs":82106924,"gv":86,"h":"xgtbxz","i":2912,"its":0,"l":11,"n":"ر","p":"xianggangtebiexingzheng_2912","s":82106924,"v":86,"x":12709499,"y":2529064},{"4k":0,"bb":2507776,"bl":12639232,"br":12648448,"bt":4196352,"c":[],"cl":2,"dom":1,"frc":2,"gs":25207617,"gv":83,"h":"amtbxz","i":2911,"its":0,"l":13,"n":"ر","p":"aomentebiexingzheng_2911","s":25207617,"v":83,"x":12640429,"y":2518425},{"4k":0,"bb":2373632,"bl":13150208,"br":13976576,"bt":3031040,"c":[],"cl":2,"dom":1,"frc":2,"gs":289194816,"gv":83,"h":"twd","i":9000,"its":0,"l":9,"n":"̨ʡ","p":"taiwandi_9000","s":289194816,"v":83,"x":13447711,"y":2742969}],"dver":572,"fver":3000} \ No newline at end of file diff --git a/ios/lib/BaiduMapAPI_Map.framework/Resources/mapapi.bundle/files/DVHotMap.cfg b/android/src/main/assets/cfg/a/DVHotMap.cfg similarity index 100% rename from ios/lib/BaiduMapAPI_Map.framework/Resources/mapapi.bundle/files/DVHotMap.cfg rename to android/src/main/assets/cfg/a/DVHotMap.cfg diff --git a/android/src/main/assets/cfg/a/DVHotcity.cfg b/android/src/main/assets/cfg/a/DVHotcity.cfg new file mode 100644 index 00000000..ff88ae1c --- /dev/null +++ b/android/src/main/assets/cfg/a/DVHotcity.cfg @@ -0,0 +1 @@ +{"cities":[{"4k":0,"bb":4757504,"bl":12849152,"br":13082624,"bt":4994048,"c":[],"cl":2,"dom":1,"frc":1,"h":"bj","i":131,"its":1,"l":12,"n":"","p":"beijing_131","s":45521986,"v":322,"x":12959247,"y":4825323},{"4k":0,"bb":3568640,"bl":13454336,"br":13582336,"bt":3724288,"c":[],"cl":2,"dom":1,"frc":1,"h":"sh","i":289,"its":1,"l":12,"n":"Ϻ","p":"shanghai_289","s":41108081,"v":322,"x":13523376,"y":3641154},{"4k":0,"bb":2556928,"bl":12574720,"br":12698624,"bt":2728960,"c":[],"cl":2,"dom":1,"frc":1,"h":"gz","i":257,"its":1,"l":12,"n":"","p":"guangzhou_257","s":30107772,"v":322,"x":12609501,"y":2631394},{"4k":0,"bb":3640320,"bl":13176832,"br":13275136,"bt":3822592,"c":[],"cl":2,"dom":1,"frc":1,"h":"nj","i":315,"its":1,"l":12,"n":"Ͼ","p":"nanjing_315","s":21777532,"v":322,"x":13225203,"y":3748900},{"4k":0,"bb":3379200,"bl":13174784,"br":13440000,"bt":3556352,"c":[],"cl":2,"dom":1,"frc":1,"h":"hz","i":179,"its":1,"l":12,"n":"","p":"hangzhou_179","s":23401139,"v":322,"x":13376654,"y":3517776},{"4k":0,"bb":3493888,"bl":11468800,"br":11677696,"bt":3667968,"c":[],"cl":2,"dom":1,"frc":1,"h":"cd","i":75,"its":1,"l":12,"n":"ɶ","p":"chengdu_75","s":28504148,"v":322,"x":11585284,"y":3567299},{"4k":0,"bb":2523136,"bl":12654592,"br":12764160,"bt":2598912,"c":[],"cl":2,"dom":1,"frc":1,"h":"sz","i":340,"its":1,"l":12,"n":"","p":"shenzhen_340","s":28685707,"v":322,"x":12697742,"y":2560988},{"bb":2511872,"bl":12670976,"br":12747776,"bt":2564096,"c":[],"cl":2,"dom":1,"frc":2,"gs":63494441,"gv":75,"h":"xgtbxz","i":2912,"its":0,"l":11,"n":"ر","p":"xianggangtebiexingzheng_2912","s":63494441,"v":75,"x":12709499,"y":2529064},{"bb":2507776,"bl":12639232,"br":12648448,"bt":2522112,"c":[],"cl":2,"dom":1,"frc":2,"gs":22632328,"gv":75,"h":"amtbxz","i":2911,"its":0,"l":13,"n":"ر","p":"aomentebiexingzheng_2911","s":22632328,"v":75,"x":12640429,"y":2518425}],"dver":335,"fver":1} \ No newline at end of file diff --git a/android/src/main/assets/cfg/a/DVSDirectory.cfg b/android/src/main/assets/cfg/a/DVSDirectory.cfg new file mode 100644 index 00000000..f676ae2b --- /dev/null +++ b/android/src/main/assets/cfg/a/DVSDirectory.cfg @@ -0,0 +1 @@ +{"cities":[{"i":1,"s":6311577},{"i":33,"s":374657},{"i":34,"s":369346},{"i":35,"s":784583},{"i":36,"s":4001430},{"i":37,"s":824859},{"i":38,"s":161574},{"i":39,"s":827221},{"i":40,"s":513938},{"i":41,"s":1989451},{"i":42,"s":1236080},{"i":43,"s":582875},{"i":44,"s":1363207},{"i":45,"s":516660},{"i":46,"s":814087},{"i":47,"s":374346},{"i":48,"s":8298071},{"i":49,"s":1378713},{"i":50,"s":1836166},{"i":51,"s":1027412},{"i":52,"s":1406803},{"i":53,"s":7802022},{"i":54,"s":1552641},{"i":55,"s":2922503},{"i":56,"s":1274608},{"i":57,"s":816095},{"i":58,"s":11305203},{"i":59,"s":1231027},{"i":60,"s":1334879},{"i":61,"s":1591091},{"i":62,"s":731286},{"i":63,"s":794223},{"i":64,"s":1627312},{"i":65,"s":407298},{"i":66,"s":2318949},{"i":67,"s":142942},{"i":68,"s":191525},{"i":69,"s":427116},{"i":70,"s":75934},{"i":71,"s":85734},{"i":72,"s":61945},{"i":73,"s":394522},{"i":74,"s":2644756},{"i":75,"s":22595419},{"i":76,"s":965040},{"i":77,"s":1478931},{"i":78,"s":1031256},{"i":79,"s":2097352},{"i":80,"s":1311645},{"i":81,"s":890966},{"i":82,"s":333718},{"i":83,"s":777662},{"i":84,"s":116498},{"i":85,"s":838583},{"i":86,"s":1083769},{"i":87,"s":714852},{"i":88,"s":335815},{"i":89,"s":354890},{"i":90,"s":1357614},{"i":91,"s":588366},{"i":92,"s":4842337},{"i":93,"s":1187938},{"i":94,"s":506545},{"i":95,"s":536398},{"i":96,"s":349367},{"i":97,"s":111416},{"i":98,"s":172390},{"i":99,"s":96653},{"i":100,"s":840384},{"i":101,"s":77431},{"i":102,"s":214865},{"i":103,"s":51153},{"i":104,"s":9950066},{"i":105,"s":1416121},{"i":106,"s":1672399},{"i":107,"s":1602884},{"i":108,"s":1072131},{"i":109,"s":960604},{"i":110,"s":748693},{"i":111,"s":2050356},{"i":112,"s":1121533},{"i":113,"s":208741},{"i":114,"s":1410196},{"i":115,"s":353429},{"i":116,"s":829689},{"i":117,"s":663653},{"i":118,"s":603348},{"i":119,"s":12755714},{"i":120,"s":964},{"i":121,"s":1426643},{"i":122,"s":550782},{"i":123,"s":568553},{"i":124,"s":880064},{"i":125,"s":3221357},{"i":126,"s":1654577},{"i":127,"s":7394210},{"i":128,"s":2376756},{"i":129,"s":2209133},{"i":130,"s":2843045},{"i":131,"s":29648081},{"i":132,"s":19676006},{"i":133,"s":1954890},{"i":134,"s":6865312},{"i":135,"s":875771},{"i":136,"s":641010},{"i":137,"s":1959547},{"i":138,"s":11728277},{"i":139,"s":2326966},{"i":140,"s":3604823},{"i":141,"s":2461935},{"i":142,"s":3515475},{"i":143,"s":1377538},{"i":144,"s":845095},{"i":145,"s":1137399},{"i":146,"s":4509862},{"i":147,"s":978397},{"i":148,"s":2733643},{"i":149,"s":2940804},{"i":150,"s":8282513},{"i":151,"s":3209391},{"i":152,"s":2881173},{"i":153,"s":4931275},{"i":154,"s":2202765},{"i":155,"s":1938270},{"i":156,"s":3053534},{"i":157,"s":2437574},{"i":158,"s":10162032},{"i":159,"s":2755455},{"i":160,"s":3384868},{"i":161,"s":6557961},{"i":162,"s":3304197},{"i":163,"s":5894980},{"i":164,"s":815941},{"i":165,"s":1207150},{"i":166,"s":1940242},{"i":167,"s":8019474},{"i":168,"s":1159737},{"i":169,"s":1028703},{"i":170,"s":2224879},{"i":171,"s":1764148},{"i":172,"s":2112686},{"i":173,"s":1916988},{"i":174,"s":1981050},{"i":175,"s":3457026},{"i":176,"s":5584262},{"i":177,"s":1157595},{"i":178,"s":8566717},{"i":179,"s":16817914},{"i":180,"s":11010128},{"i":181,"s":554125},{"i":182,"s":424196},{"i":183,"s":651258},{"i":184,"s":1546128},{"i":185,"s":509978},{"i":186,"s":1759763},{"i":187,"s":5544835},{"i":188,"s":1524043},{"i":189,"s":1682502},{"i":190,"s":1593514},{"i":191,"s":3285355},{"i":192,"s":1962302},{"i":193,"s":1987719},{"i":194,"s":7134897},{"i":195,"s":2033135},{"i":196,"s":1034064},{"i":197,"s":2382911},{"i":198,"s":3073835},{"i":199,"s":1443961},{"i":200,"s":1761123},{"i":201,"s":1353539},{"i":202,"s":891193},{"i":203,"s":1460594},{"i":204,"s":741522},{"i":205,"s":1256694},{"i":206,"s":1134183},{"i":207,"s":1865890},{"i":208,"s":2028198},{"i":209,"s":1692170},{"i":210,"s":2113204},{"i":211,"s":1676765},{"i":212,"s":1309868},{"i":213,"s":2255001},{"i":214,"s":2462095},{"i":215,"s":954228},{"i":216,"s":1750067},{"i":217,"s":1391014},{"i":218,"s":14010848},{"i":219,"s":2390757},{"i":220,"s":2692880},{"i":221,"s":1305516},{"i":222,"s":2369082},{"i":223,"s":4992249},{"i":224,"s":18113276},{"i":225,"s":988679},{"i":226,"s":1460234},{"i":227,"s":1107957},{"i":228,"s":1139500},{"i":229,"s":3011889},{"i":230,"s":330500},{"i":231,"s":1936052},{"i":232,"s":454440},{"i":233,"s":12641182},{"i":234,"s":5106224},{"i":235,"s":1830035},{"i":236,"s":10898447},{"i":237,"s":924045},{"i":238,"s":1898538},{"i":239,"s":1149901},{"i":240,"s":3619019},{"i":241,"s":1346873},{"i":242,"s":970164},{"i":243,"s":1958184},{"i":244,"s":5941931},{"i":245,"s":1311427},{"i":246,"s":551868},{"i":247,"s":199815},{"i":248,"s":1033336},{"i":249,"s":2206216},{"i":250,"s":1181949},{"i":251,"s":1638454},{"i":252,"s":1372895},{"i":253,"s":1001030},{"i":254,"s":1776821},{"i":255,"s":3245232},{"i":256,"s":554223},{"i":257,"s":23003567},{"i":258,"s":1102103},{"i":259,"s":2364490},{"i":260,"s":884498},{"i":261,"s":7723677},{"i":262,"s":2626827},{"i":263,"s":1037991},{"i":264,"s":2618021},{"i":265,"s":4997939},{"i":266,"s":2717502},{"i":267,"s":2461329},{"i":268,"s":13105068},{"i":269,"s":2502978},{"i":270,"s":2504317},{"i":271,"s":2492227},{"i":272,"s":1550081},{"i":273,"s":1854134},{"i":274,"s":924350},{"i":275,"s":1654833},{"i":276,"s":4064925},{"i":277,"s":3098400},{"i":278,"s":2256436},{"i":279,"s":656010},{"i":280,"s":1468699},{"i":281,"s":1880239},{"i":282,"s":1625886},{"i":283,"s":1784699},{"i":284,"s":1136246},{"i":285,"s":715547},{"i":286,"s":4220643},{"i":287,"s":6837477},{"i":288,"s":8469972},{"i":289,"s":32715397},{"i":290,"s":1222772},{"i":291,"s":3031438},{"i":292,"s":1870406},{"i":293,"s":5310986},{"i":294,"s":3677074},{"i":295,"s":1600856},{"i":296,"s":2703213},{"i":297,"s":1932482},{"i":298,"s":1793238},{"i":299,"s":888934},{"i":300,"s":8345872},{"i":301,"s":5210250},{"i":302,"s":4155961},{"i":303,"s":3290991},{"i":304,"s":1341341},{"i":305,"s":3108852},{"i":306,"s":1248891},{"i":307,"s":5825971},{"i":308,"s":2394732},{"i":309,"s":4038472},{"i":310,"s":1749123},{"i":311,"s":1295332},{"i":312,"s":833051},{"i":313,"s":1931997},{"i":314,"s":1415182},{"i":315,"s":12814423},{"i":316,"s":6727373},{"i":317,"s":10118742},{"i":318,"s":1926887},{"i":319,"s":1545388},{"i":320,"s":2369965},{"i":321,"s":3760084},{"i":322,"s":724486},{"i":323,"s":2077916},{"i":324,"s":959952},{"i":325,"s":2823025},{"i":326,"s":6219747},{"i":327,"s":1335595},{"i":328,"s":2369617},{"i":329,"s":1584369},{"i":330,"s":1551149},{"i":331,"s":1688147},{"i":332,"s":13147270},{"i":333,"s":6920550},{"i":334,"s":5918167},{"i":335,"s":638858},{"i":336,"s":1065255},{"i":337,"s":707319},{"i":338,"s":2725458},{"i":339,"s":1030030},{"i":340,"s":21386101},{"i":341,"s":1430876},{"i":342,"s":1454867},{"i":343,"s":1040534},{"i":344,"s":1391683},{"i":345,"s":1617952},{"i":346,"s":4714271},{"i":347,"s":3554536},{"i":348,"s":8007707},{"i":349,"s":3096983},{"i":350,"s":975243},{"i":351,"s":1179307},{"i":352,"s":1452857},{"i":353,"s":2610672},{"i":354,"s":4265964},{"i":355,"s":1657013},{"i":356,"s":1898936},{"i":357,"s":866885},{"i":358,"s":1128564},{"i":359,"s":741347},{"i":360,"s":3175491},{"i":361,"s":2067557},{"i":362,"s":1298603},{"i":363,"s":1762962},{"i":364,"s":2630621},{"i":365,"s":3856911},{"i":366,"s":2009723},{"i":367,"s":1262234},{"i":368,"s":2251675},{"i":369,"s":1704042},{"i":370,"s":1668790},{"i":371,"s":976348},{"i":372,"s":2425437},{"i":373,"s":1369455},{"i":1277,"s":571535},{"i":2911,"s":554211},{"i":2912,"s":5020758}],"fver":1,"dver":20150320} \ No newline at end of file diff --git a/android/src/main/assets/cfg/a/DVStreet.cfg b/android/src/main/assets/cfg/a/DVStreet.cfg new file mode 100644 index 00000000..507e5eda --- /dev/null +++ b/android/src/main/assets/cfg/a/DVStreet.cfg @@ -0,0 +1 @@ +{"cities":[{"bb":4758298,"bl":12849780,"br":13081648,"bt":4993922,"i":131,"n":"北京市"},{"bb":5014316,"bl":13629240,"br":13783738,"bt":5290030,"i":58,"n":"沈阳市"},{"bb":3626874,"bl":13305727,"br":13426482,"bt":3739356,"i":317,"n":"无锡市"},{"bb":3640320,"bl":12331008,"br":12594176,"bt":3823616,"i":156,"n":"襄樊市"},{"bb":3193856,"bl":12154880,"br":12290048,"bt":3436544,"i":274,"n":"凤凰"},{"bb":3568640,"bl":13454336,"br":13582336,"bt":3724288,"i":289,"n":"上海市"},{"bb":4631552,"bl":12992512,"br":13145088,"bt":4876288,"i":332,"n":"天津市"},{"bb":4648960,"bl":13461504,"br":13753344,"bt":4869120,"i":167,"n":"大连市"},{"bb":2037760,"bl":12126208,"br":12225536,"bt":2098176,"i":121,"n":"三亚市"},{"bb":3385344,"bl":9991168,"br":10311680,"bt":3618816,"i":100,"n":"拉萨市"},{"bb":2202624,"bl":12253184,"br":12325888,"bt":2280448,"i":125,"n":"海口市"},{"bb":2523136,"bl":12654592,"br":12764160,"bt":2598912,"i":340,"n":"深圳市"},{"bb":3579904,"bl":13349888,"br":13513728,"bt":3745792,"i":224,"n":"苏州市"},{"bb":2511872,"bl":12670976,"br":12747776,"bt":2564096,"i":2912,"n":"香港特别行政区"},{"bb":2507776,"bl":12639232,"br":12648448,"bt":2522112,"i":2911,"n":"澳门特别行政区"},{"bb":2556928,"bl":12574720,"br":12698624,"bt":2728960,"i":257,"n":"广州市"},{"bb":4031488,"bl":12677120,"br":12832768,"bt":4143104,"i":210,"n":"开封市"},{"bb":3204096,"bl":12939264,"br":13191168,"bt":3444736,"i":364,"n":"上饶市"},{"bb":4210688,"bl":13304832,"br":13516800,"bt":4434944,"i":236,"n":"青岛市"},{"bb":3966976,"bl":12953600,"br":13211648,"bt":4132864,"i":316,"n":"徐州市"},{"bb":3249152,"bl":12851200,"br":12977152,"bt":3378176,"i":163,"n":"南昌市"},{"bb":5445632,"bl":13991936,"br":14499840,"bt":5859328,"i":48,"n":"哈尔滨市"},{"bb":5322752,"bl":13864960,"br":14149632,"bt":5632000,"i":53,"n":"长春市"},{"bb":3379200,"bl":13174784,"br":13440000,"bt":3556352,"i":179,"n":"杭州市"},{"bb":3640320,"bl":13176832,"br":13275136,"bt":3822592,"i":315,"n":"南京市"},{"bb":3630080,"bl":13262848,"br":13382656,"bt":3749888,"i":348,"n":"常州市"},{"bb":4779008,"bl":12303360,"br":12503040,"bt":5042176,"i":321,"n":"呼和浩特市"},{"bb":4279296,"bl":12938240,"br":13109248,"bt":4489216,"i":288,"n":"济南市"},{"bb":4620288,"bl":12925952,"br":13054976,"bt":4853760,"i":191,"n":"廊坊市"},{"bb":2782208,"bl":13123584,"br":13188096,"bt":2847744,"i":194,"n":"厦门市"},{"bb":4586496,"bl":12664832,"br":12951552,"bt":4832256,"i":307,"n":"保定市"},{"bb":5132288,"bl":14190592,"br":14619648,"bt":5516288,"i":54,"n":"延边朝鲜族自治州"},{"bb":4216832,"bl":11421696,"br":11642880,"bt":4419584,"i":36,"n":"兰州市"},{"bb":4941824,"bl":13646848,"br":13770752,"bt":5075968,"i":351,"n":"辽阳市"},{"bb":4306944,"bl":11233280,"br":11345920,"bt":4470784,"i":66,"n":"西宁市"},{"bb":3676160,"bl":12990464,"br":13124608,"bt":3812352,"i":127,"n":"合肥市"},{"bb":4039680,"bl":12548096,"br":12717056,"bt":4139008,"i":268,"n":"郑州市"},{"bb":4476928,"bl":12413952,"br":12598272,"bt":4614144,"i":176,"n":"太原市"},{"bb":3477504,"bl":12657664,"br":12812288,"bt":3658752,"i":218,"n":"武汉市"},{"bb":3210240,"bl":12456960,"br":12721152,"bt":3313664,"i":158,"n":"长沙市"},{"bb":2520064,"bl":11948032,"br":12204032,"bt":2741248,"i":261,"n":"南宁市"},{"bb":2783232,"bl":11373568,"br":11542528,"bt":3048448,"i":104,"n":"昆明市"},{"bb":3963904,"bl":11981824,"br":12226560,"bt":4106240,"i":233,"n":"西安市"},{"bb":4031488,"bl":11983872,"br":12154880,"bt":4214784,"i":323,"n":"咸阳市"},{"bb":3493888,"bl":11468800,"br":11677696,"bt":3667968,"i":75,"n":"成都市"},{"bb":4481024,"bl":11782144,"br":11897856,"bt":4677632,"i":360,"n":"银川市"},{"bb":3834880,"bl":9978880,"br":11109376,"bt":4727808,"i":65,"n":"海西蒙古族藏族自治州"},{"bb":3690496,"bl":13381632,"br":13582336,"bt":3834880,"i":161,"n":"南通市"},{"bb":4568064,"bl":10277888,"br":11155456,"bt":5253120,"i":37,"n":"酒泉市"},{"bb":4498432,"bl":10841088,"br":11379712,"bt":4823040,"i":117,"n":"张掖市"},{"bb":3688448,"bl":9953280,"br":10886144,"bt":4315136,"i":71,"n":"玉树藏族自治州"},{"bb":4133888,"bl":13203456,"br":13353984,"bt":4282368,"i":173,"n":"日照市"},{"bb":4001792,"bl":13181952,"br":13342720,"bt":4157440,"i":347,"n":"连云港市"},{"bb":4015104,"bl":11641856,"br":11880448,"bt":4164608,"i":196,"n":"天水市"},{"bb":4785152,"bl":10891264,"br":10969088,"bt":4836352,"i":33,"n":"嘉峪关市"},{"bb":4090880,"bl":11013120,"br":11333632,"bt":4447232,"i":68,"n":"海南藏族自治州"},{"bb":4236288,"bl":13155328,"br":13361152,"bt":4460544,"i":287,"n":"潍坊市"},{"bb":3531776,"bl":12452864,"br":12635136,"bt":3690496,"i":217,"n":"荆门市"},{"bb":4379648,"bl":11335680,"br":11601920,"bt":4761600,"i":118,"n":"武威市"},{"bb":4376576,"bl":10919936,"br":11427840,"bt":4708352,"i":67,"n":"海北藏族自治州"},{"bb":3963904,"bl":12587008,"br":12728320,"bt":4060160,"i":155,"n":"许昌市"},{"bb":5169152,"bl":13274112,"br":13773824,"bt":5700608,"i":64,"n":"通辽市"},{"bb":5475328,"bl":13300736,"br":13765632,"bt":6020096,"i":62,"n":"兴安盟"},{"bb":4388864,"bl":11940864,"br":12385280,"bt":4780032,"i":231,"n":"榆林市"},{"bb":5026816,"bl":12954624,"br":13469696,"bt":5630976,"i":297,"n":"赤峰市"},{"bb":4225024,"bl":12918784,"br":13136896,"bt":4341760,"i":325,"n":"泰安市"},{"bb":3946496,"bl":12371968,"br":12578816,"bt":4150272,"i":153,"n":"洛阳市"},{"bb":4505600,"bl":12570624,"br":12696576,"bt":4628480,"i":357,"n":"阳泉市"},{"bb":4376576,"bl":12286976,"br":12506112,"bt":4657152,"i":327,"n":"吕梁市"},{"bb":4192256,"bl":12286976,"br":12532736,"bt":4405248,"i":368,"n":"临汾市"},{"bb":4707328,"bl":12456960,"br":12644352,"bt":4883456,"i":237,"n":"朔州市"},{"bb":4572160,"bl":12350464,"br":12688384,"bt":4791296,"i":367,"n":"忻州市"},{"bb":3315712,"bl":12684288,"br":13015040,"bt":3492864,"i":349,"n":"九江市"},{"bb":4083712,"bl":12269568,"br":12478464,"bt":4252672,"i":328,"n":"运城市"},{"bb":4364288,"bl":12402688,"br":12707840,"bt":4567040,"i":238,"n":"晋中市"},{"bb":4186112,"bl":11984896,"br":12308480,"bt":4484096,"i":284,"n":"延安市"},{"bb":4251648,"bl":12466176,"br":12662784,"bt":4431872,"i":356,"n":"长治市"},{"bb":5471232,"bl":13541376,"br":13846528,"bt":5799936,"i":51,"n":"白城市"},{"bb":4122624,"bl":12621824,"br":12805120,"bt":4254720,"i":152,"n":"新乡市"},{"bb":4964352,"bl":13944832,"br":14111744,"bt":5286912,"i":165,"n":"通化市"},{"bb":4368384,"bl":13490176,"br":13663232,"bt":4499456,"i":175,"n":"威海市"},{"bb":4123648,"bl":11726848,"br":12008448,"bt":4242432,"i":359,"n":"平凉市"},{"bb":4171776,"bl":11840512,"br":12103680,"bt":4436992,"i":135,"n":"庆阳市"},{"bb":5926912,"bl":12861440,"br":14035968,"bt":7012352,"i":61,"n":"呼伦贝尔市"},{"bb":2681856,"bl":13014016,"br":13164544,"bt":2882560,"i":255,"n":"漳州市"},{"bb":4874240,"bl":12162048,"br":12407808,"bt":5243904,"i":229,"n":"包头市"},{"bb":3889152,"bl":12495872,"br":12656640,"bt":4051968,"i":213,"n":"平顶山市"},{"bb":3249152,"bl":11720704,"br":12268544,"bt":3768320,"i":132,"n":"重庆市"},{"bb":3760128,"bl":11743232,"br":12055552,"bt":3989504,"i":352,"n":"汉中市"},{"bb":5434368,"bl":13705216,"br":14049280,"bt":5678080,"i":52,"n":"松原市"},{"bb":4292608,"bl":11610112,"br":11820032,"bt":4519936,"i":181,"n":"中卫市"},{"bb":5348352,"bl":14274560,"br":14620672,"bt":5748736,"i":49,"n":"牡丹江市"},{"bb":3776512,"bl":12590080,"br":12827648,"bt":3943424,"i":269,"n":"驻马店市"},{"bb":2883584,"bl":13178880,"br":13419520,"bt":3060736,"i":300,"n":"福州市"},{"bb":3085312,"bl":10027008,"br":10505216,"bt":3461120,"i":97,"n":"山南地区"},{"bb":3130368,"bl":9144320,"br":10058752,"bt":3716096,"i":102,"n":"日喀则地区"},{"bb":3173376,"bl":10259456,"br":10994688,"bt":3569664,"i":98,"n":"林芝地区"},{"bb":3948544,"bl":11834368,"br":12029952,"bt":4154368,"i":171,"n":"宝鸡市"},{"bb":4114432,"bl":12531712,"br":12652544,"bt":4207616,"i":211,"n":"焦作市"},{"bb":3878912,"bl":12700672,"br":12875776,"bt":4050944,"i":308,"n":"周口市"},{"bb":5217280,"bl":13987840,"br":14252032,"bt":5537792,"i":55,"n":"吉林市"},{"bb":3338240,"bl":12211200,"br":12395520,"bt":3457024,"i":312,"n":"张家界市"},{"bb":3404800,"bl":13046784,"br":13237248,"bt":3549184,"i":252,"n":"黄山市"},{"bb":397312,"bl":12086272,"br":13144064,"bt":2288640,"i":296,"n":"海南省直辖县级行政单位"},{"bb":5741568,"bl":14416896,"br":15040512,"bt":6154240,"i":42,"n":"佳木斯市"},{"bb":4065280,"bl":12898304,"br":13091840,"bt":4274176,"i":286,"n":"济宁市"},{"bb":3319808,"bl":13020160,"br":13105152,"bt":3474432,"i":225,"n":"景德镇市"},{"bb":4499456,"bl":11852800,"br":12409856,"bt":4968448,"i":283,"n":"鄂尔多斯市"},{"bb":4957184,"bl":13758464,"br":14004224,"bt":5069824,"i":227,"n":"本溪市"},{"bb":2850816,"bl":13186048,"br":13328384,"bt":2951168,"i":195,"n":"莆田市"},{"bb":5785600,"bl":13626368,"br":14102528,"bt":6233088,"i":41,"n":"齐齐哈尔市"},{"bb":4353024,"bl":13308928,"br":13574144,"bt":4619264,"i":326,"n":"烟台市"},{"bb":3011584,"bl":13025280,"br":13279232,"bt":3269632,"i":133,"n":"南平市"},{"bb":3155968,"bl":13213696,"br":13408256,"bt":3349504,"i":292,"n":"丽水市"},{"bb":4866048,"bl":12903424,"br":13276160,"bt":5226496,"i":207,"n":"承德市"},{"bb":3660800,"bl":12658688,"br":12908544,"bt":3828736,"i":214,"n":"信阳市"},{"bb":2976768,"bl":12672000,"br":12907520,"bt":3225600,"i":318,"n":"吉安市"},{"bb":3383296,"bl":13345792,"br":13496320,"bt":3519488,"i":293,"n":"绍兴市"},{"bb":2540544,"bl":12669952,"br":12850176,"bt":2732032,"i":301,"n":"惠州市"},{"bb":2572288,"bl":12511232,"br":12623872,"bt":2684928,"i":138,"n":"佛山市"},{"bb":3691520,"bl":13244416,"br":13358080,"bt":3783680,"i":160,"n":"镇江市"},{"bb":5019648,"bl":13767680,"br":13970432,"bt":5204992,"i":184,"n":"抚顺市"},{"bb":4680704,"bl":13081600,"br":13298688,"bt":4907008,"i":265,"n":"唐山市"},{"bb":4474880,"bl":12637184,"br":12857344,"bt":4662272,"i":150,"n":"石家庄市"},{"bb":3834880,"bl":13160448,"br":13320192,"bt":4018176,"i":162,"n":"淮安市"},{"bb":4774912,"bl":12670976,"br":12965888,"bt":5155840,"i":264,"n":"张家口市"},{"bb":3602432,"bl":13028352,"br":13193216,"bt":3748864,"i":251,"n":"巢湖市"},{"bb":3335168,"bl":13456384,"br":13617152,"bt":3540992,"i":180,"n":"宁波市"},{"bb":2574336,"bl":12637184,"br":12721152,"bt":2633728,"i":119,"n":"东莞市"},{"bb":4370432,"bl":13053952,"br":13179904,"bt":4597760,"i":235,"n":"滨州市"},{"bb":3965952,"bl":12782592,"br":12986368,"bt":4121600,"i":154,"n":"商丘市"},{"bb":4756480,"bl":13199360,"br":13344768,"bt":4928512,"i":148,"n":"秦皇岛市"},{"bb":2516992,"bl":12597248,"br":12657664,"bt":2589696,"i":187,"n":"中山市"},{"bb":4166656,"bl":12649472,"br":12802048,"bt":4327424,"i":267,"n":"安阳市"},{"bb":5651456,"bl":13776896,"br":14004224,"bt":5990400,"i":50,"n":"大庆市"},{"bb":3513344,"bl":13391872,"br":13531136,"bt":3615744,"i":334,"n":"嘉兴市"},{"bb":3228672,"bl":13390848,"br":13580288,"bt":3398656,"i":244,"n":"台州市"},{"bb":3890176,"bl":13129728,"br":13267968,"bt":4062208,"i":277,"n":"宿迁市"},{"bb":2569216,"bl":12792832,"br":12940288,"bt":2673664,"i":339,"n":"汕尾市"},{"bb":3769344,"bl":13249536,"br":13349888,"bt":3928064,"i":346,"n":"扬州市"},{"bb":3259392,"bl":13138944,"br":13287424,"bt":3419136,"i":243,"n":"衢州市"},{"bb":2428928,"bl":12468224,"br":12609536,"bt":2598912,"i":302,"n":"江门市"},{"bb":2670592,"bl":12460032,"br":12682240,"bt":2883584,"i":197,"n":"清远市"},{"bb":3816448,"bl":13298688,"br":13470720,"bt":4078592,"i":223,"n":"盐城市"},{"bb":2468864,"bl":12585984,"br":12737536,"bt":2550784,"i":140,"n":"珠海市"},{"bb":4354048,"bl":11755520,"br":11985920,"bt":4591616,"i":322,"n":"吴忠市"},{"bb":4405248,"bl":13148160,"br":13286400,"bt":4577280,"i":174,"n":"东营市"},{"bb":3424256,"bl":13528064,"br":13692928,"bt":3599360,"i":245,"n":"舟山市"},{"bb":3529728,"bl":13274112,"br":13414400,"bt":3635200,"i":294,"n":"湖州市"},{"bb":4931584,"bl":13522944,"br":13629440,"bt":5052416,"i":228,"n":"盘锦市"},{"bb":3652608,"bl":12549120,"br":12706816,"bt":3798016,"i":371,"n":"随州市"},{"bb":4761600,"bl":8686592,"br":9362432,"bt":5230592,"i":85,"n":"阿克苏地区"},{"bb":4944896,"bl":13438976,"br":13648896,"bt":5152768,"i":166,"n":"锦州市"},{"bb":4200448,"bl":8289280,"br":8892416,"bt":4877312,"i":83,"n":"喀什地区"},{"bb":5012480,"bl":9713664,"br":10233856,"bt":5381120,"i":89,"n":"吐鲁番地区"},{"bb":3676160,"bl":12182528,"br":12423168,"bt":3908608,"i":216,"n":"十堰市"},{"bb":4049920,"bl":8616960,"br":9454592,"bt":4787200,"i":82,"n":"和田地区"},{"bb":3419136,"bl":12749824,"br":12860416,"bt":3525632,"i":311,"n":"黄石市"},{"bb":4245504,"bl":12833792,"br":12975104,"bt":4417536,"i":366,"n":"聊城市"},{"bb":3474432,"bl":9467904,"br":10578944,"bt":4342784,"i":101,"n":"那曲地区"},{"bb":6571008,"bl":13490176,"br":14142464,"bt":7054336,"i":38,"n":"大兴安岭地区"},{"bb":4264960,"bl":13085696,"br":13195264,"bt":4454400,"i":354,"n":"淄博市"},{"bb":2620416,"bl":12941312,"br":13066240,"bt":2694144,"i":303,"n":"汕头市"},{"bb":2434048,"bl":11965440,"br":12091392,"bt":2541568,"i":204,"n":"防城港市"},{"bb":3408896,"bl":12384256,"br":12701696,"bt":3567616,"i":157,"n":"荆州市"},{"bb":2361344,"bl":12116992,"br":12223488,"bt":2487296,"i":295,"n":"北海市"},{"bb":3564544,"bl":13132800,"br":13218816,"bt":3680256,"i":129,"n":"芜湖市"},{"bb":3611648,"bl":12843008,"br":13053952,"bt":3828736,"i":298,"n":"六安市"},{"bb":4331520,"bl":12887040,"br":13092864,"bt":4555776,"i":372,"n":"德州市"},{"bb":4925440,"bl":13230080,"br":13504512,"bt":5190656,"i":280,"n":"朝阳市"},{"bb":2436096,"bl":12043264,"br":12231680,"bt":2578432,"i":145,"n":"钦州市"},{"bb":5171200,"bl":8924160,"br":9491456,"bt":5567488,"i":90,"n":"伊犁哈萨克自治州"},{"bb":2452480,"bl":12194816,"br":12346368,"bt":2631680,"i":361,"n":"玉林市"},{"bb":4702208,"bl":12532736,"br":12753920,"bt":4947968,"i":355,"n":"大同市"},{"bb":4827136,"bl":13565952,"br":13694976,"bt":4976640,"i":281,"n":"营口市"},{"bb":5069824,"bl":12374016,"br":13373440,"bt":5875712,"i":63,"n":"锡林郭勒盟"},{"bb":4783104,"bl":8756224,"br":9765888,"bt":5529600,"i":87,"n":"新疆直辖县级行政单位"},{"bb":5452800,"bl":9412608,"br":9578496,"bt":5784576,"i":95,"n":"克拉玛依市"},{"bb":3209216,"bl":12990464,"br":13078528,"bt":3308544,"i":279,"n":"鹰潭市"},{"bb":2596864,"bl":12870656,"br":12985344,"bt":2709504,"i":259,"n":"揭阳市"},{"bb":2265088,"bl":12204032,"br":12366848,"bt":2487296,"i":198,"n":"湛江市"},{"bb":2573312,"bl":12156928,"br":12320768,"bt":2742272,"i":341,"n":"贵港市"},{"bb":2724864,"bl":12088320,"br":12266496,"bt":2988032,"i":305,"n":"柳州市"},{"bb":2447360,"bl":11863040,"br":12036096,"bt":2659328,"i":144,"n":"崇左市"},{"bb":2597888,"bl":11627520,"br":12011520,"bt":2871296,"i":203,"n":"百色市"},{"bb":3484672,"bl":12746752,"br":12813312,"bt":3562496,"i":122,"n":"鄂州市"},{"bb":4793344,"bl":13734912,"br":13996032,"bt":5008384,"i":282,"n":"丹东市"},{"bb":2766848,"bl":12203008,"br":12412928,"bt":3028992,"i":142,"n":"桂林市"},{"bb":3105792,"bl":13317120,"br":13512704,"bt":3306496,"i":178,"n":"温州市"},{"bb":2772992,"bl":13088768,"br":13255680,"bt":2972672,"i":134,"n":"泉州市"},{"bb":3530752,"bl":12614656,"br":12758016,"bt":3722240,"i":310,"n":"孝感市"},{"bb":3446784,"bl":12735488,"br":12930048,"bt":3690496,"i":271,"n":"黄冈市"},{"bb":3358720,"bl":12639232,"br":12800000,"bt":3521536,"i":362,"n":"咸宁市"},{"bb":4861952,"bl":12282880,"br":12782592,"bt":5342208,"i":168,"n":"乌兰察布市"},{"bb":5130240,"bl":13743104,"br":13928448,"bt":5358592,"i":60,"n":"铁岭市"},{"bb":2634752,"bl":12718080,"br":12869632,"bt":2832384,"i":200,"n":"河源市"},{"bb":4469760,"bl":10817536,"br":11897856,"bt":5253120,"i":230,"n":"阿拉善盟"},{"bb":5087232,"bl":13471744,"br":13690880,"bt":5260288,"i":59,"n":"阜新市"},{"bb":4838400,"bl":13601792,"br":13778944,"bt":5069824,"i":320,"n":"鞍山市"},{"bb":2568192,"bl":12281856,"br":12432384,"bt":2786304,"i":304,"n":"梧州市"},{"bb":2694144,"bl":12309504,"br":12476416,"bt":2877440,"i":260,"n":"贺州市"},{"bb":4862976,"bl":11711488,"br":12235776,"bt":5202944,"i":169,"n":"巴彦淖尔市"},{"bb":2432000,"bl":12388352,"br":12510208,"bt":2577408,"i":199,"n":"阳江市"},{"bb":2781184,"bl":12897280,"br":13109248,"bt":2985984,"i":193,"n":"龙岩市"},{"bb":3016704,"bl":13197312,"br":13443072,"bt":3189760,"i":192,"n":"宁德市"},{"bb":2660352,"bl":12836864,"br":13019136,"bt":2850816,"i":141,"n":"梅州市"},{"bb":2540544,"bl":12362752,"br":12527616,"bt":2655232,"i":258,"n":"云浮市"},{"bb":2648064,"bl":12069888,"br":12297216,"bt":2793472,"i":202,"n":"来宾市"},{"bb":2577408,"bl":11530240,"br":11823104,"bt":2792448,"i":177,"n":"文山壮族苗族自治州"},{"bb":3145728,"bl":12468224,"br":12591104,"bt":3238912,"i":313,"n":"湘潭市"},{"bb":2985984,"bl":12575744,"br":12703744,"bt":3233792,"i":222,"n":"株洲市"},{"bb":2778112,"bl":11471872,"br":11670528,"bt":3111936,"i":249,"n":"曲靖市"},{"bb":3193856,"bl":12154880,"br":12290048,"bt":3436544,"i":274,"n":"湘西土家族苗族自治州"},{"bb":2498560,"bl":11038720,"br":11392000,"bt":2837504,"i":108,"n":"普洱市"},{"bb":3225600,"bl":12325888,"br":12574720,"bt":3422208,"i":272,"n":"益阳市"},{"bb":2750464,"bl":10919936,"br":11139072,"bt":2963456,"i":112,"n":"保山市"},{"bb":2548736,"bl":11332608,"br":11610112,"bt":2830336,"i":107,"n":"红河哈尼族彝族自治州"},{"bb":3098624,"bl":12643328,"br":12722176,"bt":3230720,"i":350,"n":"萍乡市"},{"bb":3368960,"bl":12063744,"br":12317696,"bt":3662848,"i":373,"n":"恩施土家族苗族自治州"},{"bb":3279872,"bl":12300288,"br":12503040,"bt":3499008,"i":219,"n":"常德市"},{"bb":2994176,"bl":12417024,"br":12611584,"bt":3163136,"i":159,"n":"衡阳市"},{"bb":3281920,"bl":12503040,"br":12708864,"bt":3464192,"i":220,"n":"岳阳市"},{"bb":4226048,"bl":9181184,"br":10450944,"bt":5369856,"i":86,"n":"巴音郭楞蒙古自治州"},{"bb":5270528,"bl":9661440,"br":9906176,"bt":5593088,"i":92,"n":"乌鲁木齐市"},{"bb":2816000,"bl":11005952,"br":11249664,"bt":3067904,"i":111,"n":"大理白族自治州"},{"bb":2653184,"bl":11274240,"br":11484160,"bt":2852864,"i":106,"n":"玉溪市"},{"bb":2924544,"bl":10924032,"br":11094016,"bt":3279872,"i":113,"n":"怒江傈僳族自治州"},{"bb":2393088,"bl":11125760,"br":11338752,"bt":2567168,"i":109,"n":"西双版纳傣族自治州"},{"bb":2681856,"bl":11864064,"br":12152832,"bt":2933760,"i":143,"n":"河池市"},{"bb":3475456,"bl":12273664,"br":12478464,"bt":3686400,"i":270,"n":"宜昌市"},{"bb":3172352,"bl":12678144,"br":12931072,"bt":3368960,"i":278,"n":"宜春市"},{"bb":3490816,"bl":12238848,"br":12672000,"bt":3723264,"i":345,"n":"湖北省直辖县级行政单位"},{"bb":2416640,"bl":12281856,"br":12434432,"bt":2580480,"i":139,"n":"茂名市"},{"bb":3775488,"bl":12354560,"br":12670976,"bt":3979264,"i":309,"n":"南阳市"},{"bb":3908608,"bl":12957696,"br":13032448,"bt":4039680,"i":253,"n":"淮北市"},{"bb":3833856,"bl":12995584,"br":13145088,"bt":3939328,"i":126,"n":"蚌埠市"},{"bb":4078592,"bl":12782592,"br":12960768,"bt":4257792,"i":353,"n":"菏泽市"},{"bb":4421632,"bl":12823552,"br":12977152,"bt":4605952,"i":208,"n":"衡水市"},{"bb":3648512,"bl":13177856,"br":13236224,"bt":3713024,"i":358,"n":"马鞍山市"},{"bb":2985984,"bl":11139072,"br":11565056,"bt":3394560,"i":80,"n":"凉山彝族自治州"},{"bb":2990080,"bl":11258880,"br":11383808,"bt":3147776,"i":81,"n":"攀枝花市"},{"bb":3294208,"bl":13273088,"br":13447168,"bt":3442688,"i":333,"n":"金华市"},{"bb":3721216,"bl":13042688,"br":13274112,"bt":3901440,"i":189,"n":"滁州市"},{"bb":4379648,"bl":12663808,"br":12898304,"bt":4527104,"i":266,"n":"邢台市"},{"bb":4056064,"bl":13071360,"br":13271040,"bt":4304896,"i":234,"n":"临沂市"},{"bb":3540992,"bl":11738112,"br":11909120,"bt":3722240,"i":291,"n":"南充市"},{"bb":4184064,"bl":12787712,"br":12926976,"bt":4305920,"i":209,"n":"濮阳市"},{"bb":3793920,"bl":12788736,"br":12985344,"bt":3950592,"i":128,"n":"阜阳市"},{"bb":3945472,"bl":12285952,"br":12472320,"bt":4152320,"i":212,"n":"三门峡市"},{"bb":4166656,"bl":12461056,"br":12650496,"bt":4285440,"i":290,"n":"晋城市"},{"bb":3209216,"bl":11534336,"br":11729920,"bt":3389440,"i":186,"n":"宜宾市"},{"bb":3549184,"bl":11554816,"br":11709440,"bt":3702784,"i":74,"n":"德阳市"},{"bb":3186688,"bl":11705344,"br":11843584,"bt":3397632,"i":331,"n":"泸州市"},{"bb":3908608,"bl":12931072,"br":13158400,"bt":4092928,"i":370,"n":"宿州市"},{"bb":4067328,"bl":13003776,"br":13118464,"bt":4184064,"i":172,"n":"枣庄市"},{"bb":3523584,"bl":11874304,"br":12085248,"bt":3785728,"i":369,"n":"达州市"},{"bb":4504576,"bl":8181760,"br":8781824,"bt":5044224,"i":84,"n":"克孜勒苏柯尔克孜自治州"},{"bb":2762752,"bl":11212800,"br":11409408,"bt":3043328,"i":105,"n":"楚雄彝族自治州"},{"bb":3731456,"bl":13319168,"br":13421568,"bt":3902464,"i":276,"n":"泰州市"},{"bb":3453952,"bl":12887040,"br":13108224,"bt":3646464,"i":130,"n":"安庆市"},{"bb":3440640,"bl":11598848,"br":11773952,"bt":3565568,"i":242,"n":"资阳市"},{"bb":3046400,"bl":11452416,"br":11724800,"bt":3313664,"i":336,"n":"昭通市"},{"bb":3345408,"bl":11583488,"br":11719680,"bt":3436544,"i":78,"n":"自贡市"},{"bb":4832256,"bl":13271040,"br":13481984,"bt":5015552,"i":319,"n":"葫芦岛市"},{"bb":3121152,"bl":11756544,"br":12047360,"bt":3384320,"i":262,"n":"遵义市"},{"bb":2978816,"bl":11063296,"br":11301888,"bt":3220480,"i":114,"n":"丽江市"},{"bb":2916352,"bl":12955648,"br":13211648,"bt":3121152,"i":254,"n":"三明市"},{"bb":2722816,"bl":12563456,"br":12774400,"bt":2922496,"i":137,"n":"韶关市"},{"bb":3003392,"bl":11813888,"br":11943936,"bt":3149824,"i":146,"n":"贵阳市"},{"bb":3790848,"bl":12953600,"br":13049856,"bt":3873792,"i":250,"n":"淮南市"},{"bb":2624512,"bl":10984448,"br":11194368,"bt":2863104,"i":110,"n":"临沧市"},{"bb":3172352,"bl":12678144,"br":12931072,"bt":3368960,"i":278,"n":"宜春市"},{"bb":5569536,"bl":14516224,"br":14912512,"bt":5849088,"i":46,"n":"鸡西市"},{"bb":6006784,"bl":13887488,"br":14420992,"bt":6590464,"i":39,"n":"黑河市"},{"bb":5670912,"bl":13900800,"br":14312448,"bt":6092800,"i":44,"n":"绥化市"},{"bb":5920768,"bl":14435328,"br":14753792,"bt":6134784,"i":43,"n":"鹤岗市"},{"bb":5684224,"bl":14483456,"br":14688256,"bt":5805056,"i":47,"n":"七台河市"},{"bb":5715968,"bl":14545920,"br":14956544,"bt":6005760,"i":45,"n":"双鸭山市"},{"bb":5256192,"bl":13726720,"br":14003200,"bt":5460992,"i":56,"n":"四平市"},{"bb":5038080,"bl":14040064,"br":14285824,"bt":5257216,"i":57,"n":"白山市"},{"bb":5177344,"bl":13897728,"br":14010368,"bt":5319680,"i":183,"n":"辽源市"},{"bb":2900992,"bl":11716608,"br":11865088,"bt":3058688,"i":263,"n":"安顺市"},{"bb":3119104,"bl":11995136,"br":12187648,"bt":3366912,"i":205,"n":"铜仁地区"},{"bb":3484672,"bl":11794432,"br":11947008,"bt":3593216,"i":241,"n":"广安市"},{"bb":3679232,"bl":11645952,"br":11886592,"bt":3864576,"i":329,"n":"广元市"},{"bb":3405824,"bl":11449344,"br":11634688,"bt":3529728,"i":77,"n":"眉山市"},{"bb":3572736,"bl":11549696,"br":11770880,"bt":3878912,"i":240,"n":"绵阳市"},{"bb":3281920,"bl":11456512,"br":11607040,"bt":3474432,"i":79,"n":"乐山市"},{"bb":3378176,"bl":11608064,"br":11739136,"bt":3488768,"i":248,"n":"内江市"},{"bb":3505152,"bl":11695104,"br":11801600,"bt":3633152,"i":330,"n":"遂宁市"},{"bb":3558400,"bl":11191296,"br":11627520,"bt":4047872,"i":185,"n":"阿坝藏族羌族自治州"},{"bb":3170304,"bl":12744704,"br":12848128,"bt":3244032,"i":164,"n":"新余市"},{"bb":4021248,"bl":11517952,"br":11761664,"bt":4282368,"i":136,"n":"定西市"},{"bb":2795520,"bl":12681216,"br":12986368,"bt":3123200,"i":365,"n":"赣州市"},{"bb":4556800,"bl":11290624,"br":11438080,"bt":4696064,"i":34,"n":"金昌市"},{"bb":4700160,"bl":11866112,"br":11932672,"bt":4826112,"i":123,"n":"乌海市"},{"bb":4640768,"bl":11798528,"br":11911168,"bt":4752384,"i":335,"n":"石嘴山市"},{"bb":4282368,"bl":12631040,"br":12857344,"bt":4417536,"i":151,"n":"邯郸市"},{"bb":4199424,"bl":12690432,"br":12776448,"bt":4283392,"i":215,"n":"鹤壁市"},{"bb":3926016,"bl":12631040,"br":12724224,"bt":4003840,"i":344,"n":"漯河市"},{"bb":3041280,"bl":12867584,"br":13059072,"bt":3292160,"i":226,"n":"抚州市"},{"bb":2812928,"bl":12351488,"br":12520448,"bt":3088384,"i":314,"n":"永州市"}],"dver":1253,"fver":1100} \ No newline at end of file diff --git a/android/src/main/assets/cfg/a/DVVersion.cfg b/android/src/main/assets/cfg/a/DVVersion.cfg new file mode 100644 index 00000000..54429dfa --- /dev/null +++ b/android/src/main/assets/cfg/a/DVVersion.cfg @@ -0,0 +1 @@ +{"std": 10, "c": 522, "stg": 11, "assets": [{"path": "mode_1/map.sdkrs", "version": 36}, {"path": "mode_1/map.sty", "version": 496}, {"path": "mode_1/reduct.sdkrs", "version": 12}, {"path": "mode_1/reduct.sty", "version": 323}, {"path": "mode_1/traffic.sdkrs", "version": 291}, {"path": "mode_1/traffic.sty", "version": 1116}], "stc": 1253, "h": 456, "idrresver": 133, "sc": 20160613, "gd": 79, "didr": 1194, "idrcfgver": 1135, "idrs": 14, "d": 522} \ No newline at end of file diff --git a/android/src/main/assets/cfg/a/mode_1/map.sdkrs b/android/src/main/assets/cfg/a/mode_1/map.sdkrs new file mode 100644 index 00000000..7b157712 Binary files /dev/null and b/android/src/main/assets/cfg/a/mode_1/map.sdkrs differ diff --git a/android/src/main/assets/cfg/a/mode_1/map.sty b/android/src/main/assets/cfg/a/mode_1/map.sty new file mode 100644 index 00000000..abd7c571 Binary files /dev/null and b/android/src/main/assets/cfg/a/mode_1/map.sty differ diff --git a/android/src/main/assets/cfg/a/mode_1/reduct.sdkrs b/android/src/main/assets/cfg/a/mode_1/reduct.sdkrs new file mode 100644 index 00000000..0810b125 Binary files /dev/null and b/android/src/main/assets/cfg/a/mode_1/reduct.sdkrs differ diff --git a/android/src/main/assets/cfg/a/mode_1/reduct.sty b/android/src/main/assets/cfg/a/mode_1/reduct.sty new file mode 100644 index 00000000..6cca3a86 Binary files /dev/null and b/android/src/main/assets/cfg/a/mode_1/reduct.sty differ diff --git a/android/src/main/assets/cfg/a/mode_1/traffic.sdkrs b/android/src/main/assets/cfg/a/mode_1/traffic.sdkrs new file mode 100644 index 00000000..cf1e317b Binary files /dev/null and b/android/src/main/assets/cfg/a/mode_1/traffic.sdkrs differ diff --git a/ios/lib/BaiduMapAPI_Map.framework/Resources/mapapi.bundle/files/mapstyle.sty b/android/src/main/assets/cfg/a/mode_1/traffic.sty similarity index 52% rename from ios/lib/BaiduMapAPI_Map.framework/Resources/mapapi.bundle/files/mapstyle.sty rename to android/src/main/assets/cfg/a/mode_1/traffic.sty index 40be4952..3550f56e 100644 Binary files a/ios/lib/BaiduMapAPI_Map.framework/Resources/mapapi.bundle/files/mapstyle.sty and b/android/src/main/assets/cfg/a/mode_1/traffic.sty differ diff --git a/android/src/main/assets/cfg/idrres/DVIndoor.cfg b/android/src/main/assets/cfg/idrres/DVIndoor.cfg new file mode 100644 index 00000000..e7b9121b --- /dev/null +++ b/android/src/main/assets/cfg/idrres/DVIndoor.cfg @@ -0,0 +1,158 @@ +{"citys":[ +{"bb":2523821,"bl":12682725,"br":12720698,"bt":2554556,"i":2912,"n":"香港特别行政区-香港特别行政区"}, +{"bb":2521743,"bl":12636529,"br":12644693,"bt":2529413,"i":140,"n":"广东省-珠海市"}, +{"bb":3527130,"bl":12706616,"br":12743019,"bt":3595932,"i":218,"n":"湖北省-武汉市"}, +{"bb":4275086,"bl":13190039,"br":13294707,"bt":4397364,"i":287,"n":"山东省-潍坊市"}, +{"bb":3302228,"bl":12890363,"br":12910477,"bt":3338311,"i":163,"n":"江西省-南昌市"}, +{"bb":3852302,"bl":13336346,"br":13394828,"bt":3935484,"i":223,"n":"江苏省-盐城市"}, +{"bb":4791047,"bl":11891862,"br":11892309,"bt":4791584,"i":123,"n":"内蒙古自治区-乌海市"}, +{"bb":4948459,"bl":12789601,"br":12790946,"bt":4958900,"i":264,"n":"河北省-张家口市"}, +{"bb":3356523,"bl":12876437,"br":12923113,"bt":3447675,"i":349,"n":"江西省-九江市"}, +{"bb":4618696,"bl":11821341,"br":11832385,"bt":4623402,"i":360,"n":"宁夏回族自治区-银川市"}, +{"bb":3052009,"bl":11323053,"br":11323150,"bt":3052163,"i":81,"n":"四川省-攀枝花市"}, +{"bb":3607062,"bl":11596828,"br":11623998,"bt":3628023,"i":74,"n":"四川省-德阳市"}, +{"bb":3669880,"bl":11658160,"br":11662033,"bt":3672163,"i":240,"n":"四川省-绵阳市"}, +{"bb":3550018,"bl":11537534,"br":11607721,"bt":3610240,"i":75,"n":"四川省-成都市"}, +{"bb":3796716,"bl":11780842,"br":11787354,"bt":3798733,"i":329,"n":"四川省-广元市"}, +{"bb":4337790,"bl":12912536,"br":12912855,"bt":4339636,"i":366,"n":"山东省-聊城市"}, +{"bb":2454949,"bl":12348740,"br":12351009,"bt":2455653,"i":139,"n":"广东省-茂名市"}, +{"bb":5405222,"bl":9754780,"br":9754976,"bt":5405378,"i":92,"n":"新疆维吾尔自治区-乌鲁木齐市"}, +{"bb":2433348,"bl":12147231,"br":12147389,"bt":2433497,"i":295,"n":"广西壮族自治区-北海市"}, +{"bb":2628381,"bl":12200925,"br":12201207,"bt":2628900,"i":341,"n":"广西壮族自治区-贵港市"}, +{"bb":2773447,"bl":12180362,"br":12184034,"bt":2776702,"i":305,"n":"广西壮族自治区-柳州市"}, +{"bb":2786227,"bl":12419017,"br":12419137,"bt":2786391,"i":260,"n":"广西壮族自治区-贺州市"}, +{"bb":2491207,"bl":12092552,"br":12093347,"bt":2493227,"i":145,"n":"广西壮族自治区-钦州市"}, +{"bb":2590032,"bl":12053096,"br":12069583,"bt":2600266,"i":261,"n":"广西壮族自治区-南宁市"}, +{"bb":2887725,"bl":12278483,"br":12281780,"bt":2892368,"i":142,"n":"广西壮族自治区-桂林市"}, +{"bb":4955113,"bl":12431309,"br":12439334,"bt":4960956,"i":321,"n":"内蒙古自治区-呼和浩特市"}, +{"bb":6345148,"bl":13072844,"br":13073236,"bt":6345462,"i":61,"n":"内蒙古自治区-呼伦贝尔市"}, +{"bb":4990069,"bl":12592106,"br":12592285,"bt":4990204,"i":168,"n":"内蒙古自治区-乌兰察布市"}, +{"bb":4947775,"bl":11956262,"br":11958446,"bt":4949579,"i":169,"n":"内蒙古自治区-巴彦淖尔市"}, +{"bb":4778002,"bl":12217855,"br":12246820,"bt":4813085,"i":283,"n":"内蒙古自治区-鄂尔多斯市"}, +{"bb":4923267,"bl":12225069,"br":12249286,"bt":4936424,"i":229,"n":"内蒙古自治区-包头市"}, +{"bb":5170734,"bl":13238319,"br":13238738,"bt":5171113,"i":297,"n":"内蒙古自治区-赤峰市"}, +{"bb":5426862,"bl":12922482,"br":12923575,"bt":5428073,"i":63,"n":"内蒙古自治区-锡林郭勒盟"}, +{"bb":5702412,"bl":14091136,"br":14104570,"bt":5715202,"i":48,"n":"黑龙江省-哈尔滨市"}, +{"bb":5845542,"bl":13926100,"br":13926598,"bt":5845973,"i":50,"n":"黑龙江省-大庆市"}, +{"bb":3207014,"bl":11099787,"br":11099850,"bt":3207075,"i":115,"n":"云南省-迪庆藏族自治州"}, +{"bb":4086393,"bl":13267591,"br":13267744,"bt":4086520,"i":347,"n":"江苏省-连云港市"}, +{"bb":3392072,"bl":13048485,"br":13049434,"bt":3392699,"i":225,"n":"江西省-景德镇市"}, +{"bb":3969832,"bl":12562386,"br":12614645,"bt":4028604,"i":213,"n":"河南省-平顶山市"}, +{"bb":4537682,"bl":12741220,"br":12764689,"bt":4575193,"i":150,"n":"河北省-石家庄市"}, +{"bb":3696668,"bl":13192783,"br":13193337,"bt":3700308,"i":358,"n":"安徽省-马鞍山市"}, +{"bb":4796992,"bl":13266340,"br":13332691,"bt":4839496,"i":148,"n":"河北省-秦皇岛市"}, +{"bb":5112739,"bl":13793419,"br":13793793,"bt":5113165,"i":184,"n":"辽宁省-抚顺市"}, +{"bb":2865049,"bl":13027531,"br":13027848,"bt":2865190,"i":193,"n":"福建省-龙岩市"}, +{"bb":3204806,"bl":12795783,"br":12795916,"bt":3204919,"i":164,"n":"江西省-新余市"}, +{"bb":4691272,"bl":13032908,"br":13104173,"bt":4748502,"i":332,"n":"天津市-天津市"}, +{"bb":5167523,"bl":13774211,"br":13787926,"bt":5177785,"i":60,"n":"辽宁省-铁岭市"}, +{"bb":3488881,"bl":13326393,"br":13408164,"bt":3536951,"i":179,"n":"浙江省-杭州市"}, +{"bb":3716512,"bl":13248134,"br":13340225,"bt":3772481,"i":160,"n":"江苏省-镇江市"}, +{"bb":5414532,"bl":14091186,"br":14091560,"bt":5415314,"i":55,"n":"吉林省-吉林市"}, +{"bb":4734300,"bl":13131761,"br":13188308,"bt":4868439,"i":265,"n":"河北省-唐山市"}, +{"bb":4849552,"bl":12613435,"br":12613574,"bt":4849720,"i":355,"n":"山西省-大同市"}, +{"bb":3565809,"bl":12389026,"br":12398900,"bt":3573668,"i":270,"n":"湖北省-宜昌市"}, +{"bb":3574290,"bl":13480966,"br":13561930,"bt":3691836,"i":289,"n":"上海市-上海市"}, +{"bb":3789734,"bl":13286625,"br":13299061,"bt":3844878,"i":346,"n":"江苏省-扬州市"}, +{"bb":3652849,"bl":13214228,"br":13252441,"bt":3786221,"i":315,"n":"江苏省-南京市"}, +{"bb":3478355,"bl":13593355,"br":13617454,"bt":3484936,"i":245,"n":"浙江省-舟山市"}, +{"bb":4305001,"bl":13100634,"br":13100912,"bt":4309273,"i":124,"n":"山东省-莱芜市"}, +{"bb":3238216,"bl":12569902,"br":12649824,"bt":3260551,"i":158,"n":"湖南省-长沙市"}, +{"bb":3203018,"bl":12587468,"br":12597602,"bt":3209218,"i":222,"n":"湖南省-株洲市"}, +{"bb":5077825,"bl":13731260,"br":13749941,"bt":5121310,"i":58,"n":"辽宁省-沈阳市"}, +{"bb":2960635,"bl":12795397,"br":12795614,"bt":2960797,"i":365,"n":"江西省-赣州市"}, +{"bb":2553554,"bl":12669597,"br":12728039,"bt":2589794,"i":340,"n":"广东省-深圳市"}, +{"bb":3861940,"bl":13065126,"br":13065476,"bt":3862133,"i":126,"n":"安徽省-蚌埠市"}, +{"bb":2622645,"bl":12521060,"br":12550046,"bt":2654414,"i":338,"n":"广东省-肇庆市"}, +{"bb":4299423,"bl":12999677,"br":13042334,"bt":4303466,"i":325,"n":"山东省-泰安市"}, +{"bb":3428296,"bl":13385613,"br":13457111,"bt":3495580,"i":293,"n":"浙江省-绍兴市"}, +{"bb":3177635,"bl":13422861,"br":13449765,"bt":3230896,"i":178,"n":"浙江省-温州市"}, +{"bb":2659275,"bl":12993669,"br":12997463,"bt":2661424,"i":303,"n":"广东省-汕头市"}, +{"bb":2590213,"bl":12730639,"br":12743727,"bt":2630014,"i":301,"n":"广东省-惠州市"}, +{"bb":4344009,"bl":13120612,"br":13170322,"bt":4408571,"i":354,"n":"山东省-淄博市"}, +{"bb":4108973,"bl":12730348,"br":12730821,"bt":4109122,"i":210,"n":"河南省-开封市"}, +{"bb":4407670,"bl":12912609,"br":13049791,"bt":4516609,"i":372,"n":"山东省-德州市"}, +{"bb":2582084,"bl":12644732,"br":12714491,"bt":2628446,"i":119,"n":"广东省-东莞市"}, +{"bb":3526128,"bl":12493446,"br":12493744,"bt":3526471,"i":157,"n":"湖北省-荆州市"}, +{"bb":2705455,"bl":12767850,"br":12768696,"bt":2707511,"i":200,"n":"广东省-河源市"}, +{"bb":4799843,"bl":12911156,"br":13037613,"bt":4906211,"i":131,"n":"北京市-北京市"}, +{"bb":2844916,"bl":11409472,"br":11459615,"bt":2870947,"i":104,"n":"云南省-昆明市"}, +{"bb":3763267,"bl":13341471,"br":13361425,"bt":3863271,"i":276,"n":"江苏省-泰州市"}, +{"bb":3509051,"bl":12809000,"br":12813148,"bt":3514024,"i":311,"n":"湖北省-黄石市"}, +{"bb":4112232,"bl":13054210,"br":13059605,"bt":4113572,"i":172,"n":"山东省-枣庄市"}, +{"bb":4079053,"bl":11769417,"br":11789704,"bt":4083410,"i":196,"n":"甘肃省-天水市"}, +{"bb":4050384,"bl":12102827,"br":12108681,"bt":4064914,"i":323,"n":"陕西省-咸阳市"}, +{"bb":4535789,"bl":12923254,"br":13064395,"bt":4654095,"i":149,"n":"河北省-沧州市"}, +{"bb":5415303,"bl":13937779,"br":13959668,"bt":5427313,"i":53,"n":"吉林省-长春市"}, +{"bb":5003079,"bl":13587899,"br":13593683,"bt":5012719,"i":228,"n":"辽宁省-盘锦市"}, +{"bb":4145139,"bl":13169749,"br":13175035,"bt":4152928,"i":234,"n":"山东省-临沂市"}, +{"bb":4998894,"bl":13484894,"br":13489515,"bt":5002871,"i":166,"n":"辽宁省-锦州市"}, +{"bb":3598889,"bl":13404612,"br":13487529,"bt":3735367,"i":224,"n":"江苏省-苏州市"}, +{"bb":2835999,"bl":13199589,"br":13203748,"bt":2855141,"i":134,"n":"福建省-泉州市"}, +{"bb":2653447,"bl":12931872,"br":12932137,"bt":2653679,"i":259,"n":"广东省-揭阳市"}, +{"bb":3666171,"bl":13300965,"br":13356547,"bt":3722289,"i":348,"n":"江苏省-常州市"}, +{"bb":4473807,"bl":13191176,"br":13211172,"bt":4479691,"i":174,"n":"山东省-东营市"}, +{"bb":3601203,"bl":13173484,"br":13181193,"bt":3656533,"i":129,"n":"安徽省-芜湖市"}, +{"bb":4675535,"bl":13528482,"br":13557968,"bt":4710202,"i":167,"n":"辽宁省-大连市"}, +{"bb":3342019,"bl":13298093,"br":13385859,"bt":3412907,"i":333,"n":"浙江省-金华市"}, +{"bb":2565026,"bl":12577247,"br":12589564,"bt":2586470,"i":302,"n":"广东省-江门市"}, +{"bb":4139749,"bl":12949022,"br":13023028,"bt":4215506,"i":286,"n":"山东省-济宁市"}, +{"bb":3047606,"bl":11877369,"br":11890125,"bt":3052161,"i":146,"n":"贵州省-贵阳市"}, +{"bb":3203783,"bl":12734254,"br":12734589,"bt":3204049,"i":278,"n":"江西省-宜春市"}, +{"bb":2587044,"bl":12565652,"br":12612286,"bt":2639815,"i":138,"n":"广东省-佛山市"}, +{"bb":2400116,"bl":12275244,"br":12292804,"bt":2448849,"i":198,"n":"广东省-湛江市"}, +{"bb":2790632,"bl":13140053,"br":13156436,"bt":2814121,"i":194,"n":"福建省-厦门市"}, +{"bb":4258074,"bl":13353843,"br":13417549,"bt":4394804,"i":236,"n":"山东省-青岛市"}, +{"bb":3539934,"bl":12789264,"br":12805639,"bt":3634786,"i":271,"n":"湖北省-黄冈市"}, +{"bb":4518869,"bl":12525445,"br":12539608,"bt":4537742,"i":176,"n":"山西省-太原市"}, +{"bb":3644700,"bl":13338760,"br":13410637,"bt":3731365,"i":317,"n":"江苏省-无锡市"}, +{"bb":4435721,"bl":13587884,"br":13635133,"bt":4487593,"i":175,"n":"山东省-威海市"}, +{"bb":3259492,"bl":13028660,"br":13028853,"bt":3259727,"i":279,"n":"江西省-鹰潭市"}, +{"bb":3601682,"bl":13115815,"br":13118532,"bt":3604902,"i":337,"n":"安徽省-铜陵市"}, +{"bb":3400579,"bl":12591841,"br":12603364,"bt":3403134,"i":220,"n":"湖南省-岳阳市"}, +{"bb":3757653,"bl":12699641,"br":12773601,"bt":3787585,"i":214,"n":"河南省-信阳市"}, +{"bb":2050684,"bl":12180053,"br":12218401,"bt":2068379,"i":121,"n":"海南省-三亚市"}, +{"bb":4357524,"bl":13012985,"br":13049377,"bt":4393720,"i":288,"n":"山东省-济南市"}, +{"bb":4039348,"bl":13043276,"br":13052901,"bt":4045847,"i":316,"n":"江苏省-徐州市"}, +{"bb":4466450,"bl":13136403,"br":13139105,"bt":4467579,"i":235,"n":"山东省-滨州市"}, +{"bb":3749173,"bl":12483347,"br":12494432,"bt":3754156,"i":156,"n":"湖北省-襄阳市"}, +{"bb":4281756,"bl":11535981,"br":11564035,"bt":4290003,"i":36,"n":"甘肃省-兰州市"}, +{"bb":2478665,"bl":12464890,"br":12465233,"bt":2478788,"i":199,"n":"广东省-阳江市"}, +{"bb":2909266,"bl":13247302,"br":13247675,"bt":2909594,"i":195,"n":"福建省-莆田市"}, +{"bb":3285263,"bl":13126494,"br":13133363,"bt":3286223,"i":364,"n":"江西省-上饶市"}, +{"bb":4051723,"bl":11927734,"br":11954843,"bt":4055540,"i":171,"n":"陕西省-宝鸡市"}, +{"bb":4026329,"bl":12122462,"br":12134828,"bt":4056242,"i":233,"n":"陕西省-西安市"}, +{"bb":4935470,"bl":13607896,"br":13608922,"bt":4936668,"i":281,"n":"辽宁省-营口市"}, +{"bb":4675099,"bl":12854566,"br":12869812,"bt":4680394,"i":307,"n":"河北省-保定市"}, +{"bb":4854894,"bl":13844932,"br":13848679,"bt":4858477,"i":282,"n":"辽宁省-丹东市"}, +{"bb":2790081,"bl":13098085,"br":13115201,"bt":2798347,"i":255,"n":"福建省-漳州市"}, +{"bb":3872851,"bl":12530861,"br":12531072,"bt":3873005,"i":309,"n":"河南省-南阳市"}, +{"bb":4193489,"bl":13299086,"br":13307157,"bt":4197734,"i":173,"n":"山东省-日照市"}, +{"bb":3577158,"bl":13412579,"br":13448829,"bt":3580587,"i":334,"n":"浙江省-嘉兴市"}, +{"bb":4361269,"bl":11327803,"br":11330709,"bt":4363317,"i":66,"n":"青海省-西宁市"}, +{"bb":4084958,"bl":12513944,"br":12519996,"bt":4095327,"i":153,"n":"河南省-洛阳市"}, +{"bb":3716524,"bl":13411213,"br":13543891,"bt":3812000,"i":161,"n":"江苏省-南通市"}, +{"bb":2590954,"bl":12598509,"br":12672841,"bt":2672358,"i":257,"n":"广东省-广州市"}, +{"bb":3061300,"bl":13307685,"br":13308083,"bt":3061571,"i":192,"n":"福建省-宁德市"}, +{"bb":3939594,"bl":13250767,"br":13264890,"bt":3952492,"i":162,"n":"江苏省-淮安市"}, +{"bb":3404095,"bl":11826382,"br":12066229,"bt":3587135,"i":132,"n":"重庆市-重庆市"}, +{"bb":3118760,"bl":12800735,"br":12800923,"bt":3118914,"i":318,"n":"江西省-吉安市"}, +{"bb":3882855,"bl":11915124,"br":11915578,"bt":3883524,"i":352,"n":"陕西省-汉中市"}, +{"bb":4101709,"bl":12646754,"br":12666984,"bt":4111212,"i":268,"n":"河南省-郑州市"}, +{"bb":3392926,"bl":13485188,"br":13567655,"bt":3525038,"i":180,"n":"浙江省-宁波市"}, +{"bb":5001428,"bl":13692398,"br":13692509,"bt":5001585,"i":320,"n":"辽宁省-鞍山市"}, +{"bb":3460579,"bl":12722695,"br":12728898,"bt":3466940,"i":362,"n":"湖北省-咸宁市"}, +{"bb":4769904,"bl":12989988,"br":13005513,"bt":4834853,"i":191,"n":"河北省-廊坊市"}, +{"bb":3705176,"bl":13021544,"br":13077331,"bt":3739673,"i":127,"n":"安徽省-合肥市"}, +{"bb":4328254,"bl":12713178,"br":12749295,"bt":4371287,"i":151,"n":"河北省-邯郸市"}, +{"bb":2945711,"bl":13270470,"br":13291558,"bt":2995111,"i":300,"n":"福建省-福州市"}, +{"bb":2251569,"bl":12281702,"br":12298297,"bt":2263763,"i":125,"n":"海南省-海口市"}, +{"bb":2556005,"bl":12600200,"br":12626685,"bt":2577258,"i":187,"n":"广东省-中山市"}, +{"bb":3966715,"bl":13168130,"br":13212300,"bt":3999787,"i":277,"n":"江苏省-宿迁市"}, +{"bb":3183089,"bl":12674161,"br":12674806,"bt":3184398,"i":350,"n":"江西省-萍乡市"}, +{"bb":4928581,"bl":13438927,"br":13455690,"bt":4949446,"i":319,"n":"辽宁省-葫芦岛市"}, +{"bb":4422186,"bl":12742242,"br":12746942,"bt":4424899,"i":266,"n":"河北省-邢台市"}, +{"bb":4408531,"bl":13352522,"br":13538768,"bt":4527984,"i":326,"n":"山东省-烟台市"}, +{"bb":3245675,"bl":13473870,"br":13519294,"bt":3373843,"i":244,"n":"浙江省-台州市"}, +{"bb":2772752,"bl":12928590,"br":12928829,"bt":2772980,"i":141,"n":"广东省-梅州市"} +],"dver":1150,"fver":1000} diff --git a/android/src/main/assets/cfg/idrres/ResPackIndoorMap.sdkrs b/android/src/main/assets/cfg/idrres/ResPackIndoorMap.sdkrs new file mode 100644 index 00000000..3494de84 Binary files /dev/null and b/android/src/main/assets/cfg/idrres/ResPackIndoorMap.sdkrs differ diff --git a/ios/lib/BaiduMapAPI_Map.framework/Resources/mapapi.bundle/files/indoor/baseindoormap.sty b/android/src/main/assets/cfg/idrres/baseindoormap.sty similarity index 70% rename from ios/lib/BaiduMapAPI_Map.framework/Resources/mapapi.bundle/files/indoor/baseindoormap.sty rename to android/src/main/assets/cfg/idrres/baseindoormap.sty index a5916a6d..557d3135 100644 Binary files a/ios/lib/BaiduMapAPI_Map.framework/Resources/mapapi.bundle/files/indoor/baseindoormap.sty and b/android/src/main/assets/cfg/idrres/baseindoormap.sty differ diff --git a/android/src/main/assets/icon_scale.9.png b/android/src/main/assets/icon_scale.9.png new file mode 100644 index 00000000..9aa298f0 Binary files /dev/null and b/android/src/main/assets/icon_scale.9.png differ diff --git a/ios/lib/BaiduMapAPI_Map.framework/Resources/mapapi.bundle/images/lineDashTexture.png b/android/src/main/assets/lineDashTexture.png similarity index 100% rename from ios/lib/BaiduMapAPI_Map.framework/Resources/mapapi.bundle/images/lineDashTexture.png rename to android/src/main/assets/lineDashTexture.png diff --git a/android/src/main/assets/logo_h.png b/android/src/main/assets/logo_h.png new file mode 100644 index 00000000..ed2ca038 Binary files /dev/null and b/android/src/main/assets/logo_h.png differ diff --git a/android/src/main/assets/logo_l.png b/android/src/main/assets/logo_l.png new file mode 100644 index 00000000..d1589945 Binary files /dev/null and b/android/src/main/assets/logo_l.png differ diff --git a/android/src/main/assets/main_bottombtn_down.9.png b/android/src/main/assets/main_bottombtn_down.9.png new file mode 100644 index 00000000..948482e8 Binary files /dev/null and b/android/src/main/assets/main_bottombtn_down.9.png differ diff --git a/android/src/main/assets/main_bottombtn_up.9.png b/android/src/main/assets/main_bottombtn_up.9.png new file mode 100644 index 00000000..659c7957 Binary files /dev/null and b/android/src/main/assets/main_bottombtn_up.9.png differ diff --git a/android/src/main/assets/main_icon_zoomin.png b/android/src/main/assets/main_icon_zoomin.png new file mode 100644 index 00000000..cb134d96 Binary files /dev/null and b/android/src/main/assets/main_icon_zoomin.png differ diff --git a/android/src/main/assets/main_icon_zoomin_dis.png b/android/src/main/assets/main_icon_zoomin_dis.png new file mode 100644 index 00000000..d881e582 Binary files /dev/null and b/android/src/main/assets/main_icon_zoomin_dis.png differ diff --git a/android/src/main/assets/main_icon_zoomout.png b/android/src/main/assets/main_icon_zoomout.png new file mode 100644 index 00000000..2a312857 Binary files /dev/null and b/android/src/main/assets/main_icon_zoomout.png differ diff --git a/android/src/main/assets/main_icon_zoomout_dis.png b/android/src/main/assets/main_icon_zoomout_dis.png new file mode 100644 index 00000000..5cbacfae Binary files /dev/null and b/android/src/main/assets/main_icon_zoomout_dis.png differ diff --git a/android/src/main/assets/main_topbtn_down.9.png b/android/src/main/assets/main_topbtn_down.9.png new file mode 100644 index 00000000..33d3f739 Binary files /dev/null and b/android/src/main/assets/main_topbtn_down.9.png differ diff --git a/android/src/main/assets/main_topbtn_up.9.png b/android/src/main/assets/main_topbtn_up.9.png new file mode 100644 index 00000000..33618eeb Binary files /dev/null and b/android/src/main/assets/main_topbtn_up.9.png differ diff --git a/android/src/main/assets/wear_zoom_in.png b/android/src/main/assets/wear_zoom_in.png new file mode 100644 index 00000000..f15db832 Binary files /dev/null and b/android/src/main/assets/wear_zoom_in.png differ diff --git a/android/src/main/assets/wear_zoom_in_pressed.png b/android/src/main/assets/wear_zoom_in_pressed.png new file mode 100644 index 00000000..bf3fd7ce Binary files /dev/null and b/android/src/main/assets/wear_zoom_in_pressed.png differ diff --git a/android/src/main/assets/wear_zoom_out_pressed.png b/android/src/main/assets/wear_zoom_out_pressed.png new file mode 100644 index 00000000..dd51320b Binary files /dev/null and b/android/src/main/assets/wear_zoom_out_pressed.png differ diff --git a/android/src/main/assets/wear_zoon_out.png b/android/src/main/assets/wear_zoon_out.png new file mode 100644 index 00000000..68895231 Binary files /dev/null and b/android/src/main/assets/wear_zoon_out.png differ diff --git a/android/src/main/java/com/baidu/mapapi/clusterutil/MarkerManager.java b/android/src/main/java/com/baidu/mapapi/clusterutil/MarkerManager.java new file mode 100755 index 00000000..e558e701 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/clusterutil/MarkerManager.java @@ -0,0 +1,150 @@ +/* + * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. + */ + +package com.baidu.mapapi.clusterutil; + +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.Marker; +import com.baidu.mapapi.map.MarkerOptions; + +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +/** + * Keeps track of collections of markers on the map. Delegates all Marker-related events to each + * collection's individually managed listeners. + *

+ * All marker operations (adds and removes) should occur via its collection class. That is, don't + * add a marker via a collection, then remove it via Marker.remove() + */ +public class MarkerManager implements BaiduMap.OnMarkerClickListener, BaiduMap.OnMarkerDragListener { + private final BaiduMap mMap; + + private final Map mNamedCollections = new HashMap(); + private final Map mAllMarkers = new HashMap(); + + public MarkerManager(BaiduMap map) { + this.mMap = map; + } + + public Collection newCollection() { + return new Collection(); + } + + /** + * Create a new named collection, which can later be looked up by {@link #getCollection(String)} + * @param id a unique id for this collection. + */ + public Collection newCollection(String id) { + if (mNamedCollections.get(id) != null) { + throw new IllegalArgumentException("collection id is not unique: " + id); + } + Collection collection = new Collection(); + mNamedCollections.put(id, collection); + return collection; + } + + /** + * Gets a named collection that was created by {@link #newCollection(String)} + * @param id the unique id for this collection. + */ + public Collection getCollection(String id) { + return mNamedCollections.get(id); + } + + @Override + public boolean onMarkerClick(Marker marker) { + Collection collection = mAllMarkers.get(marker); + if (collection != null && collection.mMarkerClickListener != null) { + // you can set the click action + return collection.mMarkerClickListener.onMarkerClick(marker); + } else { + ; // click single maker out of cluster + } + return false; + } + + @Override + public void onMarkerDragStart(Marker marker) { + Collection collection = mAllMarkers.get(marker); + if (collection != null && collection.mMarkerDragListener != null) { + collection.mMarkerDragListener.onMarkerDragStart(marker); + } + } + + @Override + public void onMarkerDrag(Marker marker) { + Collection collection = mAllMarkers.get(marker); + if (collection != null && collection.mMarkerDragListener != null) { + collection.mMarkerDragListener.onMarkerDrag(marker); + } + } + + @Override + public void onMarkerDragEnd(Marker marker) { + Collection collection = mAllMarkers.get(marker); + if (collection != null && collection.mMarkerDragListener != null) { + collection.mMarkerDragListener.onMarkerDragEnd(marker); + } + } + + /** + * Removes a marker from its collection. + * + * @param marker the marker to remove. + * @return true if the marker was removed. + */ + public boolean remove(Marker marker) { + Collection collection = mAllMarkers.get(marker); + return collection != null && collection.remove(marker); + } + + public class Collection { + private final Set mMarkers = new HashSet(); + private BaiduMap.OnMarkerClickListener mMarkerClickListener; + private BaiduMap.OnMarkerDragListener mMarkerDragListener; + + public Collection() { + } + + public Marker addMarker(MarkerOptions opts) { + Marker marker = (Marker) mMap.addOverlay(opts); + mMarkers.add(marker); + mAllMarkers.put(marker, Collection.this); + return marker; + } + + public boolean remove(Marker marker) { + if (mMarkers.remove(marker)) { + mAllMarkers.remove(marker); + marker.remove(); + return true; + } + return false; + } + + public void clear() { + for (Marker marker : mMarkers) { + marker.remove(); + mAllMarkers.remove(marker); + } + mMarkers.clear(); + } + + public java.util.Collection getMarkers() { + return Collections.unmodifiableCollection(mMarkers); + } + + public void setOnMarkerClickListener(BaiduMap.OnMarkerClickListener markerClickListener) { + mMarkerClickListener = markerClickListener; + } + + public void setOnMarkerDragListener(BaiduMap.OnMarkerDragListener markerDragListener) { + mMarkerDragListener = markerDragListener; + } + } +} diff --git a/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/Cluster.java b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/Cluster.java new file mode 100755 index 00000000..e4244479 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/Cluster.java @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. + */ + +package com.baidu.mapapi.clusterutil.clustering; + + +import com.baidu.mapapi.model.LatLng; + +import java.util.Collection; + +/** + * A collection of ClusterItems that are nearby each other. + */ +public interface Cluster { + public LatLng getPosition(); + + Collection getItems(); + + int getSize(); +} \ No newline at end of file diff --git a/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/ClusterItem.java b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/ClusterItem.java new file mode 100755 index 00000000..e7d4c420 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/ClusterItem.java @@ -0,0 +1,22 @@ +/* + * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. + */ + +package com.baidu.mapapi.clusterutil.clustering; + + +import com.baidu.mapapi.map.BitmapDescriptor; +import com.baidu.mapapi.model.LatLng; + +/** + * ClusterItem represents a marker on the map. + */ +public interface ClusterItem { + + /** + * The position of this marker. This must always return the same value. + */ + LatLng getPosition(); + + BitmapDescriptor getBitmapDescriptor(); +} \ No newline at end of file diff --git a/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/ClusterManager.java b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/ClusterManager.java new file mode 100755 index 00000000..0c04b7bd --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/ClusterManager.java @@ -0,0 +1,281 @@ +/* + * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. + */ + +package com.baidu.mapapi.clusterutil.clustering; + +import android.content.Context; +import android.os.AsyncTask; +import android.os.Build; + +import com.baidu.mapapi.clusterutil.MarkerManager; +import com.baidu.mapapi.clusterutil.clustering.algo.Algorithm; +import com.baidu.mapapi.clusterutil.clustering.algo.NonHierarchicalDistanceBasedAlgorithm; +import com.baidu.mapapi.clusterutil.clustering.algo.PreCachingAlgorithmDecorator; +import com.baidu.mapapi.clusterutil.clustering.view.ClusterRenderer; +import com.baidu.mapapi.clusterutil.clustering.view.DefaultClusterRenderer; +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.MapStatus; +import com.baidu.mapapi.map.Marker; + +import java.util.Collection; +import java.util.Set; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; + +/** + * Groups many items on a map based on zoom level. + *

+ * ClusterManager should be added to the map + *

  • + */ +public class ClusterManager implements + BaiduMap.OnMapStatusChangeListener, BaiduMap.OnMarkerClickListener { + private final MarkerManager mMarkerManager; + private final MarkerManager.Collection mMarkers; + private final MarkerManager.Collection mClusterMarkers; + + private Algorithm mAlgorithm; + private final ReadWriteLock mAlgorithmLock = new ReentrantReadWriteLock(); + private ClusterRenderer mRenderer; + + private BaiduMap mMap; + private MapStatus mPreviousCameraPosition; + private ClusterTask mClusterTask; + private final ReadWriteLock mClusterTaskLock = new ReentrantReadWriteLock(); + + private OnClusterItemClickListener mOnClusterItemClickListener; + private OnClusterInfoWindowClickListener mOnClusterInfoWindowClickListener; + private OnClusterItemInfoWindowClickListener mOnClusterItemInfoWindowClickListener; + private OnClusterClickListener mOnClusterClickListener; + + public ClusterManager(Context context, BaiduMap map) { + this(context, map, new MarkerManager(map)); + } + + public ClusterManager(Context context, BaiduMap map, MarkerManager markerManager) { + mMap = map; + mMarkerManager = markerManager; + mClusterMarkers = markerManager.newCollection(); + mMarkers = markerManager.newCollection(); + mRenderer = new DefaultClusterRenderer(context, map, this); + mAlgorithm = new PreCachingAlgorithmDecorator(new NonHierarchicalDistanceBasedAlgorithm()); + mClusterTask = new ClusterTask(); + mRenderer.onAdd(); + } + + public MarkerManager.Collection getMarkerCollection() { + return mMarkers; + } + + public MarkerManager.Collection getClusterMarkerCollection() { + return mClusterMarkers; + } + + public MarkerManager getMarkerManager() { + return mMarkerManager; + } + + public void setRenderer(ClusterRenderer view) { + mRenderer.setOnClusterClickListener(null); + mRenderer.setOnClusterItemClickListener(null); + mClusterMarkers.clear(); + mMarkers.clear(); + mRenderer.onRemove(); + mRenderer = view; + mRenderer.onAdd(); + mRenderer.setOnClusterClickListener(mOnClusterClickListener); + mRenderer.setOnClusterInfoWindowClickListener(mOnClusterInfoWindowClickListener); + mRenderer.setOnClusterItemClickListener(mOnClusterItemClickListener); + mRenderer.setOnClusterItemInfoWindowClickListener(mOnClusterItemInfoWindowClickListener); + cluster(); + } + + public void setAlgorithm(Algorithm algorithm) { + mAlgorithmLock.writeLock().lock(); + try { + if (mAlgorithm != null) { + algorithm.addItems(mAlgorithm.getItems()); + } + mAlgorithm = new PreCachingAlgorithmDecorator(algorithm); + } finally { + mAlgorithmLock.writeLock().unlock(); + } + cluster(); + } + + public void clearItems() { + mAlgorithmLock.writeLock().lock(); + try { + mAlgorithm.clearItems(); + } finally { + mAlgorithmLock.writeLock().unlock(); + } + } + + public void addItems(Collection items) { + mAlgorithmLock.writeLock().lock(); + try { + mAlgorithm.addItems(items); + } finally { + mAlgorithmLock.writeLock().unlock(); + } + + } + + public void addItem(T myItem) { + mAlgorithmLock.writeLock().lock(); + try { + mAlgorithm.addItem(myItem); + } finally { + mAlgorithmLock.writeLock().unlock(); + } + } + + public void removeItem(T item) { + mAlgorithmLock.writeLock().lock(); + try { + mAlgorithm.removeItem(item); + } finally { + mAlgorithmLock.writeLock().unlock(); + } + } + + /** + * Force a re-cluster. You may want to call this after adding new item(s). + */ + public void cluster() { + mClusterTaskLock.writeLock().lock(); + try { + // Attempt to cancel the in-flight request. + mClusterTask.cancel(true); + mClusterTask = new ClusterTask(); + + if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) { + mClusterTask.execute(mMap.getMapStatus().zoom); + } else { + mClusterTask.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, mMap.getMapStatus().zoom); + } + } finally { + mClusterTaskLock.writeLock().unlock(); + } + } + + + @Override + public void onMapStatusChangeStart(MapStatus mapStatus) { + + } + + @Override + public void onMapStatusChangeStart(MapStatus status, int reason) { + + } + + @Override + public void onMapStatusChange(MapStatus mapStatus) { + if (mRenderer instanceof BaiduMap.OnMapStatusChangeListener) { + ((BaiduMap.OnMapStatusChangeListener) mRenderer).onMapStatusChange(mapStatus); + } + } + + @Override + public void onMapStatusChangeFinish(MapStatus mapStatus) { + if (mRenderer instanceof BaiduMap.OnMapStatusChangeListener) { + ((BaiduMap.OnMapStatusChangeListener) mRenderer).onMapStatusChangeFinish(mapStatus); + } + + mPreviousCameraPosition = mMap.getMapStatus(); + + cluster(); + } + + @Override + public boolean onMarkerClick(Marker marker) { + return getMarkerManager().onMarkerClick(marker); + } + + /** + * Runs the clustering algorithm in a background thread, then re-paints when results come back. + */ + private class ClusterTask extends AsyncTask>> { + @Override + protected Set> doInBackground(Float... zoom) { + mAlgorithmLock.readLock().lock(); + try { + return mAlgorithm.getClusters(zoom[0]); + } finally { + mAlgorithmLock.readLock().unlock(); + } + } + + @Override + protected void onPostExecute(Set> clusters) { + mRenderer.onClustersChanged(clusters); + } + } + + /** + * Sets a callback that's invoked when a Cluster is tapped. Note: For this listener to function, + * the ClusterManager must be added as a click listener to the map. + */ + public void setOnClusterClickListener(OnClusterClickListener listener) { + mOnClusterClickListener = listener; + mRenderer.setOnClusterClickListener(listener); + } + + /** + * Sets a callback that's invoked when a Cluster is tapped. Note: For this listener to function, + * the ClusterManager must be added as a info window click listener to the map. + */ + public void setOnClusterInfoWindowClickListener(OnClusterInfoWindowClickListener listener) { + mOnClusterInfoWindowClickListener = listener; + mRenderer.setOnClusterInfoWindowClickListener(listener); + } + + /** + * Sets a callback that's invoked when an individual ClusterItem is tapped. Note: For this + * listener to function, the ClusterManager must be added as a click listener to the map. + */ + public void setOnClusterItemClickListener(OnClusterItemClickListener listener) { + mOnClusterItemClickListener = listener; + mRenderer.setOnClusterItemClickListener(listener); + } + + /** + * Sets a callback that's invoked when an individual ClusterItem's Info Window is tapped. Note: For this + * listener to function, the ClusterManager must be added as a info window click listener to the map. + */ + public void setOnClusterItemInfoWindowClickListener(OnClusterItemInfoWindowClickListener listener) { + mOnClusterItemInfoWindowClickListener = listener; + mRenderer.setOnClusterItemInfoWindowClickListener(listener); + } + + /** + * Called when a Cluster is clicked. + */ + public interface OnClusterClickListener { + public boolean onClusterClick(Cluster cluster); + } + + /** + * Called when a Cluster's Info Window is clicked. + */ + public interface OnClusterInfoWindowClickListener { + public void onClusterInfoWindowClick(Cluster cluster); + } + + /** + * Called when an individual ClusterItem is clicked. + */ + public interface OnClusterItemClickListener { + public boolean onClusterItemClick(T item); + } + + /** + * Called when an individual ClusterItem's Info Window is clicked. + */ + public interface OnClusterItemInfoWindowClickListener { + public void onClusterItemInfoWindowClick(T item); + } +} diff --git a/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/algo/Algorithm.java b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/algo/Algorithm.java new file mode 100755 index 00000000..362a18d3 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/algo/Algorithm.java @@ -0,0 +1,29 @@ +/* + * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. + */ + +package com.baidu.mapapi.clusterutil.clustering.algo; + + +import com.baidu.mapapi.clusterutil.clustering.Cluster; +import com.baidu.mapapi.clusterutil.clustering.ClusterItem; + +import java.util.Collection; +import java.util.Set; + +/** + * Logic for computing clusters + */ +public interface Algorithm { + void addItem(T item); + + void addItems(Collection items); + + void clearItems(); + + void removeItem(T item); + + Set> getClusters(double zoom); + + Collection getItems(); +} \ No newline at end of file diff --git a/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/algo/NonHierarchicalDistanceBasedAlgorithm.java b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/algo/NonHierarchicalDistanceBasedAlgorithm.java new file mode 100755 index 00000000..9cd74041 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/algo/NonHierarchicalDistanceBasedAlgorithm.java @@ -0,0 +1,199 @@ +/* + * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. + */ + +package com.baidu.mapapi.clusterutil.clustering.algo; + +import com.baidu.mapapi.clusterutil.clustering.Cluster; +import com.baidu.mapapi.clusterutil.clustering.ClusterItem; +import com.baidu.mapapi.clusterutil.projection.Bounds; +import com.baidu.mapapi.clusterutil.projection.Point; +import com.baidu.mapapi.clusterutil.projection.SphericalMercatorProjection; +import com.baidu.mapapi.clusterutil.quadtree.PointQuadTree; +import com.baidu.mapapi.model.LatLng; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + +/** + * A simple clustering algorithm with O(nlog n) performance. Resulting clusters are not + * hierarchical. + *

    + * High level algorithm:
    + * 1. Iterate over items in the order they were added (candidate clusters).
    + * 2. Create a cluster with the center of the item.
    + * 3. Add all items that are within a certain distance to the cluster.
    + * 4. Move any items out of an existing cluster if they are closer to another cluster.
    + * 5. Remove those items from the list of candidate clusters. + *

    + * Clusters have the center of the first element (not the centroid of the items within it). + */ +public class NonHierarchicalDistanceBasedAlgorithm implements Algorithm { + public static final int MAX_DISTANCE_AT_ZOOM = 100; // essentially 100 dp. + + /** + * Any modifications should be synchronized on mQuadTree. + */ + private final Collection> mItems = new ArrayList>(); + + /** + * Any modifications should be synchronized on mQuadTree. + */ + private final PointQuadTree> mQuadTree = new PointQuadTree>(0, 1, 0, 1); + + private static final SphericalMercatorProjection PROJECTION = new SphericalMercatorProjection(1); + + @Override + public void addItem(T item) { + final QuadItem quadItem = new QuadItem(item); + synchronized (mQuadTree) { + mItems.add(quadItem); + mQuadTree.add(quadItem); + } + } + + @Override + public void addItems(Collection items) { + for (T item : items) { + addItem(item); + } + } + + @Override + public void clearItems() { + synchronized (mQuadTree) { + mItems.clear(); + mQuadTree.clear(); + } + } + + @Override + public void removeItem(T item) { + // TODO: delegate QuadItem#hashCode and QuadItem#equals to its item. + throw new UnsupportedOperationException("NonHierarchicalDistanceBasedAlgorithm.remove not implemented"); + } + + /** + * cluster算法核心 + * @param zoom map的级别 + * @return + */ + @Override + public Set> getClusters(double zoom) { + final int discreteZoom = (int) zoom; + + final double zoomSpecificSpan = MAX_DISTANCE_AT_ZOOM / Math.pow(2, discreteZoom) / 256; + + final Set> visitedCandidates = new HashSet>(); + final Set> results = new HashSet>(); + final Map, Double> distanceToCluster = new HashMap, Double>(); + final Map, StaticCluster> itemToCluster = + new HashMap, StaticCluster>(); + + synchronized (mQuadTree) { + for (QuadItem candidate : mItems) { + if (visitedCandidates.contains(candidate)) { + // Candidate is already part of another cluster. + continue; + } + + Bounds searchBounds = createBoundsFromSpan(candidate.getPoint(), zoomSpecificSpan); + Collection> clusterItems; + // search 某边界范围内的clusterItems + clusterItems = mQuadTree.search(searchBounds); + if (clusterItems.size() == 1) { + // Only the current marker is in range. Just add the single item to the results. + results.add(candidate); + visitedCandidates.add(candidate); + distanceToCluster.put(candidate, 0d); + continue; + } + StaticCluster cluster = + new StaticCluster(candidate.mClusterItem.getPosition()); + results.add(cluster); + + for (QuadItem clusterItem : clusterItems) { + Double existingDistance = distanceToCluster.get(clusterItem); + double distance = distanceSquared(clusterItem.getPoint(), candidate.getPoint()); + if (existingDistance != null) { + // Item already belongs to another cluster. Check if it's closer to this cluster. + if (existingDistance < distance) { + continue; + } + // Move item to the closer cluster. + itemToCluster.get(clusterItem).remove(clusterItem.mClusterItem); + } + distanceToCluster.put(clusterItem, distance); + cluster.add(clusterItem.mClusterItem); + itemToCluster.put(clusterItem, cluster); + } + visitedCandidates.addAll(clusterItems); + } + } + return results; + } + + @Override + public Collection getItems() { + final List items = new ArrayList(); + synchronized (mQuadTree) { + for (QuadItem quadItem : mItems) { + items.add(quadItem.mClusterItem); + } + } + return items; + } + + private double distanceSquared(Point a, Point b) { + return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y); + } + + private Bounds createBoundsFromSpan(Point p, double span) { + // TODO: Use a span that takes into account the visual size of the marker, not just its + // LatLng. + double halfSpan = span / 2; + return new Bounds( + p.x - halfSpan, p.x + halfSpan, + p.y - halfSpan, p.y + halfSpan); + } + + private static class QuadItem implements PointQuadTree.Item, Cluster { + private final T mClusterItem; + private final Point mPoint; + private final LatLng mPosition; + private Set singletonSet; + + private QuadItem(T item) { + mClusterItem = item; + mPosition = item.getPosition(); + mPoint = PROJECTION.toPoint(mPosition); + singletonSet = Collections.singleton(mClusterItem); + } + + @Override + public Point getPoint() { + return mPoint; + } + + @Override + public LatLng getPosition() { + return mPosition; + } + + @Override + public Set getItems() { + return singletonSet; + } + + @Override + public int getSize() { + return 1; + } + } +} diff --git a/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/algo/PreCachingAlgorithmDecorator.java b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/algo/PreCachingAlgorithmDecorator.java new file mode 100755 index 00000000..07052980 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/algo/PreCachingAlgorithmDecorator.java @@ -0,0 +1,113 @@ +/* + * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. + */ + +package com.baidu.mapapi.clusterutil.clustering.algo; + +import android.util.LruCache; + +import com.baidu.mapapi.clusterutil.clustering.Cluster; +import com.baidu.mapapi.clusterutil.clustering.ClusterItem; + +import java.util.Collection; +import java.util.Set; +import java.util.concurrent.locks.ReadWriteLock; +import java.util.concurrent.locks.ReentrantReadWriteLock; + +/** + * Optimistically fetch clusters for adjacent zoom levels, caching them as necessary. + */ +public class PreCachingAlgorithmDecorator implements Algorithm { + private final Algorithm mAlgorithm; + + // TODO: evaluate maxSize parameter for LruCache. + private final LruCache>> mCache = + new LruCache>>(5); + private final ReadWriteLock mCacheLock = new ReentrantReadWriteLock(); + + public PreCachingAlgorithmDecorator(Algorithm algorithm) { + mAlgorithm = algorithm; + } + + public void addItem(T item) { + mAlgorithm.addItem(item); + clearCache(); + } + + @Override + public void addItems(Collection items) { + mAlgorithm.addItems(items); + clearCache(); + } + + @Override + public void clearItems() { + mAlgorithm.clearItems(); + clearCache(); + } + + public void removeItem(T item) { + mAlgorithm.removeItem(item); + clearCache(); + } + + private void clearCache() { + mCache.evictAll(); + } + + @Override + public Set> getClusters(double zoom) { + int discreteZoom = (int) zoom; + Set> results = getClustersInternal(discreteZoom); + // TODO: Check if requests are already in-flight. + if (mCache.get(discreteZoom + 1) == null) { + new Thread(new PrecacheRunnable(discreteZoom + 1)).start(); + } + if (mCache.get(discreteZoom - 1) == null) { + new Thread(new PrecacheRunnable(discreteZoom - 1)).start(); + } + return results; + } + + @Override + public Collection getItems() { + return mAlgorithm.getItems(); + } + + private Set> getClustersInternal(int discreteZoom) { + Set> results; + mCacheLock.readLock().lock(); + results = mCache.get(discreteZoom); + mCacheLock.readLock().unlock(); + + if (results == null) { + mCacheLock.writeLock().lock(); + results = mCache.get(discreteZoom); + if (results == null) { + results = mAlgorithm.getClusters(discreteZoom); + mCache.put(discreteZoom, results); + } + mCacheLock.writeLock().unlock(); + } + return results; + } + + private class PrecacheRunnable implements Runnable { + private final int mZoom; + + public PrecacheRunnable(int zoom) { + mZoom = zoom; + } + + @Override + public void run() { + try { + // Wait between 500 - 1000 ms. + Thread.sleep((long) (Math.random() * 500 + 500)); + } catch (InterruptedException e) { + // ignore. keep going. + } + getClustersInternal(mZoom); + } + } +} diff --git a/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/algo/StaticCluster.java b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/algo/StaticCluster.java new file mode 100755 index 00000000..bdd65760 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/algo/StaticCluster.java @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. + */ + +package com.baidu.mapapi.clusterutil.clustering.algo; + +import com.baidu.mapapi.clusterutil.clustering.Cluster; +import com.baidu.mapapi.clusterutil.clustering.ClusterItem; +import com.baidu.mapapi.model.LatLng; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** + * A cluster whose center is determined upon creation. + */ +public class StaticCluster implements Cluster { + private final LatLng mCenter; + private final List mItems = new ArrayList(); + + public StaticCluster(LatLng center) { + mCenter = center; + } + + + + public boolean add(T t) { + return mItems.add(t); + } + + @Override + public LatLng getPosition() { + return mCenter; + } + + public boolean remove(T t) { + return mItems.remove(t); + } + + @Override + public Collection getItems() { + return mItems; + } + + @Override + public int getSize() { + return mItems.size(); + } + + @Override + public String toString() { + return "StaticCluster{" + + "mCenter=" + mCenter + + ", mItems.size=" + mItems.size() + + '}'; + } +} \ No newline at end of file diff --git a/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/view/ClusterRenderer.java b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/view/ClusterRenderer.java new file mode 100755 index 00000000..bb0f5474 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/view/ClusterRenderer.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. + */ + +package com.baidu.mapapi.clusterutil.clustering.view; + + +import com.baidu.mapapi.clusterutil.clustering.Cluster; +import com.baidu.mapapi.clusterutil.clustering.ClusterItem; +import com.baidu.mapapi.clusterutil.clustering.ClusterManager; + +import java.util.Set; + +/** + * Renders clusters. + */ +public interface ClusterRenderer { + + /** + * Called when the view needs to be updated because new clusters need to be displayed. + * @param clusters the clusters to be displayed. + */ + void onClustersChanged(Set> clusters); + + void setOnClusterClickListener(ClusterManager.OnClusterClickListener listener); + + void setOnClusterInfoWindowClickListener(ClusterManager.OnClusterInfoWindowClickListener listener); + + void setOnClusterItemClickListener(ClusterManager.OnClusterItemClickListener listener); + + void setOnClusterItemInfoWindowClickListener(ClusterManager.OnClusterItemInfoWindowClickListener listener); + + /** + * Called when the view is added. + */ + void onAdd(); + + /** + * Called when the view is removed. + */ + void onRemove(); +} \ No newline at end of file diff --git a/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/view/DefaultClusterRenderer.java b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/view/DefaultClusterRenderer.java new file mode 100755 index 00000000..0fb35c95 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/clusterutil/clustering/view/DefaultClusterRenderer.java @@ -0,0 +1,916 @@ +/* + * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. + */ + +package com.baidu.mapapi.clusterutil.clustering.view; + +import android.animation.Animator; +import android.animation.AnimatorListenerAdapter; +import android.animation.TimeInterpolator; +import android.animation.ValueAnimator; +import android.annotation.SuppressLint; +import android.annotation.TargetApi; +import android.content.Context; +import android.graphics.Color; +import android.graphics.drawable.Drawable; +import android.graphics.drawable.LayerDrawable; +import android.graphics.drawable.ShapeDrawable; +import android.graphics.drawable.shapes.OvalShape; +import android.os.Build; +import android.os.Handler; +import android.os.Looper; +import android.os.Message; +import android.os.MessageQueue; +import android.util.SparseArray; +import android.view.ViewGroup; +import android.view.animation.DecelerateInterpolator; + +import com.baidu.mapapi.clusterutil.MarkerManager; +import com.baidu.mapapi.clusterutil.clustering.Cluster; +import com.baidu.mapapi.clusterutil.clustering.ClusterItem; +import com.baidu.mapapi.clusterutil.clustering.ClusterManager; +import com.baidu.mapapi.clusterutil.projection.Point; +import com.baidu.mapapi.clusterutil.projection.SphericalMercatorProjection; +import com.baidu.mapapi.clusterutil.ui.IconGenerator; +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.BitmapDescriptor; +import com.baidu.mapapi.map.BitmapDescriptorFactory; +import com.baidu.mapapi.map.Marker; +import com.baidu.mapapi.map.MarkerOptions; +import com.baidu.mapapi.map.Projection; +import com.baidu.mapapi.model.LatLng; +import com.baidu.mapapi.model.LatLngBounds; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Queue; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.locks.Condition; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; + +import org.lovebing.reactnative.baidumap.R; + +import static com.baidu.mapapi.clusterutil.clustering.algo.NonHierarchicalDistanceBasedAlgorithm.MAX_DISTANCE_AT_ZOOM; + + +/** + * The default view for a ClusterManager. Markers are animated in and out of clusters. + */ +public class DefaultClusterRenderer implements + ClusterRenderer { + private static final boolean SHOULD_ANIMATE = Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB; + private final BaiduMap mMap; + private final IconGenerator mIconGenerator; + private final ClusterManager mClusterManager; + private final float mDensity; + + private static final int[] BUCKETS = {10, 20, 50, 100, 200, 500, 1000}; + private ShapeDrawable mColoredCircleBackground; + + /** + * Markers that are currently on the map. + */ + private Set mMarkers = Collections.newSetFromMap( + new ConcurrentHashMap()); + + /** + * Icons for each bucket. + */ + private SparseArray mIcons = new SparseArray(); + + /** + * Markers for single ClusterItems. + */ + private MarkerCache mMarkerCache = new MarkerCache(); + + /** + * If cluster size is less than this size, display individual markers. + */ + private static final int MIN_CLUSTER_SIZE = 4; + + /** + * The currently displayed set of clusters. + */ + private Set> mClusters; + + /** + * Lookup between markers and the associated cluster. + */ + private Map> mMarkerToCluster = new HashMap>(); + private Map, Marker> mClusterToMarker = new HashMap, Marker>(); + + /** + * The target zoom level for the current set of clusters. + */ + private float mZoom; + + private final ViewModifier mViewModifier = new ViewModifier(); + + private ClusterManager.OnClusterClickListener mClickListener; + private ClusterManager.OnClusterInfoWindowClickListener mInfoWindowClickListener; + private ClusterManager.OnClusterItemClickListener mItemClickListener; + private ClusterManager.OnClusterItemInfoWindowClickListener mItemInfoWindowClickListener; + + public DefaultClusterRenderer(Context context, BaiduMap map, ClusterManager clusterManager) { + mMap = map; + mDensity = context.getResources().getDisplayMetrics().density; + mIconGenerator = new IconGenerator(context); + mIconGenerator.setContentView(makeSquareTextView(context)); + mIconGenerator.setTextAppearance(R.style.ClusterIcon_TextAppearance); + mIconGenerator.setBackground(makeClusterBackground()); + mClusterManager = clusterManager; + } + + @Override + public void onAdd() { + mClusterManager.getMarkerCollection().setOnMarkerClickListener(new BaiduMap.OnMarkerClickListener() { + @Override + public boolean onMarkerClick(Marker marker) { + return mItemClickListener != null && mItemClickListener.onClusterItemClick(mMarkerCache.get(marker)); + } + }); + + + mClusterManager.getClusterMarkerCollection().setOnMarkerClickListener(new BaiduMap.OnMarkerClickListener() { + @Override + public boolean onMarkerClick(Marker marker) { + return mClickListener != null && mClickListener.onClusterClick(mMarkerToCluster.get(marker)); + } + }); + + } + + @Override + public void onRemove() { + mClusterManager.getMarkerCollection().setOnMarkerClickListener(null); + mClusterManager.getClusterMarkerCollection().setOnMarkerClickListener(null); + } + + private LayerDrawable makeClusterBackground() { + mColoredCircleBackground = new ShapeDrawable(new OvalShape()); + ShapeDrawable outline = new ShapeDrawable(new OvalShape()); + outline.getPaint().setColor(0x80ffffff); // Transparent white. + LayerDrawable background = new LayerDrawable(new Drawable[]{outline, mColoredCircleBackground}); + int strokeWidth = (int) (mDensity * 3); + background.setLayerInset(1, strokeWidth, strokeWidth, strokeWidth, strokeWidth); + return background; + } + + private com.baidu.mapapi.clusterutil.ui.SquareTextView makeSquareTextView(Context context) { + com.baidu.mapapi.clusterutil.ui.SquareTextView squareTextView = + new com.baidu.mapapi.clusterutil.ui.SquareTextView(context); + ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, + ViewGroup.LayoutParams.WRAP_CONTENT); + squareTextView.setLayoutParams(layoutParams); + squareTextView.setId(R.id.text); + int twelveDpi = (int) (12 * mDensity); + squareTextView.setPadding(twelveDpi, twelveDpi, twelveDpi, twelveDpi); + return squareTextView; + } + + private int getColor(int clusterSize) { + final float hueRange = 220; + final float sizeRange = 300; + final float size = Math.min(clusterSize, sizeRange); + final float hue = (sizeRange - size) * (sizeRange - size) / (sizeRange * sizeRange) * hueRange; + return Color.HSVToColor(new float[]{ + hue, 1f, .6f + }); + } + + protected String getClusterText(int bucket) { + if (bucket < BUCKETS[0]) { + return String.valueOf(bucket); + } + return String.valueOf(bucket) + "+"; + } + + /** + * Gets the "bucket" for a particular cluster. By default, uses the number of points within the + * cluster, bucketed to some set points. + */ + protected int getBucket(Cluster cluster) { + int size = cluster.getSize(); + if (size <= BUCKETS[0]) { + return size; + } + for (int i = 0; i < BUCKETS.length - 1; i++) { + if (size < BUCKETS[i + 1]) { + return BUCKETS[i]; + } + } + return BUCKETS[BUCKETS.length - 1]; + } + + /** + * ViewModifier ensures only one re-rendering of the view occurs at a time, and schedules + * re-rendering, which is performed by the RenderTask. + */ + @SuppressLint("HandlerLeak") + private class ViewModifier extends Handler { + private static final int RUN_TASK = 0; + private static final int TASK_FINISHED = 1; + private boolean mViewModificationInProgress = false; + private RenderTask mNextClusters = null; + + @Override + public void handleMessage(Message msg) { + if (msg.what == TASK_FINISHED) { + mViewModificationInProgress = false; + if (mNextClusters != null) { + // Run the task that was queued up. + sendEmptyMessage(RUN_TASK); + } + return; + } + removeMessages(RUN_TASK); + + if (mViewModificationInProgress) { + // Busy - wait for the callback. + return; + } + + if (mNextClusters == null) { + // Nothing to do. + return; + } + + RenderTask renderTask; + synchronized (this) { + renderTask = mNextClusters; + mNextClusters = null; + mViewModificationInProgress = true; + } + + renderTask.setCallback(new Runnable() { + @Override + public void run() { + sendEmptyMessage(TASK_FINISHED); + } + }); + renderTask.setProjection(mMap.getProjection()); + renderTask.setMapZoom(mMap.getMapStatus().zoom); + new Thread(renderTask).start(); + } + + public void queue(Set> clusters) { + synchronized (this) { + // Overwrite any pending cluster tasks - we don't care about intermediate states. + mNextClusters = new RenderTask(clusters); + } + sendEmptyMessage(RUN_TASK); + } + } + + /** + * Determine whether the cluster should be rendered as individual markers or a cluster. + */ + protected boolean shouldRenderAsCluster(Cluster cluster) { + return cluster.getSize() > MIN_CLUSTER_SIZE; + } + + /** + * Transforms the current view (represented by DefaultClusterRenderer.mClusters and DefaultClusterRenderer.mZoom) to a + * new zoom level and set of clusters. + *

    + * This must be run off the UI thread. Work is coordinated in the RenderTask, then queued up to + * be executed by a MarkerModifier. + *

    + * There are three stages for the render: + *

    + * 1. Markers are added to the map + *

    + * 2. Markers are animated to their final position + *

    + * 3. Any old markers are removed from the map + *

    + * When zooming in, markers are animated out from the nearest existing cluster. When zooming + * out, existing clusters are animated to the nearest new cluster. + */ + private class RenderTask implements Runnable { + final Set> clusters; + private Runnable mCallback; + private Projection mProjection; + private SphericalMercatorProjection mSphericalMercatorProjection; + private float mMapZoom; + + private RenderTask(Set> clusters) { + this.clusters = clusters; + } + + /** + * A callback to be run when all work has been completed. + * + * @param callback + */ + public void setCallback(Runnable callback) { + mCallback = callback; + } + + public void setProjection(Projection projection) { + this.mProjection = projection; + } + + public void setMapZoom(float zoom) { + this.mMapZoom = zoom; + this.mSphericalMercatorProjection = + new SphericalMercatorProjection(256 * Math.pow(2, Math.min(zoom, mZoom))); + } + + @SuppressLint("NewApi") + public void run() { + final MarkerModifier markerModifier = new MarkerModifier(); + + final float zoom = mMapZoom; + final boolean zoomingIn = zoom > mZoom; + final float zoomDelta = zoom - mZoom; + + final Set markersToRemove = mMarkers; + final LatLngBounds visibleBounds = mMap.getMapStatus().bound; + // TODO: Add some padding, so that markers can animate in from off-screen. + + // Find all of the existing clusters that are on-screen. These are candidates for + // markers to animate from. + List existingClustersOnScreen = null; + if (DefaultClusterRenderer.this.mClusters != null && SHOULD_ANIMATE) { + existingClustersOnScreen = new ArrayList(); + for (Cluster c : DefaultClusterRenderer.this.mClusters) { + if (shouldRenderAsCluster(c) && visibleBounds.contains(c.getPosition())) { + Point point = mSphericalMercatorProjection.toPoint(c.getPosition()); + existingClustersOnScreen.add(point); + } + } + } + + // Create the new markers and animate them to their new positions. + final Set newMarkers = Collections.newSetFromMap( + new ConcurrentHashMap()); + for (Cluster c : clusters) { + boolean onScreen = visibleBounds.contains(c.getPosition()); + if (onScreen) { + Point point = mSphericalMercatorProjection.toPoint(c.getPosition()); + Point closest = findClosestCluster(existingClustersOnScreen, point); + if (closest != null) { + LatLng animateTo = mSphericalMercatorProjection.toLatLng(closest); + markerModifier.add(true, new CreateMarkerTask(c, newMarkers, SHOULD_ANIMATE ? animateTo : null)); + } else { + markerModifier.add(true, new CreateMarkerTask(c, newMarkers, null)); + } + } + } + + // Wait for all markers to be added. + markerModifier.waitUntilFree(); + + // Don't remove any markers that were just added. This is basically anything that had + // a hit in the MarkerCache. + markersToRemove.removeAll(newMarkers); + + // Find all of the new clusters that were added on-screen. These are candidates for + // markers to animate from. + List newClustersOnScreen = null; + if (SHOULD_ANIMATE) { + newClustersOnScreen = new ArrayList(); + for (Cluster c : clusters) { + if (shouldRenderAsCluster(c) && visibleBounds.contains(c.getPosition())) { + Point p = mSphericalMercatorProjection.toPoint(c.getPosition()); + newClustersOnScreen.add(p); + } + } + } + + // Remove the old markers, animating them into clusters if zooming out. + for (final MarkerWithPosition marker : markersToRemove) { + boolean onScreen = visibleBounds.contains(marker.position); + // Don't animate when zooming out more than 3 zoom levels. + // TODO: drop animation based on speed of device & number of markers to animate. + if (!zoomingIn && zoomDelta > -3 && onScreen && SHOULD_ANIMATE) { + final Point point = mSphericalMercatorProjection.toPoint(marker.position); + final Point closest = findClosestCluster(newClustersOnScreen, point); + if (closest != null) { + LatLng animateTo = mSphericalMercatorProjection.toLatLng(closest); + markerModifier.animateThenRemove(marker, marker.position, animateTo); + } else { + markerModifier.remove(true, marker.marker); + } + } else { + markerModifier.remove(onScreen, marker.marker); + } + } + + markerModifier.waitUntilFree(); + + mMarkers = newMarkers; + DefaultClusterRenderer.this.mClusters = clusters; + mZoom = zoom; + + mCallback.run(); + } + } + + @Override + public void onClustersChanged(Set> clusters) { + mViewModifier.queue(clusters); + } + + @Override + public void setOnClusterClickListener(ClusterManager.OnClusterClickListener listener) { + mClickListener = listener; + } + + @Override + public void setOnClusterInfoWindowClickListener(ClusterManager + .OnClusterInfoWindowClickListener listener) { + mInfoWindowClickListener = listener; + } + + @Override + public void setOnClusterItemClickListener(ClusterManager.OnClusterItemClickListener listener) { + mItemClickListener = listener; + } + + @Override + public void setOnClusterItemInfoWindowClickListener(ClusterManager + .OnClusterItemInfoWindowClickListener listener) { + mItemInfoWindowClickListener = listener; + } + + private static double distanceSquared(Point a, Point b) { + return (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y); + } + + private static Point findClosestCluster(List markers, Point point) { + if (markers == null || markers.isEmpty()) { + return null; + } + + // TODO: make this configurable. + double minDistSquared = MAX_DISTANCE_AT_ZOOM * MAX_DISTANCE_AT_ZOOM; + Point closest = null; + for (Point candidate : markers) { + double dist = distanceSquared(candidate, point); + if (dist < minDistSquared) { + closest = candidate; + minDistSquared = dist; + } + } + return closest; + } + + /** + * Handles all markerWithPosition manipulations on the map. Work (such as adding, removing, or + * animating a markerWithPosition) is performed while trying not to block the rest of the app's + * UI. + */ + @SuppressLint("HandlerLeak") + private class MarkerModifier extends Handler implements MessageQueue.IdleHandler { + private static final int BLANK = 0; + + private final Lock lock = new ReentrantLock(); + private final Condition busyCondition = lock.newCondition(); + + private Queue mCreateMarkerTasks = new LinkedList(); + private Queue mOnScreenCreateMarkerTasks = new LinkedList(); + private Queue mRemoveMarkerTasks = new LinkedList(); + private Queue mOnScreenRemoveMarkerTasks = new LinkedList(); + private Queue mAnimationTasks = new LinkedList(); + + /** + * Whether the idle listener has been added to the UI thread's MessageQueue. + */ + private boolean mListenerAdded; + + private MarkerModifier() { + super(Looper.getMainLooper()); + } + + /** + * Creates markers for a cluster some time in the future. + * + * @param priority whether this operation should have priority. + */ + public void add(boolean priority, CreateMarkerTask c) { + lock.lock(); + sendEmptyMessage(BLANK); + if (priority) { + mOnScreenCreateMarkerTasks.add(c); + } else { + mCreateMarkerTasks.add(c); + } + lock.unlock(); + } + + /** + * Removes a markerWithPosition some time in the future. + * + * @param priority whether this operation should have priority. + * @param m the markerWithPosition to remove. + */ + public void remove(boolean priority, Marker m) { + lock.lock(); + sendEmptyMessage(BLANK); + if (priority) { + mOnScreenRemoveMarkerTasks.add(m); + } else { + mRemoveMarkerTasks.add(m); + } + lock.unlock(); + } + + /** + * Animates a markerWithPosition some time in the future. + * + * @param marker the markerWithPosition to animate. + * @param from the position to animate from. + * @param to the position to animate to. + */ + public void animate(MarkerWithPosition marker, LatLng from, LatLng to) { + lock.lock(); + mAnimationTasks.add(new AnimationTask(marker, from, to)); + lock.unlock(); + } + + /** + * Animates a markerWithPosition some time in the future, and removes it when the animation + * is complete. + * + * @param marker the markerWithPosition to animate. + * @param from the position to animate from. + * @param to the position to animate to. + */ + public void animateThenRemove(MarkerWithPosition marker, LatLng from, LatLng to) { + lock.lock(); + AnimationTask animationTask = new AnimationTask(marker, from, to); + animationTask.removeOnAnimationComplete(mClusterManager.getMarkerManager()); + mAnimationTasks.add(animationTask); + lock.unlock(); + } + + @Override + public void handleMessage(Message msg) { + if (!mListenerAdded) { + Looper.myQueue().addIdleHandler(this); + mListenerAdded = true; + } + removeMessages(BLANK); + + lock.lock(); + try { + + // Perform up to 10 tasks at once. + // Consider only performing 10 remove tasks, not adds and animations. + // Removes are relatively slow and are much better when batched. + for (int i = 0; i < 10; i++) { + performNextTask(); + } + + if (!isBusy()) { + mListenerAdded = false; + Looper.myQueue().removeIdleHandler(this); + // Signal any other threads that are waiting. + busyCondition.signalAll(); + } else { + // Sometimes the idle queue may not be called - schedule up some work regardless + // of whether the UI thread is busy or not. + // TODO: try to remove this. + sendEmptyMessageDelayed(BLANK, 10); + } + } finally { + lock.unlock(); + } + } + + /** + * Perform the next task. Prioritise any on-screen work. + */ + private void performNextTask() { + if (!mOnScreenRemoveMarkerTasks.isEmpty()) { + removeMarker(mOnScreenRemoveMarkerTasks.poll()); + } else if (!mAnimationTasks.isEmpty()) { + mAnimationTasks.poll().perform(); + } else if (!mOnScreenCreateMarkerTasks.isEmpty()) { + mOnScreenCreateMarkerTasks.poll().perform(this); + } else if (!mCreateMarkerTasks.isEmpty()) { + mCreateMarkerTasks.poll().perform(this); + } else if (!mRemoveMarkerTasks.isEmpty()) { + removeMarker(mRemoveMarkerTasks.poll()); + } + } + + private void removeMarker(Marker m) { + Cluster cluster = mMarkerToCluster.get(m); + mClusterToMarker.remove(cluster); + mMarkerCache.remove(m); + mMarkerToCluster.remove(m); + mClusterManager.getMarkerManager().remove(m); + } + + /** + * @return true if there is still work to be processed. + */ + public boolean isBusy() { + try { + lock.lock(); + return !(mCreateMarkerTasks.isEmpty() && mOnScreenCreateMarkerTasks.isEmpty() + && mOnScreenRemoveMarkerTasks.isEmpty() && mRemoveMarkerTasks.isEmpty() + && mAnimationTasks.isEmpty()); + } finally { + lock.unlock(); + } + } + + /** + * Blocks the calling thread until all work has been processed. + */ + public void waitUntilFree() { + while (isBusy()) { + // Sometimes the idle queue may not be called - schedule up some work regardless + // of whether the UI thread is busy or not. + // TODO: try to remove this. + sendEmptyMessage(BLANK); + lock.lock(); + try { + if (isBusy()) { + busyCondition.await(); + } + } catch (InterruptedException e) { + throw new RuntimeException(e); + } finally { + lock.unlock(); + } + } + } + + @Override + public boolean queueIdle() { + // When the UI is not busy, schedule some work. + sendEmptyMessage(BLANK); + return true; + } + } + + /** + * A cache of markers representing individual ClusterItems. + */ + private static class MarkerCache { + private Map mCache = new HashMap(); + private Map mCacheReverse = new HashMap(); + + public Marker get(T item) { + return mCache.get(item); + } + + public T get(Marker m) { + return mCacheReverse.get(m); + } + + public void put(T item, Marker m) { + mCache.put(item, m); + mCacheReverse.put(m, item); + } + + public void remove(Marker m) { + T item = mCacheReverse.get(m); + mCacheReverse.remove(m); + mCache.remove(item); + } + } + + /** + * Called before the marker for a ClusterItem is added to the map. + */ + protected void onBeforeClusterItemRendered(T item, MarkerOptions markerOptions) { + } + + /** + * Called before the marker for a Cluster is added to the map. + * The default implementation draws a circle with a rough count of the number of items. + */ + protected void onBeforeClusterRendered(Cluster cluster, MarkerOptions markerOptions) { + int bucket = getBucket(cluster); + BitmapDescriptor descriptor = mIcons.get(bucket); + if (descriptor == null) { + mColoredCircleBackground.getPaint().setColor(getColor(bucket)); + descriptor = BitmapDescriptorFactory.fromBitmap(mIconGenerator.makeIcon(getClusterText(bucket))); + mIcons.put(bucket, descriptor); + } + // TODO: consider adding anchor(.5, .5) (Individual markers will overlap more often) + markerOptions.icon(descriptor); + } + + /** + * Called after the marker for a Cluster has been added to the map. + */ + protected void onClusterRendered(Cluster cluster, Marker marker) { + } + + /** + * Called after the marker for a ClusterItem has been added to the map. + */ + protected void onClusterItemRendered(T clusterItem, Marker marker) { + } + + /** + * Get the marker from a ClusterItem + * + * @param clusterItem ClusterItem which you will obtain its marker + * @return a marker from a ClusterItem or null if it does not exists + */ + public Marker getMarker(T clusterItem) { + return mMarkerCache.get(clusterItem); + } + + /** + * Get the marker from a Cluster + * + * @param cluster which you will obtain its marker + * @return a marker from a cluster or null if it does not exists + */ + public Marker getMarker(Cluster cluster) { + return mClusterToMarker.get(cluster); + } + + /** + * Get the ClusterItem from a marker + * + * @param marker which you will obtain its ClusterItem + * @return a ClusterItem from a marker or null if it does not exists + */ + public T getClusterItem(Marker marker) { + return mMarkerCache.get(marker); + } + + /** + * Get the Cluster from a marker + * + * @param marker which you will obtain its Cluster + * @return a Cluster from a marker or null if it does not exists + */ + public Cluster getCluster(Marker marker) { + return mMarkerToCluster.get(marker); + } + + /** + * Creates markerWithPosition(s) for a particular cluster, animating it if necessary. + */ + private class CreateMarkerTask { + private final Cluster cluster; + private final Set newMarkers; + private final LatLng animateFrom; + + /** + * @param c the cluster to render. + * @param markersAdded a collection of markers to append any created markers. + * @param animateFrom the location to animate the markerWithPosition from, or null if no + * animation is required. + */ + public CreateMarkerTask(Cluster c, Set markersAdded, LatLng animateFrom) { + this.cluster = c; + this.newMarkers = markersAdded; + this.animateFrom = animateFrom; + } + + private void perform(MarkerModifier markerModifier) { + // Don't show small clusters. Render the markers inside, instead. + if (!shouldRenderAsCluster(cluster)) { + for (T item : cluster.getItems()) { + Marker marker = mMarkerCache.get(item); + MarkerWithPosition markerWithPosition; + if (marker == null) { + MarkerOptions markerOptions = new MarkerOptions(); + if (animateFrom != null) { + markerOptions.position(animateFrom); + markerOptions.icon(item.getBitmapDescriptor()); + } else { + markerOptions.position(item.getPosition()); + markerOptions.icon(item.getBitmapDescriptor()); + } + onBeforeClusterItemRendered(item, markerOptions); + marker = mClusterManager.getMarkerCollection().addMarker(markerOptions); + markerWithPosition = new MarkerWithPosition(marker); + mMarkerCache.put(item, marker); + if (animateFrom != null) { + markerModifier.animate(markerWithPosition, animateFrom, item.getPosition()); + } + } else { + markerWithPosition = new MarkerWithPosition(marker); + } + onClusterItemRendered(item, marker); + newMarkers.add(markerWithPosition); + } + return; + } + + MarkerOptions markerOptions = new MarkerOptions() + .position(animateFrom == null ? cluster.getPosition() : animateFrom); + + onBeforeClusterRendered(cluster, markerOptions); + + Marker marker = mClusterManager.getClusterMarkerCollection().addMarker(markerOptions); + mMarkerToCluster.put(marker, cluster); + mClusterToMarker.put(cluster, marker); + MarkerWithPosition markerWithPosition = new MarkerWithPosition(marker); + if (animateFrom != null) { + markerModifier.animate(markerWithPosition, animateFrom, cluster.getPosition()); + } + onClusterRendered(cluster, marker); + newMarkers.add(markerWithPosition); + } + } + + /** + * A Marker and its position. Marker.getPosition() must be called from the UI thread, so this + * object allows lookup from other threads. + */ + private static class MarkerWithPosition { + private final Marker marker; + private LatLng position; + + private MarkerWithPosition(Marker marker) { + this.marker = marker; + position = marker.getPosition(); + } + + @Override + public boolean equals(Object other) { + if (other instanceof MarkerWithPosition) { + return marker.equals(((MarkerWithPosition) other).marker); + } + return false; + } + + @Override + public int hashCode() { + return marker.hashCode(); + } + } + + private static final TimeInterpolator ANIMATION_INTERP = new DecelerateInterpolator(); + + /** + * Animates a markerWithPosition from one position to another. TODO: improve performance for + * slow devices (e.g. Nexus S). + */ + @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR1) + private class AnimationTask extends AnimatorListenerAdapter implements ValueAnimator.AnimatorUpdateListener { + private final MarkerWithPosition markerWithPosition; + private final Marker marker; + private final LatLng from; + private final LatLng to; + private boolean mRemoveOnComplete; + private MarkerManager mMarkerManager; + + private AnimationTask(MarkerWithPosition markerWithPosition, LatLng from, LatLng to) { + this.markerWithPosition = markerWithPosition; + this.marker = markerWithPosition.marker; + this.from = from; + this.to = to; + } + + public void perform() { + ValueAnimator valueAnimator = ValueAnimator.ofFloat(0, 1); + valueAnimator.setInterpolator(ANIMATION_INTERP); + valueAnimator.addUpdateListener(this); + valueAnimator.addListener(this); + valueAnimator.start(); + } + + @Override + public void onAnimationEnd(Animator animation) { + if (mRemoveOnComplete) { + Cluster cluster = mMarkerToCluster.get(marker); + mClusterToMarker.remove(cluster); + mMarkerCache.remove(marker); + mMarkerToCluster.remove(marker); + mMarkerManager.remove(marker); + } + markerWithPosition.position = to; + } + + public void removeOnAnimationComplete(MarkerManager markerManager) { + mMarkerManager = markerManager; + mRemoveOnComplete = true; + } + + @Override + public void onAnimationUpdate(ValueAnimator valueAnimator) { + float fraction = valueAnimator.getAnimatedFraction(); + double lat = (to.latitude - from.latitude) * fraction + from.latitude; + double lngDelta = to.longitude - from.longitude; + + // Take the shortest path across the 180th meridian. + if (Math.abs(lngDelta) > 180) { + lngDelta -= Math.signum(lngDelta) * 360; + } + double lng = lngDelta * fraction + from.longitude; + LatLng position = new LatLng(lat, lng); + marker.setPosition(position); + } + } +} diff --git a/android/src/main/java/com/baidu/mapapi/clusterutil/projection/Bounds.java b/android/src/main/java/com/baidu/mapapi/clusterutil/projection/Bounds.java new file mode 100755 index 00000000..3d51d75d --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/clusterutil/projection/Bounds.java @@ -0,0 +1,47 @@ + +package com.baidu.mapapi.clusterutil.projection; + +/** + * Represents an area in the cartesian plane. + */ +public class Bounds { + public final double minX; + public final double minY; + + public final double maxX; + public final double maxY; + + public final double midX; + public final double midY; + + public Bounds(double minX, double maxX, double minY, double maxY) { + this.minX = minX; + this.minY = minY; + this.maxX = maxX; + this.maxY = maxY; + + midX = (minX + maxX) / 2; + midY = (minY + maxY) / 2; + } + + public boolean contains(double x, double y) { + return minX <= x && x <= maxX && minY <= y && y <= maxY; + } + + public boolean contains(Point point) { + return contains(point.x, point.y); + } + + public boolean contains(Bounds bounds) { + return bounds.minX >= minX && bounds.maxX <= maxX && bounds.minY >= minY && bounds.maxY <= maxY; + } + + public boolean intersects(double minX, double maxX, double minY, double maxY) { + return minX < this.maxX && this.minX < maxX && minY < this.maxY && this.minY < maxY; + } + + public boolean intersects(Bounds bounds) { + return intersects(bounds.minX, bounds.maxX, bounds.minY, bounds.maxY); + } + +} \ No newline at end of file diff --git a/android/src/main/java/com/baidu/mapapi/clusterutil/projection/Point.java b/android/src/main/java/com/baidu/mapapi/clusterutil/projection/Point.java new file mode 100755 index 00000000..962b56e4 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/clusterutil/projection/Point.java @@ -0,0 +1,23 @@ +/* + * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. + */ + +package com.baidu.mapapi.clusterutil.projection; + +public class Point { + public final double x; + public final double y; + + public Point(double x, double y) { + this.x = x; + this.y = y; + } + + @Override + public String toString() { + return "Point{" + + "x=" + x + + ", y=" + y + + '}'; + } +} diff --git a/android/src/main/java/com/baidu/mapapi/clusterutil/projection/SphericalMercatorProjection.java b/android/src/main/java/com/baidu/mapapi/clusterutil/projection/SphericalMercatorProjection.java new file mode 100755 index 00000000..3583a577 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/clusterutil/projection/SphericalMercatorProjection.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. + */ +package com.baidu.mapapi.clusterutil.projection; + + +import com.baidu.mapapi.model.LatLng; + +public class SphericalMercatorProjection { + final double mWorldWidth; + + public SphericalMercatorProjection(final double worldWidth) { + mWorldWidth = worldWidth; + } + + @SuppressWarnings("deprecation") + public Point toPoint(final LatLng latLng) { + final double x = latLng.longitude / 360 + .5; + final double siny = Math.sin(Math.toRadians(latLng.latitude)); + final double y = 0.5 * Math.log((1 + siny) / (1 - siny)) / -(2 * Math.PI) + .5; + + return new Point(x * mWorldWidth, y * mWorldWidth); + } + + public LatLng toLatLng(Point point) { + final double x = point.x / mWorldWidth - 0.5; + final double lng = x * 360; + + double y = .5 - (point.y / mWorldWidth); + final double lat = 90 - Math.toDegrees(Math.atan(Math.exp(-y * 2 * Math.PI)) * 2); + + return new LatLng(lat, lng); + } +} diff --git a/android/src/main/java/com/baidu/mapapi/clusterutil/quadtree/PointQuadTree.java b/android/src/main/java/com/baidu/mapapi/clusterutil/quadtree/PointQuadTree.java new file mode 100755 index 00000000..20ba122c --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/clusterutil/quadtree/PointQuadTree.java @@ -0,0 +1,214 @@ +/* + * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. + */ + +package com.baidu.mapapi.clusterutil.quadtree; + + +import com.baidu.mapapi.clusterutil.projection.Bounds; +import com.baidu.mapapi.clusterutil.projection.Point; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +/** + * A quad tree which tracks items with a Point geometry. + * See http://en.wikipedia.org/wiki/Quadtree for details on the data structure. + * This class is not thread safe. + */ +public class PointQuadTree { + + /** + * The bounds of this quad. + */ + private final Bounds mBounds; + + /** + * The depth of this quad in the tree. + */ + private final int mDepth; + + /** + * Maximum number of elements to store in a quad before splitting. + */ + private static final int MAX_ELEMENTS = 50; + + /** + * The elements inside this quad, if any. + */ + private List mItems; + + /** + * Maximum depth. + */ + private static final int MAX_DEPTH = 40; + + /** + * Child quads. + */ + private List> mChildren = null; + + /** + * Creates a new quad tree with specified bounds. + * + * @param minX + * @param maxX + * @param minY + * @param maxY + */ + public PointQuadTree(double minX, double maxX, double minY, double maxY) { + this(new Bounds(minX, maxX, minY, maxY)); + } + + public PointQuadTree(Bounds bounds) { + this(bounds, 0); + } + + private PointQuadTree(double minX, double maxX, double minY, double maxY, int depth) { + this(new Bounds(minX, maxX, minY, maxY), depth); + } + + private PointQuadTree(Bounds bounds, int depth) { + mBounds = bounds; + mDepth = depth; + } + + /** + * Insert an item. + */ + public void add(T item) { + Point point = item.getPoint(); + if (this.mBounds.contains(point.x, point.y)) { + insert(point.x, point.y, item); + } + } + + private void insert(double x, double y, T item) { + if (this.mChildren != null) { + // 四个区域进行控制 + if (y < mBounds.midY) { + if (x < mBounds.midX) { // top left + mChildren.get(0).insert(x, y, item); + } else { // top right + mChildren.get(1).insert(x, y, item); + } + } else { + if (x < mBounds.midX) { // bottom left + mChildren.get(2).insert(x, y, item); + } else { + mChildren.get(3).insert(x, y, item); + } + } + return; + } + if (mItems == null) { + mItems = new ArrayList(); + } + mItems.add(item); + if (mItems.size() > MAX_ELEMENTS && mDepth < MAX_DEPTH) { + split(); + } + } + + /** + * Split this quad. + */ + private void split() { + mChildren = new ArrayList>(4); + mChildren.add(new PointQuadTree(mBounds.minX, mBounds.midX, mBounds.minY, mBounds.midY, mDepth + 1)); + mChildren.add(new PointQuadTree(mBounds.midX, mBounds.maxX, mBounds.minY, mBounds.midY, mDepth + 1)); + mChildren.add(new PointQuadTree(mBounds.minX, mBounds.midX, mBounds.midY, mBounds.maxY, mDepth + 1)); + mChildren.add(new PointQuadTree(mBounds.midX, mBounds.maxX, mBounds.midY, mBounds.maxY, mDepth + 1)); + + List items = mItems; + mItems = null; + + for (T item : items) { + // re-insert items into child quads. + insert(item.getPoint().x, item.getPoint().y, item); + } + } + + /** + * Remove the given item from the set. + * + * @return whether the item was removed. + */ + public boolean remove(T item) { + Point point = item.getPoint(); + if (this.mBounds.contains(point.x, point.y)) { + return remove(point.x, point.y, item); + } else { + return false; + } + } + + private boolean remove(double x, double y, T item) { + if (this.mChildren != null) { + if (y < mBounds.midY) { + if (x < mBounds.midX) { // top left + return mChildren.get(0).remove(x, y, item); + } else { // top right + return mChildren.get(1).remove(x, y, item); + } + } else { + if (x < mBounds.midX) { // bottom left + return mChildren.get(2).remove(x, y, item); + } else { + return mChildren.get(3).remove(x, y, item); + } + } + } + else { + return mItems.remove(item); + } + } + + /** + * Removes all points from the quadTree + */ + public void clear() { + mChildren = null; + if (mItems != null) { + mItems.clear(); + } + } + + public interface Item { + + public Point getPoint(); + + } + + /** + * Search for all items within a given bounds. + */ + public Collection search(Bounds searchBounds) { + final List results = new ArrayList(); + search(searchBounds, results); + return results; + } + + private void search(Bounds searchBounds, Collection results) { + if (!mBounds.intersects(searchBounds)) { + return; + } + + if (this.mChildren != null) { + for (PointQuadTree quad : mChildren) { + quad.search(searchBounds, results); + } + } else if (mItems != null) { + if (searchBounds.contains(mBounds)) { + results.addAll(mItems); + } else { + for (T item : mItems) { + if (searchBounds.contains(item.getPoint())) { + results.add(item); + } + } + } + } + } +} diff --git a/android/src/main/java/com/baidu/mapapi/clusterutil/ui/IconGenerator.java b/android/src/main/java/com/baidu/mapapi/clusterutil/ui/IconGenerator.java new file mode 100755 index 00000000..8d0670c0 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/clusterutil/ui/IconGenerator.java @@ -0,0 +1,276 @@ +/* + * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. + */ + +package com.baidu.mapapi.clusterutil.ui; + +import android.content.Context; +import android.graphics.Bitmap; +import android.graphics.Canvas; +import android.graphics.Color; +import android.graphics.Rect; +import android.graphics.drawable.Drawable; +import android.view.LayoutInflater; +import android.view.View; +import android.view.ViewGroup; +import android.widget.TextView; + +import org.lovebing.reactnative.baidumap.R; + +/** + * IconGenerator generates icons that contain text (or custom content) within an info + * window-like shape. + *

    + * The icon {@link Bitmap}s generated by the factory should be used in conjunction with a {@link + * com.baidu.mapapi.map.BitmapDescriptorFactory}. + *

    + * This class is not thread safe. + */ +public class IconGenerator { + private final Context mContext; + + private ViewGroup mContainer; + private RotationLayout mRotationLayout; + private TextView mTextView; + private View mContentView; + + private int mRotation; + + private float mAnchorU = 0.5f; + private float mAnchorV = 1f; + + /** + * Creates a new IconGenerator with the default style. + */ + public IconGenerator(Context context) { + mContext = context; + mContainer = (ViewGroup) LayoutInflater.from(mContext).inflate(R.layout.text_bubble, null); + mRotationLayout = (RotationLayout) mContainer.getChildAt(0); + mContentView = mTextView = (TextView) mRotationLayout.findViewById(R.id.text); + setStyle(STYLE_DEFAULT); + } + + /** + * Sets the text content, then creates an icon with the current style. + * + * @param text the text content to display inside the icon. + */ + public Bitmap makeIcon(String text) { + if (mTextView != null) { + mTextView.setText(text); + } + + return makeIcon(); + } + + /** + * Creates an icon with the current content and style. + *

    + * This method is useful if a custom view has previously been set, or if text content is not + * applicable. + */ + public Bitmap makeIcon() { + int measureSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED); + mContainer.measure(measureSpec, measureSpec); + + int measuredWidth = mContainer.getMeasuredWidth(); + int measuredHeight = mContainer.getMeasuredHeight(); + + mContainer.layout(0, 0, measuredWidth, measuredHeight); + + if (mRotation == 1 || mRotation == 3) { + measuredHeight = mContainer.getMeasuredWidth(); + measuredWidth = mContainer.getMeasuredHeight(); + } + + Bitmap r = Bitmap.createBitmap(measuredWidth, measuredHeight, Bitmap.Config.ARGB_8888); + r.eraseColor(Color.TRANSPARENT); + + Canvas canvas = new Canvas(r); + + if (mRotation != 0) { + // do nothing + if (mRotation == 1) { + canvas.translate(measuredWidth, 0); + canvas.rotate(90); + } else if (mRotation == 2) { + canvas.rotate(180, measuredWidth / 2, measuredHeight / 2); + } else { + canvas.translate(0, measuredHeight); + canvas.rotate(270); + } + } + mContainer.draw(canvas); + return r; + } + + /** + * Sets the child view for the icon. + *

    + * If the view contains a {@link TextView} with the id "text", operations such as {@link + * #setTextAppearance} and {@link #makeIcon(String)} will operate upon that {@link TextView}. + */ + public void setContentView(View contentView) { + mRotationLayout.removeAllViews(); + mRotationLayout.addView(contentView); + mContentView = contentView; + final View view = mRotationLayout.findViewById(R.id.text); + mTextView = view instanceof TextView ? (TextView) view : null; + } + + /** + * Rotates the contents of the icon. + * + * @param degrees the amount the contents should be rotated, as a multiple of 90 degrees. + */ + public void setContentRotation(int degrees) { + mRotationLayout.setViewRotation(degrees); + } + + /** + * Rotates the icon. + * + * @param degrees the amount the icon should be rotated, as a multiple of 90 degrees. + */ + public void setRotation(int degrees) { + mRotation = ((degrees + 360) % 360) / 90; + } + + + /** + * @return u coordinate of the anchor, with rotation applied. + */ + public float getAnchorU() { + return rotateAnchor(mAnchorU, mAnchorV); + } + + /** + * @return v coordinate of the anchor, with rotation applied. + */ + public float getAnchorV() { + return rotateAnchor(mAnchorV, mAnchorU); + } + + /** + * Rotates the anchor around (u, v) = (0, 0). + */ + private float rotateAnchor(float u, float v) { + switch (mRotation) { + case 0: + return u; + case 1: + return 1 - v; + case 2: + return 1 - u; + case 3: + return v; + default: + } + throw new IllegalStateException(); + } + + /** + * Sets the text color, size, style, hint color, and highlight color from the specified + * TextAppearance resource. + * + * @param resid the identifier of the resource. + */ + public void setTextAppearance(Context context, int resid) { + if (mTextView != null) { + mTextView.setTextAppearance(context, resid); + } + } + + /** + * Sets the text color, size, style, hint color, and highlight color from the specified + * TextAppearance resource. + * + * @param resid the identifier of the resource. + */ + public void setTextAppearance(int resid) { + setTextAppearance(mContext, resid); + } + + /** + * Sets the style of the icon. The style consists of a background and text appearance. + */ + public void setStyle(int style) { + setTextAppearance(mContext, getTextStyle(style)); + } + + /** + * Set the background to a given Drawable, or remove the background. + * + * @param background the Drawable to use as the background, or null to remove the background. + */ + @SuppressWarnings("deprecation") + // View#setBackgroundDrawable is compatible with pre-API level 16 (Jelly Bean). + public void setBackground(Drawable background) { + mContainer.setBackgroundDrawable(background); + + // Force setting of padding. + // setBackgroundDrawable does not call setPadding if the background has 0 padding. + if (background != null) { + Rect rect = new Rect(); + background.getPadding(rect); + mContainer.setPadding(rect.left, rect.top, rect.right, rect.bottom); + } else { + mContainer.setPadding(0, 0, 0, 0); + } + } + + /** + * Sets the padding of the content view. The default padding of the content view (i.e. text + * view) is 5dp top/bottom and 10dp left/right. + * + * @param left the left padding in pixels. + * @param top the top padding in pixels. + * @param right the right padding in pixels. + * @param bottom the bottom padding in pixels. + */ + public void setContentPadding(int left, int top, int right, int bottom) { + mContentView.setPadding(left, top, right, bottom); + } + + public static final int STYLE_DEFAULT = 1; + public static final int STYLE_WHITE = 2; + public static final int STYLE_RED = 3; + public static final int STYLE_BLUE = 4; + public static final int STYLE_GREEN = 5; + public static final int STYLE_PURPLE = 6; + public static final int STYLE_ORANGE = 7; + + private static int getStyleColor(int style) { + switch (style) { + default: + case STYLE_DEFAULT: + case STYLE_WHITE: + return 0xffffffff; + case STYLE_RED: + return 0xffcc0000; + case STYLE_BLUE: + return 0xff0099cc; + case STYLE_GREEN: + return 0xff669900; + case STYLE_PURPLE: + return 0xff9933cc; + case STYLE_ORANGE: + return 0xffff8800; + } + } + + private static int getTextStyle(int style) { + switch (style) { + default: + case STYLE_DEFAULT: + case STYLE_WHITE: + return R.style.Bubble_TextAppearance_Dark; + case STYLE_RED: + case STYLE_BLUE: + case STYLE_GREEN: + case STYLE_PURPLE: + case STYLE_ORANGE: + return R.style.Bubble_TextAppearance_Light; + } + } +} diff --git a/android/src/main/java/com/baidu/mapapi/clusterutil/ui/RotationLayout.java b/android/src/main/java/com/baidu/mapapi/clusterutil/ui/RotationLayout.java new file mode 100755 index 00000000..e4d99ac5 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/clusterutil/ui/RotationLayout.java @@ -0,0 +1,71 @@ +/* + * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. + */ + +package com.baidu.mapapi.clusterutil.ui; + +import android.content.Context; +import android.graphics.Canvas; +import android.util.AttributeSet; +import android.widget.FrameLayout; + +/** + * RotationLayout rotates the contents of the layout by multiples of 90 degrees. + *

    + * May not work with padding. + */ +class RotationLayout extends FrameLayout { + private int mRotation; + + public RotationLayout(Context context) { + super(context); + } + + public RotationLayout(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public RotationLayout(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + } + + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + if (mRotation == 1 || mRotation == 3) { + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + setMeasuredDimension(getMeasuredHeight(), getMeasuredWidth()); + } else { + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + } + } + + /** + * @param degrees the rotation, in degrees. + */ + public void setViewRotation(int degrees) { + mRotation = ((degrees + 360) % 360) / 90; + } + + + @Override + public void dispatchDraw(Canvas canvas) { + if (mRotation == 0) { + super.dispatchDraw(canvas); + return; + } + + if (mRotation == 1) { + canvas.translate(getWidth(), 0); + canvas.rotate(90, getWidth() / 2, 0); + canvas.translate(getHeight() / 2, getWidth() / 2); + } else if (mRotation == 2) { + canvas.rotate(180, getWidth() / 2, getHeight() / 2); + } else { + canvas.translate(0, getHeight()); + canvas.rotate(270, getWidth() / 2, 0); + canvas.translate(getHeight() / 2, -getWidth() / 2); + } + + super.dispatchDraw(canvas); + } +} diff --git a/android/src/main/java/com/baidu/mapapi/clusterutil/ui/SquareTextView.java b/android/src/main/java/com/baidu/mapapi/clusterutil/ui/SquareTextView.java new file mode 100755 index 00000000..7f6a41d5 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/clusterutil/ui/SquareTextView.java @@ -0,0 +1,49 @@ +/* + * Copyright (C) 2015 Baidu, Inc. All Rights Reserved. + */ + +package com.baidu.mapapi.clusterutil.ui; + +import android.content.Context; +import android.graphics.Canvas; +import android.util.AttributeSet; +import android.widget.TextView; + +public class SquareTextView extends TextView { + private int mOffsetTop = 0; + private int mOffsetLeft = 0; + + public SquareTextView(Context context) { + super(context); + } + + public SquareTextView(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public SquareTextView(Context context, AttributeSet attrs, int defStyle) { + super(context, attrs, defStyle); + } + + @Override + protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + super.onMeasure(widthMeasureSpec, heightMeasureSpec); + int width = getMeasuredWidth(); + int height = getMeasuredHeight(); + int dimension = Math.max(width, height); + if (width > height) { + mOffsetTop = width - height; + mOffsetLeft = 0; + } else { + mOffsetTop = 0; + mOffsetLeft = height - width; + } + setMeasuredDimension(dimension, dimension); + } + + @Override + public void draw(Canvas canvas) { + canvas.translate(mOffsetLeft / 2, mOffsetTop / 2); + super.draw(canvas); + } +} diff --git a/android/src/main/java/com/baidu/mapapi/overlayutil/BikingRouteOverlay.java b/android/src/main/java/com/baidu/mapapi/overlayutil/BikingRouteOverlay.java new file mode 100644 index 00000000..bc0ee811 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/overlayutil/BikingRouteOverlay.java @@ -0,0 +1,178 @@ +/* + * Copyright (C) 2016 Baidu, Inc. All Rights Reserved. + */ +package com.baidu.mapapi.overlayutil; + +import android.graphics.Color; +import android.os.Bundle; +import android.util.Log; + +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.BitmapDescriptor; +import com.baidu.mapapi.map.BitmapDescriptorFactory; +import com.baidu.mapapi.map.Marker; +import com.baidu.mapapi.map.MarkerOptions; +import com.baidu.mapapi.map.Overlay; +import com.baidu.mapapi.map.OverlayOptions; +import com.baidu.mapapi.map.Polyline; +import com.baidu.mapapi.map.PolylineOptions; +import com.baidu.mapapi.model.LatLng; +import com.baidu.mapapi.search.route.BikingRouteLine; + +import java.util.ArrayList; +import java.util.List; + +/** + * 用于显示骑行路线的Overlay + */ +public class BikingRouteOverlay extends OverlayManager { + + private BikingRouteLine mRouteLine = null; + + public BikingRouteOverlay(BaiduMap baiduMap) { + super(baiduMap); + } + + /** + * 设置路线数据。 + * + * @param line + * 路线数据 + */ + public void setData(BikingRouteLine line) { + mRouteLine = line; + } + + @Override + public final List getOverlayOptions() { + if (mRouteLine == null) { + return null; + } + + List overlayList = new ArrayList(); + if (mRouteLine.getAllStep() != null + && mRouteLine.getAllStep().size() > 0) { + for (BikingRouteLine.BikingStep step : mRouteLine.getAllStep()) { + Bundle b = new Bundle(); + b.putInt("index", mRouteLine.getAllStep().indexOf(step)); + if (step.getEntrance() != null) { + overlayList.add((new MarkerOptions()) + .position(step.getEntrance().getLocation()) + .rotate((360 - step.getDirection())) + .zIndex(10) + .anchor(0.5f, 0.5f) + .extraInfo(b) + .icon(BitmapDescriptorFactory + .fromAssetWithDpi("Icon_line_node.png"))); + } + + // 最后路段绘制出口点 + if (mRouteLine.getAllStep().indexOf(step) == (mRouteLine + .getAllStep().size() - 1) && step.getExit() != null) { + overlayList.add((new MarkerOptions()) + .position(step.getExit().getLocation()) + .anchor(0.5f, 0.5f) + .zIndex(10) + .icon(BitmapDescriptorFactory + .fromAssetWithDpi("Icon_line_node.png"))); + + } + } + } + // starting + if (mRouteLine.getStarting() != null) { + overlayList.add((new MarkerOptions()) + .position(mRouteLine.getStarting().getLocation()) + .icon(getStartMarker() != null ? getStartMarker() : + BitmapDescriptorFactory + .fromAssetWithDpi("Icon_start.png")).zIndex(10)); + } + // terminal + if (mRouteLine.getTerminal() != null) { + overlayList + .add((new MarkerOptions()) + .position(mRouteLine.getTerminal().getLocation()) + .icon(getTerminalMarker() != null ? getTerminalMarker() : + BitmapDescriptorFactory + .fromAssetWithDpi("Icon_end.png")) + .zIndex(10)); + } + + // poly line list + if (mRouteLine.getAllStep() != null + && mRouteLine.getAllStep().size() > 0) { + LatLng lastStepLastPoint = null; + for (BikingRouteLine.BikingStep step : mRouteLine.getAllStep()) { + List watPoints = step.getWayPoints(); + if (watPoints != null) { + List points = new ArrayList(); + if (lastStepLastPoint != null) { + points.add(lastStepLastPoint); + } + points.addAll(watPoints); + overlayList.add(new PolylineOptions().points(points).width(10) + .color(getLineColor() != 0 ? getLineColor() : Color.argb(178, 0, 78, 255)).zIndex(0)); + lastStepLastPoint = watPoints.get(watPoints.size() - 1); + } + } + + } + + return overlayList; + } + + /** + * 覆写此方法以改变默认起点图标 + * + * @return 起点图标 + */ + public BitmapDescriptor getStartMarker() { + return null; + } + public int getLineColor() { + return 0; + } + /** + * 覆写此方法以改变默认终点图标 + * + * @return 终点图标 + */ + public BitmapDescriptor getTerminalMarker() { + return null; + } + + /** + * 处理点击事件 + * + * @param i + * 被点击的step在 + * {@link BikingRouteLine#getAllStep()} + * 中的索引 + * @return 是否处理了该点击事件 + */ + public boolean onRouteNodeClick(int i) { + if (mRouteLine.getAllStep() != null + && mRouteLine.getAllStep().get(i) != null) { + Log.i("baidumapsdk", "BikingRouteOverlay onRouteNodeClick"); + } + return false; + } + + @Override + public final boolean onMarkerClick(Marker marker) { + for (Overlay mMarker : mOverlayList) { + if (mMarker instanceof Marker && mMarker.equals(marker)) { + if (marker.getExtraInfo() != null) { + onRouteNodeClick(marker.getExtraInfo().getInt("index")); + } + } + } + return true; + } + + @Override + public boolean onPolylineClick(Polyline polyline) { + // TODO Auto-generated method stub + return false; + } +} \ No newline at end of file diff --git a/android/src/main/java/com/baidu/mapapi/overlayutil/BusLineOverlay.java b/android/src/main/java/com/baidu/mapapi/overlayutil/BusLineOverlay.java new file mode 100644 index 00000000..f76e525d --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/overlayutil/BusLineOverlay.java @@ -0,0 +1,108 @@ +package com.baidu.mapapi.overlayutil; + +import android.graphics.Color; +import android.util.Log; + +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.BitmapDescriptorFactory; +import com.baidu.mapapi.map.Marker; +import com.baidu.mapapi.map.MarkerOptions; +import com.baidu.mapapi.map.OverlayOptions; +import com.baidu.mapapi.map.Polyline; +import com.baidu.mapapi.map.PolylineOptions; +import com.baidu.mapapi.model.LatLng; +import com.baidu.mapapi.search.busline.BusLineResult; + +import java.util.ArrayList; +import java.util.List; + +/** + * 用于显示一条公交详情结果的Overlay + */ +public class BusLineOverlay extends OverlayManager { + + private BusLineResult mBusLineResult = null; + + /** + * 构造函数 + * + * @param baiduMap + * 该BusLineOverlay所引用的 BaiduMap 对象 + */ + public BusLineOverlay(BaiduMap baiduMap) { + super(baiduMap); + } + + /** + * 设置公交线数据 + * + * @param result + * 公交线路结果数据 + */ + public void setData(BusLineResult result) { + this.mBusLineResult = result; + } + + @Override + public final List getOverlayOptions() { + + if (mBusLineResult == null || mBusLineResult.getStations() == null) { + return null; + } + List overlayOptionses = new ArrayList(); + for (BusLineResult.BusStation station : mBusLineResult.getStations()) { + overlayOptionses.add(new MarkerOptions() + .position(station.getLocation()) + .zIndex(10) + .anchor(0.5f, 0.5f) + .icon(BitmapDescriptorFactory + .fromAssetWithDpi("Icon_bus_station.png"))); + } + + List points = new ArrayList(); + for (BusLineResult.BusStep step : mBusLineResult.getSteps()) { + if (step.getWayPoints() != null) { + points.addAll(step.getWayPoints()); + } + } + if (points.size() > 0) { + overlayOptionses + .add(new PolylineOptions().width(10) + .color(Color.argb(178, 0, 78, 255)).zIndex(0) + .points(points)); + } + return overlayOptionses; + } + + /** + * 覆写此方法以改变默认点击行为 + * + * @param index + * 被点击的站点在 + * {@link BusLineResult#getStations()} + * 中的索引 + * @return 是否处理了该点击事件 + */ + public boolean onBusStationClick(int index) { + if (mBusLineResult.getStations() != null + && mBusLineResult.getStations().get(index) != null) { + Log.i("baidumapsdk", "BusLineOverlay onBusStationClick"); + } + return false; + } + + public final boolean onMarkerClick(Marker marker) { + if (mOverlayList != null && mOverlayList.contains(marker)) { + return onBusStationClick(mOverlayList.indexOf(marker)); + } else { + return false; + } + + } + + @Override + public boolean onPolylineClick(Polyline polyline) { + // TODO Auto-generated method stub + return false; + } +} diff --git a/android/src/main/java/com/baidu/mapapi/overlayutil/DrivingRouteOverlay.java b/android/src/main/java/com/baidu/mapapi/overlayutil/DrivingRouteOverlay.java new file mode 100644 index 00000000..c1f551fd --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/overlayutil/DrivingRouteOverlay.java @@ -0,0 +1,244 @@ +package com.baidu.mapapi.overlayutil; + +import android.graphics.Color; +import android.os.Bundle; +import android.util.Log; + +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.BitmapDescriptor; +import com.baidu.mapapi.map.BitmapDescriptorFactory; +import com.baidu.mapapi.map.Marker; +import com.baidu.mapapi.map.MarkerOptions; +import com.baidu.mapapi.map.Overlay; +import com.baidu.mapapi.map.OverlayOptions; +import com.baidu.mapapi.map.Polyline; +import com.baidu.mapapi.map.PolylineOptions; +import com.baidu.mapapi.model.LatLng; +import com.baidu.mapapi.search.route.DrivingRouteLine; +import com.baidu.mapapi.search.route.DrivingRouteLine.DrivingStep; + +import java.util.ArrayList; +import java.util.List; + +/** + * 用于显示一条驾车路线的overlay,自3.4.0版本起可实例化多个添加在地图中显示,当数据中包含路况数据时,则默认使用路况纹理分段绘制 + */ +public class DrivingRouteOverlay extends OverlayManager { + + private DrivingRouteLine mRouteLine = null; + boolean focus = false; + + /** + * 构造函数 + * + * @param baiduMap + * 该DrivingRouteOvelray引用的 BaiduMap + */ + public DrivingRouteOverlay(BaiduMap baiduMap) { + super(baiduMap); + } + + @Override + public final List getOverlayOptions() { + if (mRouteLine == null) { + return null; + } + + List overlayOptionses = new ArrayList(); + // step node + if (mRouteLine.getAllStep() != null + && mRouteLine.getAllStep().size() > 0) { + + for (DrivingStep step : mRouteLine.getAllStep()) { + Bundle b = new Bundle(); + b.putInt("index", mRouteLine.getAllStep().indexOf(step)); + if (step.getEntrance() != null) { + overlayOptionses.add((new MarkerOptions()) + .position(step.getEntrance().getLocation()) + .anchor(0.5f, 0.5f) + .zIndex(10) + .rotate((360 - step.getDirection())) + .extraInfo(b) + .icon(BitmapDescriptorFactory + .fromAssetWithDpi("Icon_line_node.png"))); + } + // 最后路段绘制出口点 + if (mRouteLine.getAllStep().indexOf(step) == (mRouteLine + .getAllStep().size() - 1) && step.getExit() != null) { + overlayOptionses.add((new MarkerOptions()) + .position(step.getExit().getLocation()) + .anchor(0.5f, 0.5f) + .zIndex(10) + .icon(BitmapDescriptorFactory + .fromAssetWithDpi("Icon_line_node.png"))); + + } + } + } + + if (mRouteLine.getStarting() != null) { + overlayOptionses.add((new MarkerOptions()) + .position(mRouteLine.getStarting().getLocation()) + .icon(getStartMarker() != null ? getStartMarker() : + BitmapDescriptorFactory + .fromAssetWithDpi("Icon_start.png")).zIndex(10)); + } + if (mRouteLine.getTerminal() != null) { + overlayOptionses + .add((new MarkerOptions()) + .position(mRouteLine.getTerminal().getLocation()) + .icon(getTerminalMarker() != null ? getTerminalMarker() : + BitmapDescriptorFactory + .fromAssetWithDpi("Icon_end.png")) + .zIndex(10)); + } + // poly line + if (mRouteLine.getAllStep() != null + && mRouteLine.getAllStep().size() > 0) { + + List steps = mRouteLine.getAllStep(); + int stepNum = steps.size(); + + + List points = new ArrayList(); + ArrayList traffics = new ArrayList(); + int totalTraffic = 0; + for (int i = 0; i < stepNum ; i++) { + if (i == stepNum - 1) { + points.addAll(steps.get(i).getWayPoints()); + } else { + points.addAll(steps.get(i).getWayPoints().subList(0, steps.get(i).getWayPoints().size() - 1)); + } + + totalTraffic += steps.get(i).getWayPoints().size() - 1; + if (steps.get(i).getTrafficList() != null && steps.get(i).getTrafficList().length > 0) { + for (int j = 0;j < steps.get(i).getTrafficList().length;j++) { + traffics.add(steps.get(i).getTrafficList()[j]); + } + } + } + +// Bundle indexList = new Bundle(); +// if (traffics.size() > 0) { +// int raffic[] = new int[traffics.size()]; +// int index = 0; +// for (Integer tempTraff : traffics) { +// raffic[index] = tempTraff.intValue(); +// index++; +// } +// indexList.putIntArray("indexs", raffic); +// } + boolean isDotLine = false; + + if (traffics != null && traffics.size() > 0) { + isDotLine = true; + } + PolylineOptions option = new PolylineOptions().points(points).textureIndex(traffics) + .width(7).dottedLine(isDotLine).focus(true) + .color(getLineColor() != 0 ? getLineColor() : Color.argb(178, 0, 78, 255)).zIndex(0); + if (isDotLine) { + option.customTextureList(getCustomTextureList()); + } + overlayOptionses.add(option); + } + return overlayOptionses; + } + + /** + * 设置路线数据 + * + * @param routeLine + * 路线数据 + */ + public void setData(DrivingRouteLine routeLine) { + this.mRouteLine = routeLine; + } + + /** + * 覆写此方法以改变默认起点图标 + * + * @return 起点图标 + */ + public BitmapDescriptor getStartMarker() { + return null; + } + + /** + * 覆写此方法以改变默认绘制颜色 + * @return 线颜色 + */ + public int getLineColor() { + return 0; + } + public List getCustomTextureList() { + ArrayList list = new ArrayList(); + list.add(BitmapDescriptorFactory.fromAsset("Icon_road_blue_arrow.png")); + list.add(BitmapDescriptorFactory.fromAsset("Icon_road_green_arrow.png")); + list.add(BitmapDescriptorFactory.fromAsset("Icon_road_yellow_arrow.png")); + list.add(BitmapDescriptorFactory.fromAsset("Icon_road_red_arrow.png")); + list.add(BitmapDescriptorFactory.fromAsset("Icon_road_nofocus.png")); + return list; + } + /** + * 覆写此方法以改变默认终点图标 + * + * @return 终点图标 + */ + public BitmapDescriptor getTerminalMarker() { + return null; + } + + /** + * 覆写此方法以改变默认点击处理 + * + * @param i + * 线路节点的 index + * @return 是否处理了该点击事件 + */ + public boolean onRouteNodeClick(int i) { + if (mRouteLine.getAllStep() != null + && mRouteLine.getAllStep().get(i) != null) { + Log.i("baidumapsdk", "DrivingRouteOverlay onRouteNodeClick"); + } + return false; + } + + @Override + public final boolean onMarkerClick(Marker marker) { + for (Overlay mMarker : mOverlayList) { + if (mMarker instanceof Marker && mMarker.equals(marker)) { + if (marker.getExtraInfo() != null) { + onRouteNodeClick(marker.getExtraInfo().getInt("index")); + } + } + } + return true; + } + + @Override + public boolean onPolylineClick(Polyline polyline) { + boolean flag = false; + for (Overlay mPolyline : mOverlayList) { + if (mPolyline instanceof Polyline && mPolyline.equals(polyline)) { + // 选中 + flag = true; + break; + } + } + setFocus(flag); + return true; + } + + public void setFocus(boolean flag) { + focus = flag; + for (Overlay mPolyline : mOverlayList) { + if (mPolyline instanceof Polyline) { + // 选中 + ((Polyline) mPolyline).setFocus(flag); + + break; + } + } + + } +} diff --git a/android/src/main/java/com/baidu/mapapi/overlayutil/IndoorPoiOverlay.java b/android/src/main/java/com/baidu/mapapi/overlayutil/IndoorPoiOverlay.java new file mode 100644 index 00000000..db0ed28d --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/overlayutil/IndoorPoiOverlay.java @@ -0,0 +1,108 @@ +package com.baidu.mapapi.overlayutil; + + +import android.os.Bundle; + +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.BitmapDescriptorFactory; +import com.baidu.mapapi.map.Marker; +import com.baidu.mapapi.map.MarkerOptions; +import com.baidu.mapapi.map.OverlayOptions; +import com.baidu.mapapi.map.Polyline; +import com.baidu.mapapi.search.poi.PoiIndoorResult; + +import java.util.ArrayList; +import java.util.List; + +/** + * 用于显示indoorpoi的overly + */ +public class IndoorPoiOverlay extends OverlayManager { + + private static final int MAX_POI_SIZE = 10; + + private PoiIndoorResult mIndoorPoiResult = null; + + /** + * 构造函数 + * + * @param baiduMap + * 该 IndoorPoiOverlay 引用的 BaiduMap 对象 + */ + public IndoorPoiOverlay(BaiduMap baiduMap) { + super(baiduMap); + } + + /** + * 设置IndoorPoi数据 + * + * @param indoorpoiResult + * 设置indoorpoiResult数据 + */ + public void setData(PoiIndoorResult indoorpoiResult) { + this.mIndoorPoiResult = indoorpoiResult; + } + + @Override + public final List getOverlayOptions() { + if (mIndoorPoiResult == null || mIndoorPoiResult.getmArrayPoiInfo() == null) { + return null; + } + List markerList = new ArrayList(); + int markerSize = 0; + for (int i = 0; i < mIndoorPoiResult.getmArrayPoiInfo().size() + && markerSize < MAX_POI_SIZE; i++) { + if (mIndoorPoiResult.getmArrayPoiInfo().get(i).latLng == null) { + continue; + } + markerSize++; + Bundle bundle = new Bundle(); + bundle.putInt("index", i); + markerList.add(new MarkerOptions() + .icon(BitmapDescriptorFactory.fromAssetWithDpi("Icon_mark" + + markerSize + ".png")).extraInfo(bundle) + .position(mIndoorPoiResult.getmArrayPoiInfo().get(i).latLng)); + + } + return markerList; + } + + /** + * 获取该 IndoorPoiOverlay 的 indoorpoi数据 + * + * @return + */ + public PoiIndoorResult getIndoorPoiResult() { + return mIndoorPoiResult; + } + + /** + * 覆写此方法以改变默认点击行为 + * + * @param i + * 被点击的poi在 + * {@link PoiIndoorResult#getmArrayPoiInfo()} } 中的索引 + * @return + */ + public boolean onPoiClick(int i) { + return false; + } + + @Override + public final boolean onMarkerClick(Marker marker) { + if (!mOverlayList.contains(marker)) { + return false; + } + if (marker.getExtraInfo() != null) { + return onPoiClick(marker.getExtraInfo().getInt("index")); + } + return false; + } + + @Override + public boolean onPolylineClick(Polyline polyline) { + // TODO Auto-generated method stub + return false; + } +} + diff --git a/android/src/main/java/com/baidu/mapapi/overlayutil/IndoorRouteOverlay.java b/android/src/main/java/com/baidu/mapapi/overlayutil/IndoorRouteOverlay.java new file mode 100644 index 00000000..7bb79c59 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/overlayutil/IndoorRouteOverlay.java @@ -0,0 +1,166 @@ +/* + * Copyright (C) 2016 Baidu, Inc. All Rights Reserved. + */ +package com.baidu.mapapi.overlayutil; + +import java.util.ArrayList; +import java.util.List; + +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.BitmapDescriptor; +import com.baidu.mapapi.map.BitmapDescriptorFactory; +import com.baidu.mapapi.map.Marker; +import com.baidu.mapapi.map.MarkerOptions; +import com.baidu.mapapi.map.OverlayOptions; +import com.baidu.mapapi.map.Polyline; +import com.baidu.mapapi.map.PolylineOptions; +import com.baidu.mapapi.model.LatLng; +import com.baidu.mapapi.search.route.IndoorRouteLine; + +import android.graphics.Color; +import android.os.Bundle; + +public class IndoorRouteOverlay extends OverlayManager { + + private IndoorRouteLine mRouteLine; + int[] colorInfo; + + /** + * 构造函数 + * + * @param baiduMap + * 该TransitRouteOverlay引用的 BaiduMap 对象 + */ + public IndoorRouteOverlay(BaiduMap baiduMap) { + super(baiduMap); + colorInfo = new int[]{ Color.argb(178, 0, 78, 255), Color.argb(178, 88, 208, 0), Color.argb(178, 88, 78, + 255)}; + } + + + /** + * 设置路线数据 + * + * @param routeOverlay + * 路线数据 + */ + public void setData(IndoorRouteLine routeOverlay) { + this.mRouteLine = routeOverlay; + } + + /** + * 覆写此方法以改变默认起点图标 + * + * @return 起点图标 + */ + public BitmapDescriptor getStartMarker() { + return null; + } + + /** + * 覆写此方法以改变默认终点图标 + * + * @return 终点图标 + */ + public BitmapDescriptor getTerminalMarker() { + return null; + } + + public int getLineColor() { + return 0; + } + @Override + public List getOverlayOptions() { + if (mRouteLine == null) { + return null; + } + + List overlayList = new ArrayList(); + + + // 添加step的节点 + if (mRouteLine.getAllStep() != null && mRouteLine.getAllStep().size() > 0) { + for (IndoorRouteLine.IndoorRouteStep step : mRouteLine.getAllStep()) { + Bundle b = new Bundle(); + b.putInt("index", mRouteLine.getAllStep().indexOf(step)); + if (step.getEntrace() != null) { + overlayList.add((new MarkerOptions()).position(step.getEntrace().getLocation()) + .zIndex(10).anchor(0.5f, 0.5f).extraInfo(b) + .icon(BitmapDescriptorFactory.fromAssetWithDpi("Icon_walk_route.png"))); + } + + // 最后路段绘制出口点 + if (mRouteLine.getAllStep().indexOf(step) == (mRouteLine.getAllStep().size() - 1) + && step.getExit() != null) { + overlayList.add((new MarkerOptions()).position(step.getExit().getLocation()).anchor(0.5f, 0.5f) + .zIndex(10).icon(BitmapDescriptorFactory.fromAssetWithDpi("Icon_walk_route.png"))); + + } + } + } + // 添加起点starting + if (mRouteLine.getStarting() != null) { + overlayList.add((new MarkerOptions()).position(mRouteLine.getStarting().getLocation()) + .icon(getStartMarker() != null ? getStartMarker() : + BitmapDescriptorFactory.fromAssetWithDpi("Icon_start.png")) + .zIndex(10)); + } + // 添加终点terminal + if (mRouteLine.getTerminal() != null) { + overlayList.add((new MarkerOptions()).position(mRouteLine.getTerminal().getLocation()) + .icon(getTerminalMarker() != null ? getTerminalMarker() : + BitmapDescriptorFactory.fromAssetWithDpi("Icon_end.png")) + .zIndex(10)); + } + + // 添加线poly line list + if (mRouteLine.getAllStep() != null && mRouteLine.getAllStep().size() > 0) { + LatLng lastStepLastPoint = null; + int idex = 0; + for (IndoorRouteLine.IndoorRouteStep step : mRouteLine.getAllStep()) { + List watPoints = step.getWayPoints(); + if (watPoints != null) { + List points = new ArrayList(); + if (lastStepLastPoint != null) { + points.add(lastStepLastPoint); + } + points.addAll(watPoints); + overlayList.add(new PolylineOptions().points(points).width(10) + .color(getLineColor() != 0 ? getLineColor() : colorInfo[idex++ % 3]).zIndex(0)); + lastStepLastPoint = watPoints.get(watPoints.size() - 1); + } + } + + } + + return overlayList; + + } + +// private BitmapDescriptor getIconForStep(IndoorRouteLine.TransitStep step) { +// switch (step.getVehileType()) { +// case ESTEP_WALK: +// return BitmapDescriptorFactory.fromAssetWithDpi("Icon_walk_route.png"); +// case ESTEP_TRAIN: +// return BitmapDescriptorFactory.fromAssetWithDpi("Icon_subway_station.png"); +// case ESTEP_DRIVING: +// case ESTEP_COACH: +// case ESTEP_PLANE: +// case ESTEP_BUS: +// return BitmapDescriptorFactory.fromAssetWithDpi("Icon_bus_station.png"); +// default: +// return null; +// } +// } + + @Override + public boolean onMarkerClick(Marker marker) { + return false; + } + + @Override + public boolean onPolylineClick(Polyline polyline) { + return false; + } +} + diff --git a/android/src/main/java/com/baidu/mapapi/overlayutil/MassTransitRouteOverlay.java b/android/src/main/java/com/baidu/mapapi/overlayutil/MassTransitRouteOverlay.java new file mode 100644 index 00000000..1afd9518 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/overlayutil/MassTransitRouteOverlay.java @@ -0,0 +1,225 @@ +/* + * Copyright (C) 2016 Baidu, Inc. All Rights Reserved. + */ +package com.baidu.mapapi.overlayutil; + +import java.util.ArrayList; +import java.util.List; + +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.BitmapDescriptor; +import com.baidu.mapapi.map.BitmapDescriptorFactory; +import com.baidu.mapapi.map.Marker; +import com.baidu.mapapi.map.MarkerOptions; +import com.baidu.mapapi.map.OverlayOptions; +import com.baidu.mapapi.map.Polyline; +import com.baidu.mapapi.map.PolylineOptions; +import com.baidu.mapapi.search.route.MassTransitRouteLine; + +import android.graphics.Color; +import android.os.Bundle; + +public class MassTransitRouteOverlay extends OverlayManager { + + private MassTransitRouteLine mRouteLine; + private boolean isSameCity; + + /** + * 构造函数 + * + * @param baiduMap + * 该TransitRouteOverlay引用的 BaiduMap 对象 + */ + public MassTransitRouteOverlay(BaiduMap baiduMap) { + super(baiduMap); + } + + + /** + * 设置路线数据 + * + * @param routeOverlay + * 路线数据 + */ + public void setData(MassTransitRouteLine routeOverlay) { + this.mRouteLine = routeOverlay; + } + + public void setSameCity( boolean sameCity ) { + isSameCity = sameCity; + } + /** + * 覆写此方法以改变默认起点图标 + * + * @return 起点图标 + */ + public BitmapDescriptor getStartMarker() { + return null; + } + + /** + * 覆写此方法以改变默认终点图标 + * + * @return 终点图标 + */ + public BitmapDescriptor getTerminalMarker() { + return null; + } + + public int getLineColor() { + return 0; + } + @Override + public List getOverlayOptions() { + if (mRouteLine == null) { + return null; + } + + List overlayOptionses = new ArrayList(); + List> steps = mRouteLine.getNewSteps(); + if (isSameCity ) { + // 同城 (同城时,每个steps的get(i)对应的List是一条step的不同方案,此处都选第一条进行绘制,即get(0)) + + // step node + for ( int i = 0; i < steps.size(); i++ ) { + + MassTransitRouteLine.TransitStep step = steps.get(i).get(0); + Bundle b = new Bundle(); + b.putInt("index", i + 1); + + if (step.getStartLocation() != null) { + overlayOptionses.add((new MarkerOptions()).position(step.getStartLocation()) + .anchor(0.5f, 0.5f).zIndex(10).extraInfo(b).icon(getIconForStep(step))); + } + + // 最后一个终点 + if ( (i == steps.size() - 1) && (step.getEndLocation() != null)) { + overlayOptionses.add((new MarkerOptions()).position(step.getEndLocation()) + .anchor(0.5f, 0.5f).zIndex(10) + .icon(getIconForStep(step)) + ); + } + + } + + // polyline + for ( int i = 0; i < steps.size(); i++ ) { + MassTransitRouteLine.TransitStep step = steps.get(i).get(0); + int color = 0; + if (step.getVehileType() != MassTransitRouteLine.TransitStep + .StepVehicleInfoType.ESTEP_WALK) { + // color = Color.argb(178, 0, 78, 255); + color = getLineColor() != 0 ? getLineColor() : Color.argb(178, 0, 78, 255); + } else { + // color = Color.argb(178, 88, 208, 0); + color = getLineColor() != 0 ? getLineColor() : Color.argb(178, 88, 208, 0); + } + overlayOptionses.add(new PolylineOptions() + .points(step.getWayPoints()).width(10).color(color) + .zIndex(0)); + } + + } else { + // 跨城 (跨城时,每个steps的get(i)对应的List是一条step的子路线sub_step,需要将它们全部拼接才是一条完整路线) + int stepSum = 0; + for (int i = 0; i < steps.size(); i++ ) { + stepSum += steps.get(i).size(); + } + + // step node + int k = 1; + for ( int i = 0; i < steps.size(); i++ ) { + + for (int j = 0; j < steps.get(i).size(); j++ ) { + MassTransitRouteLine.TransitStep step = steps.get(i).get(j); + Bundle b = new Bundle(); + b.putInt("index", k); + + if (step.getStartLocation() != null) { + overlayOptionses.add((new MarkerOptions()).position(step.getStartLocation()) + .anchor(0.5f, 0.5f).zIndex(10).extraInfo(b).icon(getIconForStep(step))); + } + + // 最后一个终点 + if ( (k == stepSum ) && (step.getEndLocation() != null)) { + overlayOptionses.add((new MarkerOptions()).position(step.getEndLocation()) + .anchor(0.5f, 0.5f).zIndex(10).icon(getIconForStep(step))); + } + + k++; + } + } + + + // polyline + for ( int i = 0; i < steps.size(); i++ ) { + + for (int j = 0; j < steps.get(i).size(); j++ ) { + MassTransitRouteLine.TransitStep step = steps.get(i).get(j); + int color = 0; + if (step.getVehileType() != MassTransitRouteLine.TransitStep + .StepVehicleInfoType.ESTEP_WALK) { + // color = Color.argb(178, 0, 78, 255); + color = getLineColor() != 0 ? getLineColor() : Color.argb(178, 0, 78, 255); + } else { + // color = Color.argb(178, 88, 208, 0); + color = getLineColor() != 0 ? getLineColor() : Color.argb(178, 88, 208, 0); + } + if (step.getWayPoints() != null ) { + overlayOptionses.add(new PolylineOptions() + .points(step.getWayPoints()).width(10).color(color) + .zIndex(0)); + } + } + } + + } + + // 起点 + if (mRouteLine.getStarting() != null && mRouteLine.getStarting().getLocation() != null) { + overlayOptionses.add((new MarkerOptions()).position(mRouteLine.getStarting().getLocation()) + .icon(getStartMarker() != null + ? getStartMarker() : BitmapDescriptorFactory.fromAssetWithDpi("Icon_start.png")) + .zIndex(10)); + } + // 终点 + if (mRouteLine.getTerminal() != null && mRouteLine.getTerminal().getLocation() != null) { + overlayOptionses + .add((new MarkerOptions()) + .position(mRouteLine.getTerminal().getLocation()) + .icon(getTerminalMarker() != null ? getTerminalMarker() : + BitmapDescriptorFactory + .fromAssetWithDpi("Icon_end.png")) + .zIndex(10)); + } + + return overlayOptionses; + + } + + private BitmapDescriptor getIconForStep(MassTransitRouteLine.TransitStep step) { + switch (step.getVehileType()) { + case ESTEP_WALK: + return BitmapDescriptorFactory.fromAssetWithDpi("Icon_walk_route.png"); + case ESTEP_TRAIN: + return BitmapDescriptorFactory.fromAssetWithDpi("Icon_subway_station.png"); + case ESTEP_DRIVING: + case ESTEP_COACH: + case ESTEP_PLANE: + case ESTEP_BUS: + return BitmapDescriptorFactory.fromAssetWithDpi("Icon_bus_station.png"); + default: + return null; + } + } + + @Override + public boolean onMarkerClick(Marker marker) { + return false; + } + + @Override + public boolean onPolylineClick(Polyline polyline) { + return false; + } +} diff --git a/android/src/main/java/com/baidu/mapapi/overlayutil/OverlayManager.java b/android/src/main/java/com/baidu/mapapi/overlayutil/OverlayManager.java new file mode 100644 index 00000000..1ef55571 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/overlayutil/OverlayManager.java @@ -0,0 +1,144 @@ +package com.baidu.mapapi.overlayutil; + +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.BaiduMap.OnPolylineClickListener; +import com.baidu.mapapi.map.MapStatus; +import com.baidu.mapapi.map.MapStatusUpdateFactory; +import com.baidu.mapapi.map.Marker; +import com.baidu.mapapi.map.Overlay; +import com.baidu.mapapi.map.OverlayOptions; +import com.baidu.mapapi.model.LatLngBounds; + +import java.util.ArrayList; +import java.util.List; + +import static com.baidu.mapapi.map.BaiduMap.OnMarkerClickListener; + +/** + * 该类提供一个能够显示和管理多个Overlay的基类 + *

    + * 复写{@link #getOverlayOptions()} 设置欲显示和管理的Overlay列表 + *

    + *

    + * 通过 + * {@link BaiduMap#setOnMarkerClickListener(OnMarkerClickListener)} + * 将覆盖物点击事件传递给OverlayManager后,OverlayManager才能响应点击事件。 + *

    + * 复写{@link #onMarkerClick(Marker)} 处理Marker点击事件 + *

    + */ +public abstract class OverlayManager implements OnMarkerClickListener, OnPolylineClickListener { + + BaiduMap mBaiduMap = null; + private List mOverlayOptionList = null; + + List mOverlayList = null; + + /** + * 通过一个BaiduMap 对象构造 + * + * @param baiduMap + */ + public OverlayManager(BaiduMap baiduMap) { + mBaiduMap = baiduMap; + // mBaiduMap.setOnMarkerClickListener(this); + if (mOverlayOptionList == null) { + mOverlayOptionList = new ArrayList(); + } + if (mOverlayList == null) { + mOverlayList = new ArrayList(); + } + } + + /** + * 覆写此方法设置要管理的Overlay列表 + * + * @return 管理的Overlay列表 + */ + public abstract List getOverlayOptions(); + + /** + * 将所有Overlay 添加到地图上 + */ + public final void addToMap() { + if (mBaiduMap == null) { + return; + } + + removeFromMap(); + List overlayOptions = getOverlayOptions(); + if (overlayOptions != null) { + mOverlayOptionList.addAll(getOverlayOptions()); + } + + for (OverlayOptions option : mOverlayOptionList) { + mOverlayList.add(mBaiduMap.addOverlay(option)); + } + } + + /** + * 将所有Overlay 从 地图上消除 + */ + public final void removeFromMap() { + if (mBaiduMap == null) { + return; + } + for (Overlay marker : mOverlayList) { + marker.remove(); + } + mOverlayOptionList.clear(); + mOverlayList.clear(); + + } + + /** + * 缩放地图,使所有Overlay都在合适的视野内 + *

    + * 注: 该方法只对Marker类型的overlay有效 + *

    + */ + public void zoomToSpan() { + if (mBaiduMap == null) { + return; + } + if (mOverlayList.size() > 0) { + LatLngBounds.Builder builder = new LatLngBounds.Builder(); + for (Overlay overlay : mOverlayList) { + // polyline 中的点可能太多,只按marker 缩放 + if (overlay instanceof Marker) { + builder.include(((Marker) overlay).getPosition()); + } + } + MapStatus mapStatus = mBaiduMap.getMapStatus(); + if (null != mapStatus){ + int width = mapStatus.winRound.right - mBaiduMap.getMapStatus().winRound.left - 400; + int height = mapStatus.winRound.bottom - mBaiduMap.getMapStatus().winRound.top - 400; + mBaiduMap.setMapStatus(MapStatusUpdateFactory + .newLatLngBounds(builder.build(), width, height)); + } + + } + } + + /** + * 设置显示在规定宽高中的地图地理范围 + */ + public void zoomToSpanPaddingBounds(int paddingLeft, int paddingTop, int paddingRight, int paddingBottom) { + if (mBaiduMap == null) { + return; + } + if (mOverlayList.size() > 0) { + LatLngBounds.Builder builder = new LatLngBounds.Builder(); + for (Overlay overlay : mOverlayList) { + // polyline 中的点可能太多,只按marker 缩放 + if (overlay instanceof Marker) { + builder.include(((Marker) overlay).getPosition()); + } + } + + mBaiduMap.setMapStatus(MapStatusUpdateFactory + .newLatLngBounds(builder.build(), paddingLeft, paddingTop, paddingRight, paddingBottom)); + } + } + +} diff --git a/android/src/main/java/com/baidu/mapapi/overlayutil/PoiOverlay.java b/android/src/main/java/com/baidu/mapapi/overlayutil/PoiOverlay.java new file mode 100644 index 00000000..2251a6b3 --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/overlayutil/PoiOverlay.java @@ -0,0 +1,113 @@ +package com.baidu.mapapi.overlayutil; + +import android.os.Bundle; + +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.BitmapDescriptorFactory; +import com.baidu.mapapi.map.Marker; +import com.baidu.mapapi.map.MarkerOptions; +import com.baidu.mapapi.map.OverlayOptions; +import com.baidu.mapapi.map.Polyline; +import com.baidu.mapapi.search.poi.PoiResult; + +import java.util.ArrayList; +import java.util.List; + +/** + * 用于显示poi的overly + */ +public class PoiOverlay extends OverlayManager { + + private static final int MAX_POI_SIZE = 10; + + private PoiResult mPoiResult = null; + + /** + * 构造函数 + * + * @param baiduMap 该 PoiOverlay 引用的 BaiduMap 对象 + */ + public PoiOverlay(BaiduMap baiduMap) { + super(baiduMap); + } + + /** + * 设置POI数据 + * + * @param poiResult 设置POI数据 + */ + public void setData(PoiResult poiResult) { + this.mPoiResult = poiResult; + } + + @Override + public final List getOverlayOptions() { + if (mPoiResult == null || mPoiResult.getAllPoi() == null) { + return null; + } + + List markerList = new ArrayList<>(); + int markerSize = 0; + + for (int i = 0; i < mPoiResult.getAllPoi().size() && markerSize < MAX_POI_SIZE; i++) { + if (mPoiResult.getAllPoi().get(i).location == null) { + continue; + } + + markerSize++; + Bundle bundle = new Bundle(); + bundle.putInt("index", i); + markerList.add(new MarkerOptions() + .icon(BitmapDescriptorFactory.fromAssetWithDpi("Icon_mark" + markerSize + ".png")) + .extraInfo(bundle) + .position(mPoiResult.getAllPoi().get(i).location)); + + } + + return markerList; + } + + /** + * 获取该PoiOverlay的poi数据 + * + * @return POI数据 + */ + public PoiResult getPoiResult() { + return mPoiResult; + } + + /** + * 覆写此方法以改变默认点击行为 + * + * @param i 被点击的poi在 + * {@link PoiResult#getAllPoi()} 中的索引 + * @return true--事件已经处理,false--事件未处理 + */ + public boolean onPoiClick(int i) { +// if (mPoiResult.getAllPoi() != null +// && mPoiResult.getAllPoi().get(i) != null) { +// Toast.makeText(BMapManager.getInstance().getContext(), +// mPoiResult.getAllPoi().get(i).name, Toast.LENGTH_LONG) +// .show(); +// } + return false; + } + + @Override + public final boolean onMarkerClick(Marker marker) { + if (!mOverlayList.contains(marker)) { + return false; + } + + if (marker.getExtraInfo() != null) { + return onPoiClick(marker.getExtraInfo().getInt("index")); + } + + return false; + } + + @Override + public boolean onPolylineClick(Polyline polyline) { + return false; + } +} diff --git a/android/src/main/java/com/baidu/mapapi/overlayutil/TransitRouteOverlay.java b/android/src/main/java/com/baidu/mapapi/overlayutil/TransitRouteOverlay.java new file mode 100644 index 00000000..c7a1bf0a --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/overlayutil/TransitRouteOverlay.java @@ -0,0 +1,189 @@ +package com.baidu.mapapi.overlayutil; + +import android.graphics.Color; +import android.os.Bundle; +import android.util.Log; + +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.BitmapDescriptor; +import com.baidu.mapapi.map.BitmapDescriptorFactory; +import com.baidu.mapapi.map.Marker; +import com.baidu.mapapi.map.MarkerOptions; +import com.baidu.mapapi.map.Overlay; +import com.baidu.mapapi.map.OverlayOptions; +import com.baidu.mapapi.map.Polyline; +import com.baidu.mapapi.map.PolylineOptions; +import com.baidu.mapapi.search.route.TransitRouteLine; + +import java.util.ArrayList; +import java.util.List; + +/** + * 用于显示换乘路线的Overlay,自3.4.0版本起可实例化多个添加在地图中显示 + */ +public class TransitRouteOverlay extends OverlayManager { + + private TransitRouteLine mRouteLine = null; + + /** + * 构造函数 + * + * @param baiduMap + * 该TransitRouteOverlay引用的 BaiduMap 对象 + */ + public TransitRouteOverlay(BaiduMap baiduMap) { + super(baiduMap); + } + + @Override + public final List getOverlayOptions() { + + if (mRouteLine == null) { + return null; + } + + List overlayOptionses = new ArrayList(); + // step node + if (mRouteLine.getAllStep() != null + && mRouteLine.getAllStep().size() > 0) { + + for (TransitRouteLine.TransitStep step : mRouteLine.getAllStep()) { + Bundle b = new Bundle(); + b.putInt("index", mRouteLine.getAllStep().indexOf(step)); + if (step.getEntrance() != null) { + overlayOptionses.add((new MarkerOptions()) + .position(step.getEntrance().getLocation()) + .anchor(0.5f, 0.5f).zIndex(10).extraInfo(b) + .icon(getIconForStep(step))); + } + // 最后路段绘制出口点 + if (mRouteLine.getAllStep().indexOf(step) == (mRouteLine + .getAllStep().size() - 1) && step.getExit() != null) { + overlayOptionses.add((new MarkerOptions()) + .position(step.getExit().getLocation()) + .anchor(0.5f, 0.5f).zIndex(10) + .icon(getIconForStep(step))); + } + } + } + + if (mRouteLine.getStarting() != null) { + overlayOptionses.add((new MarkerOptions()) + .position(mRouteLine.getStarting().getLocation()) + .icon(getStartMarker() != null ? getStartMarker() : + BitmapDescriptorFactory + .fromAssetWithDpi("Icon_start.png")).zIndex(10)); + } + if (mRouteLine.getTerminal() != null) { + overlayOptionses + .add((new MarkerOptions()) + .position(mRouteLine.getTerminal().getLocation()) + .icon(getTerminalMarker() != null ? getTerminalMarker() : + BitmapDescriptorFactory + .fromAssetWithDpi("Icon_end.png")) + .zIndex(10)); + } + // polyline + if (mRouteLine.getAllStep() != null + && mRouteLine.getAllStep().size() > 0) { + + for (TransitRouteLine.TransitStep step : mRouteLine.getAllStep()) { + if (step.getWayPoints() == null) { + continue; + } + int color = 0; + if (step.getStepType() != TransitRouteLine.TransitStep.TransitRouteStepType.WAKLING) { +// color = Color.argb(178, 0, 78, 255); + color = getLineColor() != 0 ? getLineColor() : Color.argb(178, 0, 78, 255); + } else { +// color = Color.argb(178, 88, 208, 0); + color = getLineColor() != 0 ? getLineColor() : Color.argb(178, 88, 208, 0); + } + overlayOptionses.add(new PolylineOptions() + .points(step.getWayPoints()).width(10).color(color) + .zIndex(0)); + } + } + return overlayOptionses; + } + + private BitmapDescriptor getIconForStep(TransitRouteLine.TransitStep step) { + switch (step.getStepType()) { + case BUSLINE: + return BitmapDescriptorFactory.fromAssetWithDpi("Icon_bus_station.png"); + case SUBWAY: + return BitmapDescriptorFactory.fromAssetWithDpi("Icon_subway_station.png"); + case WAKLING: + return BitmapDescriptorFactory.fromAssetWithDpi("Icon_walk_route.png"); + default: + return null; + } + } + + /** + * 设置路线数据 + * + * @param routeOverlay + * 路线数据 + */ + public void setData(TransitRouteLine routeOverlay) { + this.mRouteLine = routeOverlay; + } + + /** + * 覆写此方法以改变默认起点图标 + * + * @return 起点图标 + */ + public BitmapDescriptor getStartMarker() { + return null; + } + + /** + * 覆写此方法以改变默认终点图标 + * + * @return 终点图标 + */ + public BitmapDescriptor getTerminalMarker() { + return null; + } + + public int getLineColor() { + return 0; + } + /** + * 覆写此方法以改变起默认点击行为 + * + * @param i + * 被点击的step在 + * {@link TransitRouteLine#getAllStep()} + * 中的索引 + * @return 是否处理了该点击事件 + */ + public boolean onRouteNodeClick(int i) { + if (mRouteLine.getAllStep() != null + && mRouteLine.getAllStep().get(i) != null) { + Log.i("baidumapsdk", "TransitRouteOverlay onRouteNodeClick"); + } + return false; + } + + @Override + public final boolean onMarkerClick(Marker marker) { + for (Overlay mMarker : mOverlayList) { + if (mMarker instanceof Marker && mMarker.equals(marker)) { + if (marker.getExtraInfo() != null) { + onRouteNodeClick(marker.getExtraInfo().getInt("index")); + } + } + } + return true; + } + + @Override + public boolean onPolylineClick(Polyline polyline) { + // TODO Auto-generated method stub + return false; + } + +} diff --git a/android/src/main/java/com/baidu/mapapi/overlayutil/WalkingRouteOverlay.java b/android/src/main/java/com/baidu/mapapi/overlayutil/WalkingRouteOverlay.java new file mode 100644 index 00000000..8cb751dc --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/overlayutil/WalkingRouteOverlay.java @@ -0,0 +1,175 @@ +package com.baidu.mapapi.overlayutil; + +import android.graphics.Color; +import android.os.Bundle; +import android.util.Log; + +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.BitmapDescriptor; +import com.baidu.mapapi.map.BitmapDescriptorFactory; +import com.baidu.mapapi.map.Marker; +import com.baidu.mapapi.map.MarkerOptions; +import com.baidu.mapapi.map.Overlay; +import com.baidu.mapapi.map.OverlayOptions; +import com.baidu.mapapi.map.Polyline; +import com.baidu.mapapi.map.PolylineOptions; +import com.baidu.mapapi.model.LatLng; +import com.baidu.mapapi.search.route.WalkingRouteLine; + +import java.util.ArrayList; +import java.util.List; + +/** + * 用于显示步行路线的overlay,自3.4.0版本起可实例化多个添加在地图中显示 + */ +public class WalkingRouteOverlay extends OverlayManager { + + private WalkingRouteLine mRouteLine = null; + + public WalkingRouteOverlay(BaiduMap baiduMap) { + super(baiduMap); + } + + /** + * 设置路线数据。 + * + * @param line + * 路线数据 + */ + public void setData(WalkingRouteLine line) { + mRouteLine = line; + } + + @Override + public final List getOverlayOptions() { + if (mRouteLine == null) { + return null; + } + + List overlayList = new ArrayList(); + if (mRouteLine.getAllStep() != null + && mRouteLine.getAllStep().size() > 0) { + for (WalkingRouteLine.WalkingStep step : mRouteLine.getAllStep()) { + Bundle b = new Bundle(); + b.putInt("index", mRouteLine.getAllStep().indexOf(step)); + if (step.getEntrance() != null) { + overlayList.add((new MarkerOptions()) + .position(step.getEntrance().getLocation()) + .rotate((360 - step.getDirection())) + .zIndex(10) + .anchor(0.5f, 0.5f) + .extraInfo(b) + .icon(BitmapDescriptorFactory + .fromAssetWithDpi("Icon_line_node.png"))); + } + + // 最后路段绘制出口点 + if (mRouteLine.getAllStep().indexOf(step) == (mRouteLine + .getAllStep().size() - 1) && step.getExit() != null) { + overlayList.add((new MarkerOptions()) + .position(step.getExit().getLocation()) + .anchor(0.5f, 0.5f) + .zIndex(10) + .icon(BitmapDescriptorFactory + .fromAssetWithDpi("Icon_line_node.png"))); + + } + } + } + // starting + if (mRouteLine.getStarting() != null) { + overlayList.add((new MarkerOptions()) + .position(mRouteLine.getStarting().getLocation()) + .icon(getStartMarker() != null ? getStartMarker() : + BitmapDescriptorFactory + .fromAssetWithDpi("Icon_start.png")).zIndex(10)); + } + // terminal + if (mRouteLine.getTerminal() != null) { + overlayList + .add((new MarkerOptions()) + .position(mRouteLine.getTerminal().getLocation()) + .icon(getTerminalMarker() != null ? getTerminalMarker() : + BitmapDescriptorFactory + .fromAssetWithDpi("Icon_end.png")) + .zIndex(10)); + } + + // poly line list + if (mRouteLine.getAllStep() != null + && mRouteLine.getAllStep().size() > 0) { + LatLng lastStepLastPoint = null; + for (WalkingRouteLine.WalkingStep step : mRouteLine.getAllStep()) { + List watPoints = step.getWayPoints(); + if (watPoints != null) { + List points = new ArrayList(); + if (lastStepLastPoint != null) { + points.add(lastStepLastPoint); + } + points.addAll(watPoints); + overlayList.add(new PolylineOptions().points(points).width(10) + .color(getLineColor() != 0 ? getLineColor() : Color.argb(178, 0, 78, 255)).zIndex(0)); + lastStepLastPoint = watPoints.get(watPoints.size() - 1); + } + } + + } + + return overlayList; + } + + /** + * 覆写此方法以改变默认起点图标 + * + * @return 起点图标 + */ + public BitmapDescriptor getStartMarker() { + return null; + } + public int getLineColor() { + return 0; + } + /** + * 覆写此方法以改变默认终点图标 + * + * @return 终点图标 + */ + public BitmapDescriptor getTerminalMarker() { + return null; + } + + /** + * 处理点击事件 + * + * @param i + * 被点击的step在 + * {@link WalkingRouteLine#getAllStep()} + * 中的索引 + * @return 是否处理了该点击事件 + */ + public boolean onRouteNodeClick(int i) { + if (mRouteLine.getAllStep() != null + && mRouteLine.getAllStep().get(i) != null) { + Log.i("baidumapsdk", "WalkingRouteOverlay onRouteNodeClick"); + } + return false; + } + + @Override + public final boolean onMarkerClick(Marker marker) { + for (Overlay mMarker : mOverlayList) { + if (mMarker instanceof Marker && mMarker.equals(marker)) { + if (marker.getExtraInfo() != null) { + onRouteNodeClick(marker.getExtraInfo().getInt("index")); + } + } + } + return true; + } + + @Override + public boolean onPolylineClick(Polyline polyline) { + // TODO Auto-generated method stub + return false; + } +} diff --git a/android/src/main/java/com/baidu/mapapi/overlayutil/package.html b/android/src/main/java/com/baidu/mapapi/overlayutil/package.html new file mode 100644 index 00000000..e4ba1d8b --- /dev/null +++ b/android/src/main/java/com/baidu/mapapi/overlayutil/package.html @@ -0,0 +1 @@ +提供一些基于基础覆盖而组合而成的高级覆盖物,包括用于显示poi数据,规划路线,公交详情路线的覆盖物 \ No newline at end of file diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/BaiduMapModule.java b/android/src/main/java/org/lovebing/reactnative/baidumap/BaiduMapModule.java deleted file mode 100644 index 25c353ed..00000000 --- a/android/src/main/java/org/lovebing/reactnative/baidumap/BaiduMapModule.java +++ /dev/null @@ -1,19 +0,0 @@ -package org.lovebing.reactnative.baidumap; - -import com.facebook.react.bridge.ReactApplicationContext; - -/** - * Created by lovebing on 1/30/2016. - */ -public class BaiduMapModule extends BaseModule { - - private static final String REACT_CLASS = "BaiduMapModule"; - public BaiduMapModule(ReactApplicationContext reactContext) { - super(reactContext); - context = reactContext; - } - - public String getName() { - return REACT_CLASS; - } -} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/BaiduMapPackage.java b/android/src/main/java/org/lovebing/reactnative/baidumap/BaiduMapPackage.java index 85722abd..e01c9c9c 100644 --- a/android/src/main/java/org/lovebing/reactnative/baidumap/BaiduMapPackage.java +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/BaiduMapPackage.java @@ -1,53 +1,75 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + package org.lovebing.reactnative.baidumap; -import android.app.Activity; -import android.content.Context; +import android.os.Build; +import android.os.Looper; +import androidx.annotation.MainThread; +import androidx.annotation.RequiresApi; import java.util.Arrays; -import java.util.Collections; import java.util.List; +import com.baidu.mapapi.SDKInitializer; import com.facebook.react.ReactPackage; -import com.facebook.react.bridge.JavaScriptModule; import com.facebook.react.bridge.NativeModule; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.uimanager.ViewManager; +import org.lovebing.reactnative.baidumap.module.BaiduMapManager; +import org.lovebing.reactnative.baidumap.module.GeolocationModule; +import org.lovebing.reactnative.baidumap.module.GetDistanceModule; +import org.lovebing.reactnative.baidumap.module.MapAppModule; +import org.lovebing.reactnative.baidumap.uimanager.*; +import org.lovebing.reactnative.baidumap.view.OverlayMarkerIcon; + /** * Created by lovebing on 4/17/16. */ public class BaiduMapPackage implements ReactPackage { - private Context mContext; - - BaiduMapViewManager baiduMapViewManager; - - public BaiduMapPackage(Context context) { - this.mContext = context; - baiduMapViewManager = new BaiduMapViewManager(); - baiduMapViewManager.initSDK(context); - } - @Override public List createNativeModules(ReactApplicationContext reactContext) { - return Arrays.asList( - new BaiduMapModule(reactContext), - new GeolocationModule(reactContext) + return Arrays.asList( + new BaiduMapManager(reactContext), + new GeolocationModule(reactContext), + new GetDistanceModule(reactContext), + new MapAppModule(reactContext) ); } + @RequiresApi(api = Build.VERSION_CODES.N) @Override public List createViewManagers( ReactApplicationContext reactContext) { - return Arrays.asList( - baiduMapViewManager + init(reactContext); + return Arrays.asList( + new MapViewManager(), + new OverlayClusterManager(), + new OverlayMarkerManager(), + new OverlayMarkerIconManager(), + new OverlayOverlayInfoWindowManager(), + new OverlayArcManager(), + new OverlayCircleManager(), + new OverlayPolygonManager(), + new OverlayPolylineManager(), + new OverlayTextManager(), + new OverlayHeatMapManager() ); } - // Deprecated RN 0.47 - public List> createJSModules() { - return Collections.emptyList(); + @MainThread + protected void init(ReactApplicationContext reactContext) { + if (Looper.myLooper() == null){ + Looper.prepare(); + } + SDKInitializer.initialize(reactContext.getApplicationContext()); } } diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/BaiduMapViewManager.java b/android/src/main/java/org/lovebing/reactnative/baidumap/BaiduMapViewManager.java deleted file mode 100644 index ca32f2ef..00000000 --- a/android/src/main/java/org/lovebing/reactnative/baidumap/BaiduMapViewManager.java +++ /dev/null @@ -1,291 +0,0 @@ -package org.lovebing.reactnative.baidumap; - -import android.content.Context; -import android.graphics.Point; -import android.support.annotation.Nullable; -import android.util.Log; -import android.view.View; -import android.widget.TextView; - -import com.baidu.mapapi.map.BaiduMap; -import com.baidu.mapapi.map.InfoWindow; -import com.baidu.mapapi.map.MapPoi; -import com.baidu.mapapi.map.MapStatus; -import com.baidu.mapapi.map.MapStatusUpdate; -import com.baidu.mapapi.map.MapStatusUpdateFactory; -import com.baidu.mapapi.map.MapView; -import com.baidu.mapapi.SDKInitializer; -import com.baidu.mapapi.map.MapViewLayoutParams; -import com.baidu.mapapi.map.Marker; -import com.baidu.mapapi.model.LatLng; -import com.facebook.react.bridge.Arguments; -import com.facebook.react.bridge.ReadableArray; -import com.facebook.react.bridge.ReadableMap; -import com.facebook.react.bridge.WritableMap; -import com.facebook.react.uimanager.ThemedReactContext; -import com.facebook.react.uimanager.ViewGroupManager; -import com.facebook.react.uimanager.annotations.ReactProp; -import com.facebook.react.uimanager.events.RCTEventEmitter; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -/** - * Created by lovebing on 12/20/2015. - */ -public class BaiduMapViewManager extends ViewGroupManager { - - private static final String REACT_CLASS = "RCTBaiduMapView"; - - private ThemedReactContext mReactContext; - - private ReadableArray childrenPoints; - private HashMap mMarkerMap = new HashMap<>(); - private HashMap> mMarkersMap = new HashMap<>(); - private TextView mMarkerText; - - public String getName() { - return REACT_CLASS; - } - - - public void initSDK(Context context) { - SDKInitializer.initialize(context); - } - - public MapView createViewInstance(ThemedReactContext context) { - mReactContext = context; - MapView mapView = new MapView(context); - setListeners(mapView); - return mapView; - } - - @Override - public void addView(MapView parent, View child, int index) { - if(childrenPoints != null) { - Point point = new Point(); - ReadableArray item = childrenPoints.getArray(index); - if(item != null) { - point.set(item.getInt(0), item.getInt(1)); - MapViewLayoutParams mapViewLayoutParams = new MapViewLayoutParams - .Builder() - .layoutMode(MapViewLayoutParams.ELayoutMode.absoluteMode) - .point(point) - .build(); - parent.addView(child, mapViewLayoutParams); - } - } - - } - - @ReactProp(name = "zoomControlsVisible") - public void setZoomControlsVisible(MapView mapView, boolean zoomControlsVisible) { - mapView.showZoomControls(zoomControlsVisible); - } - - @ReactProp(name="trafficEnabled") - public void setTrafficEnabled(MapView mapView, boolean trafficEnabled) { - mapView.getMap().setTrafficEnabled(trafficEnabled); - } - - @ReactProp(name="baiduHeatMapEnabled") - public void setBaiduHeatMapEnabled(MapView mapView, boolean baiduHeatMapEnabled) { - mapView.getMap().setBaiduHeatMapEnabled(baiduHeatMapEnabled); - } - - @ReactProp(name = "mapType") - public void setMapType(MapView mapView, int mapType) { - mapView.getMap().setMapType(mapType); - } - - @ReactProp(name="zoom") - public void setZoom(MapView mapView, float zoom) { - MapStatus mapStatus = new MapStatus.Builder().zoom(zoom).build(); - MapStatusUpdate mapStatusUpdate = MapStatusUpdateFactory.newMapStatus(mapStatus); - mapView.getMap().setMapStatus(mapStatusUpdate); - } - @ReactProp(name="center") - public void setCenter(MapView mapView, ReadableMap position) { - if(position != null) { - double latitude = position.getDouble("latitude"); - double longitude = position.getDouble("longitude"); - LatLng point = new LatLng(latitude, longitude); - MapStatus mapStatus = new MapStatus.Builder() - .target(point) - .build(); - MapStatusUpdate mapStatusUpdate = MapStatusUpdateFactory.newMapStatus(mapStatus); - mapView.getMap().setMapStatus(mapStatusUpdate); - } - } - - @ReactProp(name="marker") - public void setMarker(MapView mapView, ReadableMap option) { - if(option != null) { - String key = "marker_" + mapView.getId(); - Marker marker = mMarkerMap.get(key); - if(marker != null) { - MarkerUtil.updateMaker(marker, option); - } - else { - marker = MarkerUtil.addMarker(mapView, option); - mMarkerMap.put(key, marker); - } - } - } - - @ReactProp(name="markers") - public void setMarkers(MapView mapView, ReadableArray options) { - String key = "markers_" + mapView.getId(); - List markers = mMarkersMap.get(key); - if(markers == null) { - markers = new ArrayList<>(); - } - for (int i = 0; i < options.size(); i++) { - ReadableMap option = options.getMap(i); - if(markers.size() > i + 1 && markers.get(i) != null) { - MarkerUtil.updateMaker(markers.get(i), option); - } - else { - markers.add(i, MarkerUtil.addMarker(mapView, option)); - } - } - if(options.size() < markers.size()) { - int start = markers.size() - 1; - int end = options.size(); - for (int i = start; i >= end; i--) { - markers.get(i).remove(); - markers.remove(i); - } - } - mMarkersMap.put(key, markers); - } - - @ReactProp(name = "childrenPoints") - public void setChildrenPoints(MapView mapView, ReadableArray childrenPoints) { - this.childrenPoints = childrenPoints; - } - - /** - * - * @param mapView - */ - private void setListeners(final MapView mapView) { - BaiduMap map = mapView.getMap(); - - if(mMarkerText == null) { - mMarkerText = new TextView(mapView.getContext()); - mMarkerText.setBackgroundResource(R.drawable.popup); - mMarkerText.setPadding(32, 32, 32, 32); - } - map.setOnMapStatusChangeListener(new BaiduMap.OnMapStatusChangeListener() { - - private WritableMap getEventParams(MapStatus mapStatus) { - WritableMap writableMap = Arguments.createMap(); - WritableMap target = Arguments.createMap(); - target.putDouble("latitude", mapStatus.target.latitude); - target.putDouble("longitude", mapStatus.target.longitude); - writableMap.putMap("target", target); - writableMap.putDouble("zoom", mapStatus.zoom); - writableMap.putDouble("overlook", mapStatus.overlook); - return writableMap; - } - - @Override - public void onMapStatusChangeStart(MapStatus mapStatus) { - sendEvent(mapView, "onMapStatusChangeStart", getEventParams(mapStatus)); - } - - @Override - public void onMapStatusChange(MapStatus mapStatus) { - sendEvent(mapView, "onMapStatusChange", getEventParams(mapStatus)); - } - - @Override - public void onMapStatusChangeFinish(MapStatus mapStatus) { - if(mMarkerText.getVisibility() != View.GONE) { - mMarkerText.setVisibility(View.GONE); - } - sendEvent(mapView, "onMapStatusChangeFinish", getEventParams(mapStatus)); - } - }); - - map.setOnMapLoadedCallback(new BaiduMap.OnMapLoadedCallback() { - @Override - public void onMapLoaded() { - sendEvent(mapView, "onMapLoaded", null); - } - }); - - map.setOnMapClickListener(new BaiduMap.OnMapClickListener() { - @Override - public void onMapClick(LatLng latLng) { - mapView.getMap().hideInfoWindow(); - WritableMap writableMap = Arguments.createMap(); - writableMap.putDouble("latitude", latLng.latitude); - writableMap.putDouble("longitude", latLng.longitude); - sendEvent(mapView, "onMapClick", writableMap); - } - - @Override - public boolean onMapPoiClick(MapPoi mapPoi) { - WritableMap writableMap = Arguments.createMap(); - writableMap.putString("name", mapPoi.getName()); - writableMap.putString("uid", mapPoi.getUid()); - writableMap.putDouble("latitude", mapPoi.getPosition().latitude); - writableMap.putDouble("longitude", mapPoi.getPosition().longitude); - sendEvent(mapView, "onMapPoiClick", writableMap); - return true; - } - }); - map.setOnMapDoubleClickListener(new BaiduMap.OnMapDoubleClickListener() { - @Override - public void onMapDoubleClick(LatLng latLng) { - WritableMap writableMap = Arguments.createMap(); - writableMap.putDouble("latitude", latLng.latitude); - writableMap.putDouble("longitude", latLng.longitude); - sendEvent(mapView, "onMapDoubleClick", writableMap); - } - }); - - map.setOnMarkerClickListener(new BaiduMap.OnMarkerClickListener() { - @Override - public boolean onMarkerClick(Marker marker) { - if(marker.getTitle().length() > 0) { - mMarkerText.setText(marker.getTitle()); - InfoWindow infoWindow = new InfoWindow(mMarkerText, marker.getPosition(), -80); - mMarkerText.setVisibility(View.GONE); - mapView.getMap().showInfoWindow(infoWindow); - } - else { - mapView.getMap().hideInfoWindow(); - } - WritableMap writableMap = Arguments.createMap(); - WritableMap position = Arguments.createMap(); - position.putDouble("latitude", marker.getPosition().latitude); - position.putDouble("longitude", marker.getPosition().longitude); - writableMap.putMap("position", position); - writableMap.putString("title", marker.getTitle()); - sendEvent(mapView, "onMarkerClick", writableMap); - return true; - } - }); - - } - - /** - * - * @param eventName - * @param params - */ - private void sendEvent(MapView mapView, String eventName, @Nullable WritableMap params) { - WritableMap event = Arguments.createMap(); - event.putMap("params", params); - event.putString("type", eventName); - mReactContext - .getJSModule(RCTEventEmitter.class) - .receiveEvent(mapView.getId(), - "topChange", - event); - } -} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/MarkerUtil.java b/android/src/main/java/org/lovebing/reactnative/baidumap/MarkerUtil.java deleted file mode 100644 index f077cf64..00000000 --- a/android/src/main/java/org/lovebing/reactnative/baidumap/MarkerUtil.java +++ /dev/null @@ -1,46 +0,0 @@ -package org.lovebing.reactnative.baidumap; - -import android.util.Log; -import android.widget.Button; - -import com.baidu.mapapi.map.BitmapDescriptor; -import com.baidu.mapapi.map.BitmapDescriptorFactory; -import com.baidu.mapapi.map.InfoWindow; -import com.baidu.mapapi.map.MapView; -import com.baidu.mapapi.map.Marker; -import com.baidu.mapapi.map.MarkerOptions; -import com.baidu.mapapi.map.OverlayOptions; -import com.baidu.mapapi.model.LatLng; -import com.facebook.react.bridge.ReadableMap; - -/** - * Created by lovebing on Sept 28, 2016. - */ -public class MarkerUtil { - - public static void updateMaker(Marker maker, ReadableMap option) { - LatLng position = getLatLngFromOption(option); - maker.setPosition(position); - maker.setTitle(option.getString("title")); - } - - public static Marker addMarker(MapView mapView, ReadableMap option) { - BitmapDescriptor bitmap = BitmapDescriptorFactory.fromResource(R.mipmap.icon_gcoding); - LatLng position = getLatLngFromOption(option); - OverlayOptions overlayOptions = new MarkerOptions() - .icon(bitmap) - .position(position) - .title(option.getString("title")); - - Marker marker = (Marker)mapView.getMap().addOverlay(overlayOptions); - return marker; - } - - - private static LatLng getLatLngFromOption(ReadableMap option) { - double latitude = option.getDouble("latitude"); - double longitude = option.getDouble("longitude"); - return new LatLng(latitude, longitude); - - } -} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/constant/LocationDataKey.java b/android/src/main/java/org/lovebing/reactnative/baidumap/constant/LocationDataKey.java new file mode 100644 index 00000000..19f99be8 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/constant/LocationDataKey.java @@ -0,0 +1,21 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.constant; + +/** + * @author lovebing + * @date 2019/11/02 + */ +public interface LocationDataKey { + + String LATITUDE = "latitude"; + String LONGITUDE = "longitude"; + String DIRECTION = "direction"; + String ALTITUDE = "altitude"; + +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/constant/RequestCode.java b/android/src/main/java/org/lovebing/reactnative/baidumap/constant/RequestCode.java new file mode 100644 index 00000000..4f70d838 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/constant/RequestCode.java @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.constant; + +/** + * @author lovebing + * @date 2019/10/31 + */ +public interface RequestCode { + + int CODE_ASK_PERMISSIONS = 1000; + +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/listener/MapListener.java b/android/src/main/java/org/lovebing/reactnative/baidumap/listener/MapListener.java new file mode 100644 index 00000000..a9934dac --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/listener/MapListener.java @@ -0,0 +1,165 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.listener; + +import android.util.Log; + +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.InfoWindow; +import com.baidu.mapapi.map.MapPoi; +import com.baidu.mapapi.map.MapStatus; +import com.baidu.mapapi.map.Marker; +import com.baidu.mapapi.map.TextureMapView; +import com.baidu.mapapi.model.LatLng; +import com.facebook.react.bridge.Arguments; +import com.facebook.react.bridge.ReactContext; +import com.facebook.react.bridge.WritableMap; +import com.facebook.react.uimanager.events.RCTEventEmitter; + +import org.lovebing.reactnative.baidumap.uimanager.MapViewManager; +import org.lovebing.reactnative.baidumap.view.OverlayMarker; + +import java.util.ArrayList; +import java.util.List; + +public class MapListener implements BaiduMap.OnMapStatusChangeListener, + BaiduMap.OnMapLoadedCallback, + BaiduMap.OnMapClickListener, + BaiduMap.OnMapDoubleClickListener, + BaiduMap.OnMarkerClickListener { + + private List mapStatusChangeListeners = new ArrayList<>(); + + private ReactContext reactContext; + private TextureMapView mapView; + + public MapListener(TextureMapView mapView, ReactContext reactContext) { + this.mapView = mapView; + this.reactContext = reactContext; + } + + @Override + public void onMapClick(LatLng latLng) { + WritableMap writableMap = Arguments.createMap(); + writableMap.putDouble("latitude", latLng.latitude); + writableMap.putDouble("longitude", latLng.longitude); + mapView.getMap().hideInfoWindow(); + sendEvent(mapView, "onMapClick", writableMap); + } + + @Override + public void onMapPoiClick(MapPoi mapPoi) { + WritableMap writableMap = Arguments.createMap(); + writableMap.putString("name", mapPoi.getName()); + writableMap.putString("uid", mapPoi.getUid()); + writableMap.putDouble("latitude", mapPoi.getPosition().latitude); + writableMap.putDouble("longitude", mapPoi.getPosition().longitude); + mapView.getMap().hideInfoWindow(); + sendEvent(mapView, "onMapPoiClick", writableMap); + } + + @Override + public void onMapDoubleClick(LatLng latLng) { + WritableMap writableMap = Arguments.createMap(); + writableMap.putDouble("latitude", latLng.latitude); + writableMap.putDouble("longitude", latLng.longitude); + sendEvent(mapView, "onMapDoubleClick", writableMap); + } + + @Override + public void onMapLoaded() { + sendEvent(mapView, "onMapLoaded", null); + } + + @Override + public void onMapStatusChangeStart(MapStatus mapStatus) { + sendEvent(mapView, "onMapStatusChangeStart", getEventParams(mapStatus)); + } + + @Override + public void onMapStatusChangeStart(MapStatus mapStatus, int i) { + + } + + @Override + public void onMapStatusChange(MapStatus mapStatus) { + sendEvent(mapView, "onMapStatusChange", getEventParams(mapStatus)); + for (BaiduMap.OnMapStatusChangeListener mapStatusChangeListener : mapStatusChangeListeners) { + mapStatusChangeListener.onMapStatusChange(mapStatus); + } + } + + @Override + public void onMapStatusChangeFinish(MapStatus mapStatus) { + sendEvent(mapView, "onMapStatusChangeFinish", getEventParams(mapStatus)); + for (BaiduMap.OnMapStatusChangeListener mapStatusChangeListener : mapStatusChangeListeners) { + mapStatusChangeListener.onMapStatusChangeFinish(mapStatus); + } + } + + @Override + public boolean onMarkerClick(Marker marker) { + WritableMap writableMap = Arguments.createMap(); + WritableMap position = Arguments.createMap(); + position.putDouble("latitude", marker.getPosition().latitude); + position.putDouble("longitude", marker.getPosition().longitude); + writableMap.putMap("position", position); + writableMap.putString("title", marker.getTitle()); + OverlayMarker overlayMarker = MapViewManager.findOverlayMaker(marker); + mapView.getMap().hideInfoWindow(); + if (overlayMarker != null) { + InfoWindow infoWindow = overlayMarker.getInfoWindow(marker.getPosition()); + if (infoWindow != null) { + mapView.getMap().showInfoWindow(infoWindow); + } + reactContext + .getJSModule(RCTEventEmitter.class) + .receiveEvent(overlayMarker.getId(), + "topClick", writableMap.copy()); + } + sendEvent(mapView, "onMarkerClick", writableMap); + return true; + } + + public void addMapStatusChangeListener(BaiduMap.OnMapStatusChangeListener mapStatusChangeListener) { + mapStatusChangeListeners.add(mapStatusChangeListener); + } + + public void removeMapStatusChangeListener(BaiduMap.OnMapStatusChangeListener mapStatusChangeListener) { + mapStatusChangeListeners.remove(mapStatusChangeListener); + } + + private WritableMap getEventParams(MapStatus mapStatus) { + WritableMap writableMap = Arguments.createMap(); + WritableMap target = Arguments.createMap(); + target.putDouble("latitude", mapStatus.target.latitude); + target.putDouble("longitude", mapStatus.target.longitude); + writableMap.putMap("target", target); + writableMap.putDouble("latitudeDelta", mapStatus.bound.northeast.latitude - mapStatus.bound.southwest.latitude); + writableMap.putDouble("longitudeDelta", mapStatus.bound.northeast.longitude - mapStatus.bound.southwest.longitude); + writableMap.putDouble("zoom", mapStatus.zoom); + writableMap.putDouble("overlook", mapStatus.overlook); + return writableMap; + } + + /** + * + * @param eventName + * @param params + */ + private void sendEvent(TextureMapView mapView, String eventName, WritableMap params) { + WritableMap event = Arguments.createMap(); + event.putMap("params", params); + event.putString("type", eventName); + reactContext + .getJSModule(RCTEventEmitter.class) + .receiveEvent(mapView.getId(), + "topChange", + event); + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/model/IconInfo.java b/android/src/main/java/org/lovebing/reactnative/baidumap/model/IconInfo.java new file mode 100644 index 00000000..27b57b3a --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/model/IconInfo.java @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.model; + +/** + * @author lovebing + * @date 2020-05-16 + */ +public class IconInfo { + + private int width = 0; + private int height = 0; + private String uri; + + public int getWidth() { + return width; + } + + public void setWidth(int width) { + this.width = width; + } + + public int getHeight() { + return height; + } + + public void setHeight(int height) { + this.height = height; + } + + public String getUri() { + return uri; + } + + public void setUri(String uri) { + this.uri = uri; + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/model/LocationData.java b/android/src/main/java/org/lovebing/reactnative/baidumap/model/LocationData.java new file mode 100644 index 00000000..9861a19d --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/model/LocationData.java @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.model; + +/** + * @author lovebing + * @date 2019/11/02 + */ +public class LocationData { + + private Double latitude; + private Double longitude; + private Double direction; + private Double altitude; + private Double speed; + + public Double getLatitude() { + return latitude; + } + + public void setLatitude(Double latitude) { + this.latitude = latitude; + } + + public Double getLongitude() { + return longitude; + } + + public void setLongitude(Double longitude) { + this.longitude = longitude; + } + + public Double getDirection() { + return direction; + } + + public void setDirection(Double direction) { + this.direction = direction; + } + + public Double getAltitude() { + return altitude; + } + + public void setAltitude(Double altitude) { + this.altitude = altitude; + } + + public Double getSpeed() { + return speed; + } + + public void setSpeed(Double speed) { + this.speed = speed; + } + + public boolean isValid() { + return latitude != null && longitude != null; + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/module/BaiduMapManager.java b/android/src/main/java/org/lovebing/reactnative/baidumap/module/BaiduMapManager.java new file mode 100644 index 00000000..2e4fe67c --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/module/BaiduMapManager.java @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.module; + +import android.Manifest; +import android.util.Log; +import androidx.annotation.NonNull; + +import com.facebook.react.bridge.Promise; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.bridge.ReactMethod; + +import org.lovebing.reactnative.baidumap.support.AppUtils; + +/** + * @author lovebing + * @date 2019/10/30 + */ +public class BaiduMapManager extends BaseModule { + + public BaiduMapManager(ReactApplicationContext reactContext) { + super(reactContext); + } + + @NonNull + @Override + public String getName() { + return getClass().getSimpleName(); + } + + @ReactMethod + public void initSDK(String key) { + Log.i("initSDK", key); + } + + @ReactMethod + public void hasLocationPermission(Promise promise) { + promise.resolve(AppUtils.hasPermission(context.getCurrentActivity(), Manifest.permission.ACCESS_FINE_LOCATION)); + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/BaseModule.java b/android/src/main/java/org/lovebing/reactnative/baidumap/module/BaseModule.java similarity index 71% rename from android/src/main/java/org/lovebing/reactnative/baidumap/BaseModule.java rename to android/src/main/java/org/lovebing/reactnative/baidumap/module/BaseModule.java index e295b221..2b4979a9 100644 --- a/android/src/main/java/org/lovebing/reactnative/baidumap/BaseModule.java +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/module/BaseModule.java @@ -1,6 +1,11 @@ -package org.lovebing.reactnative.baidumap; +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ -import android.support.annotation.Nullable; +package org.lovebing.reactnative.baidumap.module; import com.facebook.react.bridge.ReactApplicationContext; import com.facebook.react.bridge.ReactContextBaseJavaModule; @@ -24,7 +29,7 @@ public BaseModule(ReactApplicationContext reactContext) { * @param eventName * @param params */ - protected void sendEvent(String eventName,@Nullable WritableMap params) { + protected void sendEvent(String eventName, WritableMap params) { context .getJSModule(DeviceEventManagerModule.RCTDeviceEventEmitter.class) .emit(eventName, params); diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/GeolocationModule.java b/android/src/main/java/org/lovebing/reactnative/baidumap/module/GeolocationModule.java similarity index 80% rename from android/src/main/java/org/lovebing/reactnative/baidumap/GeolocationModule.java rename to android/src/main/java/org/lovebing/reactnative/baidumap/module/GeolocationModule.java index 3920ef1a..7d516235 100644 --- a/android/src/main/java/org/lovebing/reactnative/baidumap/GeolocationModule.java +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/module/GeolocationModule.java @@ -1,5 +1,13 @@ -package org.lovebing.reactnative.baidumap; +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.module; +import android.Manifest; import android.util.Log; import com.baidu.location.BDLocation; @@ -23,6 +31,7 @@ import com.facebook.react.bridge.ReactMethod; import com.facebook.react.bridge.WritableArray; import com.facebook.react.bridge.WritableMap; +import org.lovebing.reactnative.baidumap.support.AppUtils; import java.util.List; @@ -34,6 +43,8 @@ public class GeolocationModule extends BaseModule private LocationClient locationClient; private static GeoCoder geoCoder; + private volatile boolean locating = false; + private volatile boolean locateOnce = false; public GeolocationModule(ReactApplicationContext reactContext) { super(reactContext); @@ -44,10 +55,13 @@ public String getName() { return "BaiduGeolocationModule"; } - private void initLocationClient() { + private void initLocationClient(String coorType) { + if(context.getCurrentActivity() != null) { + AppUtils.checkPermission(context.getCurrentActivity(), Manifest.permission.ACCESS_FINE_LOCATION); + } LocationClientOption option = new LocationClientOption(); option.setLocationMode(LocationMode.Hight_Accuracy); - option.setCoorType("bd09ll"); + option.setCoorType(coorType); option.setIsNeedAddress(true); option.setIsNeedAltitude(true); option.setIsNeedLocationDescribe(true); @@ -95,13 +109,39 @@ public void convertGPSCoor(double lat, double lng, Promise promise) { } @ReactMethod - public void getCurrentPosition() { - if(locationClient == null) { - initLocationClient(); + public void getCurrentPosition(String coorType) { + if (locating) { + return; + } + locateOnce = true; + locating = true; + if (locationClient == null) { + initLocationClient(coorType); } Log.i("getCurrentPosition", "getCurrentPosition"); locationClient.start(); } + + @ReactMethod + public void startLocating(String coorType) { + if (locating) { + return; + } + locateOnce = false; + locating = true; + initLocationClient(coorType); + locationClient.start(); + } + + @ReactMethod + public void stopLocating() { + locating = false; + if (locationClient != null) { + locationClient.stop(); + locationClient = null; + } + } + @ReactMethod public void geocode(String city, String addr) { getGeoCoder().geocode(new GeoCodeOption() @@ -125,6 +165,7 @@ public void onReceiveLocation(BDLocation bdLocation) { WritableMap params = Arguments.createMap(); params.putDouble("latitude", bdLocation.getLatitude()); params.putDouble("longitude", bdLocation.getLongitude()); + params.putDouble("speed", bdLocation.getSpeed()); params.putDouble("direction", bdLocation.getDirection()); params.putDouble("altitude", bdLocation.getAltitude()); params.putDouble("radius", bdLocation.getRadius()); @@ -140,8 +181,15 @@ public void onReceiveLocation(BDLocation bdLocation) { params.putString("buildingId", bdLocation.getBuildingID()); params.putString("buildingName", bdLocation.getBuildingName()); Log.i("onReceiveLocation", "onGetCurrentLocationPosition"); - sendEvent("onGetCurrentLocationPosition", params); - locationClient.stop(); + + if (locateOnce) { + locating = false; + sendEvent("onGetCurrentLocationPosition", params); + locationClient.stop(); + locationClient = null; + } else { + sendEvent("onLocationUpdate", params); + } } @Override @@ -149,6 +197,7 @@ public void onGetGeoCodeResult(GeoCodeResult result) { WritableMap params = Arguments.createMap(); if (result == null || result.error != SearchResult.ERRORNO.NO_ERROR) { params.putInt("errcode", -1); + params.putString("errmsg", result.error.name()); } else { params.putDouble("latitude", result.getLocation().latitude); diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/module/GetDistanceModule.java b/android/src/main/java/org/lovebing/reactnative/baidumap/module/GetDistanceModule.java new file mode 100644 index 00000000..d65adfb5 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/module/GetDistanceModule.java @@ -0,0 +1,39 @@ +// https://www.jianshu.com/p/d5fc74b72892 +// Riant 略有调整 2019/10/22 + +package org.lovebing.reactnative.baidumap.module; + +import android.util.Log; +import android.widget.Toast; + +import com.baidu.mapapi.model.LatLng; +import com.baidu.mapapi.utils.DistanceUtil; +import com.facebook.react.bridge.Arguments; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.bridge.ReactMethod; +import com.facebook.react.bridge.WritableMap; + +import com.facebook.react.bridge.Promise; + +public class GetDistanceModule extends BaseModule{ + + public GetDistanceModule(ReactApplicationContext reactContext) { + super(reactContext); + context = reactContext; + } + + public String getName() { + return "BaiduGetDistanceModule"; + } + + @ReactMethod + public void getLocationDistance(double lat1, double lng1, double lat2, double lng2, Promise promise) { + WritableMap params = Arguments.createMap(); + LatLng p1 = new LatLng(lat1, lng1); + LatLng p2 = new LatLng(lat2, lng2); + //计算p1、p2两点之间的直线距离,单位:米 + double distance = DistanceUtil.getDistance(p1, p2); + params.putDouble("distance", distance); + promise.resolve(params); + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/module/MapAppModule.java b/android/src/main/java/org/lovebing/reactnative/baidumap/module/MapAppModule.java new file mode 100644 index 00000000..aba25289 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/module/MapAppModule.java @@ -0,0 +1,127 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.module; + +import android.content.Context; +import com.baidu.mapapi.utils.route.BaiduMapRoutePlan; +import com.baidu.mapapi.utils.route.RouteParaOption; +import com.facebook.react.bridge.ReactApplicationContext; +import com.facebook.react.bridge.ReactMethod; +import com.facebook.react.bridge.ReadableMap; +import org.lovebing.reactnative.baidumap.util.LatLngUtil; +import com.baidu.mapapi.navi.BaiduMapAppNotSupportNaviException; +import com.baidu.mapapi.navi.BaiduMapNavigation; +import com.baidu.mapapi.navi.NaviParaOption; +import com.baidu.mapapi.utils.poi.BaiduMapPoiSearch; +import com.baidu.mapapi.utils.poi.PoiParaOption; + +/** + * @author lovebing Created on Dec 09, 2018 + */ +public class MapAppModule extends BaseModule { + + private static final String KEY_NAME = "name"; + + private Context context; + + public MapAppModule(ReactApplicationContext reactContext) { + super(reactContext); + context = reactContext; + } + + @Override + public String getName() { + return "BaiduMapAppModule"; + } + + @ReactMethod + public void openDrivingRoute(ReadableMap startPoint, ReadableMap endPoint) { + RouteParaOption paraOption = createRouteParaOption(startPoint, endPoint); + try { + BaiduMapRoutePlan.openBaiduMapDrivingRoute(paraOption, context); + } catch (Exception e) { + e.printStackTrace(); + } + BaiduMapRoutePlan.finish(context); + } + + @ReactMethod + public void openTransitRoute(ReadableMap startPoint, ReadableMap endPoint) { + RouteParaOption paraOption = createRouteParaOption(startPoint, endPoint); + try { + BaiduMapRoutePlan.openBaiduMapTransitRoute(paraOption, context); + } catch (Exception e) { + e.printStackTrace(); + } + BaiduMapRoutePlan.finish(context); + } + + @ReactMethod + public void openWalkNavi(ReadableMap startPoint, ReadableMap endPoint) { + NaviParaOption para = new NaviParaOption() + .startPoint(LatLngUtil.fromReadableMap(startPoint)) + .endPoint(LatLngUtil.fromReadableMap(endPoint)) + .startName(startPoint.getString("name")) + .endName(endPoint.getString("name")); + try { + BaiduMapNavigation.openBaiduMapWalkNavi(para, context); + } catch (BaiduMapAppNotSupportNaviException e) { + e.printStackTrace(); + } + BaiduMapNavigation.finish(context); + } + + @ReactMethod + public void openPoiNearbySearch(ReadableMap options) { + PoiParaOption para = new PoiParaOption() + .key(options.getString("key")) + .center(LatLngUtil.fromReadableMap(options)) + .radius(options.getInt("radius")); + try { + BaiduMapPoiSearch.openBaiduMapPoiNearbySearch(para, context); + } catch (Exception e) { + e.printStackTrace(); + } + BaiduMapPoiSearch.finish(context); + } + + @ReactMethod + public void openPoiDetialsPage(String uid) { + PoiParaOption para = new PoiParaOption().uid(uid); + try { + BaiduMapPoiSearch.openBaiduMapPoiDetialsPage(para, context); + } catch (Exception e) { + e.printStackTrace(); + } + BaiduMapPoiSearch.finish(context); + } + + @ReactMethod + public void openPanoShow(String uid) { + try { + BaiduMapPoiSearch.openBaiduMapPanoShow(uid, context); + } catch (Exception e) { + e.printStackTrace(); + } + BaiduMapPoiSearch.finish(context); + } + + private RouteParaOption createRouteParaOption(ReadableMap startPoint, ReadableMap endPoint) { + RouteParaOption paraOption = new RouteParaOption() + .startPoint(LatLngUtil.fromReadableMap(startPoint)) + .endPoint(LatLngUtil.fromReadableMap(endPoint)) + .busStrategyType(RouteParaOption.EBusStrategyType.bus_recommend_way); + if (startPoint.hasKey(KEY_NAME)) { + paraOption.startName(startPoint.getString(KEY_NAME)); + } + if (endPoint.hasKey(KEY_NAME)) { + paraOption.endName(endPoint.getString(KEY_NAME)); + } + return paraOption; + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/support/AppUtils.java b/android/src/main/java/org/lovebing/reactnative/baidumap/support/AppUtils.java new file mode 100644 index 00000000..5cd38a8b --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/support/AppUtils.java @@ -0,0 +1,36 @@ +/** + * Copyright (c) 2016-present, lovebing.org. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.support; + +import android.app.Activity; +import android.content.pm.PackageManager; +import android.os.Build; +import androidx.core.app.ActivityCompat; +import androidx.core.content.ContextCompat; +import org.lovebing.reactnative.baidumap.constant.RequestCode; + +/** + * @author lovebing + * @date 2019/10/31 + */ +public class AppUtils { + + public static void checkPermission(Activity activity, String permission) { + if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { + if (activity.getApplicationInfo().targetSdkVersion >= Build.VERSION_CODES.M) { + if (!hasPermission(activity, permission)) { + ActivityCompat.requestPermissions(activity, new String[]{permission}, RequestCode.CODE_ASK_PERMISSIONS); + } + } + } + } + + public static boolean hasPermission(Activity activity, String permission) { + return ContextCompat.checkSelfPermission(activity, permission) == PackageManager.PERMISSION_GRANTED; + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/support/ConvertUtils.java b/android/src/main/java/org/lovebing/reactnative/baidumap/support/ConvertUtils.java new file mode 100644 index 00000000..4ce1c46b --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/support/ConvertUtils.java @@ -0,0 +1,74 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.support; + +import android.util.Log; +import com.baidu.mapapi.model.LatLng; +import com.facebook.react.bridge.ReadableMap; +import org.lovebing.reactnative.baidumap.model.LocationData; + +import java.lang.reflect.Field; +import java.util.HashMap; +import java.util.Map; + +/** + * @author lovebing + * @date 2019/11/02 + */ +public class ConvertUtils { + + private static final String TAG = ConvertUtils.class.getName(); + private static final Map FILED_MAP = new HashMap<>(); + + public static LatLng convert(LocationData locationData) { + if (locationData == null || !locationData.isValid()) { + return null; + } + return new LatLng(locationData.getLatitude(), locationData.getLongitude()); + } + + public static T convert(ReadableMap readableMap, Class targetClass) { + if (readableMap == null) { + return null; + } + if (!FILED_MAP.containsKey(targetClass)) { + FILED_MAP.put(targetClass, targetClass.getDeclaredFields()); + } + try { + T target = targetClass.newInstance(); + Field[] fields = FILED_MAP.get(targetClass); + for (Field field : fields) { + if (readableMap.hasKey(field.getName())) { + field.setAccessible(true); + field.set(target, getValue(readableMap, field)); + } + } + return target; + } catch (Exception e) { + Log.e(TAG, e.getMessage()); + e.printStackTrace(); + return null; + } + } + + private static Object getValue(ReadableMap readableMa, Field field) { + if (field.getType().equals(Integer.class)) { + return readableMa.getInt(field.getName()); + } + if (field.getType().equals(Double.class)) { + return readableMa.getDouble(field.getName()); + } + if (field.getType().equals(String.class)) { + return readableMa.getString(field.getName()); + } + if (field.getType().equals(Boolean.class)) { + return readableMa.getBoolean(field.getName()); + } + return null; + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/MapViewManager.java b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/MapViewManager.java new file mode 100644 index 00000000..b59da815 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/MapViewManager.java @@ -0,0 +1,186 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.uimanager; + +import android.os.Build; +import android.util.Log; +import android.view.View; + +import androidx.annotation.RequiresApi; + +import com.baidu.mapapi.map.*; +import com.baidu.mapapi.model.LatLng; +import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.uimanager.ThemedReactContext; +import com.facebook.react.uimanager.ViewGroupManager; +import com.facebook.react.uimanager.annotations.ReactProp; + +import org.lovebing.reactnative.baidumap.listener.MapListener; +import org.lovebing.reactnative.baidumap.model.LocationData; +import org.lovebing.reactnative.baidumap.support.ConvertUtils; +import org.lovebing.reactnative.baidumap.view.OverlayCluster; +import org.lovebing.reactnative.baidumap.view.OverlayMarker; +import org.lovebing.reactnative.baidumap.view.OverlayView; + +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; + +@RequiresApi(api = Build.VERSION_CODES.N) +public class MapViewManager extends ViewGroupManager { + + private MapListener mapListener; + private static Set overlayMarkers = ConcurrentHashMap.newKeySet(); + private int childrenCount = 0; + + @Override + public String getName() { + return "BaiduMapView"; + } + + @Override + public void addView(TextureMapView parent, View child, int index) { + Log.i("MapViewManager", "addView:" + index); + if (child instanceof OverlayView) { + if (child instanceof OverlayMarker) { + overlayMarkers.add((OverlayMarker) child); + } + if (child instanceof OverlayCluster) { + ((OverlayCluster) child).setMapListener(mapListener); + } + ((OverlayView) child).addTopMap(parent.getMap()); + } + super.addView(parent, child, index); + } + + @Override + public void removeViewAt(TextureMapView parent, int index) { + View child = parent.getChildAt(index); + Log.i("MapViewManager", "removeViewAt:" + index + "," + child.getClass().getName()); + if (child instanceof OverlayView) { + if (child instanceof OverlayMarker) { + overlayMarkers.add((OverlayMarker) child); + } + ((OverlayView) child).removeFromMap(parent.getMap()); + } + super.removeViewAt(parent, index); + } + + @Override + protected TextureMapView createViewInstance(ThemedReactContext themedReactContext) { + TextureMapView mapView = new TextureMapView(themedReactContext); + BaiduMap map = mapView.getMap(); + mapListener = new MapListener(mapView, themedReactContext); + map.setOnMapStatusChangeListener(mapListener); + map.setOnMapLoadedCallback(mapListener); + map.setOnMapClickListener(mapListener); + map.setOnMapDoubleClickListener(mapListener); + map.setOnMarkerClickListener(mapListener); + return mapView; + } + + @ReactProp(name = "zoomControlsVisible") + public void setZoomControlsVisible(TextureMapView mapView, boolean zoomControlsVisible) { + mapView.showZoomControls(zoomControlsVisible); + } + + @ReactProp(name="trafficEnabled") + public void setTrafficEnabled(TextureMapView mapView, boolean trafficEnabled) { + mapView.getMap().setTrafficEnabled(trafficEnabled); + } + + @ReactProp(name="baiduHeatMapEnabled") + public void setBaiduHeatMapEnabled(TextureMapView mapView, boolean baiduHeatMapEnabled) { + mapView.getMap().setBaiduHeatMapEnabled(baiduHeatMapEnabled); + } + + @ReactProp(name = "mapType") + public void setMapType(TextureMapView mapView, int mapType) { + mapView.getMap().setMapType(mapType); + } + + @ReactProp(name="zoom") + public void setZoom(TextureMapView mapView, float zoom) { + MapStatus mapStatus = new MapStatus.Builder().zoom(zoom).build(); + MapStatusUpdate mapStatusUpdate = MapStatusUpdateFactory.newMapStatus(mapStatus); + mapView.getMap().setMapStatus(mapStatusUpdate); + } + + @ReactProp(name = "showsUserLocation") + public void setShowsUserLocation(TextureMapView mapView, boolean showsUserLocation) { + mapView.getMap().setMyLocationEnabled(showsUserLocation); + } + + @ReactProp(name = "showMapPoi") + public void showMapPoi(MapView mapView, boolean showMapPoi) { + mapView.getMap().showMapPoi(showMapPoi); + } + + @ReactProp(name = "locationData") + public void setLocationData(TextureMapView mapView, ReadableMap readableMap) { + LocationData locationData = ConvertUtils.convert(readableMap, LocationData.class); + if (locationData == null || !locationData.isValid()) { + return; + } + MyLocationData.Builder builder = new MyLocationData.Builder() + .latitude(locationData.getLatitude()) + .longitude(locationData.getLongitude()); + if (locationData.getDirection() != null) { + builder.direction(locationData.getDirection().floatValue()); + } + if (locationData.getSpeed() != null) { + builder.speed(locationData.getSpeed().floatValue()); + } + mapView.getMap().setMyLocationData(builder.build()); + } + + @ReactProp(name="zoomGesturesEnabled") + public void setGesturesEnabled(TextureMapView mapView, boolean zoomGesturesEnabled) { + UiSettings setting = mapView.getMap().getUiSettings(); + setting.setZoomGesturesEnabled(zoomGesturesEnabled); + } + + @ReactProp(name="scrollGesturesEnabled") + public void setScrollEnabled(TextureMapView mapView, boolean scrollGesturesEnabled) { + UiSettings setting = mapView.getMap().getUiSettings(); + setting.setScrollGesturesEnabled(scrollGesturesEnabled); + } + + @ReactProp(name="center") + public void setCenter(TextureMapView mapView, ReadableMap position) { + LocationData locationData = ConvertUtils.convert(position, LocationData.class); + LatLng point = ConvertUtils.convert(locationData); + if (point == null) { + return; + } + MapStatus mapStatus = new MapStatus.Builder() + .target(point) + .build(); + MapStatusUpdate mapStatusUpdate = MapStatusUpdateFactory.newMapStatus(mapStatus); + mapView.getMap().setMapStatus(mapStatusUpdate); + } + + @ReactProp(name = "childrenCount") + public void setChildrenCount(TextureMapView mapView, Integer childrenCount) { + Log.i("MapViewManager", "childrenCount:" + childrenCount); + this.childrenCount = childrenCount; + } + + + public static OverlayMarker findOverlayMaker(Marker marker) { + for (OverlayMarker overlayMarker : overlayMarkers) { + if (marker.equals(overlayMarker.getMarker())) { + return overlayMarker; + } + if (marker.getPosition() != null && marker.getPosition().latitude == overlayMarker.getPosition().latitude + && marker.getPosition().longitude == overlayMarker.getPosition().longitude) { + return overlayMarker; + } + } + return null; + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayArcManager.java b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayArcManager.java new file mode 100644 index 00000000..aa3180fc --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayArcManager.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.uimanager; + +import com.facebook.react.bridge.ReadableArray; +import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.uimanager.SimpleViewManager; +import com.facebook.react.uimanager.ThemedReactContext; +import com.facebook.react.uimanager.annotations.ReactProp; +import org.lovebing.reactnative.baidumap.util.LatLngUtil; +import org.lovebing.reactnative.baidumap.util.StrokeUtil; +import org.lovebing.reactnative.baidumap.view.OverlayArc; + +/** + * @author lovebing Created on Dec 09, 2018 + */ +public class OverlayArcManager extends SimpleViewManager { + + @Override + public String getName() { + return "BaiduMapOverlayArc"; + } + + @Override + protected OverlayArc createViewInstance(ThemedReactContext reactContext) { + return new OverlayArc(reactContext); + } + + @ReactProp(name = "stroke") + public void setStroke(OverlayArc overlayArc, ReadableMap stroke) { + overlayArc.setStroke(StrokeUtil.fromReadableMap(stroke)); + } + + @ReactProp(name = "points") + public void setPoints(OverlayArc overlayArc, ReadableArray points) { + OverlayArc.Points _points = new OverlayArc.Points(LatLngUtil.fromReadableMap(points.getMap(0)), + LatLngUtil.fromReadableMap(points.getMap(1)), + LatLngUtil.fromReadableMap(points.getMap(2))); + overlayArc.setPoints(_points); + } + +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayCircleManager.java b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayCircleManager.java new file mode 100644 index 00000000..212508c9 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayCircleManager.java @@ -0,0 +1,53 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.uimanager; + +import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.uimanager.SimpleViewManager; +import com.facebook.react.uimanager.ThemedReactContext; +import com.facebook.react.uimanager.annotations.ReactProp; +import org.lovebing.reactnative.baidumap.util.ColorUtil; +import org.lovebing.reactnative.baidumap.util.LatLngUtil; +import org.lovebing.reactnative.baidumap.util.StrokeUtil; +import org.lovebing.reactnative.baidumap.view.OverlayCircle; + +/** + * @author lovebing Created on Dec 09, 2018 + */ +public class OverlayCircleManager extends SimpleViewManager { + + @Override + public String getName() { + return "BaiduMapOverlayCircle"; + } + + @Override + protected OverlayCircle createViewInstance(ThemedReactContext reactContext) { + return new OverlayCircle(reactContext); + } + + @ReactProp(name = "radius") + public void setRadius(OverlayCircle overlayCircle, int radius) { + overlayCircle.setRadius(radius); + } + + @ReactProp(name = "center") + public void setCenter(OverlayCircle overlayCircle, ReadableMap center) { + overlayCircle.setCenter(LatLngUtil.fromReadableMap(center)); + } + + @ReactProp(name = "fillColor") + public void setFillColor(OverlayCircle overlayCircle, String fillColor) { + overlayCircle.setFillColor(ColorUtil.fromString(fillColor)); + } + + @ReactProp(name = "stroke") + public void setStroke(OverlayCircle overlayCircle, ReadableMap stroke) { + overlayCircle.setStroke(StrokeUtil.fromReadableMap(stroke)); + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayClusterManager.java b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayClusterManager.java new file mode 100644 index 00000000..dee0346a --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayClusterManager.java @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.uimanager; + +import android.util.Log; +import android.view.View; +import androidx.annotation.NonNull; +import com.facebook.react.uimanager.ThemedReactContext; +import com.facebook.react.uimanager.ViewGroupManager; +import org.lovebing.reactnative.baidumap.view.OverlayCluster; +import org.lovebing.reactnative.baidumap.view.OverlayMarker; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author lovebing Created on 10月 07, 2019 + */ +public class OverlayClusterManager extends ViewGroupManager { + + private static Object EMPTY_OBJ = new Object(); + private List children = new ArrayList<>(10); + + @NonNull + @Override + public String getName() { + return "BaiduMapOverlayCluster"; + } + + @Override + public void addView(OverlayCluster parent, View child, int index) { + Log.i("OverlayClusterManager", "addView: " + index); + if (index == 0 && !children.isEmpty()) { + removeOldChildViews(parent); + } + if (child instanceof OverlayMarker) { + children.add(child); + parent.addMarker((OverlayMarker) child); + } else { + children.add(EMPTY_OBJ); + } + super.addView(parent, child, index); + } + + @Override + public void removeViewAt(OverlayCluster parent, int index) { + Log.i("OverlayClusterManager", "removeViewAt: " + index); + Object child = children.get(index); + children.remove(index); + if (child instanceof OverlayMarker) { + parent.removeMarker((OverlayMarker) child); + } + super.removeViewAt(parent, index); + } + + @NonNull + @Override + protected OverlayCluster createViewInstance(@NonNull ThemedReactContext reactContext) { + return new OverlayCluster(reactContext); + } + + private void removeOldChildViews(OverlayCluster cluster) { + children.clear(); + cluster.clearMarkers(); + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayHeatMapManager.java b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayHeatMapManager.java new file mode 100644 index 00000000..d785f6ff --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayHeatMapManager.java @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.uimanager; + +import android.util.Log; + +import androidx.annotation.NonNull; + +import com.baidu.mapapi.map.Gradient; +import com.facebook.react.bridge.ReadableArray; +import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.uimanager.SimpleViewManager; +import com.facebook.react.uimanager.ThemedReactContext; +import com.facebook.react.uimanager.annotations.ReactProp; + +import org.lovebing.reactnative.baidumap.util.ColorUtil; +import org.lovebing.reactnative.baidumap.util.LatLngUtil; +import org.lovebing.reactnative.baidumap.view.OverlayHeatMap; + +/** + * @author lovebing + * @date 2020-05-22 + */ +public class OverlayHeatMapManager extends SimpleViewManager { + + private static final String TAG = OverlayHeatMapManager.class.getSimpleName(); + + @NonNull + @Override + public String getName() { + return "BaiduMapOverlayHeatMap"; + } + + @NonNull + @Override + protected OverlayHeatMap createViewInstance(@NonNull ThemedReactContext reactContext) { + return new OverlayHeatMap(reactContext); + } + + @ReactProp(name = "points") + public void setPoints(OverlayHeatMap overlayHeatMap, ReadableArray points) { + overlayHeatMap.setPoints(LatLngUtil.fromReadableArray(points)); + } + + @ReactProp(name = "gradient") + public void setGradient(OverlayHeatMap overlayHeatMap, ReadableMap gradient) { + ReadableArray colorsArray = gradient.getArray("colors"); + ReadableArray startPointsArray = gradient.getArray("startPoints"); + if (colorsArray == null + || startPointsArray == null + || colorsArray.size() == 0 + || colorsArray.size() != startPointsArray.size()) { + Log.w(TAG, "setGradient error: invalid params"); + return; + } + int[] colors = new int[colorsArray.size()]; + float[] startPoints = new float[colors.length]; + for (int i = 0; i < colors.length; i++) { + if (colorsArray.getString(i) == null) { + Log.w(TAG, "setGradient error: invalid params"); + return; + } + colors[i] = ColorUtil.fromString(colorsArray.getString(i)); + startPoints[i] = (float) startPointsArray.getDouble(i); + } + overlayHeatMap.setGradient(new Gradient(colors, startPoints)); + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayMarkerIconManager.java b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayMarkerIconManager.java new file mode 100644 index 00000000..36256e00 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayMarkerIconManager.java @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.uimanager; + +import androidx.annotation.NonNull; +import com.facebook.react.uimanager.ThemedReactContext; +import com.facebook.react.uimanager.ViewGroupManager; +import org.lovebing.reactnative.baidumap.view.OverlayMarkerIcon; + +/** + * @author lovebing + * @date 2020-06-07 + */ +public class OverlayMarkerIconManager extends ViewGroupManager { + + @NonNull + @Override + public String getName() { + return "BaiduMapOverlayMarkerIcon"; + } + + @NonNull + @Override + protected OverlayMarkerIcon createViewInstance(@NonNull ThemedReactContext reactContext) { + return new OverlayMarkerIcon(reactContext); + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayMarkerManager.java b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayMarkerManager.java new file mode 100644 index 00000000..40e6b6a5 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayMarkerManager.java @@ -0,0 +1,106 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.uimanager; + +import android.util.Log; +import android.view.View; + +import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.uimanager.ThemedReactContext; +import com.facebook.react.uimanager.ViewGroupManager; +import com.facebook.react.uimanager.annotations.ReactProp; + +import org.lovebing.reactnative.baidumap.model.IconInfo; +import org.lovebing.reactnative.baidumap.util.LatLngUtil; +import org.lovebing.reactnative.baidumap.view.OverlayInfoWindow; +import org.lovebing.reactnative.baidumap.view.OverlayMarker; +import org.lovebing.reactnative.baidumap.view.OverlayMarkerIcon; + +public class OverlayMarkerManager extends ViewGroupManager { + + @Override + public String getName() { + return "BaiduMapOverlayMarker"; + } + + @Override + protected OverlayMarker createViewInstance(ThemedReactContext themedReactContext) { + return new OverlayMarker(themedReactContext); + } + + @ReactProp(name = "title") + public void setTitle(OverlayMarker overlayMarker, String title) { + overlayMarker.setTitle(title); + } + + @ReactProp(name = "animateType") + public void setAnimateType(OverlayMarker overlayMarker, String animateType) { + overlayMarker.setAnimateType(animateType); + } + + @ReactProp(name = "titleOffsetY") + public void setTitleOffsetY(OverlayMarker overlayMarker, int titleOffsetY) { + overlayMarker.setTitleOffsetY(titleOffsetY); + } + + @ReactProp(name = "location") + public void setLocation(OverlayMarker overlayMarker, ReadableMap position) { + overlayMarker.setPosition(LatLngUtil.fromReadableMap(position)); + } + + @ReactProp(name = "icon") + public void setIcon(OverlayMarker overlayMarker, ReadableMap icon) { + if (icon != null && icon.hasKey("uri")) { + IconInfo iconInfo = new IconInfo(); + iconInfo.setUri(icon.getString("uri")); + if (icon.hasKey("width")) { + iconInfo.setWidth(icon.getInt("width")); + } + if (icon.hasKey("height")) { + iconInfo.setHeight(icon.getInt("height")); + } + Log.i("iconInfo", iconInfo.getUri()); + overlayMarker.setIcon(iconInfo); + } + } + + @ReactProp(name = "perspective") + public void setPerspective(OverlayMarker overlayMarker, boolean perspective) { + overlayMarker.setPerspective(perspective); + } + + @ReactProp(name = "alpha") + public void setAlpha(OverlayMarker overlayMarker, float alpha) { + overlayMarker.setAlpha(alpha); + } + + @ReactProp(name = "rotate") + public void setRotate(OverlayMarker overlayMarker, float rotate) { + overlayMarker.setRotate(rotate); + } + + @ReactProp(name = "flat") + public void setFlat(OverlayMarker overlayMarker, boolean flat) { + overlayMarker.setFlat(flat); + } + + @Override + public void addView(OverlayMarker parent, View child, int index) { + if (child instanceof OverlayInfoWindow) { + parent.setOverlayInfoWindow((OverlayInfoWindow) child); + } else if (child instanceof OverlayMarkerIcon) { + parent.setIconView(child); + } + super.addView(parent, child, index); + } + + @Override + public void removeViewAt(OverlayMarker parent, int index) { + super.removeViewAt(parent, index); + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayOverlayInfoWindowManager.java b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayOverlayInfoWindowManager.java new file mode 100644 index 00000000..04aa36cb --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayOverlayInfoWindowManager.java @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.uimanager; + +import android.util.Log; +import android.view.View; +import com.facebook.react.uimanager.ThemedReactContext; +import com.facebook.react.uimanager.ViewGroupManager; +import com.facebook.react.uimanager.annotations.ReactProp; +import org.lovebing.reactnative.baidumap.view.OverlayInfoWindow; + +/** + * @author lovebing Created on Dec 09, 2018 + */ +public class OverlayOverlayInfoWindowManager extends ViewGroupManager { + + @Override + public String getName() { + return "BaiduMapOverlayInfoWindow"; + } + + @Override + protected OverlayInfoWindow createViewInstance(ThemedReactContext reactContext) { + return new OverlayInfoWindow(reactContext); + } + + @Override + public void addView(OverlayInfoWindow parent, View child, int index) { + Log.i("infoWindow addView", parent.hashCode() + ":" + child.getClass().getName() + ":" + child.hashCode()); + super.addView(parent, child, index); + } + + @ReactProp(name = "width") + public void setWidth(OverlayInfoWindow overlayInfoWindow, int width) { + overlayInfoWindow.setWidth(width); + } + + @ReactProp(name = "height") + public void setHeight(OverlayInfoWindow overlayInfoWindow, int height) { + overlayInfoWindow.setHeight(height); + } + + @ReactProp(name = "offsetY") + public void setOffsetY(OverlayInfoWindow overlayInfoWindow, int offsetY) { + overlayInfoWindow.setOffsetY(offsetY); + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayPolygonManager.java b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayPolygonManager.java new file mode 100644 index 00000000..74c2e3ea --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayPolygonManager.java @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.uimanager; + +import com.facebook.react.bridge.ReadableArray; +import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.uimanager.SimpleViewManager; +import com.facebook.react.uimanager.ThemedReactContext; +import com.facebook.react.uimanager.annotations.ReactProp; +import org.lovebing.reactnative.baidumap.util.ColorUtil; +import org.lovebing.reactnative.baidumap.util.LatLngUtil; +import org.lovebing.reactnative.baidumap.util.StrokeUtil; +import org.lovebing.reactnative.baidumap.view.OverlayPolygon; + +/** + * @author lovebing Created on Dec 09, 2018 + */ +public class OverlayPolygonManager extends SimpleViewManager { + + @Override + public String getName() { + return "BaiduMapOverlayPolygon"; + } + + @Override + protected OverlayPolygon createViewInstance(ThemedReactContext reactContext) { + return new OverlayPolygon(reactContext); + } + + @ReactProp(name = "points") + public void setPoints(OverlayPolygon overlayPolygon, ReadableArray points) { + overlayPolygon.setPoints(LatLngUtil.fromReadableArray(points)); + } + + @ReactProp(name = "fillColor") + public void setFillColor(OverlayPolygon overlayPolygon, String fillColor) { + overlayPolygon.setFillColor(ColorUtil.fromString(fillColor)); + } + + @ReactProp(name = "stroke") + public void setStroke(OverlayPolygon overlayPolygon, ReadableMap stroke) { + overlayPolygon.setStroke(StrokeUtil.fromReadableMap(stroke)); + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayPolylineManager.java b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayPolylineManager.java new file mode 100644 index 00000000..a6cb1981 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayPolylineManager.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.uimanager; + +import com.facebook.react.bridge.ReadableArray; +import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.uimanager.SimpleViewManager; +import com.facebook.react.uimanager.ThemedReactContext; +import com.facebook.react.uimanager.annotations.ReactProp; +import org.lovebing.reactnative.baidumap.util.ColorUtil; +import org.lovebing.reactnative.baidumap.util.LatLngUtil; +import org.lovebing.reactnative.baidumap.util.StrokeUtil; +import org.lovebing.reactnative.baidumap.view.OverlayPolygon; +import org.lovebing.reactnative.baidumap.view.OverlayPolyline; + + +/** + * @author lovebing Created on Dec 09, 2018 + */ +public class OverlayPolylineManager extends SimpleViewManager { + + @Override + public String getName() { + return "BaiduMapOverlayPolyline"; + } + + @Override + protected OverlayPolyline createViewInstance(ThemedReactContext reactContext) { + return new OverlayPolyline(reactContext); + } + + @ReactProp(name = "points") + public void setPoints(OverlayPolyline overlayPolyline, ReadableArray points) { + overlayPolyline.setPoints(LatLngUtil.fromReadableArray(points)); + } + + @ReactProp(name = "stroke") + public void setStroke(OverlayPolyline overlayPolyline, ReadableMap stroke) { + overlayPolyline.setStroke(StrokeUtil.fromReadableMap(stroke)); + } + +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayTextManager.java b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayTextManager.java new file mode 100644 index 00000000..27bc562e --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/uimanager/OverlayTextManager.java @@ -0,0 +1,62 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.uimanager; + +import com.facebook.react.bridge.ReadableMap; +import com.facebook.react.uimanager.SimpleViewManager; +import com.facebook.react.uimanager.ThemedReactContext; +import com.facebook.react.uimanager.annotations.ReactProp; + +import org.lovebing.reactnative.baidumap.util.ColorUtil; +import org.lovebing.reactnative.baidumap.util.LatLngUtil; +import org.lovebing.reactnative.baidumap.view.OverlayText; + +import java.math.BigInteger; + +public class OverlayTextManager extends SimpleViewManager { + + @Override + public String getName() { + return "BaiduMapOverlayText"; + } + + @Override + protected OverlayText createViewInstance(ThemedReactContext reactContext) { + return new OverlayText(reactContext); + } + + @ReactProp(name = "text") + public void setText(OverlayText overlayText, String text) { + overlayText.setText(text); + } + + @ReactProp(name = "fontSize") + public void setFontSize(OverlayText overlayText, int fontSize) { + overlayText.setFontSize(fontSize); + } + + @ReactProp(name = "fontColor") + public void setFontColor(OverlayText overlayText, String fontColor) { + overlayText.setFontColor(ColorUtil.fromString(fontColor)); + } + + @ReactProp(name = "bgColor") + public void setBgColor(OverlayText overlayText, String bgColor) { + overlayText.setBgColor(new BigInteger(bgColor, 16).intValue()); + } + @ReactProp(name = "rotate") + public void setRotate(OverlayText overlayText, float rotate) { + overlayText.setRotate(rotate); + } + + @ReactProp(name = "location") + public void setLocation(OverlayText overlayText, ReadableMap position) { + overlayText.setPosition(LatLngUtil.fromReadableMap(position)); + } + +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/util/BitmapUtil.java b/android/src/main/java/org/lovebing/reactnative/baidumap/util/BitmapUtil.java new file mode 100644 index 00000000..dce8a0c7 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/util/BitmapUtil.java @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.util; + +import android.graphics.Bitmap; +import android.graphics.Canvas; +import android.graphics.Matrix; +import android.view.View; + +import com.baidu.mapapi.map.BitmapDescriptor; +import com.baidu.mapapi.map.BitmapDescriptorFactory; + +/** + * @author lovebing + * @date 2020-05-25 + */ +public class BitmapUtil { + + public static BitmapDescriptor createBitmapDescriptor(View view) { + return createBitmapDescriptor(view, 0, 0); + } + + public static BitmapDescriptor createBitmapDescriptor(View view, int width, int height) { + if (width > 0 && height > 0) { + view.layout(0, 0, width, height); + } else if (view.getMeasuredWidth() == 0 || view.getMeasuredHeight() == 0) { + view.layout(0, 0, view.getMeasuredWidth() > 0 ? view.getMeasuredWidth() : 50, view.getMeasuredHeight() > 0 ? view.getMeasuredHeight() : 100); + } + view.buildDrawingCache(); + BitmapDescriptor bitmapDescriptor = BitmapDescriptorFactory.fromBitmap(view.getDrawingCache()); + view.destroyDrawingCache(); + return bitmapDescriptor; + } + + public static Bitmap resizeBitmap(Bitmap bitmap, int width, int height) { + float scaleWidth = ((float) width) / bitmap.getWidth(); + float scaleHeight = ((float) height) / bitmap.getHeight(); + Matrix matrix = new Matrix(); + matrix.postScale(scaleWidth, scaleHeight); + return Bitmap.createBitmap(bitmap, 0, 0, bitmap.getWidth(), bitmap.getHeight(), matrix, true); + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/util/ColorUtil.java b/android/src/main/java/org/lovebing/reactnative/baidumap/util/ColorUtil.java new file mode 100644 index 00000000..2cacb5c9 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/util/ColorUtil.java @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.util; + +import java.math.BigInteger; + +/** + * @author lovebing Created on Dec 09, 2018 + */ +public class ColorUtil { + + public static int fromString(String color) { + if (color.startsWith("#")) { + color = color.substring(1); + } + if (color.length() == 6) { + color = "FF" + color; + } + return new BigInteger(color, 16).intValue(); + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/util/LatLngUtil.java b/android/src/main/java/org/lovebing/reactnative/baidumap/util/LatLngUtil.java new file mode 100644 index 00000000..8875f7bd --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/util/LatLngUtil.java @@ -0,0 +1,38 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.util; + +import com.baidu.mapapi.model.LatLng; +import com.facebook.react.bridge.ReadableArray; +import com.facebook.react.bridge.ReadableMap; +import org.lovebing.reactnative.baidumap.constant.LocationDataKey; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author lovebing Created on Dec 09, 2018 + */ +public class LatLngUtil { + + public static LatLng fromReadableMap(ReadableMap readableMap) { + if (!readableMap.hasKey(LocationDataKey.LATITUDE) || !readableMap.hasKey(LocationDataKey.LONGITUDE)) { + return null; + } + return new LatLng(readableMap.getDouble(LocationDataKey.LATITUDE), readableMap.getDouble(LocationDataKey.LONGITUDE)); + } + + public static List fromReadableArray(ReadableArray readableArray) { + List list = new ArrayList<>(); + int size = readableArray.size(); + for (int i = 0; i < size; i++) { + list.add(fromReadableMap(readableArray.getMap(i))); + } + return list; + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/util/StrokeUtil.java b/android/src/main/java/org/lovebing/reactnative/baidumap/util/StrokeUtil.java new file mode 100644 index 00000000..5c7343d3 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/util/StrokeUtil.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.util; + +import com.baidu.mapapi.map.Stroke; +import com.facebook.react.bridge.ReadableMap; + +/** + * @author lovebing Created on Dec 09, 2018 + */ +public class StrokeUtil { + + public static Stroke fromReadableMap(ReadableMap stroke) { + return new Stroke(stroke.getInt("width"), + ColorUtil.fromString(stroke.getString("color"))); + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayArc.java b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayArc.java new file mode 100644 index 00000000..333445aa --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayArc.java @@ -0,0 +1,125 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.view; + +import android.annotation.TargetApi; +import android.content.Context; +import android.util.AttributeSet; +import android.view.View; +import com.baidu.mapapi.map.Arc; +import com.baidu.mapapi.map.ArcOptions; +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.Stroke; +import com.baidu.mapapi.model.LatLng; + +/** + * @author lovebing Created on Dec 09, 2018 + */ +public class OverlayArc extends View implements OverlayView { + + private Arc arc; + private Points points; + private Stroke stroke = new Stroke(4, 0xAA00FF00); + + public OverlayArc(Context context) { + super(context); + } + + public OverlayArc(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public OverlayArc(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + } + + @TargetApi(21) + public OverlayArc(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { + super(context, attrs, defStyleAttr, defStyleRes); + } + + public Stroke getStroke() { + return stroke; + } + + public void setStroke(Stroke stroke) { + this.stroke = stroke; + if (arc != null) { + arc.setWidth(stroke.strokeWidth); + arc.setColor(stroke.color); + } + } + + public Points getPoints() { + return points; + } + + public void setPoints(Points points) { + this.points = points; + if (arc != null) { + arc.setPoints(points.getP1(), points.getP2(), points.getP3()); + } + } + + @Override + public void addTopMap(BaiduMap baiduMap) { + ArcOptions ooArc = new ArcOptions() + .color(stroke.color) + .width(stroke.strokeWidth) + .points(points.getP1(), points.getP2(), points.getP3()); + arc = (Arc) baiduMap.addOverlay(ooArc); + } + + @Override + public void removeFromMap(BaiduMap baiduMap) { + if (arc != null) { + arc.remove(); + arc = null; + } + } + + public static final class Points { + + private LatLng p1; + private LatLng p2; + private LatLng p3; + + public Points() { + } + + public Points(LatLng p1, LatLng p2, LatLng p3) { + this.p1 = p1; + this.p2 = p2; + this.p3 = p3; + } + + public LatLng getP1() { + return p1; + } + + public void setP1(LatLng p1) { + this.p1 = p1; + } + + public LatLng getP2() { + return p2; + } + + public void setP2(LatLng p2) { + this.p2 = p2; + } + + public LatLng getP3() { + return p3; + } + + public void setP3(LatLng p3) { + this.p3 = p3; + } + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayCircle.java b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayCircle.java new file mode 100644 index 00000000..fa848090 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayCircle.java @@ -0,0 +1,107 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.view; + +import android.annotation.TargetApi; +import android.content.Context; +import android.util.AttributeSet; +import android.view.View; +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.Circle; +import com.baidu.mapapi.map.CircleOptions; +import com.baidu.mapapi.map.Stroke; +import com.baidu.mapapi.model.LatLng; + +/** + * @author lovebing Created on Dec 9, 2018 + */ +public class OverlayCircle extends View implements OverlayView { + + private LatLng center; + private int radius = 1400; + private int fillColor = 0x000000FF; + private Stroke stroke = new Stroke(5, 0xAA000000); + private Circle circle; + + public OverlayCircle(Context context) { + super(context); + } + + public OverlayCircle(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public OverlayCircle(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + } + + @TargetApi(21) + public OverlayCircle(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { + super(context, attrs, defStyleAttr, defStyleRes); + } + + public LatLng getCenter() { + return center; + } + + public void setCenter(LatLng center) { + this.center = center; + if (circle != null) { + circle.setCenter(center); + } + } + + public int getRadius() { + return radius; + } + + public void setRadius(int radius) { + this.radius = radius; + if (circle != null) { + circle.setRadius(radius); + } + } + + public int getFillColor() { + return fillColor; + } + + public void setFillColor(int fillColor) { + this.fillColor = fillColor; + if (circle != null) { + circle.setFillColor(fillColor); + } + } + + public Stroke getStroke() { + return stroke; + } + + public void setStroke(Stroke stroke) { + this.stroke = stroke; + if (circle != null) { + circle.setStroke(stroke); + } + } + + @Override + public void addTopMap(BaiduMap baiduMap) { + CircleOptions options = new CircleOptions().fillColor(fillColor) + .center(center).stroke(stroke) + .radius(radius); + circle = (Circle) baiduMap.addOverlay(options); + } + + @Override + public void removeFromMap(BaiduMap baiduMap) { + if (circle != null) { + circle.remove(); + circle = null; + } + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayCluster.java b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayCluster.java new file mode 100644 index 00000000..70006cfb --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayCluster.java @@ -0,0 +1,109 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.view; + +import android.annotation.TargetApi; +import android.content.Context; +import android.util.AttributeSet; +import android.util.Log; +import android.view.ViewGroup; +import com.baidu.mapapi.clusterutil.clustering.ClusterManager; +import com.baidu.mapapi.map.BaiduMap; +import org.lovebing.reactnative.baidumap.listener.MapListener; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author lovebing Created on 10月 07, 2019 + */ +public class OverlayCluster extends ViewGroup implements OverlayView { + + private MapListener mapListener; + private BaiduMap baiduMap; + private List markers = new ArrayList<>(10); + private ClusterManager markerClusterManager; + + public OverlayCluster(Context context) { + super(context); + } + + public OverlayCluster(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public OverlayCluster(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + } + + @TargetApi(21) + public OverlayCluster(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { + super(context, attrs, defStyleAttr, defStyleRes); + } + + @Override + protected void onLayout(boolean changed, int l, int t, int r, int b) { + + } + + @Override + public void addTopMap(BaiduMap baiduMap) { + this.baiduMap = baiduMap; + if (markerClusterManager == null) { + markerClusterManager = new ClusterManager<>(getContext(), baiduMap); + mapListener.addMapStatusChangeListener(markerClusterManager); + Log.i("OverlayCluster", "addMapStatusChangeListener"); + } + refresh(); + } + + @Override + public void removeFromMap(BaiduMap baiduMap) { + mapListener.removeMapStatusChangeListener(markerClusterManager); + Log.i("OverlayCluster", "removeMapStatusChangeListener"); + markerClusterManager = null; + } + + public void addMarker(OverlayMarker marker) { + if (markerClusterManager == null) { + markers.add(marker); + } else { + markerClusterManager.addItem(marker); + markerClusterManager.cluster(); + } + } + + public void removeMarker(OverlayMarker marker) { + Log.i("OverlayCluster", "removeMarker, " + + marker.getPosition().latitude + "," + marker.getPosition().longitude); + markers.remove(marker); + Log.i("OverlayCluster", "markers size: " + markers.size()); + refresh(); + } + + public void clearMarkers() { + Log.i("OverlayCluster", "clearMarkers: " + markers.size()); + markers.clear(); + if (markerClusterManager != null) { + markerClusterManager.clearItems(); + } + } + + + public void setMapListener(MapListener mapListener) { + this.mapListener = mapListener; + } + + private void refresh() { + if (markerClusterManager != null) { + markerClusterManager.clearItems(); + markerClusterManager.addItems(markers); + markerClusterManager.cluster(); + } + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayHeatMap.java b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayHeatMap.java new file mode 100644 index 00000000..8f1994cd --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayHeatMap.java @@ -0,0 +1,77 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.view; + +import android.annotation.TargetApi; +import android.content.Context; +import android.util.AttributeSet; +import android.view.View; + +import androidx.annotation.Nullable; + +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.Gradient; +import com.baidu.mapapi.map.HeatMap; +import com.baidu.mapapi.model.LatLng; + +import java.util.List; + +/** + * @author lovebing + * @date 2020-05-22 + */ +public class OverlayHeatMap extends View implements OverlayView { + + private List points; + private HeatMap heatMap; + private Gradient gradient; + + public OverlayHeatMap(Context context) { + super(context); + } + + public OverlayHeatMap(Context context, @Nullable AttributeSet attrs) { + super(context, attrs); + } + + public OverlayHeatMap(Context context, @Nullable AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + } + + public void setPoints(List points) { + this.points = points; + } + + public void setGradient(Gradient gradient) { + this.gradient = gradient; + } + + @TargetApi(21) + public OverlayHeatMap(Context context, @Nullable AttributeSet attrs, int defStyleAttr, int defStyleRes) { + super(context, attrs, defStyleAttr, defStyleRes); + } + + @Override + public void addTopMap(BaiduMap baiduMap) { + HeatMap.Builder build = new HeatMap.Builder() + .data(points); + if (gradient != null) { + build.gradient(gradient); + } + heatMap = build.build(); + baiduMap.addHeatMap(heatMap); + } + + @Override + public void removeFromMap(BaiduMap baiduMap) { + if (heatMap != null) { + heatMap.removeHeatMap(); + heatMap = null; + } + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayInfoWindow.java b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayInfoWindow.java new file mode 100644 index 00000000..efb3d1e5 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayInfoWindow.java @@ -0,0 +1,69 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.view; + +import android.content.Context; +import com.baidu.mapapi.map.BitmapDescriptor; +import com.baidu.mapapi.map.InfoWindow; +import com.baidu.mapapi.model.LatLng; +import com.facebook.react.views.view.ReactViewGroup; + +import org.lovebing.reactnative.baidumap.util.BitmapUtil; + +/** + * @author lovebing Created on Dec 09, 2018 + */ +public class OverlayInfoWindow extends ReactViewGroup { + + private InfoWindow infoWindow; + private int width; + private int height; + private int offsetY = 0; + + public OverlayInfoWindow(Context context) { + super(context); + } + + public InfoWindow getInfoWindow(LatLng location) { + updateInfoWindow(location); + return infoWindow; + } + + public void clearInfoWindow() { + infoWindow = null; + } + + public void setHeight(int height) { + this.height = height; + } + + public void setWidth(int width) { + this.width = width; + } + + public void setOffsetY(int offsetY) { + this.offsetY = offsetY; + } + + private void updateInfoWindow(LatLng location) { + if (infoWindow == null) { + BitmapDescriptor bitmapDescriptor = BitmapUtil.createBitmapDescriptor(this, width, height); + if (bitmapDescriptor == null) { + return; + } + infoWindow = new InfoWindow(bitmapDescriptor, location, offsetY, new InfoWindow.OnInfoWindowClickListener() { + @Override + public void onInfoWindowClick() { + + } + }); + } else { + infoWindow.setPosition(location); + } + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayMarker.java b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayMarker.java new file mode 100644 index 00000000..66516ce8 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayMarker.java @@ -0,0 +1,366 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.view; + +import android.annotation.TargetApi; +import android.content.Context; +import android.graphics.Bitmap; +import android.graphics.drawable.Animatable; +import android.net.Uri; +import android.util.AttributeSet; + +import android.util.Log; +import android.view.View; +import android.view.ViewGroup; +import android.widget.Button; + +import com.baidu.mapapi.clusterutil.clustering.ClusterItem; +import com.baidu.mapapi.map.*; +import com.baidu.mapapi.model.LatLng; +import com.facebook.common.references.CloseableReference; +import com.facebook.datasource.DataSource; +import com.facebook.drawee.backends.pipeline.Fresco; +import com.facebook.drawee.controller.BaseControllerListener; +import com.facebook.drawee.controller.ControllerListener; +import com.facebook.drawee.drawable.ScalingUtils; +import com.facebook.drawee.generic.GenericDraweeHierarchy; +import com.facebook.drawee.generic.GenericDraweeHierarchyBuilder; +import com.facebook.drawee.interfaces.DraweeController; +import com.facebook.drawee.view.DraweeHolder; +import com.facebook.imagepipeline.core.ImagePipeline; +import com.facebook.imagepipeline.image.CloseableImage; +import com.facebook.imagepipeline.image.CloseableStaticBitmap; +import com.facebook.imagepipeline.image.ImageInfo; +import com.facebook.imagepipeline.request.ImageRequest; +import com.facebook.imagepipeline.request.ImageRequestBuilder; + +import org.lovebing.reactnative.baidumap.R; +import org.lovebing.reactnative.baidumap.model.IconInfo; +import org.lovebing.reactnative.baidumap.util.BitmapUtil; + +import java.util.Map; +import java.util.Objects; +import java.util.concurrent.ConcurrentHashMap; + +public class OverlayMarker extends ViewGroup implements OverlayView, ClusterItem { + + // TODO 1. 下载中的情况。 2. 清理零引用的 key + private static final Map BITMAP_DESCRIPTOR_MAP = new ConcurrentHashMap<>(); + + private String title; + private int titleOffsetY = -100; + private MarkerOptions.MarkerAnimateType animateType = MarkerOptions.MarkerAnimateType.none; + private LatLng position; + private Float rotate; + private Boolean flat; + private Boolean perspective; + private BitmapDescriptor iconBitmapDescriptor; + private Marker marker; + private DataSource> dataSource; + private DraweeHolder imageHolder; + private IconInfo iconInfo; + private OverlayInfoWindow overlayInfoWindow; + private volatile boolean loadingImage = false; + private InfoWindow titleInfoWindow; + private View iconView; + + private final ControllerListener imageControllerListener = + new BaseControllerListener() { + @Override + public void onFinalImageSet(String id, final ImageInfo imageInfo, Animatable animatable) { + Log.i("onFinalImageSet", id); + CloseableReference imageReference = null; + try { + imageReference = dataSource.getResult(); + if (imageReference != null) { + CloseableImage image = imageReference.get(); + if (image != null && image instanceof CloseableStaticBitmap) { + CloseableStaticBitmap closeableStaticBitmap = (CloseableStaticBitmap) image; + Bitmap bitmap = closeableStaticBitmap.getUnderlyingBitmap(); + if (bitmap != null) { + bitmap = bitmap.copy(Bitmap.Config.ARGB_8888, true); + iconBitmapDescriptor = BitmapDescriptorFactory.fromBitmap(bitmap); + BITMAP_DESCRIPTOR_MAP.put(iconInfo.getUri(), iconBitmapDescriptor); + } + } + } + } finally { + dataSource.close(); + if (imageReference != null) { + CloseableReference.closeSafely(imageReference); + } + loadingImage = false; + } + } + }; + + public OverlayMarker(Context context) { + super(context); + init(); + } + + public OverlayMarker(Context context, AttributeSet attrs) { + super(context, attrs); + init(); + } + + public OverlayMarker(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + init(); + } + + public Marker getMarker() { + return marker; + } + + protected void init() { + GenericDraweeHierarchy genericDraweeHierarchy = new GenericDraweeHierarchyBuilder(getResources()) + .setActualImageScaleType(ScalingUtils.ScaleType.FIT_CENTER) + .setFadeDuration(0) + .build(); + imageHolder = DraweeHolder.create(genericDraweeHierarchy, getContext()); + imageHolder.onAttach(); + } + + @TargetApi(21) + public OverlayMarker(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { + super(context, attrs, defStyleAttr, defStyleRes); + } + + @Override + protected void onLayout(boolean changed, int l, int t, int r, int b) { + + } + + public InfoWindow getInfoWindow(LatLng position) { + if (overlayInfoWindow != null) { + return overlayInfoWindow.getInfoWindow(position); + } + if (title != null && title.length() > 0) { + if (titleInfoWindow == null) { + Button button = new Button(getContext()); + button.setVisibility(GONE); + button.setText(title); + titleInfoWindow = new InfoWindow(BitmapDescriptorFactory.fromView(button), position, titleOffsetY, new InfoWindow.OnInfoWindowClickListener() { + @Override + public void onInfoWindowClick() { + + } + }); + } else { + titleInfoWindow.setPosition(position); + } + return titleInfoWindow; + } + return null; + } + + public void setOverlayInfoWindow(OverlayInfoWindow overlayInfoWindow) { + this.overlayInfoWindow = overlayInfoWindow; + } + + public void setIconView(View iconView) { + this.iconView = iconView; + if (marker != null) { + iconBitmapDescriptor = BitmapUtil.createBitmapDescriptor(iconView); + marker.setIcon(iconBitmapDescriptor); + } + } + + public void setAnimateType(String animateType) { + if (animateType == null) { + return; + } + switch (animateType) { + case "drop": + this.animateType = MarkerOptions.MarkerAnimateType.drop; + break; + case "grow": + this.animateType = MarkerOptions.MarkerAnimateType.grow; + break; + case "jump": + this.animateType = MarkerOptions.MarkerAnimateType.jump; + break; + default: + this.animateType = MarkerOptions.MarkerAnimateType.none; + } + if (marker != null) { + marker.setAnimateType(this.animateType.ordinal()); + } + } + + public void setTitle(String title) { + this.title = title; + } + + public void setTitleOffsetY(int titleOffsetY) { + this.titleOffsetY = titleOffsetY; + } + + @Override + public LatLng getPosition() { + return position; + } + + public void setPosition(LatLng position) { + this.position = position; + if (marker != null) { + marker.setPosition(position); + } + } + + public Float getRotate() { + return rotate; + } + + public void setRotate(Float rotate) { + this.rotate = rotate; + if (marker != null) { + marker.setRotate(rotate); + } + } + + public void setFlat(Boolean flat) { + this.flat = flat; + if (marker != null) { + marker.setFlat(flat); + } + } + + public void setPerspective(Boolean perspective) { + this.perspective = perspective; + if (marker != null) { + marker.setPerspective(perspective); + } + } + + public void setIcon(IconInfo iconInfo) { + if (iconInfo.getUri() == null || iconInfo.getUri().length() == 0) { + return; + } + if (BITMAP_DESCRIPTOR_MAP.containsKey(iconInfo.getUri())) { + iconBitmapDescriptor = BITMAP_DESCRIPTOR_MAP.get(iconInfo.getUri()); + return; + } + Log.i("download", iconInfo.getUri()); + this.iconInfo = iconInfo; + String uri = iconInfo.getUri(); + if (uri == null) { + iconBitmapDescriptor = null; + } else if (uri.startsWith("http://") || uri.startsWith("https://") || + uri.startsWith("file://") || uri.startsWith("asset://")) { + loadingImage = true; + ImageRequest imageRequest = ImageRequestBuilder + .newBuilderWithSource(Uri.parse(uri)) + .build(); + ImagePipeline imagePipeline = Fresco.getImagePipeline(); + dataSource = imagePipeline.fetchDecodedImage(imageRequest, this); + DraweeController controller = Fresco.newDraweeControllerBuilder() + .setImageRequest(imageRequest) + .setControllerListener(imageControllerListener) + .setOldController(imageHolder.getController()) + .build(); + imageHolder.setController(controller); + } else { + iconBitmapDescriptor = getBitmapDescriptorByName(uri); + } + } + + @Override + public BitmapDescriptor getBitmapDescriptor() { + BitmapDescriptor result; + if (iconBitmapDescriptor != null) { + result = iconBitmapDescriptor; + } else { + result = BitmapDescriptorFactory.fromResource(R.mipmap.icon_gcoding); + } + if (iconInfo != null + && iconInfo.getWidth() > 0 + && iconInfo.getHeight() > 0) { + result = BitmapDescriptorFactory.fromBitmap(BitmapUtil.resizeBitmap(result.getBitmap(), + iconInfo.getWidth(), iconInfo.getHeight())); + } + return result; + } + + @Override + public void addTopMap(BaiduMap baiduMap) { + if (loadingImage) { + new Thread(() -> { + while (loadingImage) { + try { + Thread.sleep(200); + } catch (InterruptedException e) { + break; + } + } + addOverlay(baiduMap); + }).start(); + } else { + addOverlay(baiduMap); + } + } + + @Override + public void removeFromMap(BaiduMap baiduMap) { + if (marker != null) { + marker.remove(); + marker = null; + overlayInfoWindow = null; + titleInfoWindow = null; + iconView = null; + iconBitmapDescriptor = null; + } + } + + @Override + public boolean equals(Object o) { + if (this == o) return true; + if (o == null || getClass() != o.getClass()) return false; + OverlayMarker that = (OverlayMarker) o; + return position.latitude == that.position.latitude + && position.longitude == that.position.longitude; + } + + @Override + public int hashCode() { + return Objects.hash(position.latitude, position.longitude); + } + + private void addOverlay(BaiduMap baiduMap) { + if (iconView != null) { + iconBitmapDescriptor = BitmapUtil.createBitmapDescriptor(iconView); + } + MarkerOptions option = new MarkerOptions() + .position(position) + .alpha(getAlpha()) + .animateType(animateType) + .icon(getBitmapDescriptor()); + if (rotate != null) { + option.rotate(rotate); + } + if (flat != null) { + option.flat(flat); + } + if (perspective != null) { + option.perspective(perspective); + } + marker = (Marker) baiduMap.addOverlay(option); + } + + private int getDrawableResourceByName(String name) { + return getResources().getIdentifier( + name, + "drawable", + getContext().getPackageName()); + } + + private BitmapDescriptor getBitmapDescriptorByName(String name) { + return BitmapDescriptorFactory.fromResource(getDrawableResourceByName(name)); + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayMarkerIcon.java b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayMarkerIcon.java new file mode 100644 index 00000000..78d7f398 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayMarkerIcon.java @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.view; + +import android.content.Context; +import com.facebook.react.views.view.ReactViewGroup; + +/** + * @author lovebing + * @date 2020-06-07 + */ +public class OverlayMarkerIcon extends ReactViewGroup { + + public OverlayMarkerIcon(Context context) { + super(context); + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayPolygon.java b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayPolygon.java new file mode 100644 index 00000000..17f1239c --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayPolygon.java @@ -0,0 +1,99 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.view; + +import android.annotation.TargetApi; +import android.content.Context; +import android.util.AttributeSet; +import android.view.View; +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.Polygon; +import com.baidu.mapapi.map.PolygonOptions; +import com.baidu.mapapi.map.Stroke; +import com.baidu.mapapi.model.LatLng; + +import java.util.List; + +/** + * @author lovebing Created on Dec 9, 2018 + */ +public class OverlayPolygon extends View implements OverlayView { + + private Polygon polygon; + private List points; + private int fillColor = 0xAAFFFF00; + private Stroke stroke = new Stroke(5, 0xAA00FF00); + + public OverlayPolygon(Context context) { + super(context); + } + + public OverlayPolygon(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public OverlayPolygon(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + } + + @TargetApi(21) + public OverlayPolygon(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { + super(context, attrs, defStyleAttr, defStyleRes); + } + + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + if (polygon != null) { + polygon.setPoints(points); + } + } + + public int getFillColor() { + return fillColor; + } + + public void setFillColor(int fillColor) { + this.fillColor = fillColor; + if (polygon != null) { + polygon.setFillColor(fillColor); + } + } + + public Stroke getStroke() { + return stroke; + } + + public void setStroke(Stroke stroke) { + this.stroke = stroke; + if (polygon != null) { + polygon.setStroke(stroke); + } + } + + @Override + public void addTopMap(BaiduMap baiduMap) { + PolygonOptions options = new PolygonOptions() + .points(points) + .stroke(stroke) + .fillColor(fillColor); + polygon = (Polygon) baiduMap.addOverlay(options); + } + + @Override + public void removeFromMap(BaiduMap baiduMap) { + if (polygon != null) { + polygon.remove(); + polygon = null; + } + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayPolyline.java b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayPolyline.java new file mode 100644 index 00000000..2b267a36 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayPolyline.java @@ -0,0 +1,82 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.view; + +import android.annotation.TargetApi; +import android.content.Context; +import android.util.AttributeSet; +import android.view.View; +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.Polyline; +import com.baidu.mapapi.map.PolylineOptions; +import com.baidu.mapapi.map.Stroke; +import com.baidu.mapapi.model.LatLng; + +import java.util.List; + +/** + * @author lovebing Created on Dec 9, 2018 + */ +public class OverlayPolyline extends View implements OverlayView { + + private List points; + private Polyline polyline; + + private Stroke stroke = new Stroke(1, 0xAAFF0000); + + public OverlayPolyline(Context context) { + super(context); + } + + public OverlayPolyline(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public OverlayPolyline(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + } + + @TargetApi(21) + public OverlayPolyline(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { + super(context, attrs, defStyleAttr, defStyleRes); + } + + public List getPoints() { + return points; + } + + public void setPoints(List points) { + this.points = points; + if (polyline != null) { + polyline.setPoints(points); + } + } + + public void setStroke(Stroke stroke) { + this.stroke = stroke; + if (polyline != null) { + polyline.setColor(stroke.color); + polyline.setWidth(stroke.strokeWidth); + } + } + + @Override + public void addTopMap(BaiduMap baiduMap) { + PolylineOptions options = new PolylineOptions().width(stroke.strokeWidth) + .color(stroke.color).points(points); + polyline = (Polyline) baiduMap.addOverlay(options); + } + + @Override + public void removeFromMap(BaiduMap baiduMap) { + if (polyline != null) { + polyline.remove(); + polyline = null; + } + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayText.java b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayText.java new file mode 100644 index 00000000..340d83d0 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayText.java @@ -0,0 +1,139 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.view; + +import android.annotation.TargetApi; +import android.content.Context; +import android.util.AttributeSet; +import android.view.View; +import com.baidu.mapapi.map.BaiduMap; +import com.baidu.mapapi.map.Text; +import com.baidu.mapapi.map.TextOptions; +import com.baidu.mapapi.model.LatLng; + +public class OverlayText extends View implements OverlayView { + + private LatLng position; + private String text; + private Integer fontSize; + private Integer fontColor; + private Integer bgColor; + private Float rotate; + private Text textOverlay; + + public OverlayText(Context context) { + super(context); + } + + public OverlayText(Context context, AttributeSet attrs) { + super(context, attrs); + } + + public OverlayText(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + } + + @TargetApi(21) + public OverlayText(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) { + super(context, attrs, defStyleAttr, defStyleRes); + } + + public LatLng getPosition() { + return position; + } + + public void setPosition(LatLng position) { + this.position = position; + if (textOverlay != null) { + textOverlay.setPosition(position); + } + } + + public String getText() { + return text; + } + + public void setText(String text) { + this.text = text; + if (textOverlay != null) { + textOverlay.setText(text); + } + } + + public Integer getFontSize() { + return fontSize; + } + + public void setFontSize(Integer fontSize) { + this.fontSize = fontSize; + if (textOverlay != null) { + textOverlay.setFontSize(fontSize); + } + } + + public Integer getFontColor() { + return fontColor; + } + + public void setFontColor(Integer fontColor) { + this.fontColor = fontColor; + if (textOverlay != null) { + textOverlay.setFontColor(fontColor); + } + } + + public Integer getBgColor() { + return bgColor; + } + + public void setBgColor(Integer bgColor) { + this.bgColor = bgColor; + if (textOverlay != null) { + textOverlay.setBgColor(bgColor); + } + } + + public Float getRotate() { + return rotate; + } + + public void setRotate(Float rotate) { + this.rotate = rotate; + if (textOverlay != null) { + textOverlay.setRotate(rotate); + } + } + + @Override + public void addTopMap(BaiduMap baiduMap) { + TextOptions option = new TextOptions() + .text(text) + .position(position); + if (fontSize != null) { + option.fontSize(fontSize); + } + if (fontColor != null) { + option.fontColor(fontColor); + } + if (bgColor != null) { + option.bgColor(bgColor); + } + if (rotate != null) { + option.rotate(rotate); + } + textOverlay = (Text) baiduMap.addOverlay(option); + } + + @Override + public void removeFromMap(BaiduMap baiduMap) { + if (textOverlay != null) { + textOverlay.remove(); + textOverlay = null; + } + } +} diff --git a/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayView.java b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayView.java new file mode 100644 index 00000000..a94637b3 --- /dev/null +++ b/android/src/main/java/org/lovebing/reactnative/baidumap/view/OverlayView.java @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2016-present, lovebing.net. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ + +package org.lovebing.reactnative.baidumap.view; + +import com.baidu.mapapi.map.BaiduMap; + +/** + * @author lovebing Created on Dec 09, 2018 + */ +public interface OverlayView { + + void addTopMap(BaiduMap baiduMap); + void removeFromMap(BaiduMap baiduMap); +} diff --git a/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_base_v4_0_0.so b/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_base_v4_0_0.so deleted file mode 100644 index fb340a72..00000000 Binary files a/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_base_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_base_v6_0_0.so b/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_base_v6_0_0.so new file mode 100644 index 00000000..275df2e8 Binary files /dev/null and b/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_base_v6_0_0.so differ diff --git a/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_cloud_v4_0_0.so b/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_cloud_v4_0_0.so deleted file mode 100644 index 8f5e7c2b..00000000 Binary files a/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_cloud_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_map_v4_0_0.so b/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_map_v4_0_0.so deleted file mode 100644 index dd5fe445..00000000 Binary files a/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_map_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_map_v6_0_0.so b/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_map_v6_0_0.so new file mode 100644 index 00000000..a8df920d Binary files /dev/null and b/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_map_v6_0_0.so differ diff --git a/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_search_v4_0_0.so b/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_search_v4_0_0.so deleted file mode 100644 index a3b4c3d3..00000000 Binary files a/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_search_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_util_v4_0_0.so b/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_util_v4_0_0.so deleted file mode 100644 index cbd96393..00000000 Binary files a/android/src/main/jniLibs/arm64-v8a/libBaiduMapSDK_util_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/arm64-v8a/libindoor.so b/android/src/main/jniLibs/arm64-v8a/libindoor.so new file mode 100644 index 00000000..f8e8ca81 Binary files /dev/null and b/android/src/main/jniLibs/arm64-v8a/libindoor.so differ diff --git a/android/src/main/jniLibs/arm64-v8a/liblocSDK7.so b/android/src/main/jniLibs/arm64-v8a/liblocSDK7.so deleted file mode 100644 index d2fe4fc1..00000000 Binary files a/android/src/main/jniLibs/arm64-v8a/liblocSDK7.so and /dev/null differ diff --git a/android/src/main/jniLibs/arm64-v8a/liblocSDK7b.so b/android/src/main/jniLibs/arm64-v8a/liblocSDK7b.so new file mode 100644 index 00000000..6bab09a2 Binary files /dev/null and b/android/src/main/jniLibs/arm64-v8a/liblocSDK7b.so differ diff --git a/android/src/main/jniLibs/arm64-v8a/liblocSDK8a.so b/android/src/main/jniLibs/arm64-v8a/liblocSDK8a.so new file mode 100644 index 00000000..cd47e164 Binary files /dev/null and b/android/src/main/jniLibs/arm64-v8a/liblocSDK8a.so differ diff --git a/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_base_v4_0_0.so b/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_base_v4_0_0.so deleted file mode 100644 index 0176f201..00000000 Binary files a/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_base_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_base_v6_0_0.so b/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_base_v6_0_0.so new file mode 100644 index 00000000..2685834e Binary files /dev/null and b/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_base_v6_0_0.so differ diff --git a/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_cloud_v4_0_0.so b/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_cloud_v4_0_0.so deleted file mode 100644 index e188cead..00000000 Binary files a/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_cloud_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_map_v4_0_0.so b/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_map_v4_0_0.so deleted file mode 100644 index 449ab139..00000000 Binary files a/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_map_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_map_v6_0_0.so b/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_map_v6_0_0.so new file mode 100644 index 00000000..7abbf314 Binary files /dev/null and b/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_map_v6_0_0.so differ diff --git a/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_search_v4_0_0.so b/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_search_v4_0_0.so deleted file mode 100644 index c82ad9b7..00000000 Binary files a/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_search_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_util_v4_0_0.so b/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_util_v4_0_0.so deleted file mode 100644 index 52f8701e..00000000 Binary files a/android/src/main/jniLibs/armeabi-v7a/libBaiduMapSDK_util_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/armeabi-v7a/libindoor.so b/android/src/main/jniLibs/armeabi-v7a/libindoor.so new file mode 100644 index 00000000..177ad251 Binary files /dev/null and b/android/src/main/jniLibs/armeabi-v7a/libindoor.so differ diff --git a/android/src/main/jniLibs/armeabi-v7a/liblocSDK7.so b/android/src/main/jniLibs/armeabi-v7a/liblocSDK7.so deleted file mode 100644 index b013399f..00000000 Binary files a/android/src/main/jniLibs/armeabi-v7a/liblocSDK7.so and /dev/null differ diff --git a/android/src/main/jniLibs/armeabi-v7a/liblocSDK7b.so b/android/src/main/jniLibs/armeabi-v7a/liblocSDK7b.so new file mode 100644 index 00000000..dd040ea7 Binary files /dev/null and b/android/src/main/jniLibs/armeabi-v7a/liblocSDK7b.so differ diff --git a/android/src/main/jniLibs/armeabi-v7a/liblocSDK8a.so b/android/src/main/jniLibs/armeabi-v7a/liblocSDK8a.so new file mode 100644 index 00000000..0c6e58c5 Binary files /dev/null and b/android/src/main/jniLibs/armeabi-v7a/liblocSDK8a.so differ diff --git a/android/src/main/jniLibs/armeabi/libBaiduMapSDK_base_v4_0_0.so b/android/src/main/jniLibs/armeabi/libBaiduMapSDK_base_v4_0_0.so deleted file mode 100644 index 5761e045..00000000 Binary files a/android/src/main/jniLibs/armeabi/libBaiduMapSDK_base_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/armeabi/libBaiduMapSDK_base_v6_0_0.so b/android/src/main/jniLibs/armeabi/libBaiduMapSDK_base_v6_0_0.so new file mode 100644 index 00000000..77f049ee Binary files /dev/null and b/android/src/main/jniLibs/armeabi/libBaiduMapSDK_base_v6_0_0.so differ diff --git a/android/src/main/jniLibs/armeabi/libBaiduMapSDK_cloud_v4_0_0.so b/android/src/main/jniLibs/armeabi/libBaiduMapSDK_cloud_v4_0_0.so deleted file mode 100644 index b3869258..00000000 Binary files a/android/src/main/jniLibs/armeabi/libBaiduMapSDK_cloud_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/armeabi/libBaiduMapSDK_map_v4_0_0.so b/android/src/main/jniLibs/armeabi/libBaiduMapSDK_map_v4_0_0.so deleted file mode 100644 index eee59ddf..00000000 Binary files a/android/src/main/jniLibs/armeabi/libBaiduMapSDK_map_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/armeabi/libBaiduMapSDK_map_v6_0_0.so b/android/src/main/jniLibs/armeabi/libBaiduMapSDK_map_v6_0_0.so new file mode 100644 index 00000000..d3d829e2 Binary files /dev/null and b/android/src/main/jniLibs/armeabi/libBaiduMapSDK_map_v6_0_0.so differ diff --git a/android/src/main/jniLibs/armeabi/libBaiduMapSDK_search_v4_0_0.so b/android/src/main/jniLibs/armeabi/libBaiduMapSDK_search_v4_0_0.so deleted file mode 100644 index e4a8f7f6..00000000 Binary files a/android/src/main/jniLibs/armeabi/libBaiduMapSDK_search_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/armeabi/libBaiduMapSDK_util_v4_0_0.so b/android/src/main/jniLibs/armeabi/libBaiduMapSDK_util_v4_0_0.so deleted file mode 100644 index 2ff04ccc..00000000 Binary files a/android/src/main/jniLibs/armeabi/libBaiduMapSDK_util_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/armeabi/libindoor.so b/android/src/main/jniLibs/armeabi/libindoor.so new file mode 100644 index 00000000..cd2a5481 Binary files /dev/null and b/android/src/main/jniLibs/armeabi/libindoor.so differ diff --git a/android/src/main/jniLibs/armeabi/liblocSDK7.so b/android/src/main/jniLibs/armeabi/liblocSDK7.so deleted file mode 100644 index ba77dc61..00000000 Binary files a/android/src/main/jniLibs/armeabi/liblocSDK7.so and /dev/null differ diff --git a/android/src/main/jniLibs/armeabi/liblocSDK7b.so b/android/src/main/jniLibs/armeabi/liblocSDK7b.so new file mode 100644 index 00000000..1a9a34ae Binary files /dev/null and b/android/src/main/jniLibs/armeabi/liblocSDK7b.so differ diff --git a/android/src/main/jniLibs/armeabi/liblocSDK8a.so b/android/src/main/jniLibs/armeabi/liblocSDK8a.so new file mode 100644 index 00000000..52869965 Binary files /dev/null and b/android/src/main/jniLibs/armeabi/liblocSDK8a.so differ diff --git a/android/src/main/jniLibs/x86/libBaiduMapSDK_base_v4_0_0.so b/android/src/main/jniLibs/x86/libBaiduMapSDK_base_v4_0_0.so deleted file mode 100644 index 4e700165..00000000 Binary files a/android/src/main/jniLibs/x86/libBaiduMapSDK_base_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/x86/libBaiduMapSDK_base_v6_0_0.so b/android/src/main/jniLibs/x86/libBaiduMapSDK_base_v6_0_0.so new file mode 100644 index 00000000..0f3e2555 Binary files /dev/null and b/android/src/main/jniLibs/x86/libBaiduMapSDK_base_v6_0_0.so differ diff --git a/android/src/main/jniLibs/x86/libBaiduMapSDK_cloud_v4_0_0.so b/android/src/main/jniLibs/x86/libBaiduMapSDK_cloud_v4_0_0.so deleted file mode 100644 index 421a63ed..00000000 Binary files a/android/src/main/jniLibs/x86/libBaiduMapSDK_cloud_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/x86/libBaiduMapSDK_map_v4_0_0.so b/android/src/main/jniLibs/x86/libBaiduMapSDK_map_v4_0_0.so deleted file mode 100644 index 8d336541..00000000 Binary files a/android/src/main/jniLibs/x86/libBaiduMapSDK_map_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/x86/libBaiduMapSDK_map_v6_0_0.so b/android/src/main/jniLibs/x86/libBaiduMapSDK_map_v6_0_0.so new file mode 100644 index 00000000..be7cd258 Binary files /dev/null and b/android/src/main/jniLibs/x86/libBaiduMapSDK_map_v6_0_0.so differ diff --git a/android/src/main/jniLibs/x86/libBaiduMapSDK_search_v4_0_0.so b/android/src/main/jniLibs/x86/libBaiduMapSDK_search_v4_0_0.so deleted file mode 100644 index 2f3c1bf7..00000000 Binary files a/android/src/main/jniLibs/x86/libBaiduMapSDK_search_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/x86/libBaiduMapSDK_util_v4_0_0.so b/android/src/main/jniLibs/x86/libBaiduMapSDK_util_v4_0_0.so deleted file mode 100644 index 7b7c102a..00000000 Binary files a/android/src/main/jniLibs/x86/libBaiduMapSDK_util_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/x86/libindoor.so b/android/src/main/jniLibs/x86/libindoor.so new file mode 100644 index 00000000..14a6348b Binary files /dev/null and b/android/src/main/jniLibs/x86/libindoor.so differ diff --git a/android/src/main/jniLibs/x86/liblocSDK7.so b/android/src/main/jniLibs/x86/liblocSDK7.so deleted file mode 100644 index 42bf4324..00000000 Binary files a/android/src/main/jniLibs/x86/liblocSDK7.so and /dev/null differ diff --git a/android/src/main/jniLibs/x86/liblocSDK7b.so b/android/src/main/jniLibs/x86/liblocSDK7b.so new file mode 100644 index 00000000..f25b6e94 Binary files /dev/null and b/android/src/main/jniLibs/x86/liblocSDK7b.so differ diff --git a/android/src/main/jniLibs/x86/liblocSDK8a.so b/android/src/main/jniLibs/x86/liblocSDK8a.so new file mode 100644 index 00000000..cc244659 Binary files /dev/null and b/android/src/main/jniLibs/x86/liblocSDK8a.so differ diff --git a/android/src/main/jniLibs/x86_64/libBaiduMapSDK_base_v4_0_0.so b/android/src/main/jniLibs/x86_64/libBaiduMapSDK_base_v4_0_0.so deleted file mode 100644 index 4ab81a4b..00000000 Binary files a/android/src/main/jniLibs/x86_64/libBaiduMapSDK_base_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/x86_64/libBaiduMapSDK_base_v6_0_0.so b/android/src/main/jniLibs/x86_64/libBaiduMapSDK_base_v6_0_0.so new file mode 100644 index 00000000..ca005512 Binary files /dev/null and b/android/src/main/jniLibs/x86_64/libBaiduMapSDK_base_v6_0_0.so differ diff --git a/android/src/main/jniLibs/x86_64/libBaiduMapSDK_cloud_v4_0_0.so b/android/src/main/jniLibs/x86_64/libBaiduMapSDK_cloud_v4_0_0.so deleted file mode 100644 index 3ba6390e..00000000 Binary files a/android/src/main/jniLibs/x86_64/libBaiduMapSDK_cloud_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/x86_64/libBaiduMapSDK_map_v4_0_0.so b/android/src/main/jniLibs/x86_64/libBaiduMapSDK_map_v4_0_0.so deleted file mode 100644 index 587a3035..00000000 Binary files a/android/src/main/jniLibs/x86_64/libBaiduMapSDK_map_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/x86_64/libBaiduMapSDK_map_v6_0_0.so b/android/src/main/jniLibs/x86_64/libBaiduMapSDK_map_v6_0_0.so new file mode 100644 index 00000000..fa166ef4 Binary files /dev/null and b/android/src/main/jniLibs/x86_64/libBaiduMapSDK_map_v6_0_0.so differ diff --git a/android/src/main/jniLibs/x86_64/libBaiduMapSDK_search_v4_0_0.so b/android/src/main/jniLibs/x86_64/libBaiduMapSDK_search_v4_0_0.so deleted file mode 100644 index 41e1335f..00000000 Binary files a/android/src/main/jniLibs/x86_64/libBaiduMapSDK_search_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/x86_64/libBaiduMapSDK_util_v4_0_0.so b/android/src/main/jniLibs/x86_64/libBaiduMapSDK_util_v4_0_0.so deleted file mode 100644 index d7f7de62..00000000 Binary files a/android/src/main/jniLibs/x86_64/libBaiduMapSDK_util_v4_0_0.so and /dev/null differ diff --git a/android/src/main/jniLibs/x86_64/libindoor.so b/android/src/main/jniLibs/x86_64/libindoor.so new file mode 100644 index 00000000..6c0e05ee Binary files /dev/null and b/android/src/main/jniLibs/x86_64/libindoor.so differ diff --git a/android/src/main/jniLibs/x86_64/liblocSDK7.so b/android/src/main/jniLibs/x86_64/liblocSDK7.so deleted file mode 100644 index 772b274a..00000000 Binary files a/android/src/main/jniLibs/x86_64/liblocSDK7.so and /dev/null differ diff --git a/android/src/main/jniLibs/x86_64/liblocSDK7b.so b/android/src/main/jniLibs/x86_64/liblocSDK7b.so new file mode 100644 index 00000000..4fda0cd8 Binary files /dev/null and b/android/src/main/jniLibs/x86_64/liblocSDK7b.so differ diff --git a/android/src/main/jniLibs/x86_64/liblocSDK8a.so b/android/src/main/jniLibs/x86_64/liblocSDK8a.so new file mode 100644 index 00000000..b66eb9a5 Binary files /dev/null and b/android/src/main/jniLibs/x86_64/liblocSDK8a.so differ diff --git a/android/src/main/res/anim/pop_hide.xml b/android/src/main/res/anim/pop_hide.xml new file mode 100644 index 00000000..b2250802 --- /dev/null +++ b/android/src/main/res/anim/pop_hide.xml @@ -0,0 +1,12 @@ + + + + + + diff --git a/android/src/main/res/anim/pop_show.xml b/android/src/main/res/anim/pop_show.xml new file mode 100644 index 00000000..b2250802 --- /dev/null +++ b/android/src/main/res/anim/pop_show.xml @@ -0,0 +1,12 @@ + + + + + + diff --git a/android/src/main/res/layout/layout_marker.xml b/android/src/main/res/layout/layout_marker.xml new file mode 100644 index 00000000..f9504c9a --- /dev/null +++ b/android/src/main/res/layout/layout_marker.xml @@ -0,0 +1,6 @@ + + + + diff --git a/android/src/main/res/layout/text_bubble.xml b/android/src/main/res/layout/text_bubble.xml new file mode 100755 index 00000000..b3ab45e2 --- /dev/null +++ b/android/src/main/res/layout/text_bubble.xml @@ -0,0 +1,26 @@ + + + + + + + + + + \ No newline at end of file diff --git a/android/src/main/res/values/styles.xml b/android/src/main/res/values/styles.xml new file mode 100755 index 00000000..8449b9a7 --- /dev/null +++ b/android/src/main/res/values/styles.xml @@ -0,0 +1,21 @@ + + + + + + + + + diff --git a/demo/BaiduMapDemo.js b/demo/BaiduMapDemo.js deleted file mode 100644 index 81d03f2a..00000000 --- a/demo/BaiduMapDemo.js +++ /dev/null @@ -1,163 +0,0 @@ -/** - * @author lovebing - */ - -import React, { - Component, - PropTypes -} from 'react'; - -import { - MapView, - MapTypes, - Geolocation -} from 'react-native-baidu-map'; - -import { - Button, - AppRegistry, - StyleSheet, - Text, - View, - TouchableHighlight -} from 'react-native'; - -import Dimensions from 'Dimensions'; - -export default class BaiduMapDemo extends Component { - - constructor() { - super(); - - this.state = { - mayType: MapTypes.NORMAL, - zoom: 15, - center: { - longitude: 113.981718, - latitude: 22.542449 - }, - trafficEnabled: false, - baiduHeatMapEnabled: false, - markers: [{ - longitude: 113.981718, - latitude: 22.542449, - title: "Window of the world" - },{ - longitude: 113.995516, - latitude: 22.537642, - title: "" - }] - }; - } - - componentDidMount() { - } - - render() { - return ( - - { - console.warn(JSON.stringify(e)); - }} - onMapClick={(e) => { - }} - > - - - -