Welcome Guest, Not a member yet? Register   Sign In
BIOSTALL google map lib : how can i get the marker new position on ondragend event ?
#1

[eluser]Unknown[/eluser]

hi
i want to update position in the database when someone is dragging the marker .
i think i have to send a ajax request on "ondragend" event and send the new position to my CI controller .

but how can i get the new position on "ondragend" event ?



Code:
$this->load->library('googlemaps');
$this->googlemaps->initialize($config);
$marker = array();
$marker['draggable'] = true ;
$marker['ondragend'] = "UpdatePosition(lt , lg  )" ;
$this->googlemaps->add_marker($marker);
$data['map'] = $this->googlemaps->create_map();


lt and lg are latitude and longitude coordinates

Code:
$marker['ondragend'] = "UpdatePosition(lt , lg )" ;





Theme © iAndrew 2016 - Forum software by © MyBB