1. Home
  2. Docs
  3. GO Map – Documentation
  4. Documentation
  5. GOMap



The Map script holds map settings and customization, it is responsible for the creation of map tiles and their destruction while moving in the real world.

GOMap.cs inspector is definitely the most important of the entire package, it contains the basic map options like which API to use, the tileBuffer value, and the style/materials for layers and kinds.

(LocationManager) locationManager: the instance of location manager inside the scene.
(int) TileBuffer: how many tiles the map will buffer around the user’ location, this value has to be changed accordingly to the camera depth you want to use and to the zoomLevel value. A tile buffer value of 3 means that map will download 3 tiles in each direction from the current location (49 tiles).
(int) zoomLevel: readonly
(bool) useCache: when set to on GoMap will cache tiles locally, avoiding to make the same request twice.
(button) clearCache: when pressed the whole cache folder is deleted. The default cache folder is the Application.persistentDataPath.
(button) openCache: when pressed opens the default cache folder.
(string) Mapbox,Osm,Mapzen_Legacy, api key: use this fields to input your own api keys.
(enum) MapType: this selector allows you to switch among map services.
(Material) tileBackground: if set the map will create a plane object (floor) with the specified material as a background for each tile.
(List<GOLayer>) Layers: It is the list of map layers used in the 3D rendering.
(List<GOLayer>) Pois: It is the list of poi kinds used in the 3D rendering.
(List<GOLayer>) Labels: It is the rendering settings for the street names.
(bool) useElevation: select if render a map with elevation or not. Map elevation is supported by mapbox and mapzen_legacy to a maximum zoom level of 15.
(range) elevationMultiplier: ratio to control how enhanced you want the elevation effect. 1 means 1:1 with the real world (1 meter equals 1 unit)
(range) terrainResolution: the amount of vertices per side of each map tile. Controls the low poly effect of the terrain. A lower value will make GO Map load tiles faster and will generate less triangles in the scene.
(bool) runOnMainThread: decide to run GO Map using the main thread only. Automatically set true if building WEBGL.
(bool) combineFeatures: will combine features of each tile’s layer in a single mesh. That reduces drastically the load time but exclude the differences of rendering between kinds. (Example: if you want churches tu be rendered differently from normal buildings you can’t use that feature).
(bool) addGOFeatureComponent: will add a GOFeatureBehaviour.cs component to each map object loaded. In that component you’ll find an instance of the GOFeature object containing every information about the map feature.
(bool) useSatelliteBackground: select if use a satellite as the tileBackground material main texture. Used in satellite and hybrid demo scenes.
(bool) satellite4X: Uses 4 satellite images for each tile to have a high definition effect. Keep in mind that you are actually performing 4 requests per tile.

(UnityEvent<GOTile>) OnTileLoad: This event is fired whenever a tile is created, you can use it to add some logic after a tile creation. In the 3D demo scene it’s used to target a method to spawn Ballons in the center of some tiles. (see GOEnvironment.cs)

Was this article helpful to you? Yes No

How can we help?