WebSite-PHP Framework PHP
Multi langues
Mode Ajax simple
Aucun HTML, aucun JavaScript
URL rewrinting
Envoi d'email
Sitemap - RSS - Web service
Télécharger le Framework WebSite-PHP maintenant
 


Loading
 


Tutorial : LeafLetJS Maps
            with multiple random markers

Tutoriels

>

Tutoriel Maps

>

Tutorial : LeafLetJS Maps with multiple random markers


Maps-03: Tutoriel du composants Maps du FrameWork PHP WebSite-PHP.

Tutorial : LeafLetJS Maps with multiple random markers:



Retourner aux tutoriels du composants Maps



Code source

Code source


Fichier: /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);
    }
}
?>


Retourner aux tutoriels du composants Maps


Share

 


Copyright © 2009-2016 WebSite-PHP Framework PHP
Accueil Documentation Télécharger Quick start Tutoriels Wiki Issue Tracker