<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Map extends CI_Controller{


	public function __construct() {

		parent::__construct();

		if($this->session->userdata('client_logged_in')!==TRUE){
			redirect('/');
		}

		$this->load->model('pages/MapModel','MapModel');


	}


	public function index(){
		$data['title']="Map";
		$data['content']='pages/main/map';
		$this->load->view('layout/map-layout',$data);
	}

	public function getMapData(){
		if ($this->input->is_ajax_request())
		{
			$company_id=$this->session->userdata('company_id',TRUE);
			$result=$this->MapModel->getMapData($company_id);
			//$result=$this->MapModel->push_in_array($company_id);
			echo json_encode($result);
		}
		
	}

}