Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- defined('BASEPATH') OR exit('No direct script access allowed');
- class Welcome extends CI_Controller {
- function __construct(){
- parent::__construct();
- }
- public function index(){
- $this->load->library('googlemaps');
- $config['apiKey'] = 'isi api keynya'; // isi api key
- $config['center'] = "0.8513527, 104.6020902";
- $config['zoom'] = "auto";
- $config['places'] = TRUE;
- $this->googlemaps->initialize($config);
- $marker = array();
- $marker['position'] = "0.8513527, 104.6020902";
- $marker['infowindow_content'] = 'Contoh Marker';
- $this->googlemaps->add_marker($marker);
- $data['map'] = $this->googlemaps->create_map();
- $this->load->view('welcome_message', $data);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement