Skip to content

A slippy map implementation written in C# for Unity3D

Notifications You must be signed in to change notification settings

pinglis/UnitySlippyMap

 
 

Repository files navigation

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:

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

License

UnitySplippyMap is released under the MIT License.

Unity Version

UnitySplippyMap requires at least Unity 2021.3.26f1

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)

About

A slippy map implementation written in C# for Unity3D

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 99.3%
  • Other 0.7%