{"id":5148,"date":"2023-01-12T18:45:31","date_gmt":"2023-01-12T17:45:31","guid":{"rendered":"https:\/\/gpmfactory.com\/?p=5148"},"modified":"2023-01-15T16:36:26","modified_gmt":"2023-01-15T15:36:26","slug":"using-display-map-item-with-latitude-and-longitude","status":"publish","type":"post","link":"https:\/\/gpmfactory.com\/index.php\/2023\/01\/12\/using-display-map-item-with-latitude-and-longitude\/","title":{"rendered":"Using Display Map item with latitude and longitude"},"content":{"rendered":"\n<p>Oracle APEX <em>Display Map<\/em> item allows displaying a map with a point given as a GeoJSON object.<\/p>\n\n\n\n<p>What happens if we have only two columns Lat and Long ?<\/p>\n\n\n\n<p>We have just to transform them as a json object through a custom function as below:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>create or replace function <strong>TO_GEOJSON<\/strong>\n(lg in VARCHAR2,\nlat in VARCHAR2)\nreturn VARCHAR2\nis\nbegin\nreturn '{\"coordinates\":&#91;'||lat||','||lg ||'],\"type\": \"point\" }';\nend;<\/code><\/pre>\n\n\n\n<p>In source properties of the map item, we choose :<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Type: Expression<\/li>\n\n\n\n<li>PL\/SQL expression: <strong>to_geojson(:PXX_LONGITUDE, :PXX_LATITUDE)<\/strong><\/li>\n<\/ul>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Oracle APEX Display Map item allows displaying a map with a point given as a GeoJSON object. What happens if we have only two&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"ppma_author":[150],"class_list":["post-5148","post","type-post","status-publish","format-standard","hentry","category-non-classe"],"authors":[{"term_id":150,"user_id":1,"is_guest":0,"slug":"admin8700","display_name":"Patrick","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/209d5ed69b74d288390621ab4c1d3773?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/posts\/5148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/comments?post=5148"}],"version-history":[{"count":3,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/posts\/5148\/revisions"}],"predecessor-version":[{"id":5287,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/posts\/5148\/revisions\/5287"}],"wp:attachment":[{"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/media?parent=5148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/categories?post=5148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/tags?post=5148"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/gpmfactory.com\/index.php\/wp-json\/wp\/v2\/ppma_author?post=5148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}