- Since:
- 21.2
Extends
Copyright notice html expression.
Type:
- string
- Default Value:
- null
Example
Get option copyrightNotice after initialization.
var value = apex.region( "myRegionId" ).copyrightNotice;
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:
- Array.<Object>
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:
- jQuery
- 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:
- string
- Default Value:
- null
Example
Get option itemsToSubmit after initialization.
var value = apex.region( "myRegionId" ).itemsToSubmit;
Position of "No Data Found" and "More Data Found" messages container.
Type:
- Object
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:
- null
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:
- Array.<Object>
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
|
|||||||||
infoWindow |
Object | Layers features info window information.
Properties
|
Example
Get option layers after initialization.
var value = apex.region( "myRegionId" ).layers;
Whether load map data making an ajax request or not. Required.
Type:
- boolean
- Default Value:
- false
Example
Get option lazyLoading after initialization.
var value = apex.region( "myRegionId" ).lazyLoading;
Legend area position and styles.
Type:
- Object
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:
- null
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:
- Object
Properties:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
map |
Object | Object with map bbox coordinates and series information.
Properties
|
- Default Value:
- null
Example
Get option mapData after initialization.
var value = apex.region( "myRegionId" ).mapData;
Map tools to be used in the map.
Type:
- Object
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 overview map will be displayed on map. |
infiniteMap |
boolean | If true MapLibre 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:
- string
- Default Value:
- null
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:
- string
- Default Value:
- "metric"
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:
- Object
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" };
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:
- boolean
- Default Value:
- false
Example
Get option resetMapPosition after initialization.
var value = apex.region( "myRegionId" ).resetMapPosition;
Tyle layer information object. Required.
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
type |
string | One of "oracle-default", default layer from Oracle map server; "oracle-custom", all available layers from Oracle map server; and "shared-component", all custom backgrounds created by user. |
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". |
api_key |
string | API Key value that can be set in the custom background URL, if required by the provider. Standard mode. |
api_key_dark |
string | API Key value that can be set in the custom background URL, if required by the provider. Dark mode. |
attribution |
string | Attribution text to display on the custom map. Standard mode. |
attribution_dark |
string | Attribution text to display on the custom map. Dark mode. |
http_headers |
Object | Custom background HTTP headers required by the provider. Standard mode. |
http_headers_dark |
Object | Custom background HTTP headers required by the provider. Dark mode. |
layer_type |
string | Type of the map tile layer retrieved from custom background URL. One of "RASTER", "VECTOR" or "OGCWMS". Standard mode. |
layer_type_dark |
string | Type of the map tile layer retrieved from custom background URL. One of "RASTER", "VECTOR" or "OGCWMS". Dark mode. |
url |
string | URL used to fetch a custom map tile layer. Standard mode. |
url_dark |
string | URL used to fetch a custom map tile layer. Dark mode. |
zoom_min |
number | The minimum zoom level of the map (0-24) with 0 being the lowest zoom level (fully zoomed out) and 24 being the highest (fully zoomed in). Standard mode. |
zoom_max |
number | The maximum zoom level of the map (0-24) with 0 being the lowest zoom level (fully zoomed out) and 24 being the highest (fully zoomed in). Standard mode. |
zoom_min_dark |
number | The minimum zoom level of the map (0-24) with 0 being the lowest zoom level (fully zoomed out) and 24 being the highest (fully zoomed in). Dark mode. |
zoom_max_dark |
number | The maximum zoom level of the map (0-24) with 0 being the lowest zoom level (fully zoomed out) and 24 being the highest (fully zoomed in). Dark mode. |
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:
- string
- Overrides:
Determines if raster or vector tile layer is used. If false map will use raster tile layers. If true map will use vector tile layers. Vector tiles are better quality. Available vector tile layers are: OpenStreetMap Positron, OpenStreetMap Dark and OpenStreetMap Bright.
Type:
- boolean
- Default Value:
- false
Example
Get option useVectorTileLayers after initialization.
var value = apex.region( "myRegionId" ).useVectorTileLayers;
Triggered when the map area or zoom level has changed.
Properties:
Name | Type | Description | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
event |
Event | jQuery event object. |
||||||||||||||||||||||||
data |
Object |
Properties
|
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
|
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
|
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
} );
Add a new feature to series and to layer. If no layer id is given feature won't be added.
Parameters:
Name | Type | Description |
---|---|---|
pLayerId |
number | Id of layer. |
pFeature |
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"
}
);
Example
This example removes the circle drawn with the circle tool.
apex.region( "regionId" ).clearCircle();
Remove all info window pop-ups from layer. If no layer id is given all info windows will be closed.
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" ) );
Remove feature info window pop-up. If layer id or feature id are invalid info window won't be closed.
Parameters:
Name | Type | Description |
---|---|---|
pLayerId |
number | Id of layer. |
pFeatureId |
string | Feature Id. |
Example
This example close the specified info window pop-up.
apex.region( "regionId" ).closeInfoWindow( apex.region( "regionId" ).getLayerIdByName( "earthquakes" ), "6tgy767836" );
Example
This example close the tooltip pop-up.
apex.region( "regionId" ).closeTooltip();
Display feature popup. If map initialization has not been completed or pop-up type, layer id or feature id are invalid pop-up won't be displayed.
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pType |
string | Pop-up type. One of "tooltip" or "infoWindow". | |||||||||||||
pLayerId |
number | Id of layer. | |||||||||||||
pFeatureId |
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
|
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 } );
Focus the map
- Overrides:
Example
This example focus the map.
apex.region( "regionId" ).focus();
Returns:
- Type
- Object
Example
This example gets the current circle drawn with circle tool.
apex.region( "regionId" ).getCircle();
Returns feature object from layer. If no layer id or feature id are given return empty object.
Parameters:
Name | Type | Description |
---|---|---|
pLayerId |
number | Id of layer. |
pFeatureId |
string | Id of feature. |
Returns:
- Type
- Object
Example
This example gets the specified feature object.
apex.region( "regionId" ).getFeature( apex.region( "regionId" ).getLayerIdByName( "earthquakes" ), "0i97th6465" );
Returns layer id. If no layer name is given return null.
Parameters:
Name | Type | Description |
---|---|---|
pName |
string | Layer name. |
Returns:
- Type
- number
Example
This example gets the id of the specified layer.
apex.region( "regionId" ).getLayerIdByName( "earthquakes" );
Returns:
- Type
- Array.<Object>
Example
This example gets all the layers objects.
apex.region( "regionId" ).getLayers();
Return the current map window bbox and the zoom level in one object. If map initialization has not been completed return an empty object.
Returns:
- Type
- Object
Example
This example gets the current map window BBOX and the zoom level in one object.
apex.region( "regionId" ).getMapBboxAndZoomLevel();
Return the current map center and the zoom level in one object. If map initialization has not been completed return an empty object.
Returns:
- Type
- Object
Example
This example gets the current map center and the zoom level in one object.
apex.region( "regionId" ).getMapCenterAndZoomLevel();
Returns the MapLibre GL JS Map object. If map initialization has not been completed return null.
Developer code that uses the MapLibre API may not be forward compatible should the MapLibre API change.
Returns:
- Type
- Object
Example
This example gets the MapLibre map object.
apex.region( "regionId" ).getMapObject();
Return the current map pitch and the bearing values in one object. If map initialization has not been completed return an empty object.
Returns:
- Type
- Object
Example
This example gets the map pitch and bearing properties in one object.
apex.region( "regionId" ).getMapPitchAndBearing();
Return the current map bbox, zoom level, pitch and bearing values in one object. If map initialization has not been completed return an empty object.
Returns:
- 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. If map initialization has not been completed region can't be refreshed.
- Overrides:
Example
This example make an ajax request to server to update layers data.
apex.region( "regionId" ).refresh();
Removes feature from map. If no layer id or feature id are given feature won't be removed.
Parameters:
Name | Type | Description |
---|---|---|
pLayerId |
number | Id of layer. |
pFeatureId |
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" );
Example
This example resets the map instance.
apex.region( "regionId" ).reset();
Recenters the map to the specified position. If map initialization has not been completed map center can't be set.
Parameters:
Name | Type | Description |
---|---|---|
pCenter |
Array.<Object> | Longitude, latitude array. |
Example
This example centers the map to Washington, D.C.
var lng = -77.050636,
lat = 38.889248;
apex.region( "regionId" ).setCenter( [ lng, lat ] );
Zooms the map to the specified level. If map initialization has not been completed zoom level can't be set.
Parameters:
Name | Type | Description |
---|---|---|
pZoomLevel |
number | The new zoom level. |
Example
This example sets the zoom level to 3.
apex.region( "regionId" ).setZoomLevel( 3 );
Update feature from series and layer source. If no layer id or feature object are given feature won't be updated.
Parameters:
Name | Type | Description |
---|---|---|
pLayerId |
number | Id of layer. |
pFeature |
Object | Feature object to update. |
Example
This example update the specified feature from series 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"
}
);