screenToLocation method
- required Offset screen,
Converts screen coordinates relative to the upper-left corner of the map view to a location in map coordinates.
To call this method, assign a map to the map view, ensure that it is loaded and the draw status is DrawStatus.completed.
Parameters:
screen
— The screen coordinate, in pixels.
Return Value: A point object. Null is returned if the map view's spatial reference is not yet known, for example, before the viewed map is loaded.
Implementation
ArcGISPoint? screenToLocation({
required Offset screen,
}) {
final coreScreen = screen.toArcGIS();
final objectHandle = _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_MapView_screenToLocation(
_handle,
coreScreen.ref,
errorHandler,
);
});
return ArcGISPoint._fromHandle(
objectHandle,
);
}