Hirdetés
-
PROHARDVER!
JavaScript != Java (A JavaScript nem összekeverendő a Javával, két különböző programozási nyelvről van szó!)
Új hozzászólás Aktív témák
-
Sk8erPeter
nagyúr
válasz
papa019
#2595
üzenetére
Így van, de itt van is egy példa, a for ciklus a lényeg, ott épp használja a getAt() függvényt:
function showArrays(event) {
// Since this Polygon only has one path, we can call getPath()
// to return the MVCArray of LatLngs
var vertices = this.getPath();
var contentString = "<b>Bermuda Triangle Polygon</b><br />";
contentString += "Clicked Location: <br />" + event.latLng.lat() + "," + event.latLng.lng() + "<br />";
// Iterate over the vertices.
for (var i =0; i < vertices.length; i++) {
var xy = vertices.getAt(i);
contentString += "<br />" + "Coordinate: " + i + "<br />" + xy.lat() +"," + xy.lng();
}
// Replace our Info Window's content and position
infowindow.setContent(contentString);
infowindow.setPosition(event.latLng);
infowindow.open(map);
}A leírás meg szintén ezt mondja:
"Polygon Arrays
A polygon specifies its series of coordinates as an array of arrays, where each array is of type MVCArray. Each "leaf" array is an array of LatLng coordinates specifying a single path. To retrieve these coordinates, call the Polygon's getPaths() method. Since the array is an MVCArray you will need to manipulate and inspect it using the following operations:
» getAt() returns the LatLng at a given zero-based index value.
» insertAt() inserts a passed LatLng at a given zero-based index value. Note that any existing coordinates at that index value are moved forward.
» removeAt() removes a LatLng at a given zero-based index value.Note: you cannot simply retrieve the ith element of an array by using the syntax mvcArray[I]; you must use mvcArray.getAt(i)."
=============================
A PHP-s részre:
az escape-elésről és PDO-témáról nemrég diskuráltunk: [link], [link]==
Mondjuk akkor esélyes, hogy ez is új lesz.
Látom valszeg valami adatbázis-wrappert használsz (bár esélyes, hogy nem használod ki a lehetőségeit), de nem látok bele a működésébe. A PDO használata indokolt lehet.
Új hozzászólás Aktív témák
- 16GB DDR4 PC MEMORIA MODUL(4X4GB, 2X8GB) RAM / SZÁMLÁVAL, GARANCIÁVAL
- Szép Kis játékos HP,Core i7 10510u(8X4,9Ghz)MX 2/4GB DDR5 VGA,FullHD IPS,16-32GB RAM/256-512SSD
- Megkímélt ThinkPad Ryzen 5 Pro(12x4,0Ghz)16-32RAM/256-512SSD,100% akku,vil.bilI.
- Lenovo Thinkpad P50 15,6" FHD IPS kijelző, I7-6820HQ CPU, 16GB DDR4, 512GB NVMe SSD, 4GB Quadro VGA,
- HP 15,6",Core i7 1165G7(8x4,8Ghz)IRIS XE VGA,FullHD IPS,16-48GB RAM/256-512SSD,szép állapot
- Apple MacBook Pro 16 (2021) 16GB/512GB használt, karcmentes 87% akku, 191 ciklus
- 27% - GAMER PC! i5-14600KF / RTX 4070 Super / Z790 / DDR5 32GB / 1TB NVMe / 750w Gold! BeszámítOK
- Apple iPhone Air 512GB Bontatlan Független Összes Szín / 27% áfás ár
- 27% - NZXT Kraken 120 vízhűtés!
- Lenovo X13 Yoga 2in1 Thinkpad Gen2 LTE i7-1165G7 16GB RAM 512GB SSD Intel Iris XE Win11 Pro Garancia
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

