How do I adjust the zoom extent of the 'Home' button?
I would like to zoom to the initial extent of my operational layers rather than a global view.
Thanks,
PW
Solved! Go to Solution.
Hello Patrick,
The home extent for the Zoom Buttons needs to be a defined envelope. For example, include your home extent envelope in your app qml like this:
Envelope {
id: mapHomeExtent
xMin: -9908547
yMin: -5120850
xMax: 10128960
yMax: 14916657
}
Then, declare the home extent inside the Zoom Buttons like this:
ZoomButtons {
homeExtent: mapHomeExtent
}
Hope this helps!
- Hannah
Hello Patrick,
The home extent for the Zoom Buttons needs to be a defined envelope. For example, include your home extent envelope in your app qml like this:
Envelope {
id: mapHomeExtent
xMin: -9908547
yMin: -5120850
xMax: 10128960
yMax: 14916657
}
Then, declare the home extent inside the Zoom Buttons like this:
ZoomButtons {
homeExtent: mapHomeExtent
}
Hope this helps!
- Hannah