Class Qww.Ctls.Map.Mgr
JavaScript control to render the contents of a QlikView table on a map Currently Google maps and Microsoft Virtual Earth are supported
however developers can write their own mapping providers if required.
Defined in: <JavaScript\QWW\QwwJs_MapCtlMgr.js>.
| Constructor Attributes | Constructor Name and Description |
|---|---|
|
Qww.Ctls.Map.Mgr(cfg)
Constructs a new Qww.Ctls.Map.Mgr instance.
|
| Field Attributes | Field Name and Description |
|---|---|
|
Reference to the configuration object which was used to create construct the object.
|
|
|
Mapping provider that is being used to support the MapCtlMgr.
|
| Method Attributes | Method Name and Description |
|---|---|
|
Returns a reference to the actual map control.
|
Class Detail
Qww.Ctls.Map.Mgr(cfg)
Constructs a new Qww.Ctls.Map.Mgr instance.
var mapCtl = new Qww.Ctls.Map.Mgr(
{
"MapElementID" : "qlikWebWorkBenchMap",
"ObjectID" : "TBCOORDS",
"LatitudeColumnIndex" : 4, //Optional:Default is 1
"LongitudeColumnIndex" : 5, //Optional:Default is 2
"TableSelectColumn" : 3, //Optional:Default is 0
"MaxNumberOfRecords" : 200,
"InitialLatitude" : "43.75",
"InitialLongitude" : "-99.71",
"InitialZoom" : "4",
"OnCreateMapObject" : function(mapCtl, record, mapCtlMgr)
{
var res = {};
res.Title = record.Cells[0].Text;
res.Description = record.Cells[1].Text;
res.Icon = "http://myimageserver/geticon.aspx?";
return res;
}
});
- Parameters:
- {Object} cfg
- JSON object to configure ButtonMgr.
- {String} cfg.ObjectID
- Id of the table or listbox in the QlikView application.
- {String} cfg.MapElementID
- ID of html element to show the map in.
- {Function} cfg.OnCreateMapObject
- Function to call to create the map pin for the row in the table. This should return an Object with various properties to be used for creating and creating the actual map pin. See the documentation for the relevant MappingProvider for further information. E.g. @see Qww.Ctls.Map.Mgr.GoogleMapsProvider#CreateMarker and Qww.Ctls.Map.Mgr.VEMapProvider#CreateMarker.
- {Int} cfg.LatitudeColumnIndex Optional, Default: 1
- Index of column in underlying QlikView table which holds the latitude value for the point.
- {Int} cfg.LongitudeColumnIndex Optional, Default: 2
- Index of column in underlying QlikView table which holds the longitude value for the point.
- {Int} cfg.MaxNumberOfRecords Optional, Default: 200
- Maximum number of points to show in map.
- {Int} cfg.TableSelectColumn Optional, Default: 0
- Specifies which column in the underlying table is used for selections.
- {Int} cfg.InitialZoom Optional
- Initial zoom level of map. Note .InitialZoom, .InitialLatitude and .InitialLongitude properties are only used if all three are set.
- {Number} cfg.InitialLatitude Optional
- Initial latitude of map. Note .InitialZoom, .InitialLatitude and .InitialLongitude properties are only used if all three are set.
- cfg.MappingProvider Optional, Default: Qww.Ctls.Map.VEMapProvider
- Provider which implements a concrete mapping control (e.g. google maps, Virtual Earth) to support the MapCtlMgr.
- {Number} cfg.InitialLongitude Optional
- Initial longitude of map. Note .InitialZoom, .InitialLatitude and .InitialLongitude properties are only used if all three are set.
- {String} cfg.ApplicationID Optional, Default: null
- Id/Name of the QlikView application. Note this is only necessary when multiple QlikView documents are being used on the same web page and should otherwise be set to null.
- {Bool} cfg.WireUpDefaultPinClickHandler Optional, Default: true
- Whether to wire up the click event of the map pin to perform an select on the associated row in the underlying QlikView table.
- {Number} cfg.MaximumZoomLevel Optional, Default: 10
- Maximum zoom level which the map will be automatically panned/zoomed to. This is useful when single results are selected to prevent the map from zooming in too close.
- {Function} cfg.OnInitialised Optional
- Function to call when the control has been initialised.
- {Function} cfg.OnRenderBegin Optional
- Function to call when the control is about to re-render.
- {Function} cfg.OnRenderComplete Optional
- Function to call when the control is about to complete rendering.
Field Detail
{Object}
Cfg
Reference to the configuration object which was used to create construct the object. This
allows certain properties to be updated after initial instantiation.
{Qww.Ctls.Map.GoogleMapsProvider|Qww.Ctls.Map.VEMapProvider|Custom}
MappingProvider
Mapping provider that is being used to support the MapCtlMgr.
Method Detail
{GMap2|VEMap|Custom}
GetMapCtl()
Returns a reference to the actual map control.
