[Interest] How to get all MapItems in a given region?
Paolo Angelelli
paolo.angelelli at qt.io
Sat Nov 19 12:58:19 CET 2016
Hi,
You are right, there is no api for this at the moment.
We are considering whether to add one, and whether to base it on some
acceleration structure.
For now, the best you can do is to keep track of the map items yourself
and query your structure
(yes, map items also miss a bounding box at the present, hopefully they
will get it in 5.9)
best
Paolo
On Tue, 08 Nov 2016 13:10:41 +0530
Kishore Jonnalagadda <kitts.mailinglists at gmail.com> wrote:
> I could not find any API for this... I want to be able to get a list
> of all the mapitems on a map that have coordinates that lie within a
> given (rectangular) region. What is the best way to do this?
>
> The only way I see right now is to iterate all the items returned by
> the mapItems() API and check if each one has coordinates that lie
> within my region of interest. Depending on the total number of
> mapItems present on the map, this may be very inefficient. Hence the
> question.
More information about the Interest
mailing list