0

我有一个地址列表,我想在谷歌地图中标记这些地方(近 1k),也许可以得到它的坐标来保存它们。实际上我不是在编写应用程序,但我知道两种语言(Android 和 PHP),我认为两者都可以做到这一点。任何的想法 ?预先感谢!

4

1 回答 1

1

你试过谷歌地图api吗?

https://developers.google.com/maps/documentation/geocoding/intro

https://developers.google.com/maps/documentation/geocoding/intro#ReverseGeocoding

我想这就是你要找的东西。

编辑:在地图上标记星星

    // In the following example, markers appear when the user clicks on the map.
// Each marker is labeled with a single alphabetical character.
var labels = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
var labelIndex = 0;

function initialize() {
  var bangalore = { lat: 12.97, lng: 77.59 };
  var map = new google.maps.Map(document.getElementById('map'), {
    zoom: 12,
    center: bangalore
  });

  // This event listener calls addMarker() when the map is clicked.
  google.maps.event.addListener(map, 'click', function(event) {
    addMarker(event.latLng, map);
  });

  // Add a marker at the center of the map.
  addMarker(bangalore, map);
}

// Adds a marker to the map.
function addMarker(location, map) {
  // Add the marker at the clicked location, and add the next-available label
  // from the array of alphabetical characters.
  var marker = new google.maps.Marker({
    position: location,
    label: labels[labelIndex++ % labels.length],
    map: map
  });

 }
于 2017-03-04T16:43:52.220 回答