Skip to content
This repository has been archived by the owner on Apr 16, 2024. It is now read-only.

Commit

Permalink
Merge branch 'master' of https://github.com/tcuje/osmodul into tcuje-…
Browse files Browse the repository at this point in the history
…master
  • Loading branch information
Schlumpf committed Nov 15, 2015
2 parents cb048c9 + 50822a1 commit 0092555
Show file tree
Hide file tree
Showing 12 changed files with 160 additions and 155 deletions.
14 changes: 8 additions & 6 deletions helper.php
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ private static function wxh($string){

private static function imagery($bl, $style){
$return = "";
if($bl == 'mapnikde') $return = '<a href="http://www.openstreetmap.de/">Openstreetmap.de</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)';
else if($bl == 'stamenwater') $return = '<a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>';
else if($bl == 'mapquest') $return = '<a href="http://www.mapquest.com/">MapQuest</a>';
else if($bl == 'opentopomap') $return = '<a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>), <a href="http://viewfinderpanoramas.org">SRTM</a>';
else if($bl == 'openmapsurfer')$return = '<a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a>';
else if($bl == 'custom') $return = $style;
if($bl == 'mapnikde') $return = '<a href="http://www.openstreetmap.de/">Openstreetmap.de</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>)';
else if($bl == 'stamenwater') $return = '<a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>';
else if($bl == 'mapquest') $return = '<a href="http://www.mapquest.com/">MapQuest</a>';
else if($bl == 'opentopomap') $return = '<a href="https://opentopomap.org">OpenTopoMap</a> (<a href="https://creativecommons.org/licenses/by-sa/3.0/">CC-BY-SA</a>), <a href="http://viewfinderpanoramas.org">SRTM</a>';
else if($bl == 'openmapsurfer') $return = '<a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a>';
else if($bl == 'humanitarian') $return = '<a href="https://hotosm.org/">Humanitarian OpenStreetMap Team</a>';
else if($bl == 'custom') $return = $style;
return $return;
}

Expand Down Expand Up @@ -159,6 +160,7 @@ public static function javascript($params, $id){
else if($params->get('baselayer', 'mapnik') == 'stamenwater') { $baselayerURL = 'http://stamen-tiles-{s}.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png'; $baselayerSettings = "subdomains: 'abcd', minZoom: 1, maxZoom: 16, "; }
else if($params->get('baselayer', 'mapnik') == 'opentopomap') { $baselayerURL = 'http://{s}.tile.opentopomap.org/{z}/{x}/{y}.png'; $baselayerSettings = "maxZoom: 16, "; }
else if($params->get('baselayer', 'mapnik') == 'openmapsurfer') { $baselayerURL = 'http://openmapsurfer.uni-hd.de/tiles/roads/x={x}&y={y}&z={z}'; $baselayerSettings = "maxZoom: 20, "; }
else if($params->get('baselayer', 'mapnik') == 'humanitarian') { $baselayerURL = 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png'; $baselayerSettings = "maxZoom: 20, "; }
else if($params->get('baselayer', 'mapnik') == 'custom') { $baselayerURL = $params->get('customBaselayerURL', ''); }

// load start coordinates
Expand Down
Empty file modified images/custom_marker_help.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified images/index.html
100755 → 100644
Empty file.
Empty file modified index.html
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion language/de-DE/de-DE.mod_osmod.ini
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ MOD_OSMOD_H_MAP="Karteneinstellungen"
MOD_OSMOD_HEIGHT="Höhe der Karte"
MOD_OSMOD_HEIGHT_DESC="in px"
MOD_OSMOD_ZOOM="Zoomlevel"
MOD_OSMOD_ZOOM_DESC="1: Sehr weit weg, 18: ganz nah"
MOD_OSMOD_ZOOM_DESC="1: Sehr weit weg, 20: ganz nah"
MOD_OSMOD_BASELAYER="Kartenstil"
MOD_OSMOD_BASELAYER_DESC="Mapnik ist der Standardstil von OpenStreetMap."
MOD_OSMOD_CUSTOMBASELAYER="Benutzerdefinierter Kartenstil"
Expand Down
Empty file modified language/de-DE/de-DE.mod_osmod.sys.ini
100755 → 100644
Empty file.
2 changes: 1 addition & 1 deletion language/en-GB/en-GB.mod_osmod.ini
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ MOD_OSMOD_H_MAP="Map configuration"
MOD_OSMOD_HEIGHT="Map height"
MOD_OSMOD_HEIGHT_DESC="in px"
MOD_OSMOD_ZOOM="Zoomlevel"
MOD_OSMOD_ZOOM_DESC="1: far awaly, 18: very close"
MOD_OSMOD_ZOOM_DESC="1: far awaly, 20: very close"
MOD_OSMOD_BASELAYER="Map style"
MOD_OSMOD_BASELAYER_DESC="Mapnik is the default style of OpenStreetMap."
MOD_OSMOD_CUSTOMBASELAYER="Custom map style"
Expand Down
Empty file modified language/en-GB/en-GB.mod_osmod.sys.ini
100755 → 100644
Empty file.
Empty file modified mod_osmod.php
100755 → 100644
Empty file.
297 changes: 150 additions & 147 deletions mod_osmod.xml
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -2,161 +2,164 @@
<extension type="module" version="2.5" client="site" method="upgrade">

<!-- Metadata -->
<name>OSModul</name>
<author>Martin Kröll</author>
<creationDate>31.05.2015</creationDate>
<copyright>(c) 2012-2015 Martin Kröll</copyright>
<license>http://www.gnu.org/licenseses/gpl-3.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>http://extensions.joomla.org/extensions/owner/schlumpf</authorUrl>
<version>2.7</version>
<description>MOD_OSMOD_DESCRIPTION</description>

<name>OSModul</name>
<author>Martin Kröll</author>
<creationDate>31.05.2015</creationDate>
<copyright>(c) 2012-2015 Martin Kröll</copyright>
<license>http://www.gnu.org/licenseses/gpl-3.0.html GNU/GPL</license>
<authorEmail>[email protected]</authorEmail>
<authorUrl>http://extensions.joomla.org/extensions/owner/schlumpf</authorUrl>
<version>2.7</version>
<description>MOD_OSMOD_DESCRIPTION</description>
<!-- Update servers -->
<updateservers>
<server type="extension" priority="1" name="OSModul at hof-ronig.de">http://jextensions.hof-ronig.de/mod_osmod/update.xml</server>
</updateservers>
<updateservers>
<server type="extension" priority="1" name="OSModul at hof-ronig.de">http://jextensions.hof-ronig.de/mod_osmod/update.xml</server>
</updateservers>

<!-- Script file -->
<scriptfile>mod_osmod.script.php</scriptfile>

<!-- Front-end files -->
<files>
<folder>language</folder>
<folder>tmpl</folder>
<filename>mod_osmod.xml</filename>
<filename module="mod_osmod">mod_osmod.php</filename>
<filename>helper.php</filename>
<filename>index.html</filename>
<filename>CHANGES</filename>
</files>
<files>
<folder>language</folder>
<folder>tmpl</folder>
<filename>mod_osmod.xml</filename>
<filename module="mod_osmod">mod_osmod.php</filename>
<filename>helper.php</filename>
<filename>index.html</filename>
<filename>CHANGES</filename>
</files>

<!-- Media files -->
<media destination="mod_osmod">
<folder>leaflet</folder>
<folder>images</folder>
<folder>leaflet</folder>
<folder>images</folder>
</media>

<!-- Configuration -->
<config>
<fields name="params">
<fieldset name="mapConfig" label="MOD_OSMOD_H_MAP">
<field type="text" name="height" label="MOD_OSMOD_HEIGHT" description="MOD_OSMOD_HEIGHT_DESC" default="200"/>

<field type="list" name="zoom" default="12" label="MOD_OSMOD_ZOOM" description="MOD_OSMOD_ZOOM_DESC">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
</field>

<field type="list" name="baselayer" default="Mapnik" label="MOD_OSMOD_BASELAYER" description="MOD_OSMOD_BASELAYER_DESC">
<option value="mapnik">OpenStreetMap</option>
<option value="mapnikde">OpenStreetMap DE</option>
<option value="stamenwater">Stamen Watercolor</option>
<option value="mapquest">MapQuest</option>
<option value="opentopomap">OpenTopoMap</option>
<option value="openmapsurfer">OpenMapSurfer</option>
<option value="custom">custom</option>
</field>

<field type="text" name="customBaselayer" label="MOD_OSMOD_CUSTOMBASELAYER" description="MOD_OSMOD_CUSTOMBASELAYER_DESC" default=""/>
<field type="text" name="customBaselayerURL" label="MOD_OSMOD_CUSTOMBASELAYERURL" description="MOD_OSMOD_CUSTOMBASELAYERURL_DESC" default=""/>

<field type="checkboxes" name="scale" label="MOD_OSMOD_SCALE" description="MOD_OSMOD_SCALE_DESC">
<option value="metric">MOD_OSMOD_METRIC</option>
<option value="imperial">MOD_OSMOD_IMPERIAL</option>
</field>

<field type="list" name="noWorldWarp" default="0" label="MOD_OSMOD_NOWORLDWARP" description="MOD_OSMOD_NOWORLDWARP_DESC">
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>

<field type="list" name="attrLeaflet" default="0" label="MOD_OSMOD_ATTRLEAFLET" description="MOD_OSMOD_ATTRLEAFLET_DESC">
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>

<field type="list" name="attrImagery" default="1" label="MOD_OSMOD_ATTRIMAGERY" description="MOD_OSMOD_ATTRIMAGERY_DESC">
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>

<field type="list" name="attrModule" default="1" label="MOD_OSMOD_ATTRMODULE" description="MOD_OSMOD_ATTRMODULE_DESC">
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>

<field type="spacer" name="spacerPos0" hr="true" />
<field type="spacer" name="spacerPos" label="MOD_OSMOD_POSITION" class="text"/>

<field type="text" name="lon" label="MOD_OSMOD_LON" description="MOD_OSMOD_LON_DESC" default="7.316633"/>
<field type="text" name="lat" label="MOD_OSMOD_LAT" description="MOD_OSMOD_LAT_DESC" default="50.560715"/>
</fieldset>

<fieldset name="pinConfig" label="MOD_OSMOD_H_PIN">
<field type="radio" name="pin" default="1" label="MOD_OSMOD_PIN" description="MOD_OSMOD_PIN_DESC">
<option value="0">MOD_OSMOD_NOPIN</option>
<option value="1">&lt;img src="../media/mod_osmod/leaflet/images/marker-icon.png" alt="default" /&gt;</option>
<option value="2">MOD_OSMOD_OWNPIN</option>
</field>

<field type="spacer" name="spacerPin0" hr="true" />
<field type="spacer" name="spacerPin" label="MOD_OSMOD_PINPATH" class="text"/>

<field type="media" name="customPinPath" label="MOD_OSMOD_PINPATH" description="MOD_OSMOD_PINPATH_DESC" default=""/>
<field type="text" name="customPinSize" label="MOD_OSMOD_PINSIZE" description="MOD_OSMOD_PINSIZE_DESC" default="24x24"/>
<field type="media" name="customPinShadowPath" label="MOD_OSMOD_PINSHADOWPATH" description="MOD_OSMOD_PINSHADOWPATH_DESC" default=""/>
<field type="text" name="customPinShadowSize" label="MOD_OSMOD_PINSHADOWSIZE" description="MOD_OSMOD_PINSHADOWSIZE_DESC" default="0x0"/>

<field type="text" name="customPinOffset" label="MOD_OSMOD_PINOFFSET" description="MOD_OSMOD_PINOFFSET_DESC" default="0x0"/>
<field type="text" name="customPinPopupOffset" label="MOD_OSMOD_PINPOPUPOFFSET" description="MOD_OSMOD_PINPOPUPOFFSET_DESC" default="0x0"/>

<field type="spacer" name="spacerPopup0" hr="true" />
<field type="spacer" name="spacerPopup" label="MOD_OSMOD_HPOPUP" class="text"/>
<field type="list" name="popup" default="0" label="MOD_OSMOD_POPUP" description="MOD_OSMOD_POPUP_DESC">
<option value="1">MOD_OSMOD_KLICK</option>
<option value="2">MOD_OSMOD_ALWAYS</option>
<option value="0">MOD_OSMOD_NEVER</option>
</field>
</fieldset>

<!-- Popup Text -->
<fieldset name="popoupConfig" label="MOD_OSMOD_POPUPTEXT">
<field type="editor" name="popuptext" default="" label="MOD_OSMOD_POPUPTEXT" description="MOD_OSMOD_POPUPTEXT_DESC" filter="safehtml"/>
</fieldset>

<!-- Multipin -->
<fieldset name="multipinConfig" label="MOD_OSMOD_MP_MULTIPIN">
<field name="pins" type="textarea" default="" label="MOD_OSMOD_MP_PINS" description="MOD_OSMOD_MP_PINS_DESC" />
<field name="custompins" type="textarea" default="" label="MOD_OSMOD_MP_CUSTOMS" description="MOD_OSMOD_MP_CUSTOMS_DESC" />
<field name="popups" type="textarea" default="" label="MOD_OSMOD_MP_POPUPS" description="MOD_OSMOD_MP_POPUPS_DESC" filter="raw" />
</fieldset>

<!-- advanced -->
<fieldset name="advanced">
<field
name="moduleclass_sfx"
type="text"
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
</fieldset>

</fields>
</config>
<config>
<fields name="params">
<fieldset name="mapConfig" label="MOD_OSMOD_H_MAP">
<field type="text" name="height" label="MOD_OSMOD_HEIGHT" description="MOD_OSMOD_HEIGHT_DESC" default="200"/>

<field type="list" name="zoom" default="12" label="MOD_OSMOD_ZOOM" description="MOD_OSMOD_ZOOM_DESC">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
<option value="7">7</option>
<option value="8">8</option>
<option value="9">9</option>
<option value="10">10</option>
<option value="11">11</option>
<option value="12">12</option>
<option value="13">13</option>
<option value="14">14</option>
<option value="15">15</option>
<option value="16">16</option>
<option value="17">17</option>
<option value="18">18</option>
<option value="19">19</option>
<option value="20">20</option>
</field>

<field type="list" name="baselayer" default="Mapnik" label="MOD_OSMOD_BASELAYER" description="MOD_OSMOD_BASELAYER_DESC">
<option value="mapnik">OpenStreetMap</option>
<option value="mapnikde">OpenStreetMap DE</option>
<option value="stamenwater">Stamen Watercolor</option>
<option value="mapquest">MapQuest</option>
<option value="opentopomap">OpenTopoMap</option>
<option value="openmapsurfer">OpenMapSurfer</option>
<option value="humanitarian">Humanitarian</option>
<option value="custom">custom</option>
</field>

<field type="text" name="customBaselayer" label="MOD_OSMOD_CUSTOMBASELAYER" description="MOD_OSMOD_CUSTOMBASELAYER_DESC" default=""/>
<field type="text" name="customBaselayerURL" label="MOD_OSMOD_CUSTOMBASELAYERURL" description="MOD_OSMOD_CUSTOMBASELAYERURL_DESC" default=""/>

<field type="checkboxes" name="scale" label="MOD_OSMOD_SCALE" description="MOD_OSMOD_SCALE_DESC">
<option value="metric">MOD_OSMOD_METRIC</option>
<option value="imperial">MOD_OSMOD_IMPERIAL</option>
</field>

<field type="list" name="noWorldWarp" default="0" label="MOD_OSMOD_NOWORLDWARP" description="MOD_OSMOD_NOWORLDWARP_DESC">
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>

<field type="list" name="attrLeaflet" default="0" label="MOD_OSMOD_ATTRLEAFLET" description="MOD_OSMOD_ATTRLEAFLET_DESC">
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>

<field type="list" name="attrImagery" default="1" label="MOD_OSMOD_ATTRIMAGERY" description="MOD_OSMOD_ATTRIMAGERY_DESC">
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>

<field type="list" name="attrModule" default="1" label="MOD_OSMOD_ATTRMODULE" description="MOD_OSMOD_ATTRMODULE_DESC">
<option value="1">JYES</option>
<option value="0">JNO</option>
</field>

<field type="spacer" name="spacerPos0" hr="true" />
<field type="spacer" name="spacerPos" label="MOD_OSMOD_POSITION" class="text"/>

<field type="text" name="lon" label="MOD_OSMOD_LON" description="MOD_OSMOD_LON_DESC" default="7.316633"/>
<field type="text" name="lat" label="MOD_OSMOD_LAT" description="MOD_OSMOD_LAT_DESC" default="50.560715"/>
</fieldset>

<fieldset name="pinConfig" label="MOD_OSMOD_H_PIN">
<field type="radio" name="pin" default="1" label="MOD_OSMOD_PIN" description="MOD_OSMOD_PIN_DESC">
<option value="0">MOD_OSMOD_NOPIN</option>
<option value="1">&lt;img src="../media/mod_osmod/leaflet/images/marker-icon.png" alt="default" /&gt;</option>
<option value="2">MOD_OSMOD_OWNPIN</option>
</field>

<field type="spacer" name="spacerPin0" hr="true" />
<field type="spacer" name="spacerPin" label="MOD_OSMOD_PINPATH" class="text"/>

<field type="media" name="customPinPath" label="MOD_OSMOD_PINPATH" description="MOD_OSMOD_PINPATH_DESC" default=""/>
<field type="text" name="customPinSize" label="MOD_OSMOD_PINSIZE" description="MOD_OSMOD_PINSIZE_DESC" default="24x24"/>
<field type="media" name="customPinShadowPath" label="MOD_OSMOD_PINSHADOWPATH" description="MOD_OSMOD_PINSHADOWPATH_DESC" default=""/>
<field type="text" name="customPinShadowSize" label="MOD_OSMOD_PINSHADOWSIZE" description="MOD_OSMOD_PINSHADOWSIZE_DESC" default="0x0"/>

<field type="text" name="customPinOffset" label="MOD_OSMOD_PINOFFSET" description="MOD_OSMOD_PINOFFSET_DESC" default="0x0"/>
<field type="text" name="customPinPopupOffset" label="MOD_OSMOD_PINPOPUPOFFSET" description="MOD_OSMOD_PINPOPUPOFFSET_DESC" default="0x0"/>

<field type="spacer" name="spacerPopup0" hr="true" />
<field type="spacer" name="spacerPopup" label="MOD_OSMOD_HPOPUP" class="text"/>
<field type="list" name="popup" default="0" label="MOD_OSMOD_POPUP" description="MOD_OSMOD_POPUP_DESC">
<option value="1">MOD_OSMOD_KLICK</option>
<option value="2">MOD_OSMOD_ALWAYS</option>
<option value="0">MOD_OSMOD_NEVER</option>
</field>
</fieldset>

<!-- Popup Text -->
<fieldset name="popoupConfig" label="MOD_OSMOD_POPUPTEXT">
<field type="editor" name="popuptext" default="" label="MOD_OSMOD_POPUPTEXT" description="MOD_OSMOD_POPUPTEXT_DESC" filter="safehtml"/>
</fieldset>

<!-- Multipin -->
<fieldset name="multipinConfig" label="MOD_OSMOD_MP_MULTIPIN">
<field name="pins" type="textarea" default="" label="MOD_OSMOD_MP_PINS" description="MOD_OSMOD_MP_PINS_DESC" />
<field name="custompins" type="textarea" default="" label="MOD_OSMOD_MP_CUSTOMS" description="MOD_OSMOD_MP_CUSTOMS_DESC" />
<field name="popups" type="textarea" default="" label="MOD_OSMOD_MP_POPUPS" description="MOD_OSMOD_MP_POPUPS_DESC" filter="raw" />
</fieldset>

<!-- advanced -->
<fieldset name="advanced">
<field
name="moduleclass_sfx"
type="text"
label="COM_MODULES_FIELD_MODULECLASS_SFX_LABEL"
description="COM_MODULES_FIELD_MODULECLASS_SFX_DESC" />
</fieldset>

</fields>
</config>
</extension>
Empty file modified tmpl/default.php
100755 → 100644
Empty file.
Empty file modified tmpl/index.html
100755 → 100644
Empty file.

0 comments on commit 0092555

Please sign in to comment.