Hirdetés
- Luck Dragon: Asszociációs játék. :)
- joghurt: Megtarthatod a jogsid?
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- nézzbe: AM3 hűtés s478-ra
- Tomasz72: Jimi home multiméter
- Samus: Oldschool játékos konfig a memóriaválság idején
- sziku69: Fűzzük össze a szavakat :)
- GoodSpeed: Samsung Galaxy A56 5G
- Sub-ZeRo: Euro Truck Simulator 2 & American Truck Simulator 1 (esetleg 2 majd, ha lesz) :)
- Klaus Duran: Panelkérdés.
-
LOGOUT
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
-
tildy
nagyúr
Sziasztok!
PHPban van foreach , az érdekelne, van-e erre valami megoldás javascriptben is.
PHP a kód nagy része, van benne egy tömb is ,a mit szeretnék használni :
vlahogy igy :
foreach ($matches[0] as $key=>$value)
{
$coordinata =preg_split(''/ \|\ /'',$matches[0][$key]);
//és ide lenne a javascript kód
$.html= <<<EOH
<script type=''text/javascript''>
var point = new GLatLng($coordinata[1], $coordinata[0]);
var marker = createMarker(point,'<div style=''width:240px''>Eov koordináták : <br/> x: $coordinata[1]<br/> y: $coordinata[0]</a> </div>')
map.addOverlay(marker);
</script>
EOH;
}
Na de nem tudom, hogy kéne ehhez átírnom ezt:
$html = <<< EOH
<div id=''map'' style=''width: 550px; height: 450px''></div>
<noscript><b>JavaScript must be enabled in order for you to use Google Maps.</b>
However, it seems JavaScript is either disabled or not supported by your browser.
To view Google Maps, enable JavaScript by changing your browser options, and then
try again.
</noscript>
<script type=''text/javascript''>
//<![CDATA[
if (GBrowserIsCompatible()) {
// A function to create the marker and set up the event window
// Dont try to unroll this function. It has to be here for the function closure
// Each instance of the function preserves the contends of a different instance
// of the ''marker'' and ''html'' variables which will be needed later when the event triggers.
function createMarker(point,html) {
var marker = new GMarker(point);
GEvent.addListener(marker, ''click'', function() {
marker.openInfoWindowHtml(html);
});
return marker;
}
// Display the map, with some controls and set the initial location
var map = new GMap2(document.getElementById(''map''));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng($eovwgs[1], $eovwgs[0]),8);
// Set up three markers with info windows
var point = new GLatLng($eovwgs[1], $eovwgs[0]);
var marker = createMarker(point,'<div style=''width:240px''>Eov koordináták : <br/> x: $eov_x <br/> y: $eov_y </a> </div>')
map.addOverlay(marker);
}
// display a warning if the browser was not compatible
else {
alert(''Sorry, the Google Maps API is not compatible with this browser'');
}
//]]>
</script>
EOH;
Új hozzászólás Aktív témák
Hirdetés
- Luck Dragon: Asszociációs játék. :)
- Steam topic
- Xbox Series X|S
- Folyószámla, bankszámla, bankváltás, külföldi kártyahasználat
- Apple iPhone 17 - alap
- Arc Raiders
- AMD K6-III, és minden ami RETRO - Oldschool tuning
- Forza sorozat (Horizon/Motorsport)
- Autós topik látogatók beszélgetős, offolós topikja
- Audi, Cupra, Seat, Skoda, Volkswagen topik
- További aktív témák...
- Samsung 27" 2K 2560x1440 monitor S27A850D PLS panel, kis hibákkal, DP porton kell használni!
- NEC 27" 2K 2560x1440 IPS monitor pici hibával PIVOT mód, HDMI, DP port
- Epson WorkForce Pro WF-C579RDWF (C11CG77401) A4-es, színes üzleti tintasugaras MFP nyomtató eladó
- iPhone 15 Pro Max Natúr Titán 256 GB
- iPhone 15 PRO 128GB fekete titán KÁRTYAFÜGGETLEN! 2027 júniusig Apple garancia! Akkumlátor 87%
- HIBÁTLAN iPhone 12 128GB Purple -1 ÉV GARANCIA - Kártyafüggetlen, MS4364
- Dell Precision 3571 4G LTE i7-12700H 32GB 1000GB FHD RTX A1000 4GB 1 év teljeskörű garancia
- HIBÁTLAN iPhone 13 mini 128GB Pink -1 ÉV GARANCIA - Kártyafüggetlen, MS3285
- Samsung Tablet S9 FE, 128GB, 5G, SM-X516BLGA
- Motorola Moto G72 128GB,Újszerű,Dobozaval,12 hónap garanciával
Állásajánlatok
Cég: Central PC számítógép és laptop szerviz - Pécs
Város: Pécs
Cég: Laptopműhely Bt.
Város: Budapest

