Loading ...
Sorry, an error occurred while loading the content.

Re: [aprsisce] Re: Force map refresh

Expand Messages
  • James Ewen
    Okay, almost back to the real world... Finished up at Schaumburg just in time to get home and launch the balloon with the Universtiy of Alberta, then off to a
    Message 1 of 10 , Apr 25, 2010
    • 0 Attachment
      Okay, almost back to the real world... Finished up at Schaumburg just
      in time to get home and launch the balloon with the Universtiy of
      Alberta, then off to a Lobster Roast/birthday party, all while
      suffering through with a cold. GUH!

      So... Lynn, you've got two ends of the spectrum on your hands here...
      There are the ones running on a Windows mobile device with limited
      memory, and internet connectivity. Obviously the platform you're
      developing for, and the program is geared towards that. The concept of
      getting tiles, and keeping them in memory for the current area to use
      for display works great. The tiles expire after a while, freeing up
      memory for tiles of more importance (here/now, as opposed to
      there/then).

      On the other extreme are those who are running on a laptop or other
      machine with lots of memory (drive space), but limited internet access
      (read only when tethered). The concept here is to slurp up as much map
      information as is desired, and then drag it along where ever you go,
      never purging the tiles.

      The problem with the second situation is that since the tiles never
      expire, you are stuck with tiles that reflect the state of the map at
      the time of download.Now, having an older maptile is better than no
      maptile, but having the ability to update the maptile when desired is
      better than not being able to update the maptile.

      So here's the situation. I am sitting in class at Motorola not
      understanding a thing the instructor is saying, so I fire up my
      laptop, and start playing with APRSISCE/32 to see who's around the
      area. The tile fetcher grabs a bunch of tiles for the area, and viola,
      I have a map of the area. Hey, the Schaumburg Campus sucks! The road
      my hotel is located on isn't right either!

      So, fire up OSM, and after a couple hours of playing, I have a pretty
      decent representation of the Schaumburg Campus, and American Lane now
      looks like it should! Well, it looks like it should on OSM, but my
      downloaded tiles in APRSISCE/32 still have the ugly representation.

      What to do? I could simply delete the whole OSM map directory, but
      then I have to go back and grab tiles for everywhere that I want all
      over again. Most of those tiles haven't changed though, and I would be
      placing a huge burden on the OSM tile server unnecessarily. All I want
      are a few tiles covering a couple dozen square miles.

      My solution was to find the tile name in OSM, and then delete the
      appropriate sub-directory on my hard drive. I could have found every
      tile by name and deleted each one, but that ends up with a lot of
      tiles, so I used brute force, and deleted the directory containing all
      nearby tiles. I had to do this for each zoom level as well. It was
      tedious and time consuming, and I missed a few tiles when the
      directory boundary intersected my viewing area.

      All I am thinking about doing, is to have the tile prefetch routine
      simply ignore the tiles that exist on the local machine, and grab them
      from the server.

      I would think the logic in the programming would go something like this.

      Routine: Display tile x/y/z
      if
      tile exists on hard drive, goto display
      else
      download tile x/y/z
      save tile to hard drive
      goto display
      endif

      To force a refresh, I would define a routine that didn't have the if
      statement, and simply went out and grabbed the tiles.

      It's brute force, but would get the job done. It would cause some
      extra load on the OSM server by downloading tiles that may not have
      changed, but it would require the user to force a refresh, and not be
      an automatic routine that grabbed every tile every time a display was
      updated.

      So, in the case of my map editing in Schaumburg, after I finished
      editing, I would simply come back to APRSISCE/32 and hit a key
      (CTRL-F5) to force a refresh. The yellow circle would do it's dance,
      and new tiles would be fetched from the OSM server for the area. If I
      zoom in/out and find old tiles at a higher/lower zoom level, CTRL-F5
      again to update those as well.

      If the user is offline, no new tiles are fetched, and the old ones are
      still available for display. If you delete, and then move around to
      re-fetch, but are offline, the user ends up with a blank screen.

      BTW, CTRL-F5 is just an example... a shortcut for a browser refresh.
      Any key could be used, or a menu item...

      Howzat?

      James
      VE6SRV
    Your message has been successfully submitted and would be delivered to recipients shortly.