Nearmap
Nearmap WMS 2.0
As of August 2022 Nearmap have updated their WMS server, they have referred to this update as "WMS 2.0" but this is not a change to the WMS version supported by Nearmap, it is still 1.1.1, and is just used to indicate a new implementation of their server.
This change will break existing Weave toc model configurations for the Nearmap WMS map engines, since the change involved the renaming of all of the layers in Nearmap. The Nearmap WMS map engine in Weave still works as it did before, but you will need to update any toc models you have that relate to the Nearmap map engine to reflect the new layer names.
Note you should ensure that the id attribute for each toc model entry remains the same after the update so as to not break any bookmarks.
Integration with Nearmap can be done in two ways, either as a WMS service or as a separate tab in the interface similar to StreetView and Google Earth.
In order to use either of these two methods, you will need to be a licensed user of the Nearmap service.
Nearmap Panel
Server config
To enable the integration with Nearmap and Weave you'll need to provide Weave with the username/password that the Nearmap service is registered with, this is to allow Weave to generate tickets for authentication.
<?xml version="1.0" encoding="UTF-8"?>
<config xmlns="urn:com.cohga.server.config#1.0" xmlns:nearmap="urn:com.cohga.nearmap#1.0">
<nearmap:config>
<url><![CDATA[https://app.nearmap.com/api/0/checkaccess?]]></url>
<username>user@organisation.com</username>
<password>ENCFASGAHFUASHGASFAS</password>
</nearmap:config>
</config>
Client panel
The Web interface used in the Nearmap site can be embedded into a separate tab in Weave.
<view id="weave.nearmap">
<location>center</location>
</view>
Updated client config
Due to changes in the Nearmap API you must include an API key in the panel config, also note the change from weave.nearmap
to weave.nearmap2
.
You will need to get an API key from the Nearmap Administration page using your login and place it in the apiKey option below.
Note this requires version 2.6.6 of Weave or version 1.3.15 of the com.cohga.weave.nearmap
bundle.
<view id="weave.nearmap2">
<location>center</location>
<title>Nearmap</title>
<tabTip>Provides up-to-date aerial images</tabTip>
<apiKey>YOUR_API_KEY</apiKey>
</view>
WMS Service
A simple way that Nearmap can be added is using the WMS service provided by Nearmap. This is a standard WMS service that works the same as any other described in WMS MapEngine.
Custom WMS Service
First, add a reference to the WMS Map Engine, note this is a custom Nearmap service, so you should replace "[placeid]" with the unique id from the Nearmap Web UI, and "[apikey]" with your Nearmap API key.
Add this service to the client that you want the WMS service to be visible in
Generating the ToC entries for the service is a simple matter of executing the command at the OSGi console.
Running the above command will produce output similar to the following (it's tidied slightly to ensure the lines are not too long).
Sample Nearmap ToC
Simple WMS Service
First, add a reference to the WMS Map Engine you should replace "[apikey]" with your Nearmap API key.
Add this service to the client that you want the WMS service to be visible in
Generating the ToC entries for the service is a simple matter of executing the command at the OSGi console.
Running the above command will produce output similar to the following.