Hirdetés
- iPhone topik
- Milyen okostelefont vegyek?
- Apple Watch
- Beárazták a Nubia Z80 Ultra európai verzióját
- Google Pixel topik
- Amazfit Helio Strap – képernyőmentesen
- Xiaomi 15T - reakció nélkül nincs egyensúly
- Honor Magic7 Pro - kifinomult, költséges képalkotás
- Motorola Edge 70 - többért kevesebbet
- Samsung Galaxy Watch (Tizen és Wear OS) ingyenes számlapok, kupon kódok
-
Mobilarena
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
- One otthoni szolgáltatások (TV, internet, telefon)
- Álláskeresés, interjú, önéletrajz
- Melyik tápegységet vegyem?
- Építő/felújító topik
- Külföldi rendelések: boltok, fizetés, postázás
- Gyúrósok ide!
- Mibe tegyem a megtakarításaimat?
- Egyéni arckép 2. lépés: ARCKÉPSZERKESZTŐ
- PlayStation 5
- Projektor topic
- További aktív témák...
- HP 15.6 ",AMD A10,jó állapotú,magyar billentyűzet,Win.11 is megy!!
- Acer 15,6",Intel(2,58Ghz)akár 16GB RAM,akár 1TB SSD,jó akku,jó állapot
- Fujitsu ,15,6",8.gen.i5,világító.bill, 4G LTE,16-32GB/128-512,jó akku,Win.11,szép
- Vadonatúj, bontatlan MacBook AIR 13,6 (2025) M4 CHIP 16/256GB silver ALZA számla 3 év Apple garancia
- 2év Garancia,Lenovo Slim 3,i5 12450H(12x4,4Ghz)15,6"FullHD IPS,Magyar vil.bill,16GBDDR5 RAM,512SSD
- GYÖNYÖRŰ iPhone 13 128GB Midnight -1 ÉV GARANCIA - Kártyafüggetlen, MS3576, 100% Akkumulátor
- 171 - Lenovo Legion Pro 7 (16IAX10H) - Intel Core U9 275HX, RTX 5080
- HIBÁTLAN iPhone 13 Pro 128GB Sierra Blue -1 ÉV GARANCIA - Kártyafüggetlen, MS3750, 100% Akkumulátor
- HIBÁTLAN iPhone 13 mini 128GB Starlight -1 ÉV GARANCIA - Kártyafüggetlen, MS3828, 100% Akksi
- SK Hynix 32GB DDR4 2666MHz PC4-21300 laptop RAM
Állásajánlatok
Cég: PCMENTOR SZERVIZ KFT.
Város: Budapest
Cég: Laptopműhely Bt.
Város: Budapest


