Why QDeclarativeGeoMap::visibleRegion is non-NOTIFYable in QtLocation Map?
up vote
1
down vote
favorite
I'm using QtLocation QML Map to display a big amount of items on a map. As with the number of items visible on the map the performance decreases, i would like to set visible only the items actually visible on the viewport. For this it would be handy to just calculate the visibility based on whether the item's coordinate is within the viewport, like:
visible: mapBase.visibleRegion.contains(model.item.coordinate)
But unfortunately the visibleRegion property is non-NOTIFYable, as stated in the documentation at http://doc.qt.io/qt-5/qml-qtlocation-map.html#visibleRegion-prop.
Is there any specific reason (like performance-issues) to not implement a notify signal for this property? Is there any way to workaround this, and set the visibility of a map item based on whether it's within the viewport?
qt qml qtlocation
add a comment |
up vote
1
down vote
favorite
I'm using QtLocation QML Map to display a big amount of items on a map. As with the number of items visible on the map the performance decreases, i would like to set visible only the items actually visible on the viewport. For this it would be handy to just calculate the visibility based on whether the item's coordinate is within the viewport, like:
visible: mapBase.visibleRegion.contains(model.item.coordinate)
But unfortunately the visibleRegion property is non-NOTIFYable, as stated in the documentation at http://doc.qt.io/qt-5/qml-qtlocation-map.html#visibleRegion-prop.
Is there any specific reason (like performance-issues) to not implement a notify signal for this property? Is there any way to workaround this, and set the visibility of a map item based on whether it's within the viewport?
qt qml qtlocation
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm using QtLocation QML Map to display a big amount of items on a map. As with the number of items visible on the map the performance decreases, i would like to set visible only the items actually visible on the viewport. For this it would be handy to just calculate the visibility based on whether the item's coordinate is within the viewport, like:
visible: mapBase.visibleRegion.contains(model.item.coordinate)
But unfortunately the visibleRegion property is non-NOTIFYable, as stated in the documentation at http://doc.qt.io/qt-5/qml-qtlocation-map.html#visibleRegion-prop.
Is there any specific reason (like performance-issues) to not implement a notify signal for this property? Is there any way to workaround this, and set the visibility of a map item based on whether it's within the viewport?
qt qml qtlocation
I'm using QtLocation QML Map to display a big amount of items on a map. As with the number of items visible on the map the performance decreases, i would like to set visible only the items actually visible on the viewport. For this it would be handy to just calculate the visibility based on whether the item's coordinate is within the viewport, like:
visible: mapBase.visibleRegion.contains(model.item.coordinate)
But unfortunately the visibleRegion property is non-NOTIFYable, as stated in the documentation at http://doc.qt.io/qt-5/qml-qtlocation-map.html#visibleRegion-prop.
Is there any specific reason (like performance-issues) to not implement a notify signal for this property? Is there any way to workaround this, and set the visibility of a map item based on whether it's within the viewport?
qt qml qtlocation
qt qml qtlocation
asked Nov 21 at 13:07
zgyarmati
30729
30729
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
up vote
0
down vote
I suppose the reason could be that it's expensive to calculate.
But visibleRegion changes when one of the following properties change: zoomLevel, center, bearing, tilt, fieldOfView. You could, for example, define your own "property var visRegion", and update it when reacting on those properties above by fetching visibleRegion and assigning it to visRegion.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
I suppose the reason could be that it's expensive to calculate.
But visibleRegion changes when one of the following properties change: zoomLevel, center, bearing, tilt, fieldOfView. You could, for example, define your own "property var visRegion", and update it when reacting on those properties above by fetching visibleRegion and assigning it to visRegion.
add a comment |
up vote
0
down vote
I suppose the reason could be that it's expensive to calculate.
But visibleRegion changes when one of the following properties change: zoomLevel, center, bearing, tilt, fieldOfView. You could, for example, define your own "property var visRegion", and update it when reacting on those properties above by fetching visibleRegion and assigning it to visRegion.
add a comment |
up vote
0
down vote
up vote
0
down vote
I suppose the reason could be that it's expensive to calculate.
But visibleRegion changes when one of the following properties change: zoomLevel, center, bearing, tilt, fieldOfView. You could, for example, define your own "property var visRegion", and update it when reacting on those properties above by fetching visibleRegion and assigning it to visRegion.
I suppose the reason could be that it's expensive to calculate.
But visibleRegion changes when one of the following properties change: zoomLevel, center, bearing, tilt, fieldOfView. You could, for example, define your own "property var visRegion", and update it when reacting on those properties above by fetching visibleRegion and assigning it to visRegion.
answered Nov 29 at 14:10
Pa_
387313
387313
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53412746%2fwhy-qdeclarativegeomapvisibleregion-is-non-notifyable-in-qtlocation-map%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown