Skip to content

Current location Issue #64

@jadoonfarrukh

Description

@jadoonfarrukh

I cant get current location.

$this->load->library('googlemaps');

		$config = array();
		$config['center'] = 'auto';
		$config['onboundschanged'] = 'if (!centreGot) 
		{
		var mapCentre = map.getCenter();
		marker_0.setOptions({
		position: new google.maps.LatLng(mapCentre.lat(), mapCentre.lng()) 
		});
		}
		centreGot = true;';


		$this->googlemaps->initialize($config);

		// set up the marker ready for positioning 
		// once we know the users location
		$marker = array();
		$this->googlemaps->add_marker($marker);
		$data['map'] = $this->googlemaps->create_map();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions