dongyong1897 2014-03-28 08:15
浏览 60

使用CodeIgniter-Google-Maps-V3-API-Library在谷歌地图中显示距离比例?

Is there a way that I could display the distance scale - in KM or Miles or anything reasonable - as it is shown in http://maps.google.com when using the CodeIgniter-Google-Maps-V3-API-Library ?


Edited

This is what I have done :

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

    $config['center'] = $center['latitude'].' '.$center['longitude'];
    $config['zoom']    = '5';
    $config['cluster'] = false;
    $config['disableScaleControl'] = false;
    $config['scaleControlPosition'] = 'TOP_RIGHT';
    $config['disableDefaultUI']=false;

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

And this is what I am getting : enter image description here

  • 写回答

1条回答 默认 最新

  • drvvepadi289421028 2014-03-28 10:10
    关注

    The mapOptions object has a scaleControl property that is set to false by default. Please see the documentation.

    评论

报告相同问题?