MapiaBox web map class. Main map on which user can add mbxControls and mbxLayers.
(string)
array
:
Array of additional modules (mbxModule) to the principal. This array is loaded from the modules.
object
:
Viewer properties
Creates a new map
(string)
Id of the div containing the map. It has to exist already.
(string)
Id of the div containing the control panel. It has to exist already.
(string)
Id of the div containing the modal messages. It has to exist already.
(string)
Id of the full-screen control
(object)
L.map.options
Refreshes mbxMap values. Parameters are not modified if they are not assigned
(string)
URL or string with URL parameters to parse.
(boolean)
If true, all overlays loaded to the map are removed. If false, only the overlays on the 'lc' param are removed.
Refreshes mbxMap values from a GET call from URL. Parameters are not modified if they are not assigned
Refreshes the map and shows all layers
(L.latLng)
Coordinates where to center the map
Resizes the map again if container size is modified
Shows the "About us" information in the PanelControl
Shows a message in a modal dialog
Shows the feature infomation into the PanelControl or into a popup
Adds a title to mbxMap. Use [VariableControlMapiaBoxTitle].Control.update(sNewHTMLTitle) function to refresh mbxMap title.
TODO
TODO
(string)
Code for the control
(string)
ID of the side panel 'div'. It can be located anywhere in the html
(string)
Position: left or right
(boolean)
If true, it adds a close button to the panel
(boolean)
If true, map pans slightly on panel open
(number)
Show panel automatically after nTimeOut milliseconds
Adds all layers to the lateral panel
TODO
(object)
Control options object
{
BaseLayerNameA: 'Google Satellite'
BaseLayerIconA: 'resources/basemap_satellite.png'
titleToA: 'Use topographic as basemap'
BaseLayerNameB: 'ICGC Topogràfic'
BaseLayerIconB: 'resources/basemap_topo.png'
titleToB: 'Use ortoimage as basemap'
BaseActiveLayer: 'BaseLayerNameA'
}
Adds a control to change among a list of views.
Needs google apis library to be referenced. Initiate mbxUtil.GoogleShortUrlLoad afterwards.
{
BaseLayerNameA: 'Google Satellite'
BaseLayerIconA: 'resources/basemap_satellite.png'
titleToA: 'Use topographic as basemap'
BaseLayerNameB: 'ICGC Topogràfic'
BaseLayerIconB: 'resources/basemap_topo.png'
titleToB: 'Use ortoimage as basemap'
BaseActiveLayer: 'BaseLayerNameA'
}
Adds a MapiaBox control to control Mapiabox layers
Adds a mbxControl to return to the initial view of the map.
Adds a mbxControl to perform measures on the map.
Adds a mbxControl to share the map URL keeping the current map center, zoom level and layers. Needs google apis library to be referenced. Initiate mbxUtil.GoogleShortUrlLoad afterwards.
Adds a mbxControl to share the map URL keeping the current map center, zoom level and layers. It allows the user to add a point or a polygon with some notes before sharing the map. Needs google apis library to be referenced. Initiate mbxUtil.GoogleShortUrlLoad afterwards.
Adds a control to share a link of the map. Simple versión of ShareMap control. Needs google apis library to be referenced. Initiate mbxUtil.GoogleShortUrlLoad afterwards.
Adds a Leaflet Control.Scale to the map
(object)
Control.Scale options object
Adds a logo image to the map as a Leaflet.Control
Adds location to the map as a Leaflet.Control
(object?)
Optional control options object
Adds a custom legend control as a Leaflet.Control
Adds a Leaflet-Routing-Machine routing control
Needs Leaflet Routing Machine library
(object)
Control options object
{
title: Girona - Lleida,
markerUrl: 'resources/marker.png',
video: 'resources/videos/video-',
timing: 'resources/timings/timing-',
date: [170701, 170801, 170901],
lineColor: '#FFFFFF',
dashArray: '5,5'
}
object
:
(mbxQuery) To handle queries on MapiaBox. Automatically created on map creation
string
:
To show information in a div. Created on map creation.
html
:
To show modal dialogs
mbxControl class.
mbxGroup class.
mbxLayer class.
Class to define new views with active layers
Class to define a new mbxLink
Class to define a new mbxZone
mbxConfigurations object to configure MapiaBoxWeb map
mbxUtils class
Calculates an elevation using ICGC WMS service
Returns the RefCat from some coordinates or coordinates from a RefCat
Creates a text marker
(string)
Text to add to the marker
(object)
(L.latLng) Marker position
(object)
(L.layer) Leaflet layer to add the marker
(string?)
Marker class name
object
:
(L.marker) Marker returned
Loads the APIs to use ShortURL library from Google (maximum 1000000/day). To make APIs work references to script 'https_apis.google.com_js_client.js' is needed
Shortens a long URL using Google ShortURL API. Call to GoogleShortURLLoad needed before using this
Parses a CSV into a geoJson. Fields have to be surrounded by quotation marks
(array)
URL of the CSV to parse
(array)
Name of the field containing latitude
(array)
Name of the field containing longitude
(array?)
Delimiter char. Default is "."
(array)
Function to execute when codes are returned. Receives geoJson feature as a parameter
Gives easy access to default MapiaBox Public Layers
Returns true if ICGC historic layer exists
(string)
ICGC layer name to check if exists. Accepted names are: 'orto10c2011','orto10c2010','orto25c2014','orto25c2013','orto25c2012','orto25c2011','orto25c2010','orto25c2009','orto25c2008','orto25c2007','orto5m2013','orto5m2012','orto5m2011','orto5m2010','orto5m2009','orto5m2008','orto5m2007','orto5m2006','orto5m2005','orto5m2004','orto5m2003','orto5m2002','orto5m2001','orto5m2000','orto5m1999','orto5m1998','orto5m1997','orto5m1996','orto5m1995','orto5m1994','orto5m1992','orto5m1991','orto5m1990','orto5m1989','orto5m1988','orto5m1987','orto5m1986','orto5m1984','orto5m1983','orto25m2013','orto25m2012','orto25m2011','orto25m2010','orto25m2009','orto25m2008','orto25m2007','orto25m2006','orto25m2005','orto25m2004','orto25m2003','orto25m2002','orto25m2001','orto25m2000','orto25m1997','orto25m1996','orto25m1993','orto25m1990','orto25m1989','ortoi25c2014','ortoi25c2013','ortoi25c2012','ortoi25c2011','ortoi25c2010','ortoi25c2009','ortoi25c2008','ortoi5m2012','ortoi5m2011','ortoi5m2010','ortoi5m2009','ortoi5m2008','ortoi25m2013','ortoi25m2012','ortoi25m2011','ortoi25m2010','ortoi25m2009','ortoi25m2008','ortoi25m1997','ortoi25m1996','ovab5m','ovaa10m'
boolean
:
If true, layer exists
MapiaBox geographic utilities.
Converts a latitude/longitude pair to x and y coordinates in the Transverse Mercator projection. Note that Transverse Mercator is not the same as UTM; a scale factor is required to convert between them
Converts x and y coordinates in the Transverse Mercator projection to a latitude/longitude pair. Note that Transverse Mercator is not the same as UTM; a scale factor is required to convert between them
Converts a latitude/longitude pair to x and y coordinates in the Universal Transverse Mercator projection
(number)
Latitude of the point, in radians
(number)
Longitude of the point, in radians
(number)
UTM zone to be used for calculating values for x and y. If zone is less than 1 or greater than 60, the routine will determine the appropriate zone from the value of lon
(array)
A 2-element array where the UTM x and y values will be stored
number
:
UTM zone to be used for calculating values for x and y. 'zone' parameter
Converts x and y coordinates in the Universal Transverse Mercator projection to a latitude/longitude pair
(number)
The easting of the point, in meters
(number)
The northing of the point, in meters
(number)
The UTM zone in which the point lies
(boolean)
True if the point is in the southern hemisphere
(array)
A 2-element array containing the latitude and longitude of the point, in radians