release 1.0.3
This commit is contained in:
@ -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) {
|
||||
|
@ -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 {
|
||||
|
Reference in New Issue
Block a user