google map auto geolocation data

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
rrahmad
Posts: 3
Joined: 2019-10-05 15:14

google map auto geolocation data

Post by rrahmad » 2019-10-06 14:14

hooks\table.php

function table_before_insert(&$data, $memberInfo, &$args){

$data['test'] = xxxx ;

return TRUE;

hi
does anyone know how to put my current geolocation google map on xxxx automaticaly. copy and paste does work on appgini google map but i need it to be automatically. thanks

pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 608
Joined: 2018-04-01 10:12

Re: google map auto geolocation data

Post by pböttcher » 2019-10-07 07:11

Hi,

not sure I get what you try to do, but I would rather think that you need to do that on the client side, as I would expect that you want to catch the clients geolocation.

Otherwise please explain in more detail what you try to get.

rrahmad
Posts: 3
Joined: 2019-10-05 15:14

Re: google map auto geolocation data

Post by rrahmad » 2019-10-07 21:42

yes. so client side can save location without needed to copy paste from google map url. its an automatic location. i read some document from google and other. most of it using html5 and jscript. i dont know how to implement it here on appgini php.

https://developers.google.com/maps/docu ... eolocation
Attachments
lokasi.png
lokasi.png (226.47 KiB) Viewed 115 times

pböttcher
AppGini Super Hero
AppGini Super Hero
Posts: 608
Joined: 2018-04-01 10:12

Re: google map auto geolocation data

Post by pböttcher » 2019-10-08 09:11

Hi,

sorry to ask again. Do you want to display the current location of the user on the map, as shown in the picture, or do you want to capture the current latitude and longitude in some fields ?

Actually you can use the TABLENAME_dv function to add the javascript code provided on the google document page to your page and handle the rest by adding the desired functions there.

rrahmad
Posts: 3
Joined: 2019-10-05 15:14

Re: google map auto geolocation data

Post by rrahmad » 2019-10-08 18:27

hi, i want client to capture current location and save it to database with out a need to copy and paste from google map browser url. it happen directly when table.phd or web start.
can you give me example on how to implement it? or just attach those code file.
function table_before_insert(&$data, $memberInfo, &$args) is example only. i thought maybe can put there. function table_dv(&$data, $memberInfo, &$args) or other also can if it can work.

this is an example using jotform
https://form.jotform.me/92805102466454

maybe anyone here were able to do it before. sorry im not a programmer. im new on appgini and udemy.

Post Reply