skip to Main Content

Province object fields name of the province.

province.countryIndex: index of the country in the countries list.

province.hidden: shows/hide province borders.

province.regions: list of physical regions. Each region contains a list of frontier points.

province.mainRegionIndex: the index of the biggest region in the regions list.

province.localPosition: center of the province on the sphere in local space.

province.latLonCenter: latitude/longitude of the center of the province.

province.centroid: center of the province in lat/lon coordinates (guaranteed to be inside the province polygon).

province.centroidSpherical: center of the province in spherical coordinates (guaranteed to be inside the province polygon).

province.mainRegionArea: approximate surface area (width x height) of the main region.

Provinces methods and properties

map.provinces: return a List<Province> of all provinces/states records.

map.provinceHighlighted: returns the province/state object in the provinces list under the mouse cursor (or null if none).

map.provinceHighlightedIndex: returns the province/state index in the provinces list under the mouse cursor (or null if none).

map.GetProvinceIndex(countryIndex, provinceName): returns the province index matching the given name and belonging to specified country.

map.GetProvinceIndex(localPosition): returns the province that contains a map coordinate.

map.GetProvinceNearToPoint(localPosition): returns the province that contains a map coordinate or the province whose center is nearest to the map coordinate.

map.GetProvinceUnderSpherePosition(countryIndex, spherePoint, out provinceIndex, out provinceRegionIndex): returns the index of the province and region located in sphere point provided. Must provide the country index to which the province belongs to.

map.provinceLastClicked: returns the index of last clicked province.

map.provinceRegionLastClicked: returns the index of last province region clicked.

map.showProvinces: show/hide provinces when mouse enters a country. Same than inspector property.

map.provincesFillColor: color for the highlight of provinces.

map.provincesColor: color for provinces/states color.

map.ToggleProvinceSurface(name, visible, color): colorize one province with color provided or hide its surface (if visible = false).

map.ToggleProvinceSurface(index, visible, color): same but passing the index of the country instead of the name.

map.ToggleProvinceSurface(index, visible, color, texture, …): same can use a texture with scale, offset and rotation options.

map.HideProvinceSurface(countryIndex): un-colorize / hide specified province.

map.HideProvinceSurfaces: un-colorize / hide all colorized provinces (cancels ToggleProvinceSurface).

map.ProvinceNeighbours (int provinceIndex): returns a List of Provinces which are neighbours of specified province index. Note that a province can have one or more land regions (separated) which can have different neighbours each. This method returns all neighbours for all land regions of the province.

map.ProvinceNeighboursOfMainRegion (int provinceIndex): returns a list of neighbours of the specified province having into account only the main land region of the province.

map.ProvinceNeighboursOfCurrentRegion (): returns a list of province neighbours of currently selected province’s region.

map.GetProvinceRegionSurfaceGameObject(countryIndex, regionIndex): returns the game object corresponding to the colored surface of a given province and region, or null if that province has not been colored yet.

map.GetVisibleProvinces: returns a list of visible provinces on the screen.

map.ProvinceTransferProvinceRegion: merges one province into another province.

map.ProvincesMerge(List<Province>…): merges a group of provinces.

map.ProvinceTransferCell: merges one cell into a province.

map.GetProvinceMainRegionZoomExtents: returns the zoom level which makes this province’s main region occupy the entire screen

map.GetProvinceRegionZoomExtents: returns the zoom level which makes this province’s region occupy the entire screen


Back To Top