我試了很多在我的標籤名稱地圖上顯示谷歌地圖。但它只顯示空白灰色框,並且沒有顯示地圖。但是當我直接在頁面上使用它時,它工作正常。我知道resize()
函數存在一些問題。請給我一個解決方案我如何解決這個問題使用Biostall Library。下面給出了我的代碼。Codeigniter Biostall谷歌地圖API上的標籤問題
這是我的控制器代碼:
$config['center'] = '37.4419, -122.1419';
$config['zoom'] = "18";
$this->googlemaps->initialize($config);
// Get the co-ordinates from the database using our model
//$coords = $this->map_model->get_coordinates();
// Loop through the coordinates we obtained above and add them to the map
$marker = array();
$marker['position'] = '37.4419, -122.1419';
$marker['infowindow_content'] = '1600 Amphitheatre Parkway in Mountain View, Santa Clara County, California';
$marker['icon'] = base_url('assets/img/map-ico.png');
$this->googlemaps->add_marker($marker);
// Create the map
$data['map'] = $this->googlemaps->create_map();
這是我的看法代碼下面
<div class="tab-pane fade" id="map">
<div class="">
<?php echo $map['js']; ?>
<?php echo $map['html']; ?>
</div>
</div>
請檢查並讓我知道如果你想有關的任何詳細信息。
等待你的答案。在此先感謝
試試你的結局。我想你沒有明白我的觀點。 Google地圖工作正常,但問題不在標籤中。 –
我曾在我的本地試過:http:// prntscr。com/g6fzt6 我沒有你的圖標資產,所以這就是爲什麼它顯示你的默認標記。 –
親愛的朋友使用標籤。我已經提出了問題,並且也發表了評論。 –