new MapBuilder()
- Source:
 - MapBuilder.js, line 1
 
Members
- 
    
<static, constant> CLASS_NAME :string
 - 
    
    Current class name
- Source:
 - MapBuilder.js, line 126
 
 - 
    
<static> this.called :object
 - 
    
    Find if initialize methods have been used
- Source:
 - MapBuilder.js, line 24
 
Properties:
Name Type Description setTargetboolean Method setTarget() setViewboolean Method setView() setLayersboolean Method setLayers() defineStylesboolean Method defineStyles() setControlsboolean Method setControls() loadConfigboolean Method loadConfig() setSecurityboolean Method setSecurity()  - 
    
<static> this.configFile :boolean
 - 
    
    Find if the configuration will be loaded from a file
- Source:
 - MapBuilder.js, line 99
 
 - 
    
<static> this.configUrlOrJson :null|string|object
 - 
    
    URL of JSON configuration file or object with configuration
- Source:
 - MapBuilder.js, line 106
 
 - 
    
<static> this.controlsConfig :object|null
 - 
    
    Configuration of controls object.
- Source:
 - MapBuilder.js, line 84
 
 - 
    
<static> this.DEFAULT_LAYERS_CONFIG :Object
 - 
    
    Standard configuration for layers
- Source:
 - MapBuilder.js, line 52
 
Properties:
Name Type Description baseLayersarray Array with default baselayers configuration  - 
    
<static> this.DEFAULT_VIEW_CONFIG :object
 - 
    
    Standard configuration for view object.
- Source:
 - MapBuilder.js, line 41
 
Properties:
Name Type Description projectionstring Default map projection. extentarray Default map extent.  - 
    
<static> this.div :string
 - 
    
    ID of HTML-Element that contains the map.
- Source:
 - MapBuilder.js, line 70
 
 - 
    
<static> this.layersConfig :object|null
 - 
    
    Configuration of layers object.
- Source:
 - MapBuilder.js, line 92
 
 - 
    
<static> this.map :ol.Map|null
 - 
    
    OpenLayers map object.
- Source:
 - MapBuilder.js, line 63
 
 - 
    
<static> this.viewConfig :object|null
 - 
    
    Configuration of view object.
- Source:
 - MapBuilder.js, line 77
 
 - 
    
controls :array|null
 - 
    
    BKG WebMap controls
- Source:
 - MapBuilder.js, line 118
 
 - 
    
styles :object|null
 - 
    
    Object with style names and OpenLayers style classes.
- Source:
 - MapBuilder.js, line 124
 
 - 
    
stylesArray :array
 - 
    
    Array with styles configuration that will be used for vector layers
- Source:
 - MapBuilder.js, line 112
 
 
Methods
- 
    
create(callback) → {BKGWebMap.MapBuilder}
 - 
    
    
    Creates the map with current configuration and returns MapBuilder object.
Parameters:
Name Type Description callbackcreateCallback Callback for getting ready map object. You can use it to change the map. - Source:
 - MapBuilder.js, line 513
 
Returns:
- Type
 - BKGWebMap.MapBuilder
 
 - 
    
defineStyles(stylesConfig) → {BKGWebMap.MapBuilder}
 - 
    
    
    Parse styles used for vector layers
Parameters:
Name Type Description stylesConfigArray.<symbol_style> | Array.<custom_style> Array with style configuration (/styles) - Source:
 - MapBuilder.js, line 457
 
Returns:
- Type
 - BKGWebMap.MapBuilder
 
 - 
    
getMap() → {ol.Map}
 - 
    
    
    Getter: It returns the map object, but it is not ready with all elements. Better use the callback of create(): createCallback
- Source:
 - MapBuilder.js, line 851
 
Returns:
- Type
 - ol.Map
 
 - 
    
loadConfig(config) → {BKGWebMap.MapBuilder}
 - 
    
    
    Parses a configuration JSON for BKG WebMap. It can be either the URL of a JSON file or the JSON itself.
Parameters:
Name Type Description configstring | object JSON or filename or JSON with BKG WebMap configuration. (/) - Source:
 - MapBuilder.js, line 490
 
Returns:
- Type
 - BKGWebMap.MapBuilder
 
 - 
    
setControls(controlsConfig) → {BKGWebMap.MapBuilder}
 - 
    
    
    Parses the controls configuration which is used for creating the interactive control elements of the map when calling create.
Parameters:
Name Type Description controlsConfigobject Object with configuration parameters for controls. (/options) Properties
Name Type Description panelPositionstring Panel position (Values: "left", "right") (/options/panelPosition) initializestring | null Tool that should be shown, when starting the Application. If empty or null, then panel will be closed. (Values: "geoSearch", "searchCoordinates", "layerSwitcher", "legend", "showAttributes", "copyCoordinates", "measure", "edit", "share") (/options/initialize) toolsobject Tools in panel. (/options/tools) Properties
Name Type Description geoSearchobject Search a place through name. (/options/tools/geoSearch). See properties in geoSearch_options searchCoordinatesobject Tools in panel. (/options/tools/searchCoordinates). See properties in searchCoordinates_options layerSwitcherobject Layer menu. (/options/tools/layerSwitcher). See properties in layerSwitcher_options customLayersobject User can add new layers. (/options/tools/customLayers). See properties in customLayers_options legendobject Show legend. (/options/tools/legend). See properties in legend_options showAttributesobject Show attributes with click on map. (/options/tools/showAttributes). See properties in showAttributes_options copyCoordinatesobject Tool to copy coordinates. (/options/tools/copyCoordinates). See properties in copyCoordinates_options measureobject Measure tool. (/options/tools/measure). See properties in measure_options editobject Edit vector layers tool. (/options/tools/edit). See properties in edit_options shareobject Share map. (/options/tools/share). See properties in share_options zoomobject Zoom control. (/options/tools/zoom). See properties in zoom_options scalebarobject Scalebar control. (/options/tools/scalebar). See properties in scalebar_options copyrightobject Copyright control. (/options/tools/copyright). See properties in copyright_options showCoordinatesobject Show coordinates of cursor position. (/options/tools/showCoordinates). See properties in showCoordinates_options staticLinksArray.<object> Static links on map. (/options/tools/staticLinks) 
See properties of each Object in Array in staticLinks_optionsstaticWindowsArray.<object> Static windows on map. (/options/tools/staticWindows) 
See properties of each Object in Array in staticWindows_optionsfullScreenobject Full screen tool. (/options/tools/fullScreen). See properties in fullScreen_options overviewMapobject Overview map tool. (/options/tools/overviewMap). See properties in overviewMap_options timeSliderobject Timeslider tool for WMS-T. (/options/tools/timeSlider). See properties in timeSlider_options - Source:
 - MapBuilder.js, line 210
 
Returns:
- Type
 - BKGWebMap.MapBuilder
 
 - 
    
setLayers(layersConfig) → {BKGWebMap.MapBuilder}
 - 
    
    
    Parses layer configuration used for creating map layers when calling create.
Parameters:
Name Type Description layersConfigobject | array Object with configuration parameters for layers or array with ol.layer class. If OpenLayers classes are directly used, all layers are in basemaps group. (/layers) Properties
Name Type Description baseLayersArray.<WMS> | Array.<WMTS> | Array.<WFS> | Array.<MARKER> | Array.<CSV> | Array.<XLS> | Array.<GPS> | Array.<BKG> | Array.<NONE> Base layers. The order of layers will be used in menu. The array can have any of the following layer definitions: WMS, WMTS, WFS, MARKER, CSV, XLS, GPS, BKG, NONE (/layers/baseLayers) overlaysArray.<WMS> | Array.<WMTS> | Array.<WFS> | Array.<MARKER> | Array.<CSV> | Array.<XLS> | Array.<GPS> | Array.<BKG> | Array.<GROUP> Layers and group of layers that will be loaded as overlays. The order of layers will be used in menu. The array can have any of the following layer definitions: WMS, WMTS, WFS, MARKER, CSV, XLS, GPS, BKG, GROUP (/layers/overlays) - Source:
 - MapBuilder.js, line 420
 
Returns:
- Type
 - BKGWebMap.MapBuilder
 
 - 
    
setSecurity(securityConfig) → {BKGWebMap.MapBuilder}
 - 
    
    
    Parse configuration for security. Define cookieCheck and information about secure BKG Services.
Parameters:
Name Type Description securityConfigobject Security options. (/security) Properties
Name Type Description cookieCheckboolean Should the application use cookie test. (/security/cookieCheck) UUIDstring BKG UUID. (/security/UUID) appIDstring BKG Application ID. (/security/appID) appDomainstring Domain for BKG Application ID. (/security/appDomain) - Source:
 - MapBuilder.js, line 476
 
Returns:
- Type
 - BKGWebMap.MapBuilder
 
 - 
    
setTarget(div) → {BKGWebMap.MapBuilder}
 - 
    
    
    Sets the HTML-Element that contains the map
Parameters:
Name Type Description divstring ID of HMTL-Element that contains the map - Source:
 - MapBuilder.js, line 140
 
Returns:
- Type
 - BKGWebMap.MapBuilder
 
 - 
    
setView(viewConfig) → {BKGWebMap.MapBuilder}
 - 
    
    
    Parse configuration for view. Parses the view configuration which is used for creating the map view when calling create.
Parameters:
Name Type Description viewConfigobject | ol.View Object with configuration parameters for view or ol.View class Properties
Name Type Description projectionstring Map projection (/map/projection) centerobject Initial center of map (The coordinate system is defined through the projection) (/map/center) Properties
Name Type Description latnumber Map center latitude. (/map/center/lat) lonnumber Map center longitude. (/map/center/lon) resolutionnumber | null Initial resolution. If null, zoom will be used. (/map/resolution) resolutionsArray.<number> | null Array with numbers. If set, scales, maxResolution, minResolution, minZoom, and maxZoom are ignored. (/map/resolutions) scalesArray.<number> | null Array with numbers. It will be used only if resolutions is null. If set, maxResolution, minResolution, minZoom, and maxZoom are ignored. (/map/scales) zoominteger | null Initial zoom. It will be used only if resolution is null. (/map/zoom) mapExtentArray.<number> | null Initial map extent. Array with numbers: [minX, minY, maxX, maxY] (/map/mapExtent) maxResolutionnumber | null Maximum resolution. It will be used only if resolutions and scales are null. If null, maxZoom will be used. (/map/maxResolution) minResolutionnumber | null Minimum resolution. It will be used only if resolutions and scales are null. If null, minZoom will be used. (/map/minResolution) maxZoominteger | null Maximum zoom. It will be used only if maxResolution, resolutions and scales are null. (/map/maxZoom) minZoominteger | null Minimum zoom. It will be used only if minResolution, resolutions and scales are null. (/map/minZoom) - Source:
 - MapBuilder.js, line 168
 
Returns:
- Type
 - BKGWebMap.MapBuilder