-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #455 from AuScope/AUS-4275
AUS-4275 Added GeoJson file layer.
- Loading branch information
Showing
4 changed files
with
57 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/app/cesium-map/custom-querier-handler/geojson-querier-handler.service.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { UtilitiesService, LayerModel } from "@auscope/portal-core-ui"; | ||
|
||
export class GeoJsonQuerierHandler { | ||
|
||
constructor(private entity: any) {} | ||
|
||
/** | ||
* Creates an HTML string using a feature's GeoJsonFeatureData | ||
* | ||
* @returns HTML string | ||
*/ | ||
public getHTML(): string { | ||
let html = '<div class="row"><div class="col-md-3">Name</div><div class="col-md-9">' + this.entity['name'] + '</div></div><hr>'; | ||
|
||
const extendedData = this.entity['_properties']['_propertyNames']; | ||
for (const attr in extendedData) { | ||
const key = extendedData[attr]; | ||
html += '<div class="row"><div class="col-md-3">' + key + '</div><div class="col-md-9">' + this.entity['_properties'][key]['_value'] + '</div></div>'; | ||
} | ||
html += '</div></div>'; | ||
return html; | ||
} | ||
|
||
/** | ||
* Fetches a feature's name | ||
* | ||
* @returns feature name string | ||
*/ | ||
public getFeatureName(): string { | ||
return this.entity['name']; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters