release 1.0.3

This commit is contained in:
Kuloud
2024-01-03 17:12:29 +08:00
parent 6f49fc9228
commit 68178f96e3
24 changed files with 596 additions and 29 deletions

View File

@ -1,4 +1,16 @@
// import 'package:amap_map_extensions/amap_map_extensions.dart';
// Copyright 2023-2024 kuloud
// Copyright 2020 lbs.amap.com
// 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,
import 'package:amap_map_extensions/amap_map_extensions.dart';
import 'package:flutter/material.dart';
import 'dart:typed_data';
@ -12,7 +24,7 @@ class MapWithExtensionPage extends StatefulWidget {
class _MapWithExtensionPageState extends State<MapWithExtensionPage> {
List<Widget> _approvalNumberWidget = <Widget>[];
// final _extension = AmapMapExtensions();
final _extension = AmapMapExtensions();
@override
Widget build(BuildContext context) {

View File

@ -23,7 +23,19 @@ class _State extends State<MarkerConfigDemoPage> {
BitmapDescriptor? _markerIcon;
String? selectedMarkerId;
void _onMapCreated(AMapController controller) {}
Future<void> _onMapCreated(AMapController controller) async {
LatLng latLng = LatLng(mapCenter.latitude + sin(pi / 12.0) / 20.0,
mapCenter.longitude + cos(pi / 12.0) / 20.0);
try {
print('-latLng---------${latLng}');
ScreenCoordinate coordinate = await controller.toScreenCoordinate(latLng);
print('-coordinate---------${coordinate}');
LatLng reLatLng = await controller.fromScreenCoordinate(coordinate);
print('-reLatLng---------${reLatLng}');
} catch (e) {
print(e.toString());
}
}
///通过BitmapDescriptor.fromAssetImage的方式获取图片
Future<void> _createMarkerImageFromAsset(BuildContext context) async {