void RasterMap::SetViewCenter(const GeoPoint &location, fixed radius) { if (!raster_tile_cache.GetInitialised()) return; const GeoBounds &bounds = raster_tile_cache.GetBounds(); int x = angle_to_pixel(location.Longitude, bounds.west, bounds.east, raster_tile_cache.GetWidth()); int y = angle_to_pixel(location.Latitude, bounds.north, bounds.south, raster_tile_cache.GetHeight()); raster_tile_cache.UpdateTiles(path, x, y, projection.distance_pixels(radius) / 256); }
void RasterMap::SetViewCenter(const GeoPoint &location) { if (!raster_tile_cache.GetInitialised()) return; int x = angle_to_pixel(location.Longitude, bounds.west, bounds.east, raster_tile_cache.GetWidth()); int y = angle_to_pixel(location.Latitude, bounds.north, bounds.south, raster_tile_cache.GetHeight()); if (raster_tile_cache.PollTiles(x, y)) { _ReloadJPG2000(); raster_tile_cache.PollTiles(x, y); } }