Extends
Copyright notice html expression.
Type:
- Default Value:
Example
Get option copyrightNotice after initialization.
var value = apex.region( "myRegionId" ).copyrightNotice;
customStyles :Array.<Object>
These styles can be used as the SVG Shape attribute within a Point layer.
An array of objects that provide definitions for custom SVG shapes to be used as point markers.
Type:
Properties:
Name |
Type |
Description |
type |
string
|
Svg element type |
name |
string
|
Svg shape name that can be used to specify the SVG shape to display point objects. |
width |
number
|
Svg shape width |
height |
number
|
Svg shape height |
viewBox |
string
|
Defines the position and dimension of an SVG viewport. |
elements |
Array.<Object>
|
Array of objects that represent the necessary svg child elements to create the svg shape.
Each object most contain all the necessary element attrs. |
Example
Get or set option customStyles after initialization.
// get
var value = apex.region( "myRegionId" ).customStyles;
// set
apex.region( "myRegionId" ).customStyles = [
{
"name": "MyCamera",
"width": 20,
"height": 20,
"paint-order": "stroke",
"viewBox": "0 0 20 20",
"elements": [
{
"type": "path",
"d": "M15 4h-1.2l-.9-1.2c-.4-.5-1-.8-1.6-.8H8.8c-.7 0-1.3.3-1.6.8L6.2 4H5c-1.1 0-2 .9-2 2v5c0 1.1.9 2 2 2h2.2l2.4 4.7c.1.2.4.3.7.2.1 0 .2-.1.2-.2l2.4-4.7H15c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm-5 7c-1.4 0-2.5-1.1-2.5-2.5S8.6 6 10 6s2.5 1.1 2.5 2.5S11.4 11 10 11z"
}
]
}
];
The jQuery object for the region element.
Type:
- Inherited From:
Example
Get option element after initialization.
var value = apex.region( "myRegionId" ).element;
Comma separated list of page items on the current page to be set into session state when an AJAX request is made.
Type:
- Default Value:
Example
Get option itemsToSubmit after initialization.
var value = apex.region( "myRegionId" ).itemsToSubmit;
Position of "No Data Found" and "More Data Found" messages container.
Type:
Properties:
Name |
Type |
Description |
position |
string
|
One of "top" or "bottom". |
selector |
string
|
Selector for the DIV container to display the messages in. |
- Default Value:
Example
Get or set option layerMessages after initialization.
// get
var value = apex.region( "myRegionId" ).layerMessages;
// set
apex.region( "myRegionId" ).layerMessages = { position: "top" };
An array of objects with basic information about layers. Required.
Type:
Properties:
Name |
Type |
Description |
id |
number
|
Layer id. |
label |
string
|
Layer name. |
useSpatialIndex |
boolean
|
If true the widget will only fetch rows for the current map window from the database.
This provides a performance benefit when the data source contains a large amount of rows. |
minZoom |
number
|
Specify the minimum zoom level for the layer to become visible. |
maxZoom |
number
|
Specify the maximum zoom level for this layer to remain visible. |
tooltip |
Object
|
Layers features tooltip information.
Properties
Name |
Type |
Description |
template |
string
|
If Advanced formatting has been chosen for the tooltip then user needs to provide
an HTML expressions to be shown as tooltip when hovering over an layer feat on the map. |
cssClasses |
string
|
Additional css classes to be added in tooltip container. |
|
infoWindow |
Object
|
Layers features info window information.
Properties
Name |
Type |
Description |
template |
string
|
If Advanced formatting has been chosen for the info window then user needs to provide
an HTML expressions to be shown as info window when clicking on an layer feat on the map. |
cssClasses |
string
|
Additional css classes to be added in info window container. |
|
Example
Get option layers after initialization.
var value = apex.region( "myRegionId" ).layers;
Whether load map data making an ajax request or not. Required.
Type:
- Default Value:
Example
Get option lazyLoading after initialization.
var value = apex.region( "myRegionId" ).lazyLoading;
Legend area position and styles.
Type:
Properties:
Name |
Type |
Description |
position |
string
|
One of "start", "end" or "selector" |
selector |
string
|
JQuery selector to display the legend in. |
title |
string
|
Legend title text. |
cssClasses |
string
|
Additional css classes to be added in lagend container. |
- Default Value:
Example
Get or set option legend after initialization.
// get
var value = apex.region( "myRegionId" ).legend;
// set
apex.region( "myRegionId" ).legend = { positon: "start", title: "My layers" };
Object returned by the AJAX request.
Type:
Properties:
Name |
Type |
Description |
map |
Object
|
Object with map bbox coordinates and series information.
Properties
Name |
Type |
Description |
bbox |
Array.<Object>
|
Boundary box. Array of coordinates that describes the map window where all the layers features will be displayed. |
series |
Array.<Object>
|
Array of series that represent the layers. Series will contain all the feature points and information about the layers that will be created by mapbox. |
|
- Default Value:
Example
Get option mapData after initialization.
var value = apex.region( "myRegionId" ).mapData;
Map tools to be used in the map.
Type:
Properties:
Name |
Type |
Description |
mousewheelZoom |
boolean
|
If true scroll zoom will be enabled. |
scaleBar |
boolean
|
If true scale control will be enabled. |
circleTool |
boolean
|
If true circle tool will be enabled. |
browserLocation |
boolean
|
If true geolocate control will be enabled. |
rectangleZoom |
boolean
|
If true rectangle zoom tool will be enabled. |
distanceTool |
boolean
|
If true distance tool will be enabled. |
overviewMap |
boolean
|
If true over view map will be displayed on map. |
infiniteMap |
boolean
|
If true mapbox will render multiple world copies. |
Example
Get or set option mapFeatures after initialization.
// get
var value = apex.region( "myRegionId" ).mapFeatures;
// set
apex.region( "myRegionId" ).mapFeatures = {
mousewheelZoom: true,
scaleBar: true,
circleTool: true,
browserLocation: true,
rectangleZoom: true,
distanceTool: true,
overviewMap: true,
infiniteMap: true
};
This item will be populated with the current map bbox. So whenever the map is zoomed or dragged,
store the current bbox in this item.
Type:
- Default Value:
Example
Get or set option mapStatusItem after initialization.
// get
var value = apex.region( "myRegionId" ).mapStatusItem;
// set
apex.region( "myRegionId" ).mapStatusItem = "P1_STATUS_ITEM";
Unit system that will be used for scale control and distance tool.
One of "metric" or "imperial".
Type:
- Default Value:
Example
Get or set option mapUnitSystem after initialization.
// get
var value = apex.region( "myRegionId" ).mapUnitSystem;
// set
apex.region( "myRegionId" ).mapUnitSystem = "metric";
Navigation Controls Bar Object. Add zoom and rotation (compass) controls to the map. Required.
Type:
Properties:
Name |
Type |
Description |
type |
string
|
One of "none", "no-compass" or "full". |
position |
string
|
One of "top-left","top-right" or "bottom-left". |
Example
Get or set option navigationBar after initialization.
// get
var value = apex.region( "myRegionId" ).navigationBar;
// set
apex.region( "myRegionId" ).navigationBar = { type: "full", position: "top-right" };
resetMapPosition :boolean
If true map position will be initialized using the specified initial map position (basedOnFeatures, getFromBrowser or static values for longitude, latitude and zoom level).
If false widget will initialize map position using session state.
Type:
- Default Value:
Example
Get option resetMapPosition after initialization.
var value = apex.region( "myRegionId" ).resetMapPosition;
Tyle layer information object. Required.
Type:
Properties:
Name |
Type |
Description |
type |
string
|
Tile layer type. Currently map component only supports tile layers from Oracle map server,
we might support alternative map providers like Google or OSM as well for next versions. |
name |
string
|
Tile layer name for light mode. One of "osm-bright", "osm-positron", "bi-world-map", "osm-dark-matter" or "world-map". |
darkmodeName |
string
|
Tile layer name for dark mode. One of "osm-bright", "osm-positron", "bi-world-map", "osm-dark-matter" or "world-map". |
Example
Get or set option tileLayer after initialization.
// get
var value = apex.region( "myRegionId" ).tileLayer;
// set
apex.region( "myRegionId" ).tileLayer = { name: "osm-bright", darkmodeName: "osm-dark-matter" };
The mapRegion type is "SpatialMap".
Type:
- Overrides:
Triggered when the map area or zoom level has changed.
Properties:
Name |
Type |
Description |
event |
Event
|
jQuery event object. |
data |
Object
|
Properties
Name |
Type |
Description |
changeType |
string
|
One of "map-drag","map-zoom","toggle-layer","map-rotate","circle-drawn","circle-removed","feature-added","feature-removed","feature-updated" |
layers |
Array.<Object>
|
An array of objects with basic information about the visible layers on map. |
bbox |
Array.<Object>
|
Boundary box. Array of coordinates that describes the current map window. |
zoom |
number
|
Current map zoom level. |
pitch |
number
|
Map current direction user is facing measured clockwise as an angle. |
bearing |
number
|
Map current tilt in degrees. |
circle |
object
|
GeoJSON object with the circle coordinates. Sent only when a circle is drawn. |
|
Example
Bind an event listener to the spatialmapchanged
event:
$( ".selector" ).on( "spatialmapchanged", function( event, data ) {
// do something with data.changeType, data.layers, data.bbox, data.zoom, data.pitch, data.bearing and data.circle
} );
Triggered when the map (not a layer feature) has been clicked.
Properties:
Name |
Type |
Description |
event |
Event
|
jQuery event object. |
data |
Object
|
Properties
Name |
Type |
Description |
lat |
number
|
Latitude where the map was clicked. |
lng |
number
|
Longitude where the map was clicked. |
|
Example
Bind an event listener to the spatialmapclick
event:
$( ".selector" ).on( "spatialmapclick", function( event, data ) {
// do something with data.lat and data.lng
} );
Triggered when map is completely initialized (all JS loaded, map is drawn).
Properties:
Name |
Type |
Description |
event |
Event
|
jQuery event object. |
Example
Bind an event listener to the spatialmapinitialized
event:
$( ".selector" ).on( "spatialmapinitialized", function() {
// do something when map region is initialized
} );
Triggered when one of the spatial features has been clicked.
Properties:
Name |
Type |
Description |
event |
Event
|
jQuery event object. |
data |
Object
|
Properties
Name |
Type |
Description |
id |
number
|
Id of feature. Sent only if feature layer is not a cluster and primary Key column was specified. |
lat |
number
|
Latitude of feature point. In case layer feature is not a point, latitude will belong to cursor position at the moment of clicking the layer feature. |
lng |
number
|
Longitude of feature point. In case layer feature is not a point, longitude will belong to cursor position at the moment of clicking the layer feature. |
tooltip |
string
|
JSON that contains the tooltip data of the layer feature. Sent only if feature layer is not a cluster. |
infoWindow |
string
|
JSON that contains the info window data of the layer feature. Sent only if feature layer is not a cluster. |
cluster_id |
number
|
Id of cluster feature. Sent only if feature point is a cluster. |
point_count |
number
|
Number of points into the cluster. Sent only if festure point is a cluster. |
|
Example
Bind an event listener to the spatialmapobjectclick
event:
$( ".selector" ).on( "spatialmapobjectclick", function( event, data ) {
// do something with data.id, data.lat, data.lng, data.tooltip, data.infoWindow, data.cluster_id and data.point_count
} );
addFeature(pLayerId, pFeat)
Add a new feature to serie and to layer.
Parameters:
Name |
Type |
Description |
pLayerId |
number
|
Id of layer. |
pFeat |
Object
|
Feature object to be added. |
Example
This example add a new feature to the map.
apex.region( "regionId" ).addFeature(
apex.region( "regionId" ).getLayerIdByName( "earthquakes" ),
{
id: "6tgy767836",
geometry: {
type: "Point",
coordinates: [ -108.852, 15.8821667 ]
},
infoWindow: {
title: "Title text",
body: "Body text"
},
tooltip: "Tooltip text"
}
);
Removes (clears) the drawn circle from the map. Does nothing if no circle has been drawn.
Example
This example removes the circle drawn with the circle tool.
apex.region( "regionId" ).clearCircle();
closeAllInfoWindows(pLayerIdopt)
Remove all info window pop-ups.
Parameters:
Name |
Type |
Attributes |
Description |
pLayerId |
number
|
<optional>
|
Only required to close info windows from a specific layer. |
Examples
This example close all opened info window pop-ups.
apex.region( "regionId" ).closeAllInfoWindows();
This example close all opened info window pop-ups, but only from the specified layer
apex.region( "regionId" ).closeAllInfoWindows( apex.region( "regionId" ).getLayerIdByName( "earthquakes" ) );
closeInfoWindow(pLayerId, pFeatId)
Remove feature info window pop-up.
Parameters:
Name |
Type |
Description |
pLayerId |
number
|
Id of layer. |
pFeatId |
string
|
Feature Id. |
Example
This example close the specified info window pop-up.
apex.region( "regionId" ).closeInfoWindow( apex.region( "regionId" ).getLayerIdByName( "earthquakes" ), "6tgy767836" );
Remove tooltip pop-up.
Example
This example close the tooltip pop-up.
apex.region( "regionId" ).closeTooltip();
Display feature popup.
Parameters:
Name |
Type |
Attributes |
Description |
pType |
string
|
|
Pop-up type. One of "tooltip" or "infoWindow". |
pLayerId |
number
|
|
Id of layer. |
pFeatId |
string
|
|
Feature Id. |
pFocusAfterOpen |
boolean
|
|
Whether popup should get focus or not. |
pLngLat |
Object
|
<optional>
|
Tooltip coordinates. Only required if feature geometry type is other than "Point".
Properties
Name |
Type |
Attributes |
Description |
lng |
|
<optional>
|
Tooltip longitude. |
lat |
|
<optional>
|
Tooltip latitude. |
|
Examples
This example display the tooltip pop-up.
apex.region( "regionId" ).displayPopup( "tooltip", apex.region( "regionId" ).getLayerIdByName( "earthquakes" ), "6tgy767836" );
This example display the info window pop-up. This pop-up will not be focused after open.
apex.region( "regionId" ).displayPopup( "infoWindow", apex.region( "regionId" ).getLayerIdByName( "earthquakes" ), "6tgy767836", false );
This example display the info window pop-up on a polygon at the specified position.
apex.region( "regionId" ).displayPopup( "infoWindow", apex.region( "regionId" ).getLayerIdByName( "earthquakes" ), "8jd4760465", false, { lng: 0, lat: 0 } );
- Overrides:
Example
This example focus the map.
apex.region( "regionId" ).focus();
Returns the current circle, which has been drawn with the circle tool.
Returns:
The drawn circle coordinates as a GeoJSON polygon, null if no circle has been drawn.
-
Type
-
Object
Example
This example gets the current circle drawn with circle tool.
apex.region( "regionId" ).getCircle();
getFeature(pLayerId, pFeatId) → {Object}
Returns feature object from layer.
Parameters:
Name |
Type |
Description |
pLayerId |
number
|
Id of layer. |
pFeatId |
string
|
Id of feature. |
Returns:
An object containing feature properties.
-
Type
-
Object
Example
This example gets the specified feature object.
apex.region( "regionId" ).getFeature( apex.region( "regionId" ).getLayerIdByName( "earthquakes" ), "0i97th6465" );
getLayerIdByName(pName) → {number}
Returns layer ID.
Parameters:
Name |
Type |
Description |
pName |
string
|
Layer name. |
Returns:
Layer ID.
-
Type
-
number
Example
This example gets the id of the specified layer.
apex.region( "regionId" ).getLayerIdByName( "earthquakes" );
getLayers() → {Array.<Object>}
Returns layers objects array.
Returns:
An array of objects containing layers information.
-
Type
-
Array.<Object>
Example
This example gets all the layers objects.
apex.region( "regionId" ).getLayers();
getMapBboxAndZoomLevel() → {Object}
Return the current map window bbox and the zoom level in one object.
Returns:
An object containing the bbox and zoom properties.
-
Type
-
Object
Example
This example gets the current map window BBOX and the zoom level in one object.
apex.region( "regionId" ).getMapBboxAndZoomLevel();
getMapCenterAndZoomLevel() → {Object}
Return the current map center and the zoom level in one object.
Returns:
An object containing the center and zoom properties.
-
Type
-
Object
Example
This example gets the current map center and the zoom level in one object.
apex.region( "regionId" ).getMapCenterAndZoomLevel();
getMapObject() → {Object}
Returns the
Mapbox GL JS map object.
Developer code that uses the Mapbox API may not be forward compatible should the Mapbox API change.
Returns:
The mapbox object to call mapbox API functions on.
-
Type
-
Object
Example
This example gets the mapbox map object.
apex.region( "regionId" ).getMapObject();
getMapPitchAndBearing() → {Object}
Return the current map pitch and the bearing values in one object.
Returns:
An object containing the pitch and bearing properties.
-
Type
-
Object
Example
This example gets the map pitch and bearing properties in one object.
apex.region( "regionId" ).getMapPitchAndBearing();
getMapStatus() → {Object}
Return the current map bbox, zoom level, pitch and bearing values in one object.
Returns:
An object containing the bbox, zoom, pitch and bearing properties.
-
Type
-
Object
Example
This example gets the current map bbox, zoom level, pitch and bearing values in one object.
apex.region( "regionId" ).getMapStatus();
Removes an event handler from the widget element associated with this region. This method only applies to
regions that are implemented with a jQuery UI style widget. This means that region#widgetName
property must be defined and the region#widget method returns a value.
This is a shortcut for calling apex.region(id).widget().off(...)
.
Unlike the jQuery object off
method this does not return the
jQuery object and therefore is not chainable. See the jQuery documentation for details.
See also region#on.
Parameters:
Name |
Type |
Attributes |
Description |
events |
|
|
One or more space-separated event types and optional namespaces as defined by the
jQuery off method. For events defined by this region widget the
event name prefix can be omitted. |
args |
*
|
<repeatable>
|
Other arguments to be passed to the widget's jQuery object
off method such as selector, data, and handler. |
- Inherited From:
Example
This example removes all event handlers for the selectionChange event of an
Interactive Grid region. Note that the short event name "selectionChange" can be
used rather than the full name "interactivegridselectionchange".
See also interactiveGrid#event:selectionchange.
apex.region( interactiveGridRegionId ).off( "selectionChange" );
Attaches an event handler to the widget element associated with this region. This method only applies to
regions that are implemented with a jQuery UI style widget. This means that region#widgetName
property must be defined and the region#widget method returns a value.
This is a shortcut for calling apex.region(id).widget().on(...)
.
Unlike the jQuery object on
method this does not return the
jQuery object and therefore is not chainable. See the jQuery documentation for details.
See also region#off.
Parameters:
Name |
Type |
Attributes |
Description |
events |
|
|
One or more space-separated event types and optional namespaces as defined by the
jQuery on method. For events defined by this region widget the
event name prefix can be omitted. |
args |
*
|
<repeatable>
|
Other arguments to be passed to the widget's jQuery object
on method such as selector, data, and handler. |
- Inherited From:
Example
This example handles the selectionChange event of an Interactive Grid
region by logging a message to the console. Note that the short event name "selectionChange" can be
used rather than the full name "interactivegridselectionchange".
See also interactiveGrid#event:selectionchange
apex.region( interactiveGridRegionId ).on( "selectionChange", function(event, data) {
console.log("Selection changed; # records selected is", data.selectedRecords.length );
} );
Update map layers data.
- Overrides:
Example
This example make an ajax request to server to update layers data.
apex.region( "regionId" ).refresh();
removeFeature(pLayerId, pFeatId)
Removes feature from map.
Parameters:
Name |
Type |
Description |
pLayerId |
number
|
Id of layer. |
pFeatId |
string
|
Id of feature to remove. |
Example
This example removes the specified feature from the map.
apex.region( "regionId" ).removeFeature( apex.region( "regionId" ).getLayerIdByName( "earthquakes" ), "8jd4760465" );
Resets the map instance.
Example
This example resets the map instance.
apex.region( "regionId" ).reset();
Recenters the map to the specified position.
Parameters:
Name |
Type |
Description |
pCenter |
Array.<Object>
|
Longitude, latitud array. |
Example
This example centers the map to Washington, D.C.
var lng = -77.050636,
lat = 38.889248;
apex.region( "regionId" ).setCenter( [ long, lat ] );
Zooms the map to the specified level.
Parameters:
Name |
Type |
Description |
pZoomLevel |
number
|
The new zoom level. |
Example
This example sets the zoom level to 3.
apex.region( "regionId" ).setZoomLevel( 3 );
updateFeature(pLayerId, pFeat)
Update feature from serie and layer source.
Parameters:
Name |
Type |
Description |
pLayerId |
number
|
Id of layer. |
pFeat |
Object
|
Feature object to update. |
Example
This example update the specified feature from serie in the map.
apex.region( "regionId" ).updateFeature(
apex.region( "regionId" ).getLayerIdByName( "earthquakes" ),
{
id: "6tgy767836",
geometry: {
type: "Point",
coordinates: [ -128.852, 55.8821667 ]
},
infoWindow: {
title: "My info window title",
body: "My info window body"
},
tooltip: "My tooltip content"
}
);