【问题标题】:Displaying distance scale ratio in google maps by using CodeIgniter-Google-Maps-V3-API-Library?使用 CodeIgniter-Google-Maps-V3-API-Library 在谷歌地图中显示距离比例?
【发布时间】:2014-05-07 14:17:15
【问题描述】:

在使用CodeIgniter-Google-Maps-V3-API-Library 时,有没有一种方法可以显示距离刻度 - 以公里或英里或任何合理的形式显示在 http://maps.google.com 中?


已编辑

这就是我所做的:

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

这就是我得到的:

【问题讨论】:

  • 我不知道 CodeIgniter 库,但这看起来像一个错误......

标签: php codeigniter google-maps google-maps-api-3


【解决方案1】:

mapOptions 对象具有默认设置为 false 的 scaleControl 属性。请查看documentation

【讨论】:

  • 我查看了 Google 的文档。它使用 javascript。我希望通过 php 使用 Codeigniter Google-Maps Library 来实现。
  • 似乎 Codeigniter 文档显示了相同的选项。你看过$disableScaleControl$scaleControlPosition吗?
  • 我试过了,没有运气。我期待显示比例。
  • 您没有将$disableDefaultUI 设置为true?
猜你喜欢
  • 1970-01-01
  • 2017-02-17
  • 2012-07-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多