Google_Maps_V3_API地理位置问题

时间:2018-04-04 13:30:32

标签: codeigniter

代码存在一些问题,而且没有通过此库获取地理位置

$这 - >负载>库( 'Google地图');

        $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();

0 个答案:

没有答案