WebSite-PHP Framework PHP
Mehrsprachig
Einfacher Ajax Modus
Kein HTML, kein JavaScript
URL Rewriting
Mails senden
Sitemap - RSS - Web service
Laden Sie WebSite-PHP FrameWork jetzt herunter
 


Loading
 


Tutorial : LeafLetJS Maps
            with multiple random markers

Tutorials

>

Tutorial Maps

>

Tutorial : LeafLetJS Maps with multiple random markers


Maps-03: Tutorial der Komponente Maps vom PHP FrameWork WebSite-PHP.

Tutorial : LeafLetJS Maps with multiple random markers:



Zurück zum Tutorial der Komponente Maps



Quelltext

Quelltext


Datei: /pages/tutorials/maps/maps-03.php

<?php
class Maps03 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : LeafLetJS Maps
                    with multiple random markers"
;
        
        
$this->render = new MapLeafLet("map03");
        
$min_lat 180;$max_lat = -180;
        
$min_lng 180;$max_lng = -180;
        for (
$i=1$i <= 10$i++) {
            
$lat rand(-5050);
            
$lng rand(-5050);
            
$this->render->addLatitudeLongitudeMarker($lat$lng,
                
"Random marker ".$i." in the world");
            if (
$lat $min_lat) { $min_lat $lat; }
            if (
$lat $max_lat) { $max_lat $lat; }
            if (
$lng $min_lng) { $min_lng $lng; }
            if (
$lng $max_lng) { $max_lng $lng; }
        }
        
$this->render->setAutoZoom($min_lat$max_lat$min_lng$max_lng);
    }
}
?>


Zurück zum Tutorial der Komponente Maps


Share

 


Copyright © 2009-2024 WebSite-PHP Framework PHP
Start Dokumentation Herunterladen Schnellstart Tutorials Wiki Issue Tracker