/
Client Actions URL Generator
Client Actions URL Generator
Provide a helper action to generate a URL to the current client including references to the current position and scale. The URL will be copied to clipboard and can easily be pasted into a document or another browser. Accessing the generated URL will open up a new client and set the initial position and scale to instructed by the URL.
The bundle can be downloaded here
ID
se.viamap.client.map.urlGenerator
Sub-Tags
Name | Type | Cardinality | Default | Description |
---|---|---|---|---|
url | string | 0..1 | Browser url | The url will be set automatically by the browser. This can optionally be overridden by setting a fixed url. |
marker | boolean | 0..1 | false | Should a marker be placed on the x,y position when the client is loaded. |
showMessage | boolean | 0..1 | true | Should a message pop up to confirm that the URL have been generated and copied to clipboard. |
trackMouse | boolean | 0..1 | false | Should the coordinates represent the current mouse position of the map. This is suitable if the action is placed within the map context menu. By default coordinates represents the center of the map. |
Example
<!-- Simple action with default settings --> <item action="weave.urlGenerator" /> <!-- Action with additional options --> <item action="weave.urlGenerator" > <url>https://localhost/weave/main.html</url> <marker>true</marker> <showMessage>false</showMessage> <trackMouse>true</trackMouse> </item>
i18n resources
id | default |
---|---|
map.urlGenerator.tooltip.title | Copy hyperlink to clipboard |
map.urlGenerator.tooltip.text | Generates a hyperlink to this client with reference to current position and scale. The hyperlink will be copied to clipboard |
map.urlGenerator.title | Copy hyperlink |
map.urlGenerator.success.title | Copy success |
map.urlGenerator.success.msg | Successfully copied hyperlink to clipboard |
map.urlGenerator.error.msg | Could not copy hyperlink to clipboard |
i18n resources
<?xml version="1.0" encoding="UTF-8"?> <config xmlns="urn:com.cohga.server.config#1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:client="urn:com.cohga.html.client#1.0"> <!-- Swedish --> <client:resources lang="sv"> <resource id="map.urlGenerator.tooltip.title"><![CDATA[Kopiera hyperlänk som urklipp]]></resource> <resource id="map.urlGenerator.tooltip.text"><![CDATA[Generera en hyperlänk till klienten med referens till nuvarande position. Hyperlänken kopieras som ett urklipp]]></resource> <resource id="map.urlGenerator.title"><![CDATA[Kopiera hyperlänk]]></resource> <resource id="map.urlGenerator.success.title"><![CDATA[Kopieringen lyckades]]></resource> <resource id="map.urlGenerator.success.msg"><![CDATA[Kopierade hyperlänk till urklipp]]></resource> <resource id="map.urlGenerator.error.msg"><![CDATA[Kunde inte kopiera hyperlänk]]></resource> </client:resources> <!-- Norwegian--> <client:resources lang="no"> <resource id="map.urlGenerator.tooltip.title"><![CDATA[Kopier hyperkobling til utklippstavlen]]></resource> <resource id="map.urlGenerator.tooltip.text"><![CDATA[Generere en hyperkobling til klienten med referanse til den aktuelle posisjonen. Den hyperkobling er kopiert til utklippstavlen]]></resource> <resource id="map.urlGenerator.title"><![CDATA[Kopiere hyperlink]]></resource> <resource id="map.urlGenerator.success.title"><![CDATA[Kopiering lyktes]]></resource> <resource id="map.urlGenerator.success.msg"><![CDATA[Kopiert hyperkobling til utklippstavlen]]></resource> <resource id="map.urlGenerator.error.msg"><![CDATA[Kunne ikke kopiere hyperlink]]></resource> </client:resources> </config>
, multiple selections available,