[Commits] r2627 - in sandbox/mapgears/geoext.ux/ux: . WFSTFeatureEditing WFSTFeatureEditing/examples WFSTFeatureEditing/lib WFSTFeatureEditing/lib/GeoExt.ux WFSTFeatureEditing/lib/GeoExt.ux/widgets WFSTFeatureEditing/resources WFSTFeatureEditing/resources/css WFSTFeatureEditing/resources/lang
commits at geoext.org
commits at geoext.org
Mon Mar 21 19:34:35 CET 2011
Author: adube
Date: 2011-03-21 19:34:34 +0100 (Mon, 21 Mar 2011)
New Revision: 2627
Added:
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/examples/
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/examples/WFSTFeatureEditing.html
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/examples/WFSTFeatureEditing.js
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/lib/
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/lib/GeoExt.ux/
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/lib/GeoExt.ux/WFSTFeatureEditing.js
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/lib/GeoExt.ux/widgets/
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/lib/GeoExt.ux/widgets/WFSTFeatureEditingManager.js
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/lib/GeoExt.ux/widgets/WFSTFeatureEditingPanel.js
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/lib/GeoExt.ux/widgets/WFSTFeatureEditingStatusBar.js
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/resources/
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/resources/css/
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/resources/css/WFSTFeatureEditing.css
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/resources/images/
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/resources/lang/
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/resources/lang/fr.js
sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/tests/
Log:
WFSTFeatureEditing ux initial commit - blank lib files, example withou widget, dir structure
Added: sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/examples/WFSTFeatureEditing.html
===================================================================
--- sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/examples/WFSTFeatureEditing.html (rev 0)
+++ sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/examples/WFSTFeatureEditing.html 2011-03-21 18:34:34 UTC (rev 2627)
@@ -0,0 +1,49 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="content-type" content="text/html;charset=utf-8" />
+ <title>WFSTFeatureEditing ux</title>
+
+ <!-- Versions, Ext 3.1.0, GeoExt trunk, OpenLayers trunk -->
+ <link rel="stylesheet" type="text/css"
+ href="../../../../ext/resources/css/ext-all.css" />
+ <link rel="stylesheet" type="text/css"
+ href="../../../../ext/examples/shared/examples.css" />
+ <link rel="stylesheet" type="text/css"
+ href="../../../../ext/examples/ux/statusbar/css/statusbar.css" />
+ <link rel="stylesheet" type="text/css"
+ href="../resources/css/WMSBrowser.css" />
+ </head>
+ <body>
+ <h1>WFSTFeatureEditing ux</h1>
+ <p>
+ This widget automatically create all the tools required to accomplish WFST
+ editing using GeoExt. See
+ <a href="WFSTFeatureEditing.js">WFSTFeatureEditing.js</a> for the source
+ code.
+ </p>
+ <div id="content"></div>
+ <br />
+ <p>
+ More details to come.
+ </p>
+
+ <script type="text/javascript"
+ src="../../../../ext/adapter/ext/ext-base.js"></script>
+ <script type="text/javascript"
+ src="../../../../ext/ext-all.js"></script>
+ <script type="text/javascript"
+ src="../../../../ext/examples/ux/statusbar/StatusBar.js"></script>
+ <script type="text/javascript"
+ src="../../../../openlayers/lib/OpenLayers.js"></script>
+ <!--script type="text/javascript"
+ src="../../../../openlayers/lib/OpenLayers/Lang/fr.js"></script-->
+ <script type="text/javascript"
+ src="../../../../geoext/lib/GeoExt.js"></script>
+ <script type="text/javascript"
+ src="../lib/GeoExt.ux/WFSTFeatureEditing.js"></script>
+ <!--script type="text/javascript" src="../resources/lang/fr.js"></script-->
+ <script type="text/javascript" src="WFSTFeatureEditing.js"></script>
+ </body>
+</html>
Added: sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/examples/WFSTFeatureEditing.js
===================================================================
--- sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/examples/WFSTFeatureEditing.js (rev 0)
+++ sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/examples/WFSTFeatureEditing.js 2011-03-21 18:34:34 UTC (rev 2627)
@@ -0,0 +1,53 @@
+var manager, mapPanel, tree, toolbar;
+
+Ext.onReady(function() {
+ Ext.QuickTips.init();
+
+ var actions = [];
+ var action = new Ext.Action({
+ text: 'Dummy',
+ scope: this
+ });
+ actions.push(action);
+ toolbar = new Ext.Toolbar(actions);
+
+ var options = {
+ projection: new OpenLayers.Projection("EPSG:900913"),
+ displayProjection: new OpenLayers.Projection("EPSG:4326"),
+ units: "m",
+ numZoomLevels: 18,
+ maxResolution: 156543.0339,
+ maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
+ 20037508, 20037508.34)
+ };
+ map = new OpenLayers.Map('map', options);
+
+ mapPanel = new GeoExt.MapPanel({
+ region: "center",
+ layers: [new OpenLayers.Layer.OSM()],
+ map: map,
+ tbar: toolbar
+ });
+
+ tree = new Ext.tree.TreePanel({
+ region: 'east',
+ root: new GeoExt.tree.LayerContainer({
+ text: 'Map Layers',
+ layerStore: mapPanel.layers,
+ leaf: false,
+ expanded: true
+ }),
+ enableDD: true,
+ width: 170
+ });
+
+ new Ext.Panel({
+ renderTo: "content",
+ layout: "border",
+ width: 570,
+ height: 350,
+ items: [mapPanel, tree]
+ });
+
+ map.setCenter(new OpenLayers.LonLat(-10762333.581055,5968203.1676758), 2);
+});
Added: sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/lib/GeoExt.ux/WFSTFeatureEditing.js
===================================================================
--- sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/lib/GeoExt.ux/WFSTFeatureEditing.js (rev 0)
+++ sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/lib/GeoExt.ux/WFSTFeatureEditing.js 2011-03-21 18:34:34 UTC (rev 2627)
@@ -0,0 +1,82 @@
+/**
+ * Copyright (c) 2008-2011 The Open Source Geospatial Foundation
+ *
+ * Published under the BSD license.
+ * See http://svn.geoext.org/core/trunk/geoext/license.txt for the full text
+ * of the license.
+ */
+
+/*
+ * The code in this file is based on code taken from OpenLayers.
+ *
+ * Copyright (c) 2006-2007 MetaCarta, Inc., published under the Clear BSD
+ * license. See http://svn.openlayers.org/trunk/openlayers/license.txt for the
+ * full text of the license.
+ */
+
+(function() {
+
+ /**
+ * The relative path of this script.
+ */
+ var scriptName = "lib/GeoExt.ux/WFSTFeatureEditing.js";
+
+ /**
+ * Function returning the path of this script.
+ */
+ var getScriptLocation = function() {
+ var scriptLocation = "";
+ // If we load other scripts right before GeoExt using the same
+ // mechanism to add script resources dynamically (e.g. OpenLayers),
+ // document.getElementsByTagName will not find the GeoExt script tag
+ // in FF2. Using document.documentElement.getElementsByTagName instead
+ // works around this issue.
+ var scripts = document.documentElement.getElementsByTagName('script');
+ for(var i=0, len=scripts.length; i<len; i++) {
+ var src = scripts[i].getAttribute('src');
+ if(src) {
+ var index = src.lastIndexOf(scriptName);
+ // set path length for src up to a query string
+ var pathLength = src.lastIndexOf('?');
+ if(pathLength < 0) {
+ pathLength = src.length;
+ }
+ // is it found, at the end of the URL?
+ if((index > -1) && (index + scriptName.length == pathLength)) {
+ scriptLocation = src.slice(0, pathLength - scriptName.length);
+ break;
+ }
+ }
+ }
+ return scriptLocation;
+ };
+
+ var jsfiles = new Array(
+ "widgets/WFSTFeatureEditingManager.js",
+ "widgets/WFSTFeatureEditingPanel.js",
+ "widgets/WFSTFeatureEditingStatusBar.js"
+ );
+
+ var agent = navigator.userAgent;
+ var docWrite = (agent.match("MSIE") || agent.match("Safari"));
+ if(docWrite) {
+ var allScriptTags = new Array(jsfiles.length);
+ }
+ var host = getScriptLocation() + "lib/GeoExt.ux/";
+ for (var i=0, len=jsfiles.length; i<len; i++) {
+ if (docWrite) {
+ allScriptTags[i] = "<script src='" + host + jsfiles[i] +
+ "'></script>";
+ } else {
+ var s = document.createElement("script");
+ s.src = host + jsfiles[i];
+ var h = document.getElementsByTagName("head").length ?
+ document.getElementsByTagName("head")[0] :
+ document.body;
+ h.appendChild(s);
+ }
+ }
+ if (docWrite) {
+ document.write(allScriptTags.join(""));
+ }
+})();
Added: sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/lib/GeoExt.ux/widgets/WFSTFeatureEditingManager.js
===================================================================
Added: sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/lib/GeoExt.ux/widgets/WFSTFeatureEditingPanel.js
===================================================================
Added: sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/lib/GeoExt.ux/widgets/WFSTFeatureEditingStatusBar.js
===================================================================
Added: sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/resources/css/WFSTFeatureEditing.css
===================================================================
Added: sandbox/mapgears/geoext.ux/ux/WFSTFeatureEditing/resources/lang/fr.js
===================================================================
More information about the Commits
mailing list