File modules/cms/macros/macro/OpenStreetMap.class.php

Last commit: Sun Feb 23 04:49:34 2020 +0100	Jan Dankert	Refactoring with Namespaces for the cms modules, part 2.
1 <?php 2 namespace cms\macros\macro; 3 // --------------------------------------------------------------------------- 4 // $Id$ 5 // --------------------------------------------------------------------------- 6 // OpenRat Content Management System 7 // Copyright (C) 2002 Jan Dankert, jandankert@jandankert.de 8 // 9 // This program is free software; you can redistribute it and/or 10 // modify it under the terms of the GNU General Public License 11 // as published by the Free Software Foundation; either version 2 12 // of the License, or (at your option) any later version. 13 // 14 // This program is distributed in the hope that it will be useful, 15 // but WITHOUT ANY WARRANTY; without even the implied warranty of 16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 17 // GNU General Public License for more details. 18 // 19 // You should have received a copy of the GNU General Public License 20 // along with this program; if not, write to the Free Software 21 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 22 // --------------------------------------------------------------------------- 23 use util\Macro; 24 25 26 /** 27 * Bindet die OpenStreetMap ein. 28 * 29 * @author Jan Dankert 30 */ 31 class OpenStreetMap extends Macro 32 { 33 /** 34 * Bitte immer alle Parameter in dieses Array schreiben, dies ist fuer den Web-Developer hilfreich. 35 * @type String 36 */ 37 var $parameters = Array( 38 'box' => 'coordinates', 39 'layer' => 'mapnik', 40 'width' => 'Width of iframe', 41 'height' => 'Height of iframe', 42 ); 43 44 /** 45 * Bitte immer eine Beschreibung benutzen, dies ist fuer den Web-Developer hilfreich. 46 * @type String 47 */ 48 var $description = 'Includes the OpenStreetMap.'; 49 50 var $box = '9.9396,53.4821,10.184,53.643'; // default: Hamburg 51 var $layer = 'mapnik'; 52 var $width = 425; 53 var $height = 350; 54 55 /** 56 */ 57 function execute() 58 { 59 $this->output('<iframe width="'.$this->width.'" height="'.$this->height.'" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://www.openstreetmap.org/export/embed.html?bbox='.$this->box.'&layer='.$this->layer.'" style="border: 1px solid black"></iframe>'); 60 } 61 62 } 63 64 ?>
Download modules/cms/macros/macro/OpenStreetMap.class.php
History Sun, 23 Feb 2020 04:49:34 +0100 Jan Dankert Refactoring with Namespaces for the cms modules, part 2. Sun, 23 Feb 2020 04:01:30 +0100 Jan Dankert Refactoring with Namespaces for the cms modules, part 1: moving.