AppStudio Desktop Standard License. Quick Report app.
Is there a way to prevent the user from being able to refine the map location?
Solved! Go to Solution.
Hey Kristen,
You can use the following code within MapView component to disable the mouse panning completely on RefineLocationPage. But you need to remember that if the position source is unable to provide end user a good location because of network or gps issues then they cannot be able to pin point the exact location. Basically you will get location totally based on how good the device can fetch the current location.
onMousePositionChanged: {
mouse.accepted = true;
return;
}
Something like this
MapView{
id: mapView
Layout.preferredWidth: isFullMap? parent.width:(parent.width - 20 *app.scaleFactor)
Layout.fillHeight: true
Layout.maximumWidth: isFullMap? Number.POSITIVE_INFINITY: 600 * app.scaleFactor
anchors.horizontalCenter: parent.horizontalCenter
property real initialMapRotation: 0
rotationByPinchingEnabled: true
zoomByPinchingEnabled: true
wrapAroundMode: Enums.WrapAroundModeEnabledWhenSupported
onMousePositionChanged: {
mouse.accepted = true;
return;
}
backgrou.....
// More code below
Nakul
Hi Kristen,
Please could you explain what do you mean by refining the map location and why you intend to prevent it?
Thanks
In the Quick Report template, in the RefineLocationPage.qml, I am wondering if there is a way to prevent the user from being able to refine the location (aka move the point from the current location). This would be to prevent users from filing a report in a location that they are not physically located at.
Thanks for providing additional details Kristen. I will do some research and let you know if could figure this out.
Hey Kristen,
You can use the following code within MapView component to disable the mouse panning completely on RefineLocationPage. But you need to remember that if the position source is unable to provide end user a good location because of network or gps issues then they cannot be able to pin point the exact location. Basically you will get location totally based on how good the device can fetch the current location.
onMousePositionChanged: {
mouse.accepted = true;
return;
}
Something like this
MapView{
id: mapView
Layout.preferredWidth: isFullMap? parent.width:(parent.width - 20 *app.scaleFactor)
Layout.fillHeight: true
Layout.maximumWidth: isFullMap? Number.POSITIVE_INFINITY: 600 * app.scaleFactor
anchors.horizontalCenter: parent.horizontalCenter
property real initialMapRotation: 0
rotationByPinchingEnabled: true
zoomByPinchingEnabled: true
wrapAroundMode: Enums.WrapAroundModeEnabledWhenSupported
onMousePositionChanged: {
mouse.accepted = true;
return;
}
backgrou.....
// More code below
Nakul