Linking to My Maps

An interface has been provided using URL Parameters as a simple means of calling the iShare My Maps interface from other web pages.

Interface Methods

There are two methods of interfacing via URL Parameters:

  1. Directly linking to a specific theme type in iShare.
  2. Simply requesting a map from the Map Server either by location or unique id.
    1. A web designer can include a location link, on a page all about Education, to a set of maps that start up with an Education theme displaying a set location, say a school, with a set zoom.
    2. Alternatively a Libraries page may have individual unique id links to a Libraries theme.  These may have links which simply have the Library UPRN and the solution will search for this ID and when found start the map zoomed to that feature.

Examples

URL link to a specific Theme
http://localhost/isharemaps.net/mycouncil.aspx?MapSource=organisation/planning&Layers=planning1,planning2

In the above example we are selecting to show the Planning map source with the planning1 and planning2 layers.


URL link to a Theme and Easting / Northing (location)
http://localhost/isharemaps.net/mycouncil.aspx?MapSource=organisation/education&StartEasting=351688&StartNorthing=385335&StartZoom=500&tab=maps

By adding the &tab=maps in the above example My Maps will be displayed with the Map tab shown.


URL link to a Theme and an Attribute Value from a Layer (unique id)
http://localhost/isharemaps.net/mycouncil.aspx?MapSource=organisation/education&SearchLayer=Secondary_Schools&SearchField=New_School_Name&SearchValue=Wade%20Deacon%20High&20School&StartZoom=500

Parameters


Parameter

Description

Type

 Required?

MapSource

The name of an existing My Maps MapSource in the form "Organisation/MapSource". The Organisation component is the name of the folder under WebApps\WebService\config that contains your Map Source configuration (this is usually your organisation name) while the MapSource component is the name of the MapSource filename without the .xml extension. E.g.

<MapName>organisation/planning</MapName> 

OR

<MapName>organisation/education</MapName>

String

Mandatory

BaseMapSource

This is the same as the MapSource parameter above but applies to Base Maps.

String

Optional

StartEasting or x

This is the Easting co-ordinate for the centre of the map. If an MBR has been defined for the MapSource selected then this parameter must fall within it.

Float

Optional

StartNorthing or y

This is the Northing co-ordinate for the centre of the map. If an MBR has been defined for the MapSource selected then this parameter must fall within it.

Float

Optional

StartZoom or z

This is the zoom level that you wish to be set when displaying the map. If this parameter is not specified the default of 500 is assumed. The zoom level is specified in metres.

String

Optional

SearchLayer

This must be a VALID Layer name as defined in the MapSource configuration file. E.g.

<LayerName> Secondary_Schools </LayerName>

String

Optional

SearchField

This must be a VALID field name defined for the previous SearchLayer as defined in the MapSource configuration file. E.g.

<Field> New_School_Name </Field>

String

Optional

SearchValue

This is the search string to use for searching the previously defined SearchField. Spaces should be replaced with %20. E.g.

Wade%20Deacon%20High&20School

String

Optional

Layers

A comma separated list of layers to show (the layer names should match the names in the MapServer mapfile)

String

Optional

Tab

This parameter is used to display the specified tab when My Maps is displayed. The values are restricted to the following:

maps - displays the Map tab

n - where n = 0 - 2 and represents the numeric value for the tab to display where the first tab is 0.

String

Optional

Notes

  1. For simplicity StartEasting can be replaced with x, StartNorthing can be replaced with y and StartZoom can be replaced with z.
  2. The StartEasting, StartNorthing (Easting/Northing Location), StartZoom and SearchLayer, SearchField, SearchValue (Attribute Value) parameters are mutually exclusive i.e. if SearchLayer, SearchField and SearchValue are supplied then the other parameters of StartEasting, StartNorthing & StartZoom will be ignored.
  3. If the Search parameters are incorrect then the map will be displayed for the MapSource selected using the default startup parameters defined in the MapSource configuration file.
  4. If the MapSource parameter is incorrect then the default Map source will be displayed as defined in the Root configuration file.
  5. If the Easting or Northing parameters are invalid then the map will be displayed using the Startup Easting and Northing co-ordinates defined for the Map Source in the MapSource configuration file.