Contents
Overview
.................................................................................................................................................................
4
Introduction
........................................................................................................................................................
4
Controls
...............................................................................................................................................................
4
Modes of the map
.............................................................................................................................................
4
Quick creation of map using Wizard
................................................................................................................
5
Manual creation of map
....................................................................................................................................
5
Limitations of Webplayer and WebGL
.............................................................................................................
5
JS Loader
.........................................................................................................................................................
6
Interaction with the map
..................................................................................................................................
7
Saving State of map
...........................................................................................................................................
7
Work on mobile devices
....................................................................................................................................
7
Licenses and API keys
........................................................................................................................................
8
Description of fields
...............................................................................................................................................
9
Online Maps Component
..................................................................................................................................
9
2D Controls
.......................................................................................................................................................
11
3D Controls
.......................................................................................................................................................
11
Tileset Control
..................................................................................................................................................
13
Location Service
...............................................................................................................................................
14
Buildings
...........................................................................................................................................................
15
Tiles
.......................................................................................................................................................................
16
Source of map tiles
..........................................................................................................................................
16
Providers of tiles
..............................................................................................................................................
16
Using «Provider - Custom»
.............................................................................................................................
17
Custom URL Wizard
.........................................................................................................................................
17
Styled Google Maps
.........................................................................................................................................
17
Using offline
..........................................................................................................................................................
18
Preparation of tiles using GMapCatcher
.......................................................................................................
18
Preparation of tiles for offline use manually
................................................................................................
18
Caching the current state of map
..................................................................................................................
18
Other methods for offline usage
....................................................................................................................
18
Markers
.................................................................................................................................................................
19
Working with markers
.....................................................................................................................................
19
Working with 3D markers
...............................................................................................................................
19
Animated markers
...........................................................................................................................................
19
Caching of tiles
.....................................................................................................................................................
20
Using the Location Service (GPS)
........................................................................................................................
20
Elevation data
.......................................................................................................................................................
20
Generation of buildings
.......................................................................................................................................
21
Third-party assets and services
..........................................................................................................................
21
Using with NGUI, DF-GUI and iGUI
................................................................................................................
21
Using uGUI and SpriteRenderer
.....................................................................................................................
21
Working with Playmaker
.................................................................................................................................
22
Integration with Real World Terrain
..............................................................................................................
22
Integration with Curved UI
.............................................................................................................................
22
Integration with Bolt
.......................................................................................................................................
22
Google API web services
.................................................................................................................................
23
Working with Open Street Map Overpass API
..............................................................................................
24
Other third-party web services
......................................................................................................................
24
Online Maps API
...................................................................................................................................................
25
Changes to source code of Online Maps
...........................................................................................................
25
Updating versions
................................................................................................................................................
26
Troubleshooting
...................................................................................................................................................
27
Known issues
....................................................................................................................................................
27
About KML
........................................................................................................................................................
29
Your problem is not listed
...............................................................................................................................
29
Support
.............................................................................................................................................................
29
Final words
...........................................................................................................................................................
29
Links
.......................................................................................................................................................................
30
Overview
Introduction
Online Maps - is a universal mapping solution that is suitable for all applications and games that use a
map.
Supports Unity v4.6+, Unity v5+.
Supported platforms: Standalone, Webplayer, WebGL, iOS, Android, Windows Store Application (WSA).
Important: Support for WebGL is experimental. Requires Unity v5.3+. If you find that something is
not working properly, please write to support.
Online Maps contains:
Online Maps Component – it is core. This component is fully controls the creation and
operation of the map, and should always be used. To add this component, select «Component /
Infinity Code / Online maps / Online Maps».
Controls - those components are used to display map on various sources and user interaction.
Be sure to use only one control. More information you can find in the section «Controls».
Plugins - additional modules that extend the functional of the map. For example: GPS (Location
Service), building, cache.
Online Maps has a powerful API, using which you will be able to solve any task, without modifying the
core code.
Important: you can use only one instance of map in the scene.
Controls
Controls - are used to display map on various sources and user interaction.
Types of controls:
2D: GUITexture, SpriteRenderer, UIImage, UIRawImage, NGUI, iGUI, DF-GUI.
3D: Texture, Tileset.
All controls, except for «Tileset», working in «drawing in texture» mode. Tileset Control, works in
«Tileset» mode. Learn more about modes, you can in «Modes of the map».
To use NGUI control, iGUI control and DF-GUI control, you must have the relevant assets in the project.
These assets you can buy in the Unity Asset Store.
Important: You can use only one control.
If you want to display a map on the source for which there is no suitable control, please contact us. We
will try to add the desired control in the shortest time.
Modes of the map
«Online Maps» supports two modes:
1. Drawing in texture. In this mode, the map and any additional elements are drawn in texture. It
is a universal mode. You can display the map in any source, using the desired control.
2. Tileset. It is procedurally generated mesh. This mode is faster and requires less memory than
drawing in texture. Supports 3D markers and elevation data. Recommended for use on mobile
devices and WebGL.
Quick creation of map using Wizard
Select «Hierarchy / Create / Maps» or «GameObject / Create Other / Map».
Note: In Unity 5+, select «Hierarchy / Create / Create Other / Map».
Select the type of map, specify where you want to use the map, additional settings and click «Create».
Manual creation of map
Select the menu item «Component / Infinity Code / Online maps / Online Maps», to add a component
to a selected GameObject.
In section «Create texture» select size and click «Create». Will create a new texture in the root of the
project named «OnlineMap» and added to the source display. If a file with the same name already
exists, it will be replaced.
Select a texture provider and type that you want to use.
Important: If you use the «Tileset», then create texture unnecessary.
To become an interactive map, click on the menu item «Component / Infinity Code / Online Maps /
Controls».
In section «Advanced» select «Redraw on Play».
Run the scene.
Move the map area to the right place.
Add markers (for details, see «Markers»).
To save the current state, press «Save state».
Stop the scene.
Limitations of Webplayer and WebGL
Important: this limitation only for Webplayer and WebGL. For other platforms, all requests go
directly.
«Online maps» uses WWW class, for which there are security limitations. For this reason, for Webplayer,
all request of tiles and services works through the proxy on infinity-code.com.