On Thu, 17 Oct 2019, Jiri Vlasak wrote:

there was Missing Maps hackathon this weekend in Pilsen, Czech Republic. One of
the tasks we were working on was click building feature [1] -- building plot
based on mouse click to the middle of the building.

I am interested in getting background imagery in effective way. Currently, the
following steps are used:
1. Mouse listener knows the coordinates.
2. Coordinates are recomputed to TileXY.
3. New tiles around the mouse click are created in array (9 of them).
4. Based on Tile URL, Images are downloaded and used for algorithm.

I feel like downloading Tiles multiple times is not effective.

I'd recommend the meachnism already included in JOSM, e.g. the Tile loader classes which also do caching.

Also, I think that we found a bug in Tile.getUrl() -- for Esri imagery, it
returns:

https://{switch:services,server}.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/tile/{zoom}/{y}/{x}/17/79468/63554.png

Instead of proper URL. And I have the same issues with Maxar.

Seems you use a templated tile url in a non-templated environment:

See here for a description of the templated format:
https://josm.openstreetmap.de/wiki/Maps#TileMapServicesTMS

Ciao
--
http://www.dstoecker.eu/ (PGP key available)

Reply via email to