Parent namespace for all GeoMOOSE classes.
GeoMOOSE | Parent namespace for all GeoMOOSE classes. |
Functions | |
splitPaths | Splits paths in a GeoMOOSE path string (split by ‘:’) |
error | Display an error to the user. |
warning | Similar to error, but with less severity. |
registerMapSourceType | Registers a Class to a GeoMOOSE class type Parameters: map_source_type - The map-source type from the Mapbook. |
getMapSourceType | Get the class for a given layer type Parameters: map_source_type - The map-source type from the Mapbook. |
asArray | Converts parameter to an array. |
configureMapSource | Parses a map-source XML fragment and adds it to the map. |
changeLayerVisibility | Turn a layer on or off. |
turnLayerOn. | Turns on some layers. |
turnLayerOff. | Turns off some layers. |
refreshLayers | Force some layers to redraw. |
isEditable | Checks to see if a MapSource is editable. |
getLayerUrl | Get the base URL for a given layer. |
changeLayerUrl | Change the base URL for a given layer. |
updateLayerParameters | Change the params for a given layer. |
updateLayerFilter | Change the filter for a given layer. |
getLayerParameters | Get the params for a given layer. |
getLayerOpacity | Get the client-side Opacity parameter setting. |
setLayerOpacity | Set the client-side Opacity parameter setting. |
clearLayerParameters | Clears all the user set parameters from a MapSource. |
getVisibleLayers | Get the list of currently visible layer paths. |
getExtent | Get the map’s extent as an array. |
getScale | Return the map’s current scale. |
inScale | Check whether a given min/maxscale is within the current scale. |
moveLayerUp | Move’s a layer up on the visibility stack. |
moveLayerDown | Move’s a layer down on the visibility stack. |
fadeLayer | Fade out the opacity by CONFIGURATION.layer_controls.fade.change_percent. |
unfadeLayer | Un-Fade out the opacity by CONFIGURATION.layer_controls.fade.change_percent. |
startService | Start a service with some given parameters |
changeTab | Change to a tab given by tabName |
zoomToPoint | Zoom to a point and a buffer |
zoomToExtent | Zoom to an extent |
addPopup | Add a popup to the map. |
addPopupGround | Add a popup to the map. |
clearPopups | Remove all popups from the map. |
processTemplate | A low-cost, built-in template utility for GeoMOOSE. |
getBookmarkUrl | Get an URL for bookmarking. |
getUrlParameters | Parses URL parameters and returns a hash. |
bookmark | Change the URL to be something bookmarkable. |
register | Register an event with GM_Events. |
id | Generates an unique ID |
addTab | Add a new GeoMOOSE.Tab instance to the tab bar. |
getTab | Recall a tab that has been added with addTab. |
closeTab | Close a tab by the name. |
removeTab | Removes a tab from the internal list, but not the user interface. |
selectTab | Bring a tab to the forefront. |
getLegendUrls | Returns an array of legend URLs for a given set of paths. |
isDefined | Check for the null condition in a variable. |
activateMapSource | Set the active map source. |
deactivateMapSource | Sets the active map source to null and turns off the controls on any active map source. |
getActiveMapSource | Gets the active map source. |
saveChanges | |
zoomToPointsList | Zooms to the bounding box of a points list. |
convertLength | Convert a number from one denomination to another. |
download | Offers a download dialog for the php/download.php script. |
zoomToLonLat | Zooms to a specified lon, lat. |
deactivateTools | Turn off all current tools, including layer tools. |
activateLayerTool | Activates a layer tool |
activateDefaultTool | This is a bit of a “pull the ‘chute” call. |
parseBoolean | Inputs a string and outputs a boolean. |
commifyNumber | Convert a number into a string that is comma delimited. |
stripCommas | Remove the commas from a number. |
startService : function( serviceName, settingsObj, forceStart )
Start a service with some given parameters
serviceName | The service to call. |
settingsObj | A hash of settings to pass to the service. The keys in the hash should match the names of inputs in the service definition from the Mapbook. |
forceStart | When true, the service will start, ignoring any user input requirements. |
processTemplate : function ( template, replace_dict )
A low-cost, built-in template utility for GeoMOOSE. Takes in a string and replace all “%name%” instances with their appropriate values from replace_dict. Example: GeoMOOSE.processTemplate(“Hello, %name%!”, {‘name’ : ‘World’}); will return the ubiquitous “Hello, World”.
template | String containining “%...%”’s to be replaced. |
replace_dict | A hash/object containing the replacement values. |
A string with the values substituted.
Splits paths in a GeoMOOSE path string (split by ‘:’)
splitPaths : function( layerPaths )
Display an error to the user.
error: function()
Similar to error, but with less severity.
warning: function()
Registers a Class to a GeoMOOSE class type Parameters: map_source_type - The map-source type from the Mapbook.
registerMapSourceType: function( map_source_type, js_class )
Get the class for a given layer type Parameters: map_source_type - The map-source type from the Mapbook.
getMapSourceType: function( map_source_type )
Converts parameter to an array.
asArray: function( layer_list )
Parses a map-source XML fragment and adds it to the map.
configureMapSource: function( map_source_xml )
Turn a layer on or off.
changeLayerVisibility : function( layerPaths, visibility )
Force some layers to redraw.
refreshLayers : function( layerNames )
Checks to see if a MapSource is editable.
isEditable: function( source )
Get the base URL for a given layer.
getLayerUrl : function( layerName )
Change the base URL for a given layer.
changeLayerUrl : function( layerName, url )
Change the params for a given layer.
updateLayerParameters : function( layerName, paramObject )
Change the filter for a given layer.
updateLayerFilter: function( layerName, filterText )
Get the params for a given layer.
getLayerParameters : function( layerName )
Get the client-side Opacity parameter setting.
getLayerOpacity : function( layerName )
Set the client-side Opacity parameter setting.
setLayerOpacity: function( layerName, opacity )
Clears all the user set parameters from a MapSource.
clearLayerParameters: function( layerName )
Get the list of currently visible layer paths.
getVisibleLayers : function()
Get the map’s extent as an array.
getExtent: function()
Return the map’s current scale.
getScale: function()
Check whether a given min/maxscale is within the current scale.
inScale: function( minscale, maxscale )
Move’s a layer up on the visibility stack.
moveLayerUp: function( path )
Move’s a layer down on the visibility stack.
moveLayerDown: function( path )
Fade out the opacity by CONFIGURATION.layer_controls.fade.change_percent.
fadeLayer: function( path )
Un-Fade out the opacity by CONFIGURATION.layer_controls.fade.change_percent.
unfadeLayer: function( path )
Start a service with some given parameters
startService : function( serviceName, settingsObj, forceStart )
Change to a tab given by tabName
changeTab : function( tabName )
Zoom to a point and a buffer
zoomToPoint : function( x, y, buffer )
Zoom to an extent
zoomToExtent : function( minx, miny, maxx, maxy, projection )
Add a popup to the map.
addPopup : function( x, y, w, h, html, title )
Add a popup to the map.
addPopupGround : function( easting, northing, html, title )
Remove all popups from the map.
clearPopups : function()
A low-cost, built-in template utility for GeoMOOSE.
processTemplate : function ( template, replace_dict )
Get an URL for bookmarking.
getBookmarkUrl: function()
Parses URL parameters and returns a hash.
getUrlParameters: function()
Change the URL to be something bookmarkable.
bookmark: function()
Register an event with GM_Events.
register: function( event_type, ref_obj, func )
Generates an unique ID
id: function()
Add a new GeoMOOSE.Tab instance to the tab bar.
addTab: function( tab_name, tab )
Recall a tab that has been added with addTab.
getTab: function( tab_name )
Close a tab by the name.
closeTab: function( tab_name )
Removes a tab from the internal list, but not the user interface.
removeTab: function( tab_name )
Bring a tab to the forefront.
selectTab: function( tab_name )
Returns an array of legend URLs for a given set of paths.
getLegendUrls: function( layer_paths )
Check for the null condition in a variable.
isDefined: function( v )
Set the active map source.
activateMapSource: function( name )
Gets the active map source.
getActiveMapSource: function()
saveChanges: function( name )
Zooms to the bounding box of a points list.
zoomToPointsList: function( points_list, projection )
Convert a number from one denomination to another.
convertLength: function( length, src_units, dest_units )
Offers a download dialog for the php/download.php script.
download: function( id, extension )
Zooms to a specified lon, lat.
_latLongProj: null, zoomToLonLat: function( lon, lat )
Turn off all current tools, including layer tools.
deactivateTools: function()
Activates a layer tool
activateLayerTool: function( action, kwargs )
This is a bit of a “pull the ‘chute” call.
activateDefaultTool: function()
Inputs a string and outputs a boolean.
function parseBoolean( bool, def )
Convert a number into a string that is comma delimited.
function commifyNumber( number )
Remove the commas from a number.
function stripCommas( v )