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 different layers and layers controler

Tutoriels

>

Tutoriel Maps

>

Tutorial : LeafLetJS Maps with different layers and layers controler


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

Tutorial : LeafLetJS Maps with different layers and layers controler:



Retourner aux tutoriels du composants Maps



Code source

Code source


Fichier: /pages/tutorials/maps/maps-05.php

<?php
class Maps05 extends Page {
    public function 
InitializeComponent() {
        
parent::$PAGE_TITLE "Tutorial : LeafLetJS Maps
                    with different layers and layers controler"
;

        
// You can find different layers on this page:
        // http://leaflet-extras.github.io/leaflet-providers/preview/

        
$this->render = new MapLeafLet("map05");
        
$this->render->setHeight(600)->setWidth(500);
        
$this->render->addMarker("Paris France""Paris");
        
$this->render->setZoom(5);
        
$this->render->setTileLayer("http://{s}.tile.stamen.com/watercolor/{z}/{x}/{y}.png",
            
"Map tiles by <a href=\"http://stamen.com\">Stamen Design</a>, ".
            
"<a href=\"http://creativecommons.org/licenses/by/3.0\">CC BY 3.0</a> &mdash; Map data ".
            
"&copy; <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a>",
            
"Map 1"MapLeafLet::TILE_LAYER_CTRL_RADIO);
        
$this->render->addTileLayer("http://otile4.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png""",
            
"Map 2"MapLeafLet::TILE_LAYER_CTRL_RADIOfalse);
        
$this->render->addTileLayer("http://openmapsurfer.uni-hd.de/tiles/adminb/x={x}&y={y}&z={z}",
            
"Imagery from <a href=\"http://giscience.uni-hd.de/\">GIScience Research Group @ University ".
            
"of Heidelberg</a> &mdash; Map data &copy; <a href=\"http://www.openstreetmap.org/copyright\">".
            
"OpenStreetMap</a>""Admin bounds");
        
$this->render->addTileLayer("http://{s}.tile.stamen.com/toner-lines/{z}/{x}/{y}.png",
            
"Map tiles by <a href=\"http://stamen.com\">Stamen Design</a>, ".
            
"<a href=\"http://creativecommons.org/licenses/by/3.0\">CC BY 3.0</a> &mdash; Map data ".
            
"&copy; <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a>""Border lines");
    }
}
?>


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