]> dev.renevier.net Git - syj.git/commitdiff
revert: add mapquest layer
authorarno <arno@renevier.net>
Mon, 18 Apr 2011 11:30:42 +0000 (13:30 +0200)
committerarno <arno@renevier.net>
Mon, 18 Apr 2011 11:30:42 +0000 (13:30 +0200)
15 files changed:
.gitmodules
COPYING.TXT
application/configs/medias.ini
application/controllers/IdxController.php
application/languages/lang_en.po
application/languages/lang_fr.po
application/languages/lang_ja.po
public/css/syj.css
public/icons/layer-switcher-maximize-flipped.png [deleted file]
public/js/store.js [deleted symlink]
public/js/syj.js
public/js/syjraw.js
public/store.js [deleted submodule]
scripts/fulljslint.js
scripts/syj.cfg

index 0bbb5056726fb13aa0dd152b8739ccacf9a064c6..26fad1a685f84636f93f2fefd9e927bc4a2eb452 100644 (file)
@@ -10,6 +10,3 @@
 [submodule "public/simplebox"]
        path = public/simplebox
        url = git://github.com/arenevier/simplebox.git
-[submodule "public/store.js"]
-       path = public/store.js
-       url = git://github.com/cloudhead/store.js.git
index e83ada25b113cb7d2f289d4ffadf69331386d353..6128571b20ed87fea9f28e297f860739e3fb13f1 100644 (file)
@@ -10,9 +10,6 @@
 - pseudo.gif files has been generated with http://ajaxload.info/ generator and
   is free for use.
 
-- layer-switcher-maximize-flipped.png is a flipped version of
-  layer-switcher-maximize.png from OpenLayers. As such it is licensed under a
-  modified BSD license.
 
 
 ===============================================================================
index 49f0f2d393ba56292ce6c25b76d420d0ba517b69..6442a1de53bd28ec4b637ebc854dd5823bd9532f 100644 (file)
@@ -1,7 +1,7 @@
 ; This file is part of Syj, Copyright (c) 2010-2011 Arnaud Renevier,
 ; and is published under the AGPL license. */
 [production]
-scripts.idx = OpenLayers, ModifiablePath, prototype, simplebox, utils, syj, store
+scripts.idx = OpenLayers, ModifiablePath, prototype, simplebox, utils, syj
 scripts.rawidx = OpenLayers, syjraw
 scripts.login = prototype, utils, login
 scripts.contact = prototype, utils, contact
index 217295bbc0c9c9d08016bcfd749036707fbbe63d..d525d3439c32668b5f15957c3a8b267b4c490ed2 100644 (file)
@@ -144,7 +144,6 @@ class IdxController extends Zend_Controller_Action
     protected function _jsRawLocaleStrings() {
         $this->view->jslocales = array(
             'osmAttribution' => __("Map by <a href='http://openstreetmap.org/'>OpenStreetMap</a>"),
-            'mapquestAttribution' => __("Map by MapQuest, <a href='http://www.openstreetmap.org/'>OpenStreetMap</a> and contributors, <a href='http://creativecommons.org/licenses/by-sa/2.0/'>CC-BY-SA</a>"),
             );
     }
 
@@ -170,7 +169,6 @@ class IdxController extends Zend_Controller_Action
             'canResubmit' => __("Now, you can retry to save"),
             'routeBy' => __("route by"),
             'osmAttribution' => __("Map by <a href='http://openstreetmap.org/'>OpenStreetMap</a>"),
-            'mapquestAttribution' => __("Map by MapQuest, <a href='http://www.openstreetmap.org/'>OpenStreetMap</a> and contributors, <a href='http://creativecommons.org/licenses/by-sa/2.0/'>CC-BY-SA</a>"),
             'pseudoChecking' => __("checking availibilty"),
             'availablePseudo' => __("available pseudo"),
             'unavailablePseudo' => __("unavailable pseudo"),
index defca4451090e5b6caf64cd4615e2744a4419018..335ce2bf2bd744c19187c449442671c383176098 100644 (file)
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: syj\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-04-12 23:13+0200\n"
+"POT-Creation-Date: 2011-04-04 13:05+0200\n"
 "PO-Revision-Date: \n"
 "Last-Translator: arno <arno@renevier.net>\n"
 "Language-Team: arno <arno@renevier.net>\n"
@@ -106,12 +106,12 @@ msgid "gpx export"
 msgstr "gpx export"
 
 #: application/views/scripts/idx/index.phtml:112
-#: application/controllers/IdxController.php:183
+#: application/controllers/IdxController.php:182
 msgid "duplicate"
 msgstr "duplicate"
 
 #: application/views/scripts/idx/index.phtml:114
-#: application/controllers/IdxController.php:181
+#: application/controllers/IdxController.php:180
 msgid "edit"
 msgstr "edit"
 
@@ -476,7 +476,7 @@ msgstr "Hi,"
 #: application/controllers/ContactController.php:121
 #: application/controllers/NewpwdController.php:68
 #: application/controllers/AccountController.php:70
-#: application/controllers/IdxController.php:185
+#: application/controllers/IdxController.php:184
 msgid "Value is required"
 msgstr "Value is required"
 
@@ -640,34 +640,30 @@ msgid "route by"
 msgstr "route by"
 
 #: application/controllers/IdxController.php:177
-msgid "Map by MapQuest, <a href='http://www.openstreetmap.org/'>OpenStreetMap</a> and contributors, <a href='http://creativecommons.org/licenses/by-sa/2.0/'>CC-BY-SA</a>"
-msgstr "Map by MapQuest, <a href='http://www.openstreetmap.org/'>OpenStreetMap</a> and contributors, <a href='http://creativecommons.org/licenses/by-sa/2.0/'>CC-BY-SA</a>"
-
-#: application/controllers/IdxController.php:178
 msgid "checking availibilty"
 msgstr "checking availibilty"
 
-#: application/controllers/IdxController.php:179
+#: application/controllers/IdxController.php:178
 msgid "available pseudo"
 msgstr "available pseudo"
 
-#: application/controllers/IdxController.php:180
+#: application/controllers/IdxController.php:179
 msgid "unavailable pseudo"
 msgstr "unavailable pseudo"
 
-#: application/controllers/IdxController.php:182
+#: application/controllers/IdxController.php:181
 msgid "create"
 msgstr "create"
 
-#: application/controllers/IdxController.php:184
+#: application/controllers/IdxController.php:183
 msgid "You have an unsaved route"
 msgstr "You have an unsaved route"
 
-#: application/controllers/IdxController.php:186
+#: application/controllers/IdxController.php:185
 msgid "no result"
 msgstr "no result"
 
-#: application/controllers/IdxController.php:187
+#: application/controllers/IdxController.php:186
 msgid "could not analyze file content"
 msgstr "could not analyze file content"
 
index cc1824040f697fba0f52a4b95ed8479726648a8e..6efd1a2933cb2c5320b8b00300d33b0659a2d400 100644 (file)
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: syj\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-04-12 23:13+0200\n"
+"POT-Creation-Date: 2011-04-04 13:05+0200\n"
 "PO-Revision-Date: \n"
 "Last-Translator: arno <arno@renevier.net>\n"
 "Language-Team: arno <arno@renevier.net>\n"
@@ -106,12 +106,12 @@ msgid "gpx export"
 msgstr "export gpx"
 
 #: application/views/scripts/idx/index.phtml:112
-#: application/controllers/IdxController.php:183
+#: application/controllers/IdxController.php:182
 msgid "duplicate"
 msgstr "dupliquer"
 
 #: application/views/scripts/idx/index.phtml:114
-#: application/controllers/IdxController.php:181
+#: application/controllers/IdxController.php:180
 msgid "edit"
 msgstr "modifier"
 
@@ -478,7 +478,7 @@ msgstr "Bonjour,"
 #: application/controllers/ContactController.php:121
 #: application/controllers/NewpwdController.php:68
 #: application/controllers/AccountController.php:70
-#: application/controllers/IdxController.php:185
+#: application/controllers/IdxController.php:184
 msgid "Value is required"
 msgstr "Le champ est requis"
 
@@ -642,34 +642,30 @@ msgid "route by"
 msgstr "tracé par"
 
 #: application/controllers/IdxController.php:177
-msgid "Map by MapQuest, <a href='http://www.openstreetmap.org/'>OpenStreetMap</a> and contributors, <a href='http://creativecommons.org/licenses/by-sa/2.0/'>CC-BY-SA</a>"
-msgstr "Carte par MapQuest, <a href='http://www.openstreetmap.org/'>OpenStreetMap</a> et contributeurs, <a href='http://creativecommons.org/licenses/by-sa/2.0/'>CC-BY-SA</a>"
-
-#: application/controllers/IdxController.php:178
 msgid "checking availibilty"
 msgstr "vérification de la disponibilité"
 
-#: application/controllers/IdxController.php:179
+#: application/controllers/IdxController.php:178
 msgid "available pseudo"
 msgstr "pseudo disponible"
 
-#: application/controllers/IdxController.php:180
+#: application/controllers/IdxController.php:179
 msgid "unavailable pseudo"
 msgstr "pseudo non disponible"
 
-#: application/controllers/IdxController.php:182
+#: application/controllers/IdxController.php:181
 msgid "create"
 msgstr "créér"
 
-#: application/controllers/IdxController.php:184
+#: application/controllers/IdxController.php:183
 msgid "You have an unsaved route"
 msgstr "Vous avez un itinéraire non sauvegardé"
 
-#: application/controllers/IdxController.php:186
+#: application/controllers/IdxController.php:185
 msgid "no result"
 msgstr "pas de résultat"
 
-#: application/controllers/IdxController.php:187
+#: application/controllers/IdxController.php:186
 msgid "could not analyze file content"
 msgstr "impossible d'analyser le contenu du fichier"
 
index 00c952ed344c913f9efdf66f2cf67a2e04f2a793..37704d480fa910d3c5d4e215b946f6890222ff0d 100644 (file)
@@ -2,7 +2,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: syj\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-04-12 23:13+0200\n"
+"POT-Creation-Date: 2011-04-04 13:05+0200\n"
 "PO-Revision-Date: \n"
 "Last-Translator: S.Higashi <s_higash@mua.biglobe.ne.jp>\n"
 "Language: \n"
@@ -110,12 +110,12 @@ msgid "gpx export"
 msgstr "gpxにエクスポート"
 
 #: application/views/scripts/idx/index.phtml:112
-#: application/controllers/IdxController.php:183
+#: application/controllers/IdxController.php:182
 msgid "duplicate"
 msgstr "複製"
 
 #: application/views/scripts/idx/index.phtml:114
-#: application/controllers/IdxController.php:181
+#: application/controllers/IdxController.php:180
 msgid "edit"
 msgstr "編集"
 
@@ -572,7 +572,7 @@ msgstr "Hi,"
 #: application/controllers/ContactController.php:121
 #: application/controllers/NewpwdController.php:68
 #: application/controllers/AccountController.php:70
-#: application/controllers/IdxController.php:185
+#: application/controllers/IdxController.php:184
 msgid "Value is required"
 msgstr "値が必要です"
 
@@ -736,37 +736,30 @@ msgid "route by"
 msgstr "ルート作成者"
 
 #: application/controllers/IdxController.php:177
-msgid ""
-"Map by MapQuest, <a href='http://www.openstreetmap.org/'>OpenStreetMap</a> "
-"and contributors, <a href='http://creativecommons.org/licenses/by-"
-"sa/2.0/'>CC-BY-SA</a>"
-msgstr ""
-
-#: application/controllers/IdxController.php:178
 msgid "checking availibilty"
 msgstr "利用可能かチェック中"
 
-#: application/controllers/IdxController.php:179
+#: application/controllers/IdxController.php:178
 msgid "available pseudo"
 msgstr "利用出来るID"
 
-#: application/controllers/IdxController.php:180
+#: application/controllers/IdxController.php:179
 msgid "unavailable pseudo"
 msgstr "利用できないID"
 
-#: application/controllers/IdxController.php:182
+#: application/controllers/IdxController.php:181
 msgid "create"
 msgstr "作成"
 
-#: application/controllers/IdxController.php:184
+#: application/controllers/IdxController.php:183
 msgid "You have an unsaved route"
 msgstr "保存されていないルートがあります"
 
-#: application/controllers/IdxController.php:186
+#: application/controllers/IdxController.php:185
 msgid "no result"
 msgstr "結果がありません"
 
-#: application/controllers/IdxController.php:187
+#: application/controllers/IdxController.php:186
 msgid "could not analyze file content"
 msgstr "ファイル内容を分析できませんでした"
 
index ae8e1b67524107fde25b611e2ce6693c05a8f2ee..b5151ae42799231bec92545d07e4e1f9c6bfbdfb 100644 (file)
@@ -29,37 +29,6 @@ body, html {
     left: 0.5em;
 }
 
-.olControlLayerSwitcher {
-    bottom: 4em;
-    top: auto;
-    left: 13px;
-    opacity: 0.75;
-    height: 6em;
-    max-width: intrinsic;
-    max-width: -moz-max-content;
-}
-
-/* setting opacity to .olControlLayerSwitcher does not work */
-.olControlLayerSwitcher .layersDiv,
-.olControlLayerSwitcher .maximizeDiv,
-.olControlLayerSwitcher .minimizeDiv
-{
-    filter:alpha(opacity=75);
-}
-
-.olControlLayerSwitcher .dataLayersDiv, .olControlLayerSwitcher .dataLbl {
-    display: none;
-}
-.olControlLayerSwitcher .layersDiv {
-    padding: 5px 12px 5px 36px;
-}
-.olControlLayerSwitcher .maximizeDiv {
-    top: -6em;
-}
-.olControlLayerSwitcher .minimizeDiv {
-    left: 4px;
-}
-
 /*
  * main message rules
  */
diff --git a/public/icons/layer-switcher-maximize-flipped.png b/public/icons/layer-switcher-maximize-flipped.png
deleted file mode 100644 (file)
index f87fa32..0000000
Binary files a/public/icons/layer-switcher-maximize-flipped.png and /dev/null differ
diff --git a/public/js/store.js b/public/js/store.js
deleted file mode 120000 (symlink)
index bc23b5e..0000000
+++ /dev/null
@@ -1 +0,0 @@
-../store.js/store.js
\ No newline at end of file
index ed68bcf7a43b383751b66bfee28fee785079075f..fbe3f737efcc06d9ff0eef3a091e0b03aa59c554 100644 (file)
@@ -272,7 +272,7 @@ var SYJView = {
     mode: 'view',
 
     init: function() {
-        var externalGraphic, baseURL, osmLayer, layerOptions, hidemessenger, layerCode, parameters;
+        var externalGraphic, baseURL, baseLayer, layerOptions, hidemessenger;
 
         // is svg context, opera does not resolve links with base element is svg context
         externalGraphic = styleMap.edit.styles.select.defaultStyle.externalGraphic;
@@ -283,24 +283,16 @@ var SYJView = {
             controls: [
                 new OpenLayers.Control.Navigation(),
                 new OpenLayers.Control.PanZoom(),
-                this.createLayerSwitcher(),
                 new OpenLayers.Control.Attribution()
             ],
             theme: null
         });
 
-        osmLayer = new OpenLayers.Layer.OSM("OSM", [
+        baseLayer = new OpenLayers.Layer.OSM("OSM", [
                 'http://a.tile.openstreetmap.org/${z}/${x}/${y}.png',
                 'http://b.tile.openstreetmap.org/${z}/${x}/${y}.png',
                 'http://c.tile.openstreetmap.org/${z}/${x}/${y}.png'],
-                { wrapDateLine: true , attribution: SyjStrings.osmAttribution, layerCode: 'O'});
-
-        mapquestLayer = new OpenLayers.Layer.OSM("Mapquest", [
-            'http://otile1.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png',
-            'http://otile2.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png',
-            'http://otile3.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png',
-            'http://otile4.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png'],
-                { wrapDateLine: true , attribution: SyjStrings.mapquestAttribution, layerCode: 'M'});
+                { wrapDateLine: true , attribution: SyjStrings.osmAttribution });
 
         layerOptions = {format:     OpenLayers.Format.WKT,
                         projection: WGS84,
@@ -308,34 +300,7 @@ var SYJView = {
                         attribution: SyjStrings.geomAttribution };
 
         this.viewLayer = new OpenLayers.Layer.Vector("View Layer", layerOptions);
-        this.map.addLayers([osmLayer, mapquestLayer, this.viewLayer]);
-
-        this.map.setBaseLayer(mapquestLayer);
-        layerCode = null;
-        parameters = OpenLayers.Util.getParameters(window.location.href);
-        if (parameters.layer) {
-            layerCode = parameters.layer;
-            try {
-                store.remove('baselayer');
-            } catch(e) {}
-        } else {
-            try {
-                layerCode = store.get('baselayer');
-            } catch(e) {}
-        }
-
-        if (layerCode) {
-            layerCode = layerCode.toUpperCase();
-            var self = this;
-            $([osmLayer, mapquestLayer]).each(function(layer) {
-                if (layer.layerCode === layerCode) {
-                    self.map.setBaseLayer(layer);
-                }
-            });
-        }
-
-
-        this.map.events.register("changebaselayer", this, this.saveBaseLayer);
+        this.map.addLayers([baseLayer, this.viewLayer]);
 
         if ($("edit-btn")) {
             $("edit-btn").observe('click', function() {
@@ -466,33 +431,6 @@ var SYJView = {
         SYJPathLength.update();
     },
 
-    saveBaseLayer: function(data) {
-        try {
-            store.set('baselayer', data.layer.layerCode);
-        } catch(e) {}
-    },
-
-    createLayerSwitcher: function() {
-        var control = new OpenLayers.Control.LayerSwitcher({roundedCorner: false});
-        // XXX: we need to "live-patch" LayerSwitcher to use our icons. We use
-        // a regexp instead of a string in case OpenLayers is modified and in
-        // case browsers modify the function representation
-        control.loadContents = eval('(function() { return (' + control.loadContents.toString().replace(
-                    /\s*=\s*imgLocation\s*\+\s*['"]layer-switcher-maximize\.png['"]\s*;/,
-                    " = 'icons/layer-switcher-maximize-flipped.png';"
-                    ) + ')}())');
-        var oldMaximizeControl = control.maximizeControl;
-        var self = this;
-        control.maximizeControl = (function(oldfunc) {
-            return function() {
-                oldfunc.apply(control, arguments);
-                self.messenger.hide();
-            };
-        }(control.maximizeControl));
-
-        return control;
-    },
-
     initMaPos: function (aPos) {
         var extent = null, center = null, zoom = 0;
 
index 8a77bb0ee948faf92d9495aa8ea27e07e8d7733c..cf6be9c37eb8e964d3ea010be1581735d046a28c 100644 (file)
@@ -17,30 +17,12 @@ function resizeMap() {
     map.style.height = map.offsetHeight.toString() + 'px';
 }
 
-function mapquestLayer() {
-      return new OpenLayers.Layer.OSM("Mapquest", [
-                'http://otile1.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png',
-                'http://otile2.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png',
-                'http://otile3.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png',
-                'http://otile4.mqcdn.com/tiles/1.0.0/osm/${z}/${x}/${y}.png'],
-                    { attribution: SyjStrings.mapquestAttribution});
-}
-
-function osmLayer() {
-    return new OpenLayers.Layer.OSM("OSM", [
-                'http://a.tile.openstreetmap.org/${z}/${x}/${y}.png',
-                'http://b.tile.openstreetmap.org/${z}/${x}/${y}.png',
-                'http://c.tile.openstreetmap.org/${z}/${x}/${y}.png'],
-                { attribution: SyjStrings.osmAttribution});
-}
-
 function init() {
     var map = new OpenLayers.Map('map', {
                 controls: [ new OpenLayers.Control.Attribution() ],
                 theme: null}),
 
-         parameters = OpenLayers.Util.getParameters(window.location.href),
-         baseLayer = null,
+         baseLayer = new OpenLayers.Layer.OSM("OSM", null, { attribution: SyjStrings.osmAttribution }),
 
          layerOptions = {format:     OpenLayers.Format.WKT,
                         projection: WGS84,
@@ -50,21 +32,6 @@ function init() {
         viewLayer = new OpenLayers.Layer.Vector("View Layer", layerOptions),
         wkt = new OpenLayers.Format.WKT({ internalProjection: Mercator, externalProjection: WGS84 });
 
-    if (parameters.layer) {
-        switch (parameters.layer.toUpperCase()) {
-            case 'M':
-             baseLayer = mapquestLayer();
-            break;
-            case 'O':
-             baseLayer = osmLayer();
-            break;
-        }
-    }
-
-    if (!baseLayer) {
-        baseLayer = osmLayer();
-    }
-
     map.addLayers([baseLayer, viewLayer]);
     viewLayer.addFeatures([wkt.read(gInitialGeom.data)]);
     extent = viewLayer.getDataExtent();
diff --git a/public/store.js b/public/store.js
deleted file mode 160000 (submodule)
index 25c640b..0000000
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 25c640b09962bcbf46a17e88817ce195118cfeac
index 4cd74d3fa2ce4b2b9234b0e44e91793c71f8adb6..9bffa4ffd5dfaec53444e57238475779d761598a 100755 (executable)
@@ -6595,4 +6595,4 @@ loop:   for (;;) {
 
     return itself;
 
-}());
+}());
\ No newline at end of file
index 5c729f724a28e84c81a5096599748f0c09b84bb1..f473f40d83b5f603e9a948a7ae51febc7518ad3b 100644 (file)
@@ -15,7 +15,6 @@ OpenLayers/BaseTypes/Element.js
 OpenLayers/Console.js
 OpenLayers/Control/Attribution.js
 OpenLayers/Control/DrawFeature.js
-OpenLayers/Control/LayerSwitcher.js
 OpenLayers/Control/Navigation.js
 OpenLayers/Control/DragFeature.js
 OpenLayers/Control/PanZoom.js