Koordinatenfunktion in Google Maps API Polygon?JavaScript

Javascript-Forum
Anonymous
 Koordinatenfunktion in Google Maps API Polygon?

Post by Anonymous »

Ist jemand mit Google Maps-API vertraut und Polygone auf eine Still Map? Teile): < /p>

Code: Select all

  const tourStops = [
{
id: 1,
position: { lat: ##, lng: ## },
title: "Some title",
},
{
id: 2,
position: { lat: ##, lng: ## },
title: "Some other title",
},
< /code>
Gibt es eine Funktion, die ich erstellen kann, die es so erstellen kann, dass jeder Lat und LNG von meinen Standorten von meinen Standorten gefüttert werden, anstatt jeden einzelnen Set in die Struktur wie in ihrem Beispiel (unten) zu kopieren und zu kleben? < /p>
  // Define the LatLng coordinates for the polygon's path.
const triangleCoords = [
{ lat: 25.774, lng: -80.19 },
{ lat: 18.466, lng: -66.118 },
{ lat: 32.321, lng: -64.757 },
{ lat: 25.774, lng: -80.19 },
];

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post