How to configure Interactive Maps - GeoscienceAustralia/interactive-maps GitHub Wiki

First level folder structure

Master layer and tool list

In src/main/webapp/config there are 2 master files master-layer-list.json and master-tool-list.json, please see the wiki page https://github.com/GeoscienceAustralia/interactive-maps/wiki/Master-layer-and-tool-list-explained for further details.

Site-Config.json

site-config.json lives at the root of the config directory. This is the main file for configuring the landing page of interactive-maps/index.html#/.

title – title that appears at the top of the page
blurb – description that appears under the title
Header Config
title – text that will appear in the header next to the logo.

Themes
id - unique id of the theme
title - title which will appear under the below defined preview image
previewImageUrl - url to the preview image
previewDescription - description which appears under the title

Sample config site-config.json

{
    "title": "Interactive Maps",
    "blurb": "Interactive Maps is a discovery and exploration view of Geoscience Australia's geospatial services. The following scientific and decision support themes have curated content comprised of maps and functions. Each map has queries and functions with linked access to OGC (Open Geospatial Consortium) web services and metadata. This system replaces MapConnect and AMSIS applications.",
    "headerConfig": {
        "title": "Applying geoscience to Australia's most important challenges"
    },
    "themes": [
        {
            "id": "hazards",
            "title": "Hazards",
            "previewImageUrl": "content/hazards/themePreview.png",
            "previewDescription": "Historically, bushfires, floods, earthquakes, landslides and cyclones have caused loss of life and significant damage to property and infrastructure."
        },
        {
            "id": "marine",
            "title": "Marine and Coastal",
            "previewImageUrl": "content/marine/themePreview.png",
            "previewDescription": "Information regarding Australia's coasts and estuaries, seabed mapping and Antarctica."
        }
    ]
}

The above site-config.json will generate the following homepage

Second level folder structure

The theme id's declared in app.json must be created as directories in the second level under the config directory as depicted in the above diagram.

App.json

The next config file that needs to be created is the app.json file.

id - unique identifier of theme, this will match the theme id in site-config.json
title – title that appears at the top of the page
blurb – description that appears under the title
header Config
title – text that will appear in the header next to the logo
backgroundImageUrl - url for the background image of the header

maps - list of maps to be displayed
title - title which will appear under the below defined preview image
tags - this can be used to group categories together, the tags are defined below
id - unique id for the map
previewImageUrl - url to the preview image
previewDescription - description which appears under the title

tags - list of tags to be displayed
id - unique id which matches to the tags element in the above Maps object
description - Description that appears under the title
title - Title that will be displayed for the tag

Sample config app.json

{
    "id": "hazards",
    "title": "Australian Hazards",
    "blurb": "Historically, bushfires, floods, earthquakes, landslides and cyclones have caused loss of life and significant damage to property and infrastructure. The Australian continent has severe weather can range from isolated thunderstorms to intense low pressure systems affecting thousands of square kilometres. Large scale deep low pressure systems cause widespread flash flooding and gale to storm force winds extending over 400 to 1,000 square kilometres. Earthquakes in Australia are usually caused by movements along faults as a result of compression in the Earth's crust.",
    "headerConfig": {
        "title": "Applying geoscience to Australia's most important challenges"
    },
    "maps": [
        {
            "id": "windhazards",
            "title": "Cyclone Wind Hazards",
            "previewImageUrl": "content/hazards/windhazards/mapPreview.png",
            "previewDescription": "Tropical cyclone wind hazard web map service, containing the 2015 benchmark hazard map as a raster."
        },
		{
            "id": "earthquakehazards",
            "title": "Earthquake Hazards",
            "previewImageUrl": "content/hazards/earthquakehazards/mapPreview.png",
            "previewDescription": "Earthquake hazard web map service created by Geoscience Australia. The service contains the 2013 Earthquake Hazard map, as a raster and contours."
        },
        {
            "title": "Sentinel Hotspots",
            "tags": "Other",
            "previewImageUrl": "content/hazards/sentinel.png",
            "previewDescription": "Sentinel is a national bushfire monitoring system that provides timely information about hotspots to emergency service managers across Australia. The mapping system allows users to identify fire locations with a potential risk to communities and property.",
            "applicationUrl": "http://sentinel.ga.gov.au/#/announcement?utm_source=promotion&utm_medium=homepage&utm_content=Sentinel&utm_campaign=Online-Tools"
        },
        {
            "title": "Recent Earthquakes",
            "tags": "Other",
            "previewImageUrl": "content/hazards/recentearthquakes.png",
            "previewDescription": "Earthquakes are one of the natural hazards which Geoscience Australia monitors and assesses in order to inform risk mitigation and emergency management activities.",
            "applicationUrl": "http://www.ga.gov.au/earthquakes/"
        }
    ],
    "tags": [
        {
            "id": "Other",
            "description": "Relevant hazard mapping applications.",
            "title": "Related Applications"
        }
    ]
}

The above app.json will generate the following page

Third level folder structure

In the third level under the maps directory you must create a json file with matching the maps id you created in the app.json file.

EarthqaukesHazards.json

id - unique identifier of map, this will match the map id in app.json
title – title that appears in the header
datumProjection - projection used to define the base map
displayProjection - projection used for display purposes
initialExtent - sets the initial extent of the map, coordinates should be in the display projections format
requiresTermsAndConditions - boolean value true or false, on whether to display the terms and conditions popup

headerConfig
title – text that will appear in the header next to the logo

aboutConfig
enabled - boolean value true or false
bodyUrl - url for the html to display inside the about panel

layersConfig
enabled - boolean value true or false

overviewOptions
layers - an array with which layer to display in the overview window. You can either use the matching slug from the master-layer-list.json file or define your own layer here

baseLayersConfig
enabled - boolean value true or false

legendConfig
enabled - boolean value true or false
bodyUrl - url for the html to display inside the about panel

toolsConfig
enabled - boolean value true or false
timeout - sets the timeout period for the tools
tools - an array with which tools are required for this map. You can either use the matching tool id from the master-tool-list.json file or define the tool here

baseMaps - an array with which base layers the map will contain. You can either use the matching slug from the master-layer-list.json file or define your own base layer here

layerMaps - an array with which layers the map will contain. You can either use the matching slug from the master-layer-list.json file or define your own layer here. You can also overirde any of the default parameters of each layer. i.e. change the default opacity setting

seacrh
type - type of search you wish to use
typeAheadTemplateUrl - url for the typeahead template you wish to use
primaryWfsProperty - wfs property you wish to search on

{
    "id": "earthquakehazards",
    "title": "Earthquake Hazards",
    "datumProjection": "EPSG:3857",
    "displayProjection": "EPSG:4326",
    "initialExtent": [
        [
            99,
            10
        ],
        [
            169,
            -55
        ]
    ],
    "requiresTermsAndConditions": false,
    "headerConfig": {
        "title": "Earthquake Hazards"
    },
    "aboutConfig": {
        "enabled": true,
        "bodyUrl": "content/hazards/earthquakehazards/about.html"
    },
    "layersConfig": {
        "enabled": true
    },
	"overviewOptions": {
		"layers": [
			{
            "slug": "National_Color_Base_Map"
			}
		]
	},
    "baseLayersConfig": {
        "enabled": true
    },
    "legendConfig": {
        "enabled": true,
        "legendUrl": "content/hazards/earthquakehazards/legend.html"
    },
    "toolsConfig": {
        "enabled": true,
        "timeout": 5000,
        "tools": [
			{
                "id": "addLayer"
            },
            {
                "id": "export"
            },
			{
            "id": "identifyTool",
            "config": {
                "propertiesOfInterest": ["cont_val","Pixel value"],
                "propertiesAlias": ["Contour Value (g)","Pixel Value (g)"],
                "requiresGeometry": false,
                "endpoints": [			
					{
					"url": "http://www.ga.gov.au/gis/rest/services/hazards/EarthquakeHazard/MapServer", 
					"geometryName": "Shape", 
					"layers":"1", 
					"imageDisplay": "600,550,96", 
					"featureTitle": "0.0s Response Spectral Acceleration (RSA)", 
					"queryType": "ArcGISREST" 
					},
					{ 
					"url": "http://www.ga.gov.au/gis/rest/services/hazards/EarthquakeHazard/MapServer", 
					"geometryName": "Shape", 
					"layers":"0", 
					"imageDisplay": "600,550,96", 
					"featureTitle": "RSA Contours", 
					"queryType": "ArcGISREST" 
					}
			]
			}
			}
        ]
    },
    "baseMaps": [
        {
            "slug": "World_Image_XYZ"
        }
    ],
    "layerMaps": [
        {
            "slug": "Australian_Topography_2014_ARCGIS"
        },
        {
            "slug": "Earthquake_Hazards",
            "opacity": 0.7,
            "queryFeatures": true
        }
    ],
    "search": {
        "type": "geonames",
        "typeAheadTemplateUrl": "resources/partial/placeNameSearchResultTemplate.html",
        "primaryWfsProperty": "name"
    }
}

The above configuration will generate the following map