MAPPE DELLA SARDEGNA
sardegnamappe api  ›  api documentation  ›  classe
Class framework.plugins.MapLinker


Extends gxp.plugins.Tool.
Class for template and map saving management.
Defined in: MapLinker.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
Class for template and map saving management.
Field Summary
Field Attributes Field Name and Description
 
the base Ajax Url for ajax request default ""
 
the custom Url for saved map default ""
 
featureLayers container
 
The prefix of the names of the css classes that define the icons of the buttons created to activate the mapLinker.
 
Together with 'iconClsPrefix' define the icons of the buttons created
 
framework_maplinker plugin type.
 
Text for zoom in action tooltip (i18n).
Method Summary
Method Attributes Method Name and Description
 
Adds actions to be performed on click.
 
getDigest(onSuccess)
Requests a digest based on client ip.
 
Sets plugin modality to 'map'.
 
Saves a map serializing its content in json creating a new map id.
 
saveTemplate(templateName, forceWrite)
Saves a template serializing its content in json.
 
Shows a window containg a link for template/map sharing.
 
Sets plugin modality to 'template'.
 
Get serialization of data to be saved.
 
Function to be override to change the default behavior.
Class Detail
framework.plugins.MapLinker()
Class for template and map saving management. Calls servlet for digest creation and file storing on server side.
Field Detail
{String} baseUrl
the base Ajax Url for ajax request default ""

{String} customUrl
the custom Url for saved map default ""

{Array(Object)} featureLayers
featureLayers container

{String} iconClsPrefix
The prefix of the names of the css classes that define the icons of the buttons created to activate the mapLinker. You must define a class in your CSS file called with the value of the expression this.iconClsPrefix+this.mode that specifies the above mentioned icon.

{String} mode
Together with 'iconClsPrefix' define the icons of the buttons created

{String} ptype
framework_maplinker plugin type.

{string} tooltipText
Text for zoom in action tooltip (i18n).
Method Detail
addActions()
Adds actions to be performed on click.

getDigest(onSuccess)
Requests a digest based on client ip.
Parameters:
{function} onSuccess
function to be called when the digest has been received

mapMode()
Sets plugin modality to 'map'.

saveMap()
Saves a map serializing its content in json creating a new map id.

saveTemplate(templateName, forceWrite)
Saves a template serializing its content in json.
Parameters:
{String} templateName
name of template to be saved
{boolan} forceWrite
write file whitout prompting even it already exists

showLinkDialog(name)
Shows a window containg a link for template/map sharing.
Parameters:
{String} name
Name of template/map saved

templateMode()
Sets plugin modality to 'template'.

toJson()
Get serialization of data to be saved.

useMapConfiguration(id)
Function to be override to change the default behavior.
Parameters:
{number} id
id of current map configuration
© 2013 Regione Autonoma della Sardegna