Our prototype Mapping System (M4OPS) > M4OPS - Technicalities

M4OPS parameters

(1/1)

PeterC:
When you first call M4OPS you can provide some parameters in the URL to guide how it opens, otherwise it just uses its defaults.

For these parameters:
* everything is case-sensitive
* each space should be replaced by "%20", so there are no actual spaces in the URL string
* the first parameter is preceded by "?", and each subsequent one by "&"
* examples are given at the end
[Note that one way to get some of these parameters is to manipulate M4OPS so it is as you want then click on the Copy button (top right) - you will then be given a URL you can copy]

Optional parameters for M4OPS are:
* OPS= code for the initial OPS (default HcN)
* NoCHNG means you cannot change the OPS
* File= filename of json to use, default M4OPS (.json)
* Showlevel= (default 9999) for demonstrations starts at 0 then goes up at cutoffpoints
* Layer0= the name (title) of the initial base layer to use (default is Bing Aerial)
* Layer1= the name (title) of the initial overlay layer to use (default is OSM, No%20layer is an option)
* Layer2= the name (title) of the initial first feature layer to use (default is No%20layer), and similarly for Layer3, Layer4 etc
* Displaystyle= (initial view)
* onemapOpacity - One map with Opacity slider, or
* sidebyside - Side by Side maps, or
* onemapSpy - One Map with Spyglass
* Zoom= initial zoom level eg 18
* Lon= initial Longitude decimal degrees, eg -0.0318640 for central Needingworth
* Lat= initial Latitude decimal degrees, eg 52.3304020 ditto
* Extent= the number of the layer to initially fit to (default is to use the HomeView, overridden by Zoom/Lon/Lat)
* Colours= initial colour scheme for features
* Click= the initial drop-down value - one of:
* no - No lat/lon click
* M4OPScsv - M4OPS lon;lat csv
* M4OPSparam - M4OPS parameters
* csv - lat,lon csv
* geojson - {lon,lat} GeoJSON
* EPSG3857 - EPSG:3857 (x/y)
* HDMS - DegMinSec N/E
* GeoHack - GeoHack links
* Featureid - Feature id
* Splash= html text for splash screen when M4OPS first opens, can include abbreviations (#..#)
* one word abbreviations will, if necessary, have the word Splash appended, and be surrounded by #..#
* (thus Splash=Spyglass becomes #SpyglassSplash#)
* (and Splash=25inch becomes #25inchSplash#)
* Tab= the initial advanced option tab to show:
* Actions - PNG, Demo, icons (the default)
* MFL - Modifiable Feature Layers
* Upload - Upload, compile
* Time - Time sliders
* Green if you want the background in development to be the normal Green
* NoShift if you want the layers NOT shifted east or north
* LoadwA if you want tiles loaded during animations (may improve the user experience, but can also make things stutter on devices with slow memory)
* LoadwI if you want tiles loaded while interacting with the map (ditto)
* (Mouse if you want the next feature to be Georeferenced to appear by the mouse pointer)
Examples of using M4OPS with parameters are (the new lines here are just for display):

1) Show Pubs over Lidar and zooms to the Pubs
?OPS=HcN
&Layer2=Pubs
&Layer1=Lidar%20HcN
&Extent=2

2) Use spyglass display mode to compare test maps
?OPS=HcN
&Layer0=Hunts%20XIX_SW%201927%20whole
&Layer1=Hunts%20XIX_SW%201927%20stitched
&Displaystyle=onemapSpy
&Lon=-0.0320566
&Lat=52.3304344
&Splash=Spyglass

3) Use spyglass display mode to show a 25 inch map over the Bing aerial map, and lay Pubs over the top
?OPS=HcN
&Layer0=Bing%20Aerial
&Layer1=OS%2025%20inch%201925
&Layer2=Pubs
&Displaystyle=onemapSpy
&Lon=-0.0331381
&Lat=52.3298742
&Splash=Spyglass
&Zoom=18

Navigation

[0] Message Index

Go to full version