Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compasse is not displaying on the map #1427

Open
nik2001-app opened this issue Oct 4, 2024 · 3 comments
Open

Compasse is not displaying on the map #1427

nik2001-app opened this issue Oct 4, 2024 · 3 comments
Labels

Comments

@nik2001-app
Copy link

I am using version 0.16.0
This is the my MapboxMap config:

final MapboxMap mapboxMap = MapboxMap(
accessToken:
MyApp.ACCESS_TOKEN,
onMapCreated: onMapCreated,
initialCameraPosition: _kInitialPosition,
trackCameraPosition: true,
compassEnabled: _compassEnabled,
compassViewPosition: CompassViewPosition.TopRight,
cameraTargetBounds: _cameraTargetBounds,
minMaxZoomPreference: _minMaxZoomPreference,
styleString: _styleStrings[_styleStringIndex],
rotateGesturesEnabled: _rotateGesturesEnabled,
scrollGesturesEnabled: _scrollGesturesEnabled,
tiltGesturesEnabled: _tiltGesturesEnabled,
zoomGesturesEnabled: _zoomGesturesEnabled,
doubleClickZoomEnabled: _doubleClickToZoomEnabled,
myLocationEnabled: _myLocationEnabled,
myLocationTrackingMode: _myLocationTrackingMode,
myLocationRenderMode: MyLocationRenderMode.GPS,
onMapClick: (point, latLng) async {
print(
"Map click: ${point.x},${point.y} ${latLng.latitude}/${latLng.longitude}");
print("Filter $_featureQueryFilter");
List features = await mapController!
.queryRenderedFeatures(point, ["landuse"], _featureQueryFilter);
print('# features: ${features.length}');
_clearFill();
if (features.isEmpty && _featureQueryFilter != null) {
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(
content: Text('QueryRenderedFeatures: No features found!')));
} else if (features.isNotEmpty) {
_drawFill(features);
}
},
onMapLongClick: (point, latLng) async {
print(
"Map long press: ${point.x},${point.y} ${latLng.latitude}/${latLng.longitude}");
Point converted point = await mapController!.toScreenLocation(latLng);
LatLng convertedLatLng = await mapController!.toLatLng(point);
print(
"Map long press converted: ${convertedPoint.x},${convertedPoint.y} ${convertedLatLng.latitude}/${convertedLatLng.longitude}");
double metersPerPixel =
await mapController!.getMetersPerPixelAtLatitude(latLng.latitude);

@aardrop
Copy link
Contributor

aardrop commented Oct 14, 2024

I recommend pulling from the GitHub master branch, 0.16.0 is missing many of the bugs that have been fixed in the last couple of years.

 mapbox_gl:
    git:
      url: https://github.com/flutter-mapbox-gl/maps
      ref: master

Are you able to see the compass on the example project?

@nik2001-app
Copy link
Author

I recommend pulling from the GitHub master branch, 0.16.0 is missing many of the bugs that have been fixed in the last couple of years.

 mapbox_gl:
    git:
      url: https://github.com/flutter-mapbox-gl/maps
      ref: master

Are you able to see the compass on the example project?

  • not see any example project.

Copy link

stale bot commented Dec 14, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants