Publishing Tool

The Publishing tool is often used to highlight a map feature when embedding Mappin into other web pages. Imagine you have an existing web portal with information on local recreational areas. There’s an existing page there about Dunvant Rugby & Football Club and you now wish to add a map of the club there too.

In this instance you could embed Mappin into the existing page using an <iframe/> element, setting the url to:

https://YOU.cloudmappin.com/PROJECT#publish?layer=Playing%20fields&attr=Name&key=Dunvant%20Rugby%20Football%20Club&zoom=11 (where YOU is your customer ID and PROJECT is the name of your Mappin project)

The parameters in the URL tell Mappin to search for a feature in the Playing fields layer with attribute Name equal to Dunvant Rugby Football Club and to centre the map on it at a zoom level of 11

So now the embedded map on the club’s page will display something looking like this:

../_images/publish_1.png

There’d be a similar result by simply opening the URL above in a web browser.

The Publishing tool supports the following HTTP GET parameters:

  • layer - the layer (its alias) to publish
  • attr - the attribute (its alias) in layer to search on
  • key - the value to match in attr
  • zoom (optional) - the initial zoom level to use

The endpoint for the Publishing tool is /PROJECT#publish (where PROJECT is the name of your Mappin project).

Please note that if any of the above GET parameter values contain spaces or other special characters, these will need to be escaped (e.g. replacing a space with %20). More information on escaping characters in URLs can be found here.

Configuration

The Publishing tool has the following settings.

../_images/publish_settings.png

Lyrs And Attrs

Specifies which attributes (and also implies which layers) should be reachable via the Publishing tool.