{"id":223,"date":"2016-03-01T06:05:51","date_gmt":"2016-03-01T11:05:51","guid":{"rendered":"http:\/\/salzlechner.com\/dev\/?p=223"},"modified":"2018-04-22T13:52:40","modified_gmt":"2018-04-22T17:52:40","slug":"webapp-geo-location-support","status":"publish","type":"post","link":"http:\/\/salzlechner.com\/dev\/2016\/03\/01\/webapp-geo-location-support\/","title":{"rendered":"WebAPP &#8211; GEO Location support"},"content":{"rendered":"<p>Very often in mobile apps we have the need to either record\u00a0the physical location of the device or we have a need to get the location of a device for other things such as showing maps, etc.<\/p>\n<p>WebApp doesnt have built in support for GEO Location handling<\/p>\n<p><a href=\"http:\/\/www.starzen.com\">StarZen Technologies<\/a> built a custom control for WebApp that allows you to easily add GEO Location handling to your web applications<\/p>\n<p>Adding support for GEO Location is very easy<\/p>\n<p>Simply add an object of class cszGEOLocation<\/p>\n<pre class=\"lang:default decode:true\">Object oGEOLocationHelper is a cszGEOLocation\r\n\tSet pbServerOnLocationChanged to True\r\n\r\n\t\/\/ automatically aquire location on creating the control on the client side?\r\n\t\/\/ this happens only the first time the control is created in the browser        \r\n\t\/\/ Set pbAutoLocation to True\/False\r\n\t\r\n\tProcedure OnLocationChanged Integer iStatus String sLongitude String sLatitude\r\n\t\tString sErrorMessage sStatusTime\r\n\t\tInteger iLastErrorCode\r\n\t\t\r\n\t\tWebGet psStatusTime of oGEOLocationHelper to sStatusTime\r\n\t\tWebGet psLastError of oGEOLocationHelper to sErrorMessage\r\n\t\tWebGet piLastErrorCode of oGEOLocationHelper to iLastErrorCode\r\n\t\t\r\n\t\tWebSet psValue of oStatus to iStatus\r\n\t\tWebSet psValue of oStatusTime to sStatusTime\r\n\t\tWebSet psValue of oLongitude to sLongitude\r\n\t\tWebSet psValue of oLatitude to sLatitude\r\n\r\n\t\tWebSet psValue of oLastError to (trim(iLastErrorCode)+\" - \"+trim(sErrorMessage))\r\n\tEnd_Procedure   \r\nEnd_Object<\/pre>\n<p>There is a property called pbAutoLocation that allows the user to control whether the GEO Location object will automatically attempt to get location on creation.<\/p>\n<p>The class has an event called OnLocationChanged that fires whenever a location is found<\/p>\n<p>The class also has a method called RequestGetLocation that asks the control to get a new location. This location will then be returned by a call to the OnLocationChanged event.<\/p>\n<p>This class as well as others are available from <a href=\"http:\/\/www.starzen.com\">StarZen Technologies, Inc.<\/a><\/p>\n\n\t\t<div class='author-shortcodes'>\n\t\t\t<div class='author-inner'>\n\t\t\t\t<div class='author-image'>\n\t\t\t<img src='http:\/\/salzlechner.com\/dev\/wp-content\/uploads\/sites\/2\/2016\/02\/mike5crop-566174_60x60.jpg' alt='' \/>\n\t\t\t<div class='author-overlay'><\/div>\n\t\t<\/div> \n\t\t<div class='author-info'>\n\t\t\tMichael Salzlechner is the CEO of StarZen Technologies, Inc.<\/p>\n<p>He was part of the Windows Team at Data Access Worldwide that created the DataFlex for Windows Product before joining <a href=\"http:\/\/starzen.com\">StarZen Technologies<\/a>. StarZen Technologies provides consulting services as well as custom Application development and third party products specifically for DataFlex developers<\/p>\n\t\t<\/div>\n\t\t\t<\/div>\n\t\t<\/div>\n","protected":false},"excerpt":{"rendered":"<p>It is very easy to add GEO Location support to your DataFlex WebApp using this control<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","ngg_post_thumbnail":0,"footnotes":""},"categories":[6,27],"tags":[],"class_list":["post-223","post","type-post","status-publish","format-standard","hentry","category-dataflex","category-dataflex-webapp"],"_links":{"self":[{"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/posts\/223","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/comments?post=223"}],"version-history":[{"count":2,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/posts\/223\/revisions"}],"predecessor-version":[{"id":274,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/posts\/223\/revisions\/274"}],"wp:attachment":[{"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/media?parent=223"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/categories?post=223"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/salzlechner.com\/dev\/wp-json\/wp\/v2\/tags?post=223"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}