Map scale

lanthale's picture

I have the problem that I am logging waypoints inside of a radius of 5 meters. After the import into BT747 it is realy hard to see the different waypoints or to distinguish the waypoints from each other because the map at maximum zoom level is somehow 1:256. What I have seen I would need something like 1:50 or 1:100 at least. Is this possible ?

I looked around on the web but have nothing found.

mdeweerd's picture

Currently the zoom level is

Currently the zoom level is limited based on what the map provider offers.

At a higher zoom level, the tiles are not calculated.

What could be done with "limited" effort is to allow zooming deeper than what the map allows but not showing the map.  The limit could be an option.

To improve on that, tiles could be zoomed themselves.  That would to pixelisation, but one would have a better separation of the waypoints and the tracks. 

lanthale's picture

  This is exactly what I have

 

This is exactly what I have been looking for. I have seen this function inside of the JOSM tool from openstreetmap. I have now compared all mapping online tools (bing maps, google maps, openstreetmap) and the tile size from the zoom perspective is always the same as in openstreetmap. The problem for me is that I do not know how (which method/class to change) I can implement a zoom into the tile because this means a custom JXMapKit. I looked into the source of JSM tool but the map part is for me too complicated to port it into a seperate JavaBean component. Do you have any insight view of the JXMapKit ?

mdeweerd's picture

I have made considerable

I have made considerable optimisations to the JXMapKit, so I do know how it works ;-).

It's been a while since I touched it tough.  I've uploaded the current version on disk just a moment ago to make sure the latest version is available:
http://sourceforge.net/projects/bt747/files/Development/BT747_swingx-ws-20110121_1604.zip/download

That is what is used in BT747.

I did developement for that in Netbeans.  Testing the map is done in Netbeans too.

I've revisited the code to see where modifications would be needed/best placed.

Here is the result:

  1. Implement the method to compute the x/y index of the parent tile (used in 2).
  2. Update the AbstractFileFactory.
    -> Update setRequiredTiles (when the zoom level is exceeded, add the tile from the lower zoom level to requiredTilesForMap (and repeat this as much as needed).
  3. Tile url -> if the tile's zoom level is too high, set the Url to a dummy value, e.g. 'virtual' and use that value to skip the actual download.
    Use 'needsToBeDownloaded' to indicate that the tile is waiting for another tile to be loaded to be calculated.
  4. Upon a tile download complete event, calculate the tiles that need recalculation (go through tiles that are in the 'needsToBeDownloaded' state and that are 'virtual', update when the correponding parent tile is already loaded.
  5. Implement the method to compute the scaled image (used in 4).
  6. If we want to be really generic, this could be extended to compute higher zoom images too from the detailed zoom images when zooming out.

 

The implementation could be don in order as indicated above.

  1. The x/y index of the parent tile could be calculated based on the center lat/lon coordinate of the requested tile.
  2. // Update the for(Tile:tiles) loop
  3. // Requires update to 'Tile'. (!) May need to care about override compatibility.
  4. Extra listener / method call where we loop over the required tiles.
  5. First implementation of this method could be to copy the original image (to validate 1-4).
  6. To keep in mind when doing 1-5.

lanthale's picture

Thank you allot! I will start

Thank you allot!

I will start tomorrow and will inform you after I finished the change.

mdeweerd's picture

Ok, I've put all this stuff

Ok, I've put all this stuff under SVN then:

https://bt747.svn.sourceforge.net/svnroot/bt747/trunk/swingx-ws

 

If you send me a login of yours on sourceforge, I can add you to the project and give you R/W SVN access.

lanthale's picture

That would be great. My

That would be great. My username on sourceforge is "lanthale".

mdeweerd's picture

After efforts of lanthale and

After efforts of lanthale and myself, the java mapping kit can now zoom beyond the map's limits.

'lanthale' essentially implemented the method described above which he go to work, and in the process I found another way of doing it which was easier and apparently also executes faster.

So that will likely end up in BT747 one of these days.