A slippy map implementation written in C# for Unity3D
Switch branches/tags
Nothing to show
Clone or download

README.md

UnitySlippyMap

A slippy map implementation written in C# for Unity3D.

It aims at helping developpers create 2D/3D maps working with a variety of online tile providers (OpenStreetMap, VirtualEarth/Bing Maps, ...) and offline sources (DBMap, MBTiles, ...) like Route-me (iOS) or Leaflet (HTML5), on every platform supported by Unity3D. Google Maps won't be supported (see Google Maps tiles terms of service). Yahoo! Maps neither since it was closed on September 13, 2011. Nokia Maps (now called Here) provides a REST API designed for static maps. They could be used as tiles but would get a 'Nokia' watermark on each one of them. Also Nokia and Microsoft are now teaming up so supporting both might be redundant.

Hopefully, it will also be compliant with a number of popular OGC standards like WMS or GML.

Map objects (tiles, markers, ...) are placed in 3D space along X and Z axis. The idea is to be able to use 3D geometry as terrain or markers with a free camera.

Current status

UnitySlippyMap is in alpha stage and currently supports:

It is tested in Unity3D Editor 3.5.6f4 & 4.0.0, and on iOS (beware the Unity 4 GPS bug) and Android devices.

See the TODO list if you want to contribute and don't know where to start.

License

UnitySplippyMap is released under the MIT License.

TODO

Here is a short list of what could be fixed or added to UnitySlippyMap:

  • Fix the voodooish way I implemented the camera elevation and tile positioning (see the comments in Map.cs)

  • Handle device orientations properly when using the compass

  • Add new map objects (polygons, lines, ...)

  • Add support for orthographic cameras

  • Add a better zoom rounding (>80%, <20%?)

  • Add a map constraint to a given 'size', bounce on limits

  • Add movements inertia

  • Support other versions of WMS (used trang to convert dtd to xsd, then Xsd2Code to generate xml serializable classes)

  • Subdomain rotations for VirtualEarth & OSM

  • Display logo and copyright for VirtualEarth (url in metadata) & OSM (see OSM Wiki)

  • Optimise, use one material for the tiles to enable dynamic batching: tried and failed, merging textures on the fly is to costly (see TextureAtlasManager.cs)