![]() |
Online Maps
v3
|
Component that controls the buildings. More...
Classes | |
class | Tile |
Building tile More... | |
Public Member Functions | |
void | CreateBuilding (OnlineMapsBuildingsNodeData data) |
Creates a building. More... | |
OnlineMapsSavableItem[] | GetSavableItems () |
Returns an array of items to save More... | |
void | LoadBuildingsFromOSM (string osmData) |
Parses the OSM data and adds buildings to the queue for creation. More... | |
void | MoveRelationsToWays (List< OnlineMapsOSMRelation > relations, Dictionary< string, OnlineMapsOSMWay > ways, Dictionary< string, OnlineMapsOSMNode > nodes) |
Moves buildings from relations to ways. More... | |
Public Attributes | |
Action | OnAllBuildingsCreated |
The event, which occurs when all buildings has been created. More... | |
Action< OnlineMapsBuildingBase > | OnBuildingCreated |
The event, which occurs when creating of the building. More... | |
Action< OnlineMapsBuildingBase > | OnBuildingDispose |
The event, which occurs when disposing of the building. More... | |
Func< List< Vector3 >, Vector3 > | OnCalculateBuildingCenter |
This event allows you to intercept the calculation of the center point of the building, and return your own center point. More... | |
Predicate< OnlineMapsBuildingsNodeData > | OnCreateBuilding |
This event is triggered before create a building. Return TRUE - if you want to create this building, FALSE - avoid creating this building. More... | |
Func< OnlineMapsOSMWay, float > | OnGenerateBuildingHeight |
This event is fired when the height of the building is unknown. It allows you to control the height of buildings. Return - the height of buildings. More... | |
Action | OnNewBuildingsReceived |
The event, which occurs when the new building was received. More... | |
Action< OnlineMapsOSMWay, List< OnlineMapsOSMNode > > | OnPrepareBuildingCreation |
This event is triggered when preparing to create a building, and allows you to make the necessary changes and additions to the way and used nodes. More... | |
Func< string, Vector2, Vector2, string > | OnPrepareRequest |
This event is called when creating a request to OSM Overpass API. More... | |
Action | OnRequestComplete |
The event, which occurs after the response has been received. More... | |
Action | OnRequestFailed |
The event, which occurs when the request is failed. More... | |
Action | OnRequestSent |
The event, which occurs when the request for a building sent. More... | |
Predicate< OnlineMapsBuildingBase > | OnShowBuilding |
This event is triggered before show a building. Return TRUE - if you want to show this building, FALSE - do not show this building. More... | |
Dictionary< string, OnlineMapsBuildingBase > | buildings |
Dictionary of buildings. More... | |
GameObject | container |
Container for buildings. More... | |
OnlineMapsControlBaseDynamicMesh | control |
Reference to the control. More... | |
OnlineMapsRange | levelsRange = new OnlineMapsRange(3, 7, 1, 100) |
Range levels of buildings, if the description of the building is not specified. More... | |
float | levelHeight = 4.5f |
Height of the building level. More... | |
bool | generateColliders = true |
Need to generate a collider? More... | |
float | heightScale = 1 |
Scale height of the building. More... | |
OnlineMaps | map |
Reference to the map. More... | |
OnlineMapsBuildingMaterial[] | materials |
Materials of buildings. More... | |
int | maxActiveBuildings = 0 |
The maximum number of active buildings (0 - unlimited). More... | |
int | maxBuilding = 0 |
The maximum number of buildings (0 - unlimited). More... | |
float | minHeight = 4.5f |
Minimal height of the building. More... | |
OnlineMapsOSMAPIQuery | osmRequest |
Instance of the request More... | |
bool | useColorTag = true |
Use the Color tag for buildings? More... | |
bool | useHeightTag = true |
Use the Height tag for buildings? More... | |
OnlineMapsRange | zoomRange = new OnlineMapsRange(19, OnlineMaps.MAXZOOM_EXT) |
Range of zoom, in which the building will be created. More... | |
Static Public Attributes | |
static float | requestRate = 0.1f |
Rate of requests to OSM Overpass API. More... | |
Properties | |
static GameObject | buildingContainer [get] |
GameObject, which will create the building. More... | |
static OnlineMapsBuildings | instance [get] |
Instance of OnlineMapsBuildings. More... | |
IEnumerable< OnlineMapsBuildingBase > | activeBuildings [get] |
Returns the active (visible) building. More... | |
Component that controls the buildings.
void OnlineMapsBuildings.CreateBuilding | ( | OnlineMapsBuildingsNodeData | data | ) |
Creates a building.
data | Building data |
OnlineMapsSavableItem [] OnlineMapsBuildings.GetSavableItems | ( | ) |
Returns an array of items to save
Implements IOnlineMapsSavableComponent.
void OnlineMapsBuildings.LoadBuildingsFromOSM | ( | string | osmData | ) |
Parses the OSM data and adds buildings to the queue for creation.
osmData | OSM data |
void OnlineMapsBuildings.MoveRelationsToWays | ( | List< OnlineMapsOSMRelation > | relations, |
Dictionary< string, OnlineMapsOSMWay > | ways, | ||
Dictionary< string, OnlineMapsOSMNode > | nodes | ||
) |
Moves buildings from relations to ways.
relations | Relations |
ways | Ways |
nodes | Nodes |
Dictionary<string, OnlineMapsBuildingBase> OnlineMapsBuildings.buildings |
Dictionary of buildings.
GameObject OnlineMapsBuildings.container |
Container for buildings.
OnlineMapsControlBaseDynamicMesh OnlineMapsBuildings.control |
Reference to the control.
bool OnlineMapsBuildings.generateColliders = true |
Need to generate a collider?
float OnlineMapsBuildings.heightScale = 1 |
Scale height of the building.
float OnlineMapsBuildings.levelHeight = 4.5f |
Height of the building level.
OnlineMapsRange OnlineMapsBuildings.levelsRange = new OnlineMapsRange(3, 7, 1, 100) |
Range levels of buildings, if the description of the building is not specified.
OnlineMaps OnlineMapsBuildings.map |
Reference to the map.
OnlineMapsBuildingMaterial [] OnlineMapsBuildings.materials |
Materials of buildings.
int OnlineMapsBuildings.maxActiveBuildings = 0 |
The maximum number of active buildings (0 - unlimited).
int OnlineMapsBuildings.maxBuilding = 0 |
The maximum number of buildings (0 - unlimited).
float OnlineMapsBuildings.minHeight = 4.5f |
Minimal height of the building.
Action OnlineMapsBuildings.OnAllBuildingsCreated |
The event, which occurs when all buildings has been created.
Action<OnlineMapsBuildingBase> OnlineMapsBuildings.OnBuildingCreated |
The event, which occurs when creating of the building.
Action<OnlineMapsBuildingBase> OnlineMapsBuildings.OnBuildingDispose |
The event, which occurs when disposing of the building.
Func<List<Vector3>, Vector3> OnlineMapsBuildings.OnCalculateBuildingCenter |
This event allows you to intercept the calculation of the center point of the building, and return your own center point.
Predicate<OnlineMapsBuildingsNodeData> OnlineMapsBuildings.OnCreateBuilding |
This event is triggered before create a building.
Return TRUE - if you want to create this building, FALSE - avoid creating this building.
Func<OnlineMapsOSMWay, float> OnlineMapsBuildings.OnGenerateBuildingHeight |
This event is fired when the height of the building is unknown.
It allows you to control the height of buildings.
Return - the height of buildings.
Action OnlineMapsBuildings.OnNewBuildingsReceived |
The event, which occurs when the new building was received.
Action<OnlineMapsOSMWay, List<OnlineMapsOSMNode> > OnlineMapsBuildings.OnPrepareBuildingCreation |
This event is triggered when preparing to create a building, and allows you to make the necessary changes and additions to the way and used nodes.
Func<string, Vector2, Vector2, string> OnlineMapsBuildings.OnPrepareRequest |
This event is called when creating a request to OSM Overpass API.
Action OnlineMapsBuildings.OnRequestComplete |
The event, which occurs after the response has been received.
Action OnlineMapsBuildings.OnRequestFailed |
The event, which occurs when the request is failed.
Action OnlineMapsBuildings.OnRequestSent |
The event, which occurs when the request for a building sent.
Predicate<OnlineMapsBuildingBase> OnlineMapsBuildings.OnShowBuilding |
This event is triggered before show a building.
Return TRUE - if you want to show this building, FALSE - do not show this building.
OnlineMapsOSMAPIQuery OnlineMapsBuildings.osmRequest |
Instance of the request
|
static |
Rate of requests to OSM Overpass API.
bool OnlineMapsBuildings.useColorTag = true |
Use the Color tag for buildings?
bool OnlineMapsBuildings.useHeightTag = true |
Use the Height tag for buildings?
OnlineMapsRange OnlineMapsBuildings.zoomRange = new OnlineMapsRange(19, OnlineMaps.MAXZOOM_EXT) |
Range of zoom, in which the building will be created.
|
get |
Returns the active (visible) building.
|
staticget |
GameObject, which will create the building.
|
staticget |
Instance of OnlineMapsBuildings.