Embedded maps – URL API

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 Parametere

Name Description
zoom Control 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. Syntaks: [{"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 er: 4326
  • Label is not required
  • Color is not required

Eksempel:

  • 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 Control what type of label that are to be used on drawn objects in drawgeom. Syntaks: [1|2|3|4]. lt is not demanded.

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:

<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?drawgeom={"wkt": "POLYGON ((10 63, 10 64, 12 64, 12 63))","srid":4326,"label":"some text"}' ></iframe><noframes>Your browser does not support iframe. <a href='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"}' target="_blank">You can see the content of the frame here</a></noframes>
Category: Tags: