@isygis/isy-gi-bridge
v15.2.1-dev.1
Published
## GiBridge InputParams
Downloads
766
Readme
IsyGiBridge
GiBridge InputParams
Set init url
Input iframe url
this.giBridgeService.setInitUrl(url);
Set param
Create communication with iframe via setParam
this.giBridgeService.setParam({--supported giBridgeParam--})
List of supported giBridgeParamIds
gi_SetLanguage - will change global language -> 'en' or 'no'
{
giBridgeParamId: 'gi_SetLanguage',
language: string
}
gi_HideTranslateBar - show/hide translate bar in side nav menu
{
giBridgeParamId: 'gi_HideTranslateBar',
hide: boolean
}
gi_SetExtent - set map extent
{
giBridgeParamId: 'gi_SetExtent',
extent: number[],
epsg?: string
}
gi_GetExtent - return map extent as observable
{
giBridgeParamId: 'gi_GetExtent',
epsg: string
}
gi_SetCenter - set map center coordinates
{
giBridgeParamId: 'gi_SetCenter',
lon: number,
lat: number,
epsg?: string,
zoom?: number,
scale?: number
}
gi_GetCenter - return center map coordinates as observable
{
giBridgeParamId: 'gi_GetCenter'
}
gi_GetLayers - return layers list as observable
{
giBridgeParamId: 'gi_GetLayers'
}
gi_GetBaseLayers - return base layers list as observable
{
giBridgeParamId: 'gi_GetBaseLayers'
}
gi_ShowLayer - show layer in map by guid
{
giBridgeParamId: 'gi_ShowLayer',
layerGuid: string
}
gi_HideLayer - hide layer in map by guid
{
giBridgeParamId: 'gi_HideLayer',
layerGuid: string
}
gi_SetActiveBaseLayer - change active base layer
{
giBridgeParamId: 'gi_SetActiveBaseLayer',
baseLayerGuid: string
}
gi_SetTasks - send tasks to GeoInnsyn
{
giBridgeParamId: 'gi_SetTasks',
tasks: [{
ID: string,
Navn: string,
Type: string,
Beskrivelse: string,
Gyldig_Fra: string,
Gyldig_Til: string,
X: string,
Y: string,
EPSGkode: string
}]
}
gi_SetJWT - send JWT to GeoInnsyn
{
"giBridgeParamId": "gi_setJwt",
"params": {
"token": "ABC-CDE"
}
}
this.giBridgeService.setParam(EGiBridgeEventId.SETJWT, {token: 'ABC-CDE'});
GiBridgeService observables
Iframe load
Observable return true when iframe is fully loaded. (boolean)
iframeLoaded$ = this.giBridgeService.iframeLoaded$;
Map extent
Observable return map extent. (object)
mapExtent$ = this.giBridgeService.mapExtent$;
{
giBridgeParamId: 'gi_GetExtent'
epsg: 'EPSG:32633',
extent: [259132.85, 7030213.57, 282188.77, 7049309.24]
}.
Map center
Observable return map center coordinates. (object)
mapCenter$ = this.giBridgeService.mapCenter$
{
giBridgeParamId: 'gi_GetCenter'
epsg: 'EPSG:25832',
lat: 7032300
lon: 570130
scale: 80000
zoom: 10
}
Update coordinates
Observable will retun center coordinates when map stop moving. (object)
updatedCoordinates$ = this.giBridgeService.updatedCoordinates$
{
giBridgeParamId: 'gi_MapMoveEnd'
lat: '7037713.36'
layers: '1003,8013,8012,8011,8010'
lon: '565706.36'
zoom: '10'
}
Point info
Observable will retun point information when click to map. (object)
getPointInfo$ = this.giBridgeService.getPointInfo$
{
elevationResult: {
placename: "Gaubekveita"
elevation: 5.6
stedsnummer: 1020831
}
kommuneInfo: {
fylkesnavn: "Trøndelag"
fylkesnummer: "50"
kommunenavn: "Trondheim"
kommunenummer: "5001"
kommunevaapenurl: "https://data.artsdatabanken.no/Administrativ_grense/Territorialomr%C3%A5de/Fastlands-Norge/Trøndelag/Trondheim/logo_408.png"
}
kommunenavn: "Trondheim"
showPlace: true
showHeraldry: true
clickCoordinates: {
coordinate: [
0: 569779.7158241272
1: 7034709.483039856
]
pixel: [
0: 838.9429931640625
1: 386.110107421875
]
client: [
0: 838.9429931640625
1: 386.110107421875
]
epsg: "EPSG:25832"
zoom: 10
}
giBridgeParamId: "gi_GetPointInfo"
}