Jump to content

Search the Community

Showing results for tags 'geolocation'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Caspio Bridge
    • Caspio Apps for Ukraine
    • General Questions
    • Caspio JavaScript Solutions
    • Tables, Views and Relationships
    • Import/Export and DataHub
    • DataPages
    • Deployment
    • Security, Authentications, Roles, SAML
    • Styles and Localizations
    • Parameters
    • API and Integration
    • Calculations and aggregations
    • User JavaScript and CSS Discussions

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


MSN


Website URL


ICQ


Yahoo


Skype


Location


Interests

Found 3 results

  1. Hi Everyone, I would like to share a solution on how to generate geolocation coordinates on Update/Details datapages. My solution based on following HowTo article: http://howto.caspio.com/tech-tips-and-articles/advanced-customizations/tech-tip-generating-geolocation-coordinates-from-web-form-submissions/ Please use this JS instead of the one from step #3 of above article: </div><script type='text/javascript'> var lat_id = 'EditRecordlat'; var lng_id = 'EditRecordlng'; var address_id = 'EditRecordAddress'; var city_id = 'EditRecordCity'; var state_id = 'EditRecordState'; var zip_id = 'EditRecordZip'; var wrapper_id = 'cbwrapper'; var msg1 = 'Please input a valid address'; if(typeof jQuery != 'undefined'){ var cb_geocoder = cb_geocoder = new google.maps.Geocoder(); $('#'+wrapper_id+' input[id=Mod0EditRecord]').click(function(e){ e.preventDefault(); var add = $('#'+address_id).val(); var city = $('#'+city_id).val(); var state = $('#'+state_id).val(); var zip = $('#'+zip_id).val(); if(!add || !city || !state || !zip){ alert(msg1); }else{ var full = add +','+city+','+state+' '+zip; cb_geocoder.geocode({address: full}, cbCallBack); } }); }else{ document.write('This Datapage require Standard Caspio Deployment for full functionality.'); } function cbCallBack(locResult){ if(locResult != "" && locResult.length>0){ var lat1 = locResult[0].geometry.location.lat(); var lng1 = locResult[0].geometry.location.lng(); lat1 = Number(lat1); lng1 = Number(lng1); $('#'+lat_id).val(lat1); $('#'+lng_id).val(lng1); $('#'+wrapper_id+' form').submit(); }else{ alert(msg1); } } </script>
  2. Hello All I want to restrict what geographic location users can submit my forms from. Basically, I want the form to look up the latitude and longitude and match it against ones on my table. Then (within a couple of hundred feet or so) I want it to either- Accept the location the user is at as being the one I've agreed and submit the data Don't accept the user's location (they are more than a couple of hundred feet away from the latitude and longitude on my table) and put up an error message 'Sorry - you are not in the right location to complete this form'. I know this can be done, but it is way above my technical ability I'm afraid. Any help from you wonderful useful people out there? Your hopefully Duncan
  3. I have scripts which allow me to collect and post the users GPs co-ordinates (with their permission) which they click on a button which I am working on a single record selected from a report page. I wouold like to be able to update multiple records with these same GPS co-ordinates via the Bulk-Edit facility. We already get a timestamp when they click the button and use a var to post text such as "Bulk-booking" into a specific field (ArrOnStandloc) so the following all works Ok within the button script. var v_TJdriver = "Bulk booking"; var TJdriver = "ArrOnStandloc"; var inputNameTJdriver = "BulkEdit"+ TJdriver; var checkboxNameTJdriver = "Enable"+ inputNameTJdriver + "Ckb"; document.getElementsByName(checkboxNameTJdriver )[0].checked=true; document.getElementById(inputNameTJdriver).value = v_TJdriver; butit returns nothing when i try to make the var v_TJdriver refer to the results of navigator.geolocation using { if (navigator.geolocation) { navigator.geolocation.getCurrentPosition(showPosition); } else { alert ("Geolocation is not supported by this browser."); } function showPosition(position) { v_lat = position.coords.latitude; v_long = position.coords.longitude; var v_TJdriver = v_lat + " / " + v_long } } Not sure if it's a limitation on using Bulk-Edit process or if I need to have an alternative scipt to collect the Lat and Long data in useable form. Any help or pointers would be appreciated. Thanks
×
×
  • Create New...