namespace
This commit is contained in:
parent
0a6e9c7119
commit
8dac5bc3b1
|
@ -22,6 +22,9 @@ rootProject.allprojects {
|
||||||
apply plugin: 'com.android.library'
|
apply plugin: 'com.android.library'
|
||||||
|
|
||||||
android {
|
android {
|
||||||
|
if (project.android.hasProperty("namespace")) {
|
||||||
|
namespace = "com.amap.flutter.map"
|
||||||
|
}
|
||||||
compileSdkVersion 34
|
compileSdkVersion 34
|
||||||
|
|
||||||
defaultConfig {
|
defaultConfig {
|
||||||
|
@ -33,7 +36,8 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.amap.api:3dmap-location-search:10.0.800_loc6.4.5_sea9.7.2'
|
// implementation 'com.amap.api:3dmap-location-search:10.0.800_loc6.4.5_sea9.7.2'
|
||||||
|
implementation 'com.amap.api:navi-3dmap:latest.integration'
|
||||||
implementation 'androidx.annotation:annotation:1.8.1'
|
implementation 'androidx.annotation:annotation:1.8.1'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,12 @@
|
||||||
package com.amap.flutter.map.overlays.marker;
|
package com.amap.flutter.map.overlays.marker;
|
||||||
|
|
||||||
|
import android.graphics.Color;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
|
|
||||||
import androidx.annotation.NonNull;
|
import androidx.annotation.NonNull;
|
||||||
|
|
||||||
import com.amap.api.maps.AMap;
|
import com.amap.api.maps.AMap;
|
||||||
import com.amap.api.maps.model.LatLng;
|
import com.amap.api.maps.model.*;
|
||||||
import com.amap.api.maps.model.Marker;
|
|
||||||
import com.amap.api.maps.model.MarkerOptions;
|
|
||||||
import com.amap.api.maps.model.Poi;
|
|
||||||
import com.amap.flutter.map.MyMethodCallHandler;
|
import com.amap.flutter.map.MyMethodCallHandler;
|
||||||
import com.amap.flutter.map.overlays.AbstractOverlayController;
|
import com.amap.flutter.map.overlays.AbstractOverlayController;
|
||||||
import com.amap.flutter.map.utils.Const;
|
import com.amap.flutter.map.utils.Const;
|
||||||
|
|
|
@ -7,6 +7,52 @@ import 'package:amap_map_example/routes.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:permission_handler/permission_handler.dart';
|
import 'package:permission_handler/permission_handler.dart';
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
runApp(MaterialApp(
|
||||||
|
themeMode: ThemeMode.light,
|
||||||
|
onGenerateRoute: RouteConfig.onGenerateRoute,
|
||||||
|
home: AMapDemo()));
|
||||||
|
}
|
||||||
|
|
||||||
|
enum DemoCategory {
|
||||||
|
basic,
|
||||||
|
interactive,
|
||||||
|
overlay,
|
||||||
|
extension;
|
||||||
|
|
||||||
|
String toDisplayTitle() {
|
||||||
|
switch (this) {
|
||||||
|
case basic:
|
||||||
|
return '创建地图';
|
||||||
|
case interactive:
|
||||||
|
return '与地图交互';
|
||||||
|
case overlay:
|
||||||
|
return '在地图上绘制';
|
||||||
|
case extension:
|
||||||
|
return '拓展插件';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Demo {
|
||||||
|
const Demo({
|
||||||
|
required this.title,
|
||||||
|
required this.category,
|
||||||
|
required this.subtitle,
|
||||||
|
// Parameters below are required for non-study demos.
|
||||||
|
this.slug,
|
||||||
|
this.configurations = const [],
|
||||||
|
}) : assert(slug != null);
|
||||||
|
|
||||||
|
final String title;
|
||||||
|
final DemoCategory category;
|
||||||
|
final String subtitle;
|
||||||
|
final String? slug;
|
||||||
|
final List<DemoConfiguration> configurations;
|
||||||
|
|
||||||
|
String get describe => '$slug@${category.name}';
|
||||||
|
}
|
||||||
|
|
||||||
final List<Permission> needPermissionList = [
|
final List<Permission> needPermissionList = [
|
||||||
Permission.location,
|
Permission.location,
|
||||||
Permission.storage,
|
Permission.storage,
|
||||||
|
@ -92,48 +138,4 @@ class _AMapDemoState extends State<AMapDemo>
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void main() {
|
|
||||||
runApp(MaterialApp(
|
|
||||||
themeMode: ThemeMode.light,
|
|
||||||
onGenerateRoute: RouteConfig.onGenerateRoute,
|
|
||||||
home: AMapDemo()));
|
|
||||||
}
|
|
||||||
|
|
||||||
enum DemoCategory {
|
|
||||||
basic,
|
|
||||||
interactive,
|
|
||||||
overlay,
|
|
||||||
extension;
|
|
||||||
|
|
||||||
String toDisplayTitle() {
|
|
||||||
switch (this) {
|
|
||||||
case basic:
|
|
||||||
return '创建地图';
|
|
||||||
case interactive:
|
|
||||||
return '与地图交互';
|
|
||||||
case overlay:
|
|
||||||
return '在地图上绘制';
|
|
||||||
case extension:
|
|
||||||
return '拓展插件';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class Demo {
|
|
||||||
const Demo({
|
|
||||||
required this.title,
|
|
||||||
required this.category,
|
|
||||||
required this.subtitle,
|
|
||||||
// Parameters below are required for non-study demos.
|
|
||||||
this.slug,
|
|
||||||
this.configurations = const [],
|
|
||||||
}) : assert(slug != null);
|
|
||||||
|
|
||||||
final String title;
|
|
||||||
final DemoCategory category;
|
|
||||||
final String subtitle;
|
|
||||||
final String? slug;
|
|
||||||
final List<DemoConfiguration> configurations;
|
|
||||||
|
|
||||||
String get describe => '$slug@${category.name}';
|
|
||||||
}
|
|
||||||
|
|
|
@ -85,7 +85,6 @@ class _State extends State<MarkerConfigDemoPage> {
|
||||||
onDragEnd: (markerId, endPosition) =>
|
onDragEnd: (markerId, endPosition) =>
|
||||||
_onMarkerDragEnd(markerId, endPosition),
|
_onMarkerDragEnd(markerId, endPosition),
|
||||||
);
|
);
|
||||||
|
|
||||||
setState(() {
|
setState(() {
|
||||||
_markers[marker.id] = marker;
|
_markers[marker.id] = marker;
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue