simplezhli / Flutter_2d_amap
Licence: apache-2.0
Flutter 高德2D地图插件(支持Android、iOS、Web)
Stars: ✭ 102
Programming Languages
dart
5743 projects
Projects that are alternatives of or similar to Flutter 2d amap
Wac
UE4 Visualization Plugin - Windows Audio Capture (WAC) is an Unreal Engine 4 plugin that captures live audio from the windows default audio device and analyse it to frequency values.
Stars: ✭ 81 (-20.59%)
Mutual labels: plugins
Supybot Plugins
Collection of plugins for Supybot/Limnoria I wrote or forked.
Stars: ✭ 96 (-5.88%)
Mutual labels: plugins
Betterdiscordapp
Better Discord App enhances Discord desktop app with new features.
Stars: ✭ 1,225 (+1100.98%)
Mutual labels: plugins
Awesome Vuetify
🎉 The best resources related to Vuetify
Stars: ✭ 1,189 (+1065.69%)
Mutual labels: plugins
Mapbox Plugins
Customized Mapbox 🌏 plugins, including game 🎮 control, canvasOverlayer , scene animation. using ES6
Stars: ✭ 99 (-2.94%)
Mutual labels: plugins
Packages
The default package source of the Zeek Package Manager
Stars: ✭ 94 (-7.84%)
Mutual labels: plugins
Betterdiscord Plugins
Assorted small plugins for BetterDiscord
Stars: ✭ 79 (-22.55%)
Mutual labels: plugins
Dush
👏 Microscopic & functional event emitter in ~350 bytes, extensible through plugins.
Stars: ✭ 87 (-14.71%)
Mutual labels: plugins
Wishlist
A public catalogue of Lua plugins Neovim users would like to see exist
Stars: ✭ 74 (-27.45%)
Mutual labels: plugins
Skeleton
A ready-to-use CodeIgniter skeleton with tons of new features and a whole new concept of hooks (actions and filters) as well as a ready-to-use and application-free themes and plugins system. Facebook Page: http://bit.ly/2oHzpxC | Facebook Group: http://bit.ly/2o3KOrA. Help me carry on making more free stuff → http://bit.ly/2ppNujE ←
Stars: ✭ 74 (-27.45%)
Mutual labels: plugins
Ofbiz Plugins
Apache OFBiz is an open source product for the automation of enterprise processes. It includes framework components and business applications for ERP, CRM, E-Business/E-Commerce, Supply Chain Management and Manufacturing Resource Planning. OFBiz provides a foundation and starting point for reliable, secure and scalable enterprise solutions.
Stars: ✭ 83 (-18.63%)
Mutual labels: plugins
flutter_2d_amap
本插件主要服务于 flutter_deer。仅保持现有功能,需要的功能可自行拓展。
高德2D地图插件(已支持1.12版本新的android插件api)
效果展示
实现功能包括
- 支持Android、iOS、Web(玩玩Flutter Web —— 实现高德地图插件)
- 处理地图所需权限申请
- 定位并自动移动地图至当前位置
- 默认获取POI数据并返回
- 支持传入经纬度来移动地图
- 支持搜索POI
已知问题
使用方式
flutter_2d_amap:
git:
url: https://github.com/simplezhli/flutter_2d_amap.git
import 'package:flutter_2d_amap/flutter_2d_amap.dart';
AMap2DView(
onPoiSearched: (result) {
},
onAMap2DViewCreated: (controller) {
},
)
Android
AndroidManifest.xml 中添加:
<meta-data
android:name="com.amap.api.v2.apikey"
android:value="配置你的key"/>
如果你的targetSdkVersion
为27以上,则需要做以下配置来支持http明文请求(具体可以看demo),否则会导致地图加载不出:
AndroidManifest.xml 中添加:
<application
android:networkSecurityConfig="@xml/network_security_config"
/>
在 res 下新增一个 xml 目录,然后创建一个名为:network_security_config.xml
文件:
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true" />
</network-security-config>
iOS
使用前设置key:
Flutter2dAMap.setApiKey("配置你的key");
在info.plist中增加:
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>地图功能需要您的定位服务,否则无法使用,如果您需要使用后台定位功能请选择“始终允许”。</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>地图功能需要您的定位服务,否则无法使用。</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>地图功能需要您的定位服务,否则无法使用。</string>
<key>io.flutter.embedded_views_preview</key>
<true/>
Web
index.html
中添加(在main.dart.js
之前):
<script src="https://webapi.amap.com/loader.js"></script>
使用AMap2DView
时添加 webKey
:
AMap2DView(
webKey: 'xxx',
)
License
Copyright 2019 simplezhli
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].