We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
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);
The text was updated successfully, but these errors were encountered:
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?
Sorry, something went wrong.
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?
No branches or pull requests
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);
The text was updated successfully, but these errors were encountered: