地图中许多地方的中点

时间:2016-03-21 11:02:19

标签: angularjs google-maps-api-3

我想使用经度,纬度和缩放在我的地图中显示很多地方...就像这个网站http://www.geomidpoint.com/

我的地图代码:

 <map  center="{{mylatitude}},{{mylongitude}}" zoom="10" style="margin-top:-18px; margin-bottom: 50px; border: black solid 0px; position: relative; height:350px;width:100%;">

    <div  ng-repeat="itemToAdd in itemsToAdd">
         <marker  position="{{itemsToAdd[itemsToAdd.indexOf(itemToAdd)].lat}}, {{itemsToAdd[itemsToAdd.indexOf(itemToAdd)].long}}"></marker>

       <shape id="circle" name="circle" centered="true" 
  center="{{itemsToAdd[itemsToAdd.indexOf(itemToAdd)].lat}},{{itemsToAdd[itemsToAdd.indexOf(itemToAdd)].long}}"
  stroke-color='#FF0000' stroke-opacity="0.8" stroke-weight="2" 
  radius="{{itemsToAdd[itemsToAdd.indexOf(itemToAdd)].rayon}}" editable="true" ></shape>

    </div>
</map>

Angular Js表itemsToAdd:

    $scope.mylatitude =48.8534100;
$scope.mylongitude =2.3488000;
$scope.zoom =10;

默认城市是巴黎(纬度:&#39; 48.8534100&#39;,长:&#39; 2.3488000&#39;)

0 个答案:

没有答案