ngageoint / geopackage-js

GeoPackage JavaScript Library
http://ngageoint.github.io/geopackage-js/
MIT License
304 stars 78 forks source link

Projected Tile Updates #154

Closed caldwellc closed 4 years ago

caldwellc commented 4 years ago

This pull request is for some changes that address three projection issues:

  1. when a projection has more than one source tile in the destination tile, the addTile function is called multiple times. This draws the source tile into a context that is reused. that context needs to be cleared out before drawing the subsequent source tiles.
  2. the call to projectTile wasn't being awaited and would run asynchronously. This works fine when loading tiles onto a map but caused a timing issue for requesting a tile and immediately using the result (as it may not have finished projecting).
  3. the hasTile call was not projecting the requested bounding box into the source projection before checking if a tile existed.