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

Tutorials

>

Tutorial Maps

>

Tutorial : LeafLetJS Maps with different layers


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

Tutorial : LeafLetJS Maps with different layers:



Zurück zum Tutorial der Komponente Maps



Quelltext

Quelltext


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

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

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

        
$this->render = new Object();

        
// Default layer
        
$map1 = new MapLeafLet("map04_1");
        
$map1->addMarker("Paris France""Paris");
        
$map1->setZoom(5);

        
// Modify default layer
        
$map2 = new MapLeafLet("map04_2");
        
$map2->addMarker("Paris France""Paris");
        
$map2->setZoom(5);
        
$map2->setTileLayer("http://{s}.basemaps.cartocdn.com/dark_nolabels/{z}/{x}/{y}.png",
            
"&copy; <a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a> &copy; ".
            
"<a href=\"http://cartodb.com/attributions\">CartoDB</a>");

        
// Use 2 layers (tiles)
        
$map3 = new MapLeafLet("map04_3");
        
$map3->addMarker("Paris France""Paris");
        
$map3->setZoom(5);
        
$map3->setTileLayer("http://{s}.tile.thunderforest.com/spinal-map/{z}/{x}/{y}.png",
            
"Tiles Courtesy of <a href=\"http://www.mapquest.com/\">MapQuest</a>");
        
$map3->addTileLayer("http://{s}.tile.stamen.com/toner-lines/{z}/{x}/{y}.png",
            
"&copy; <a href=\"http://www.thunderforest.com/\">Thunderforest</a>, &copy; ".
        
"<a href=\"http://www.openstreetmap.org/copyright\">OpenStreetMap</a>");

        
$this->render->add($map1$map2$map3);
    }
}
?>


Zurück zum Tutorial der Komponente Maps


Share

 


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