This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var lMapRegion = apex.region("map_search"), | |
// important: Use the layer name exactly as specified in the "name" attribute in Page Designer | |
lLayerId = lMapRegion.call("getLayerIdByName", "Map Search"), | |
lCurrentZoom = lMapRegion.call("getMapCenterAndZoomLevel").zoom, | |
lLocationId = apex.item("P27_GEOLOCATOR").getValue(), | |
lFeature = lMapRegion.call("getFeature", lLayerId, lLocationId ), | |
lPosition; | |
console.log("lLocationId -> " + lLocationId); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- *** Single Point *** | |
-- GeoJSON | |
{"type": "Point", "coordinates": [-0.051, 51.50254]} | |
-- SDO_GEOMETRY | |
MDSYS.SDO_GEOMETRY(2001, 4326, MDSYS.SDO_POINT_TYPE(-0.051, 51.50254, NULL), NULL, NULL); | |
-- Longitude/Latitude | |
Longitude: -0.051 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- *** Types conversion examples *** | |
-- Convert SDO_GEOMETRY to GeoJSON | |
select apex_json.stringify( | |
mdsys.sdo_geometry( 2001, 4326, sdo_point_type( 10, 50, null ), null, null ) | |
) | |
from dual; | |
select apex_json.stringify( | |
MDSYS.SDO_GEOMETRY(2002, NULL, NULL, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
declare | |
l_prompt clob; | |
l_response clob; | |
l_response_text clob; | |
l_prompt_tokens number; | |
l_completion_tokens number; | |
l_total_tokens number; | |
chatgpt_error EXCEPTION; | |
PRAGMA exception_init(chatgpt_error, -20001); |