-
-
Notifications
You must be signed in to change notification settings - Fork 164
-
-
Notifications
You must be signed in to change notification settings - Fork 164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web API cached map features retrieval via Rect param #790
Comments
Yeh. These caches. Would it help to add a cache option to the constructor of MapQuery which disables all caching? Then you can use your own instance of the query object. The map layer can be taken from |
I see. Thanks!
Yeah, if it's OK to omit the cache in terms of performance. Is it easy for you to implement that or should I take care of it? Thanks also for the map layer hint! |
Disabling the cache would break |
Not using this method at the moment. I'll worry later on, when it becomes necessary :) Thanks! |
Ok. I think the map query has to be a member of the MapWidget since its cache is related to it. I'll change this so that there is a separate map query for each MapWidget instance. This way you get the right cached objects from the last map display request to "your" web interface related MapWidget. |
…MapPaintWidget since their caches are related to the map widget. Renamed related getter methods to indicate GUI ownership. Removed map query pointers from classes to have a late initialization. #790
Done. I changed the ownership of all classes that have MapPaintWidget related caches. MapQuery, AirwayTrackQuery and WaypointTrackQuery are now aggregates of MapPaintWidget. If you do not GUI related stuff you have to get the queries from the MapPaintWidget. You should review the usage of all What is left:
|
Hold a bit with the update. It's crashing on Windows. |
Fixed so far. |
Hi @albar965, wow, very cool! Thanks! Can't wait to check it out! Cheers! |
Hope it helps. It is a tiny step for more than one map display in LNM. Something like an inset in the GUI might be possible. |
…le-tiled-output - Resolve conflicts - Apply albar965#790 (comment)
- Apply albar965#790 (comment) - Perform dummy image action and extract results - Expose MapPaintLayer::updateLayers() to allow mapLayer initialisation
Works perfectly! Thanks! |
Hi @albar965, may i ask you again? I've successfully implemented correct airports retrieval via I must add that I'm converting from
So maybe I have introduced this issue myself... Although this works with the airports retrieval. Did you encounter anything like this before? Thanks and cheers! |
The request overloads to allow scrolling and zooming on the map without reloading. So, returning more than the requested results is ok. Make sure that the parameter lazy in the MapQuery call is set to true to avoid incomplete results. And keep in mind that the GeoDataLatLonBox uses radian instead of degree (I prefer degree since it is easier to read while debugging). You have to add |
Thanks, sounds plausible! I'll try that right away! |
Looks good! Thanks! |
Hiho @albar965,
just when i thought I'm over the hill... :)
Adding clickable features to the map requires retrieving them by a
Rect
via the API. I've managed to do that already but I've stumbled upon the fact, thatMapQuery
applies caching (e.g. airportCache)...Meaning that I'm able to retrieve features, but only those which are visible inside the in-app map instead of my provided
Rect
if I omit updating the cache. Doing so would make me feel uncomfortable, since it's the in-apps map cache...POI:
https://github.com/KOKAProduktion/littlenavmap/blob/c89da645a63c8534ca7bef59ab4e8559c3243b09/src/query/mapquery.cpp#L734-L759
Also a
MapLayer
param is required for updating the cache and I'm afraid i don't understand theMapLayer
s role in the setup as well as where to get the right one from.Would you have some insights, hints or suggestions where to look further?
Should i implement a separate cache for the API map feature calls?
Thanks for your time and cheers!
The text was updated successfully, but these errors were encountered: