Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how to get the clicked latitude and longitude and pass them to another controller #37

Open
Abokorhassan opened this issue Aug 27, 2019 · 1 comment

Comments

@Abokorhassan
Copy link

Abokorhassan commented Aug 27, 2019

I have this in my controller which basically will do is to send a pop up telling the latitude and longitude...
public function getMap() { $config['center'] = '9.562389, 44.077011'; $config['zoom'] = '14'; $config['map_height'] = '500px'; $config['scrollwheel'] = false; $config['onclick'] = 'alert(\'You just clicked at: \' + event.latLng.lat() + \', \' + event.latLng.lng());'; $gmaps = new GMaps($config); $gmaps->initialize($config); $map = $gmaps->create_map(); return view('admin.mapTest')->with('map', $map); }

so my question is... how to send the latitude and longitude to another controller?
note: forexample i wann create save that clicked map

@Abokorhassan Abokorhassan changed the title how to get latitude and longitutde when map is clicked? how to get the clicked latitude and longitude and pass them to another controller Aug 27, 2019
@AInME93
Copy link

AInME93 commented Apr 2, 2020

Hey, did you find a solution for this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants