This example displays a movable map initially centered on the historical centre of Berlin (52.515, °N, 13.405°E) with an overlay of a historical map from 1789 on top of the base map. A public domain image was used as a source, and split it into individual map tiles. Additional tiles are only downloaded when the zoom level or location changes.


Credits

Wikimedia Commons Images
The tile source is based on an image of Berlin in 1789 from Wikimedia.
Images provided by Wikimedia Commons are under the copyright of their owners.
However, almost all content hosted on Wikimedia Commons may be freely reused subject to certain restrictions.

Code

The example uses the H.map.provider.ImageTileProvider class for fetching our custom tiles. The getUrl() method constructs the URL of the tile for the specified column/row/zoom position. The result is displayed on the map as an additional layer using an instance of the H.map.layer.TileLayer class which has been created by passing in the image tile provider object.