Skip to main content
### maptiler ###

Easy interface to created custom sized map tiles for geohashing.

- Plot the result to verify that everything is working correctly
- Get tiles in the vicinity of a given latitude, longitude
- You can use the `tile.hash` property for hashing
- For many applications, it's even better to use `tile.x`, `tile.y` coordinates because you can reconstruct the bounding box from them

Important: What is different than most other map tiling algorithms: The tiles from maptiler have the same size

- You can specify the tile size when creating the instance


```
import maptiler.maptiler as mt
import maptiler.map_plot as mp

out_path = 'mymap.gitign.html'
search_point = mt.MapPoint(40.7058254, -74.1180859)
search_radius = 500 * 1000
square_size = 500 * 1000

map_tiler = mt.MapTiler(square_size=square_size)
tiles = map_tiler.tiles_for_point(search_point,
search_radius)

# the (x,y) values of the tiles
print [(tile.x, tile.y) for tile in tiles]

# the hash values of the tiles
print [tile.hash for tile in tiles]

map = mp.Map(google_api_key='YOUR_GOOGLE_MAPS_JS_API_KEY_HERE')

for tile in tiles:
rect = mp.MapRect(tile.bounds[0], tile.bounds[2])
map.add_entity(rect)

map.add_entity(mp.MapCircle(search_point, search_radius))
map.add_entity(mp.MapMarker(search_point))

map.to_file(out_path, focus=search_point, zoom=4)
```

![maptiler - image tiles](http://i.imgur.com/W1qvWUF.png)

Code hosted on `GitHub https://github.com/nziehn/maptiler`

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maptiler-1.0.3.tar.gz (6.2 kB view details)

Uploaded Source

File details

Details for the file maptiler-1.0.3.tar.gz.

File metadata

  • Download URL: maptiler-1.0.3.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for maptiler-1.0.3.tar.gz
Algorithm Hash digest
SHA256 cb600137ce0b79620f14afb3f74bbca6fc0296973a720f339dd52a77718e0674
MD5 45c619b42498236e0e7b3d6324e3e4be
BLAKE2b-256 62daad594ca77b538d3496e05ef07295998ede234596290e8466c8a203de42b5

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.3 This release

1 file

1.0.2

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page