Embedded maps – URL API

Allows you to manipulate maps using one set of URL parameters. Relevant parameters can be combined in the following order:

  1. drawgeom
  2. zoombox
  3. zoom

URL parameters

Name Description
zoom Controls the zoom level. Values are often between 1-16

Example:

  • zoom=12
zoombox Zoomer to max. Syntaks: minX,minY,maxX,maxY,SRID

Example:

  • zoombox=225060,7018725,331687,7081517,32633
  • zoombox=63.005978555197395,7.699730040672304,63.95955477757647,13.297872932848932,4326
drawgeom

Draws vector data based on the WKT representation. More can be sent using JSON array. Syntax:
[{"wkt": "POLYGON ((10 63, 10 64, 12 64, 12 63))","srid":4326[,"label":"some text"][,color:[blue|purple|green|red]]}]

  • Srid is not required – standard is: 4326
  • Label is not required
  • Color is not required

Example:

  • drawgeom={"wkt": "POLYGON ((10 63, 10 64, 12 64, 12 63))","srid":4326,"label":"some text"}
  • drawgeom=[{"wkt": "POLYGON((141880 6814964,101260 6915160,1064 6874540,41683 6774344,141880 6814964))","srid":32633,"label":"Proj 32633","color":"purple"},{"wkt": "POLYGON ((10 63, 10 64, 12 64, 12 63))","srid":4326,"label":"some text","color":"red"}]
  • drawgeom=[{"wkt": "POINT(12 65)","srid":4326,"label":"Punkt tekst","color":"green"},{"wkt": "LINESTRING(13 63, 13 64, 14 63)","srid":4326,"label":"Linje tekst","color":"purple"},{"wkt": "POLYGON ((10 63, 10 64, 12 64, 12 63))","srid":4326,"label":"Polygon tekst","color":"red"}]
lt Controls the type of label to be used on drawn objects in drawgeom. Syntax: [1|2|3|4]. Not required.

Possible values:

  1. Label displayed when the mouse pointer is over the object (standard)
  2. Static label and label when the mouse pointer is over the object
  3. Static label
  4. Label shows by click on objects

Example on iframe code with URL API

<iframe name="embedMap" title="Adaptive EmbedMap" scrolling="no" frameborder="0" width="400px" height="600px" src="http://localhost/a_a3/embedded/38e28790-4146-4150-ac41-7bcd99371a5b?zoom=3" ></iframe><noframes>Your browser does not support iframe. <a href="http://localhost/a_a3/embedded/38e28790-4146-4150-ac41-7bcd99371a5b?zoom=3" target="_blank">You can see the content of the frame here</a></noframes>

Note! When using drawgeom you must use single quotes ( ‘) around the url when the url itself contains double quotes ( “).

Example:

<code><iframe name="embedMap" title="Adaptive EmbedMap" scrolling="no" frameborder="0" width="400px" height="600px" src=<strong>'http://localhost/a_a3/embedded/38e28790-4146-4150-ac41-7bcd99371a5b?drawgeom={"wkt": "POLYGON ((10 63, 10 64, 12 64, 12 63))","srid":4326,"label":"some text"}'</strong> ></iframe><noframes>Your browser does not support iframe. <a href=<strong>'http://localhost/a_a3/embedded/38e28790-4146-4150-ac41-7bcd99371a5b?drawgeom={"wkt": "POLYGON ((10 63, 10 64, 12 64, 12 63))","srid":4326,"label":"some text"}'</strong> target="_blank">You can see the content of the frame here</a></noframes>

Submit a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.