- Since:
- 21.2
Extends
Copyright notice html expression.
Type:
- string
- Default Value:
- null
Example
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
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
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
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
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
var value = apex.region( "myRegionId" ).layers;
Whether load map data making an ajax request or not. Required.
Type:
- boolean
- Default Value:
- false
Example
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
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
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 over view map will be displayed on map. |
infiniteMap |
boolean | If true maplibre will render multiple world copies. |
Example
// 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
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
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
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
var value = apex.region( "myRegionId" ).resetMapPosition;
Tyle layer information object. Required.
Type:
- Object
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
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
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
$( ".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
$( ".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
$( ".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
$( ".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
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
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
apex.region( "regionId" ).closeAllInfoWindows();
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
apex.region( "regionId" ).closeInfoWindow( apex.region( "regionId" ).getLayerIdByName( "earthquakes" ), "6tgy767836" );
Example
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
apex.region( "regionId" ).displayPopup( "tooltip", apex.region( "regionId" ).getLayerIdByName( "earthquakes" ), "6tgy767836" );
apex.region( "regionId" ).displayPopup( "infoWindow", apex.region( "regionId" ).getLayerIdByName( "earthquakes" ), "6tgy767836", false );
apex.region( "regionId" ).displayPopup( "infoWindow", apex.region( "regionId" ).getLayerIdByName( "earthquakes" ), "8jd4760465", false, { lng: 0, lat: 0 } );
Focus the map
- Overrides:
Example
apex.region( "regionId" ).focus();
Returns:
- Type
- Object
Example
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
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
apex.region( "regionId" ).getLayerIdByName( "earthquakes" );
Returns:
- Type
- Array.<Object>
Example
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
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
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
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
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
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
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
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
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
apex.region( "regionId" ).removeFeature( apex.region( "regionId" ).getLayerIdByName( "earthquakes" ), "8jd4760465" );
Example
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, latitud array. |
Example
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
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
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"
}
);