API ReferenceThis API provides a set of functions to embed Galigeo Maps into a web page.
<script type="text/javascript" src="js/galigeo-api.js"></script><div id="ggoMapId"></div>var ggoMap = new Galigeo.Map('ggoMapId',
{
mapId: 'MyMap',
name: 'Map label',
apiKey: 'Your API key',
url: 'https://location/Galigeo'
});
ggoMap.load().then(()=>{
// work with the map
});
The OpenMap API supports multiple data formats for inline and referenced datasets. Use the format field to specify the data type.
arcgis_inlineESRI/ArcGIS inline format with explicit field definitions and ESRI geometries.
Example:
{
"format": "arcgis_inline",
"id": "sales-data",
"name": "Sales by Region",
"fields": [
{"name": "OBJECTID", "type": "esriFieldTypeOID", "alias": "ID"},
{"name": "region", "type": "esriFieldTypeString", "alias": "Region"},
{"name": "sales", "type": "esriFieldTypeDouble", "alias": "Sales Amount"}
],
"features": [
{
"attributes": {"OBJECTID": 1, "region": "North", "sales": 150000},
"geometry": {"x": -122.4194, "y": 37.7749}
}
],
"geometryType": "esriGeometryPoint"
}
Use cases:
geojson_inlineStandard GeoJSON FeatureCollection format. Field types are automatically inferred as strings.
Example:
{
"format": "geojson_inline",
"id": "cities",
"name": "World Cities",
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [2.3522, 48.8566]
},
"properties": {
"name": "Paris",
"country": "France",
"population": 2161000
}
},
{
"type": "Feature",
"geometry": {
"type": "Polygon",
"coordinates": [[[0,0], [10,0], [10,10], [0,10], [0,0]]]
},
"properties": {
"region": "North",
"area": 100
}
}
]
}
Supported geometry types:
Use cases:
Notes:
linkReference to external data via URL (CSV files or GeoServices).
Example:
{
"format": "link",
"id": "external-data",
"name": "External Dataset",
"url": "https://example.com/data.csv"
}
Supported sources:
local_fileReference to a local file stored on the server (used internally after processing inline datasets).
Example:
{
"format": "local_file",
"id": "cached-data",
"name": "Cached Dataset",
"url": "/path/to/data.csv"
}
Notes:
arcgis_inline or geojson_inline datasetsAll formats support these additional properties:
| Property | Type | Description | Default |
|---|---|---|---|
id |
string | Unique dataset identifier | Auto-generated |
name |
string | Display name | Required |
aliasEditable |
boolean | Allow field alias editing | true |
mapper |
object | Field mapping configuration for joins | null |
Mapper example (JoinMapper):
{
"format": "geojson_inline",
"id": "regions",
"name": "Sales Regions",
"mapper": {
"id": "99",
"name": "Region Mapper",
"dataField": "region_code",
"gisField": "REGION_ID",
"geometryType": "esriGeometryPolygon"
},
"features": [...]
}
| Feature | arcgis_inline | geojson_inline | link | local_file |
|---|---|---|---|---|
| Field type control | ✓ Explicit | String only | Depends on source | Depends on source |
| Geometry types | ESRI types | GeoJSON types | Varies | Varies |
| Inline data | ✓ | ✓ | ✗ (URL) | ✗ (File path) |
| Standard compliance | ESRI | RFC 7946 | N/A | N/A |
| Auto field discovery | ✗ | ✓ | Depends | Depends |
var ggoMap = new Galigeo.Map('mapDiv', {
mapId: 'multi-format-demo',
name: 'Multi-Format Map',
apiKey: 'your-api-key',
url: 'https://your-server/Galigeo',
data: [
{
format: 'geojson_inline',
id: 'stores',
name: 'Store Locations',
type: 'FeatureCollection',
features: [
{
type: 'Feature',
geometry: {type: 'Point', coordinates: [2.35, 48.85]},
properties: {name: 'Paris Store', revenue: 500000}
}
]
},
{
format: 'arcgis_inline',
id: 'regions',
name: 'Sales Regions',
fields: [
{name: 'FID', type: 'esriFieldTypeOID'},
{name: 'region', type: 'esriFieldTypeString'},
{name: 'target', type: 'esriFieldTypeDouble'}
],
features: [
{
attributes: {FID: 1, region: 'North', target: 1000000},
geometry: {rings: [[[0,0], [10,0], [10,10], [0,10], [0,0]]]}
}
],
geometryType: 'esriGeometryPolygon'
},
{
format: 'link',
id: 'demographics',
name: 'Demographics Data',
url: 'https://data.example.com/demographics.csv'
}
]
});
Main product documentation.