ankiimation / flutter_map_animated_marker Goto Github PK
View Code? Open in Web Editor NEWAnimated Marker for flutter_map
License: BSD 3-Clause "New" or "Revised" License
Animated Marker for flutter_map
License: BSD 3-Clause "New" or "Revised" License
hi sir.
I need your package but this is not supported by flutter map version 3.0.0.
can you solve it?
thanks.
Because flutter_map_animated_marker >=0.0.4 depends on flutter_map ^2.2.0 and wefinder depends on flutter_map ^3.0.0, flutter_map_animated_marker >=0.0.4 is
forbidden.
So, because wefinder depends on flutter_map_animated_marker ^0.0.4, version solving failed.
Hey hi!
beautiful library, absolutely what i have been looking for, I have done something similar where i animate the markers, and then came across this,
What I do is get the begining and end of the start and end point of coordinates and then get intermediate points using maths and then update them with certain time interval such that it appears it is moving seamlessly and it isn't like a blip or sth.
but you have done it better, I want to follow your lead and implement it in my app.
However i am having some difficulty following your example.
This is what i want to do , get the location updates from firebase using geofire and them update them on my flutter app
void initializeGeoFireListener() async {
final driverLocation =
FirebaseDatabase.instance.ref().child("availableDrivers").path;
try {
});
Geofire.queryAtLocation(position.latitude, position.longitude, 50)!
.listen((map) {
var callBack = map['callBack'];
switch (callBack) {
case Geofire.onKeyEntered:
updateDrivers.updateAvailableDriversOnMap();
// update_drivers();
}
break;
case Geofire.onKeyExited:
updateDrivers.updateAvailableDriversOnMap();
break;
case Geofire.onKeyMoved:
updateDrivers.updateAvailableDriversOnMap();
break;
case Geofire.onGeoQueryReady:
print("Geofire onQueryReady");
GeoFireAssistant.printDriversList();
break;
}
} else {
print("Drivers Null");
}
}).onError((error) {
print("Drivers error $error");
});
} on PlatformException {
print("Drivers : No platformException response");
}
}
}
After i get them from the server i update them like this
class UpdateDrivers {
BuildContext context;
MapController osmController;
bool removeDriverIcon;
String? removeDriverKey;
double? driverLon;
String? driverKey;
double? driverLat;
static const double twoPi = 2 * pi;
UpdateDrivers({
required this.context,
required this.osmController,
required this.removeDriverIcon,
this.driverKey,
this.driverLat,
this.driverLon,
this.removeDriverKey,
// required this.z,
});
void updateAvailableDriversOnMap() async {
if (removeDriverIcon) {
//removes the car when the driver goes offline
await osmController.setStaticPosition([], removeDriverKey!);
removeDriverIcon = false;
removeDriverKey = null;
} else {
List<List<double>> intermediatePoints = await addIntermediatePoints(
bearingLat!, bearingLon!, driverLat!, driverLon!, 50);
await osmController.setMarkerOfStaticPoint(
id: driverKey!,
markerIcon: MarkerIcon(
assetMarker: AssetMarker(
image: AssetImage("images/images/car-ios.png"), // 51x 77
// scaleAssetImage: (Platform.isIOS) ? 1.5 : null),
)));
for (int i = 1; i < intermediatePoints.length - 1; i++) {
await Future.delayed(Duration(milliseconds: 50));
List<double> point = intermediatePoints[i];
double y = await AssistantMethods.getHeading(
point[0],
point[1],
driverLat!,
driverLon!,
);
await osmController.setStaticPosition([
GeoPointWithOrientation(
latitude: point[0], longitude: point[1], angle: y)
], driverKey!);
}
intermediatePoints = [];
bearingLat = driverLat; //driver.latitude!;
bearingLon = driverLon;
}
}
In the above class
i call this
await osmController.setMarkerOfStaticPoint(id.. markerIcon)
to add markers on my map with their specific id as I have multiple markers, Vehicles as markers in my case. The question is how do i do something like this with your package.
Sorry for the long post, i did try but you could help out. that would be great.
Because flutter_map_animated_marker 1.0.1 depends on flutter_map ^3.0.0 and no versions of flutter_map_animated_marker match >1.0.1 <2.0.0, flutter_map_animated_marker ^1.0.1 requires flutter_map ^3.0.0.
So, because egsa_map depends on both flutter_map ^5.0.0 and flutter_map_animated_marker ^1.0.1, version solving failed.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.