This namespace contains function helpers that execute requests to Mapspace web services.
- Source:
- mapspace/bu.jsdoc
Methods
-
<static> checkSession(load, error)
-
Execute a request to the
CheckSession
service, returning true if current user is valid.Parameters:
Name Type Description load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> deleteAllExternalProviderTmpBackup(load, error)
-
Execute a request to the
DeleteAllExternalProviderTmpBackup
service to delete all the features for any external provider stored in Terratec storage services.Parameters:
Name Type Description load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> deleteUserWorkspace(name, load, error)
-
Executes a request to the
DeleteUserWorkspace
service, removing a workspace in the server.Parameters:
Name Type Description name
string The name of the workspace to remove.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getCustomLayers(load, error)
-
Execute a request to the
GetCustomLayers
, returning the list of custom layers for a user.Parameters:
Name Type Description load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getDefaultUserWorkspaces(load, error)
-
Execute a request to the
GetDefaultUserWorkspaces
service, returning a JSON object that has adata
value containing an array of objects representing workspace definitions with the default workspaces for the user.Parameters:
Name Type Description load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getExternalProviderStats(provider, status, action, time, load, error)
-
Execute a request to the
GetExternalProviderStats
service to query historical statistical data.Parameters:
Name Type Argument Description provider
Mapspace.FeatureProviderStore Provider name.
status
Mapspace.FeatureProviderStatus <nullable>
Optional status of the feature in the server.
action
Mapspace.FeatureServerActionType <nullable>
Optional type of action performed in the original feature.
time
numbner <nullable>
Optional time filter of the image to be search. A date following the structure YYYYMMDD or YYYYMM or YYYY. The service will retrieve the most current features available, whose date is previous to the requested date. It is also possible to use a range of dates with the structure YYYYMMDD-YYYYMMDD, in this case the features used will be the most current ones available in the specified date range. If the parameter is omitted the system will retrieve all features.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getExternalProviderTmpBackup(provider, status, ids, bbox, load, error)
-
Execute a request to the
GetExternalProviderTmpBackup
service to retrieve all the features for a given external provider stored in Terratec storage services.Parameters:
Name Type Argument Description provider
Mapspace.FeatureProviderStore Provider name.
status
Mapspace.FeatureProviderStatus | Array.<Mapspace.FeatureProviderStatus> <nullable>
Optional status. Can be one value or an array of values.
ids
Array.<string> <nullable>
Optional array of IDs to filter the result.
bbox
Mapspace.Extent <nullable>
Optional bounding box in EPSG:4326 projection system.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getGenericWMTSOrWMSCapabilities(url, isWMS, load, error)
-
Execute a request to any WMS/WMTS
GetCapabilities
service.Parameters:
Name Type Description url
string URL of the WMS/WMTS service.
isWMS
boolean If the service is WMS or WMTS.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getLayouts(load, error)
-
Execute a request to the
GetLayouts
service, returning Mapspace Viewer layout for certain user.Parameters:
Name Type Description load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getMapspaceWFSCapabilities(load, error)
-
Execute a request to the Mapspace WFS (
INWFSPROXY
) service.Parameters:
Name Type Description load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getMapspaceWMTSCapabilities(version, load, error)
-
Execute a request to the Mapspace WMTS (
DAWMTS
) service.Parameters:
Name Type Description version
string Version of the WMTS service.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getPOIProviders(format, load, error)
-
Execute a request to the
GetPOIProviders
service, returning the available POIs providers for certain user.Parameters:
Name Type Description format
Mapspace.ResponseFormat Format of the response.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getReverseGeocoding(point, zoom_level, srs, format, load, error)
-
Execute a request to the
SEInvAddress
service, returning the address for a given point defined by its coordinates.Parameters:
Name Type Description point
Mapspace.Coordinate Point in which search for reverse geocoding.
zoom_level
number Map view zoom level.
srs
string Spatial Reference System of the origin projection in EPSG:XXXX format.
format
Mapspace.ResponseFormat Format of the response.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getSRSInfo(epsg, format, load, error)
-
Execute a request to the
INGetSRS
service returning the projection information for a given EPSG code.Parameters:
Name Type Description epsg
string This is the EPSG code used to search by code. The value must be only the number without prefixing with 'EPSG:'.
format
Mapspace.ResponseFormat Format used in the response.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getSRSInfoList(name, format, load, error)
-
Execute a request to the
INGetSRS
service searching the available projections that matches a given name.Parameters:
Name Type Description name
string This is the string used to search projection by name.
format
Mapspace.ResponseFormat Format used in the response.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getTeg(tegid, id, load, error)
-
Execute a request to the
INGetTeg
service, returning the requested Teg file.Parameters:
Name Type Description tegid
string Teg identifier
id
string Tile quadtree identifier
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserAvailableBaselayers(format, priority, load, error)
-
Execute a request to the
INUserOrthoLayers
service, returning all available baselayers for a certain user.Parameters:
Name Type Description format
Mapspace.ResponseFormat Format used in the response.
priority
boolean If true that indicates that response must respect current user baselayers with order. False must return all available baselayers for all users.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserAvailableData(user, format, x, y, zoom_level, srs, types, yearMode, deliverExtents, includeOverlays, load, error)
-
Execute a request to the
GetUserAvailableData
service, returning a list of available ortho layers for a user.Parameters:
Name Type Description user
string Userkey of the user to request information for.
format
Mapspace.ResponseFormatExtended Format used in the response.
x
number X coordinate in the
srs
reference system.y
number Y coordinate in the
srs
reference system.zoom_level
number Zoom level.
srs
string Spatial Reference System of the origin projection in EPSG:XXXX format.
types
Mapspace.BaselayerType Indicates if request is for ortho or oblique.
yearMode
boolean Indicates if year is requested.
deliverExtents
boolean Indicates if extents are requested.
includeOverlays
boolean Indicates if overlays are requested.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserAvailableDtm3DLayers(format, load, error)
-
Execute a request to the
INGetUserAvailableDtm3DLayers
service, returning a list of available DTM 3D layers for a user.Parameters:
Name Type Description format
Mapspace.ResponseFormatExtended Format used in the response.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserAvailableLidarLayers(format, load, error)
-
Execute a request to the
INGetUserAvailableLidarLayers
service, returning a list of available LiDAR layers for a user.Parameters:
Name Type Description format
Mapspace.ResponseFormatExtended Format used in the response.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserAvailableMesh3DLayers(format, load, error)
-
Execute a request to the
INGetUserAvailable3DMeshLayers
service, returning a list of available 3D MEsh layers for a user.Parameters:
Name Type Description format
Mapspace.ResponseFormatExtended Format used in the response.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserAvailableObliqueLayers(format, priority, load, error)
-
Execute a request to the
INGetUserAvailableObliqueLayers
service, returning all available oblique layers for a certain user.Parameters:
Name Type Description format
Mapspace.ResponseFormat Format used in the response.
priority
boolean If true that indicates that response must respect current user oblique layers with order. False must return all available oblique layers for all users.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserAvailableOverlays(format, load, error)
-
Execute a request to the
INUserOverlayLayers
service, returning all available overlays for a certain user.Parameters:
Name Type Description format
Mapspace.ResponseFormat Format used in the response.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserAvailableProviders(format, load, error)
-
Execute a request to the
INUserAddressSources
, returning all available external providers for a certain user. It will deliver information about external providers and services of those external providers allowed to the user.Parameters:
Name Type Description format
Mapspace.ResponseFormatExtended Format used in the response.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserAvailableStreetLayers(priority, format, load, error)
-
Execute a request to the
INGetUserAvailableStreetLayers
, returning all available street layers for a certain user.Parameters:
Name Type Description priority
boolean If priority is true indicates that response must respect current user baselayers with order.
format
Mapspace.ResponseFormatExtended Format used in the response.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserAvailableVectorLayers(format, load, error)
-
Execute a request to the
INGetUserAvailableVectorLayers
service, returning a list of available vector layers for a user. This service returns the same array of WFS feature type names that thegetMapspaceWFSCapabilities
function returns.Parameters:
Name Type Description format
Mapspace.ResponseFormatExtended Format used in the response.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserLayers(format, load, error)
-
Execute a request to the
GetUserLayers
service returning a list of the availableUser layers
for a user. AUser layer
is an object that contain all necessary information to access a given dataset according to layer (base layer, overlay layer, oblique layer or street layer), date interval (data available between dates) and extent (extension available for a dataset).Parameters:
Name Type Description format
Mapspace.ResponseFormatExtended Format used in the response.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserLayersFormatList(format, load, error)
-
Execute a request to the
GetUserLayersFormatList
service, returning the list of the id and format type for userLayers.Parameters:
Name Type Description format
Mapspace.ResponseFormatExtended Format used in the response.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserLidarProjects(format, load, error)
-
Execute a request to the 'INGetUserLidarProjects' service, returning a JSON object that has a list of LiDAR projects.
Parameters:
Name Type Description format
Mapspace.ResponseFormat Format of the response.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserLogo(load, error)
-
Execute a request to the
GetUserLogo
service, returning client logo image.Parameters:
Name Type Description load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserMesh3DProjects(format, load, error)
-
Execute a request to the 'INGetUserMesh3DProjects' service, returning a JSON object that has a list of Mesh3D projects.
Parameters:
Name Type Description format
Mapspace.ResponseFormat Format of the response.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserProfileInfo(profileId, extentId, load, error)
-
Execute a request to the 'GetUserProfileInfo' service, returning a JSON object that has a 'data' value containing diferent values depending on request parameters. Without parameters, the service returns information about diferent types of profiles. If profileId is used the service returns information about this profile type. If extentId is used the service returns the extent.
Parameters:
Name Type Description profileId
number | null Id of the profile.
extentId
number | null Id of the extent.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserStreetProjects(format, load, error)
-
Execute a request to the 'INGetUserStreetProjects' service, returning a JSON object that has a list of Street projects.
Parameters:
Name Type Description format
Mapspace.ResponseFormat Format of the response.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserWorkspaceByUserAndName(name, load, error)
-
Executes a request to the
GetUserWorkspaceByUserAndName
service, returning a JSON object that has adata
value containing an object representing the definition of a given workspace. The object has adescription
value with the description of the workspace and adefinition
value with the definition of that workspace.Parameters:
Name Type Description name
string The name of the workspace to search for.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserWorkspaceLog(name, load, error)
-
Executes a requesto to the 'GetUserWorkspaceLog' service, returning a JSON objecto that has data about workspace actions.
Parameters:
Name Type Description name
string Name of the workspace to request actions for.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> getUserWorkspacesNames(load, error)
-
Executes a request to the
GetUserWorkspacesNames
service, returning a JSON object that has adata
value containing an array of objects representing workspaces availables for the user. Each object has aname
value with the name of the workspace and alast_modification
value with the date and time of last modification of that workspace.Parameters:
Name Type Description load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> insertUserWorkspace(name, description, definition, load, error)
-
Executes a request to the
InsertUserWorkspace
service, inserting a workspace in the server.Parameters:
Name Type Description name
string The name of the workspace to insert.
description
string A description for the workspace.
definition
string A string version of a JSON object with the definition of the workspace.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> insertUserWorkspaceLog(name, actionId, load, error)
-
Executes a requesto to the 'InsertUserWorkspaceLog' service, returning a JSON objecto that has data about workspace actions.
Parameters:
Name Type Description name
string Name of the workspace to request actions for.
actionId
string ID of the action.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> login(user, pwd, userkey, load, error)
-
Execute a request to the
Login
service.Parameters:
Name Type Description user
string User name.
pwd
string Password. User name and password are encripted previously to send the data.
userkey
string userkey. If present then user and pwd are ignored and the userkey is used instead as the only param to login.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> logout(load, error)
-
Execute a request to the
Logout
service.Parameters:
Name Type Description load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> projectCoordinates(format, points, srs1, srs2, load, error)
-
Execute a request to the
ProjectCoordinates
service, transforming a list of 2D coordinates from one projection system to another one.Parameters:
Name Type Description format
Mapspace.ResponseFormat Format used in the response.
points
Array.<number> Array of coordinates to transform. The number of coordinates must be an even number. Odd numbers represent X coodinates and even coordinates represent Y coordinates.
srs1
string Spatial Reference System of the origin projection in EPSG:XXXX format.
srs2
string Spatial Reference System of the target projection in EPSG:XXXX format.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> resetPassword(user, pwd, newpwd, userkey, load, error)
-
Execute a request to the
reset password
service.Parameters:
Name Type Description user
string User name.
pwd
string Curent pnpassword.
newpwd
string New password.
userkey
string Userkey.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> saveExternalProviderTmpBackup(provider, status, action, featureid, geometry, featureInfo, load, error)
-
Execute a request to the
SaveExternalProviderTmpBackup
service, saving a feature in Terratec storage services.Parameters:
Name Type Argument Description provider
Mapspace.FeatureProviderStore Provider name.
status
Mapspace.FeatureProviderStatus Status o the feature in the server.
action
Mapspace.FeatureServerActionType Type of action performed in the original feature.
featureid
string <nullable>
Id of the original feature or an empty string for new feature.
geometry
string A WKT serialization of the geometry of the feature with coordinates in WGS84 lonlat.
featureInfo
string A JSON serialization of the feature in Mapspace JSON format.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> sendRequest(url, method, load, error, mimetype, responseType)
-
ServiceRequest: This is the generic service launcher.
Parameters:
Name Type Argument Description url
function URL to be launched.
method
string Http method to be used, (
GET
orPOST
).load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
mimetype
string <nullable>
An optional MIME type to override the default
text/xml
type.responseType
string <nullable>
An optional string with the type of data contained in the response, to override the default
text
value.- Source:
- mapspace/services.js
-
<static> sendRequestWithAuthentication(url, method, load, error, mimetype, responseType, user_value, pass_value)
-
ServiceRequest: This is the generic service launcher.
Parameters:
Name Type Argument Description url
function URL to be launched.
method
string Http method to be used, (
GET
orPOST
).load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
mimetype
string <nullable>
An optional MIME type to override the default
text/xml
type.responseType
string <nullable>
An optional string with the type of data contained in the response, to override the default
text
value.user_value
string <nullable>
An optional string with the user value for basic authentication request.
pass_value
string <nullable>
An optional string with the password value for basic authentication request.
- Source:
- mapspace/services.js
-
<static> sendSupportForm(name, email, phone, message, load, error)
-
Execute a request to the
send message to Mapspace support
service.Parameters:
Name Type Description name
string User name.
email
string User email
phone
string User phone number
message
string User message
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> setUserPreferences(load, error)
-
Execute a request to the
SetUserPreferences
service.Parameters:
Name Type Description load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> updateExternalProviderTmpBackup(id, status, action, featureid, geometry, featureinfo, load, error)
-
Execute a request to the
UpdateExternalProviderTmpBackup
service to update a feature in Terratec storage services.Parameters:
Name Type Argument Description id
string Id of the feature in Terratec storage services.
status
Mapspace.FeatureProviderStatus <nullable>
Optional status of the feature in the server.
action
Mapspace.FeatureServerActionType <nullable>
Optional type of action performed in the original feature.
featureid
string <nullable>
Id of the original feature or an empty string for new feature.
geometry
string <nullable>
Optional WKT serialization of the geometry of the feature with coordinates in WGS84 lonlat.
featureinfo
string <nullable>
Optional JSON serialization of the feature in Mapspace JSON format.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js
-
<static> updateUserWorkspace(name, description, definition, newname, load, error)
-
Executes a request to the
UpdateUserWorkspace
service, updating a workspace in the server.Parameters:
Name Type Argument Description name
string The name of the workspace to update.
description
string A description for the workspace.
definition
string A string version of a JSON object with the definition of the workspace.
newname
string <nullable>
An optional new name for the workspace. If present then the workspace is renamed when updated.
load
function Function to execute if response is loaded.
error
function Function to execute if response has an error.
- Source:
- mapspace/services.js