|
POST
|
I have a working editor widget but I want to be able to move the pane based on onmousedown. I used this example here: dojo/dnd/Moveable — The Dojo Toolkit - Reference Guide This is the block of code that is supposed to allow me to move the pane: on(dom.byId("templatePickerPane"), "onmousedown", function () { var dnd = new Moveable(dom.byId("templatePickerPane")); }); Any idea how I get this object to move on mouse down? Here is my code: <!DOCTYPE html> <html> <head> <title>Decatur Graphics Editor</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1,maximum-scale=1, user-scalable=no"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/dijit/themes/soria/soria.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css"> <style> html, body, #mapDiv { padding:0; margin:0; height:100%; width:100%; position:absolute; z-index:0; } /* Editor style begin */ #templatePickerPane { width: 200px; height:300px; overflow: hidden; z-index:50; top:50%; right:0%; position:absolute; } #panelHeader { background-color: #92A661; border-bottom: solid 1px #92A860; color: #FFF; font-size: 18px; height: 24px; line-height: 22px; margin: 0; overflow: hidden; padding: 10px 10px 10px 10px; } #editorDiv { background-color:White; } .esriEditor .templatePicker { padding-bottom: 5px; padding-top: 5px; height: 500px; border-radius: 0px 0px 4px 4px; border: solid 1px #92A661; } .dj_ie .infowindow .window .top .right .user .content, .dj_ie .simpleInfoWindow .content { position: relative; } /* Editor Style End */ </style> <script src="http://js.arcgis.com/3.11/" type="text/javascript"></script> <script type="text/javascript"> var map; require(["esri/map", "esri/config", "esri/geometry/Extent", "esri/dijit/editing/Editor", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/layers/ArcGISTiledMapServiceLayer", "esri/layers/FeatureLayer", "esri/SnappingManager", "esri/tasks/GeometryService", "esri/toolbars/draw", "dojo/dom", "dojo/keys", "dojo/on", "dojo/parser", "dojo/_base/array", "dojo/i18n!esri/nls/jsapi", "dojo/dnd/Moveable", "dojo/domReady!"], function (Map, esriConfig, Extent, Editor, ArcGISDynamicMapServiceLayer, ArcGISTiledMapServiceLayer, FeatureLayer, SnappingManager, GeometryService, Draw, dom, keys, on, parser, arrayUtils, i18n, Moveable ) { parser.parse(); //snapping is enabled for this sample - change the tooltip to reflect this i18n.toolbars.draw.start += "<br/>Press <b>CTRL</b> to enable snapping"; i18n.toolbars.draw.addPoint += "<br/>Press <b>CTRL</b> to enable snapping"; /* The proxy comes before all references to web services */ /* Files required for security are proxy.config, web.config and proxy.ashx - set security in Manager to Private, available to selected users and select Allow access to all users who are logged in (Roles are not required) /* The proxy section is defined on the ESRI sample. I have included it as part of the documentation reads that the measuring will not work. I thought that might be important. */ // Proxy Definition Begin //identify proxy page to use if the toJson payload to the geometry service is greater than 2000 characters. //If this null or not available the project and lengths operation will not work. // Otherwise it will do a http post to the proxy. esriConfig.defaults.io.proxyUrl = "proxy.ashx"; esriConfig.defaults.io.alwaysUseProxy = true; // Proxy Definition End // declare geometry service esriConfig.defaults.geometryService = new GeometryService("http://maps.decaturil.gov/arcgis/rest/services/Utilities/Geometry/GeometryServer"); // set custom extent var initialExtent = new Extent({ "xmin": 777229.03, "ymin": 1133467.92, "xmax": 848340.14, "ymax": 1185634.58, "spatialReference": { "wkid": 3435 } }); // create map and set slider style to small map = new Map("mapDiv", { showAttribution: false, sliderStyle: "small", extent: initialExtent }); map.on("layers-add-result", initEditing); // add imagery var tiled = new ArcGISTiledMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Aerial_2014_Tiled/MapServer"); map.addLayer(tiled); // set operational layers var operationalLayer = new ArcGISDynamicMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Public/InternetVector/MapServer", { "opacity": 0.5 }); // add operational layers map.addLayer(operationalLayer); // add point feature layer var pointFeatureLayer = new FeatureLayer("http://maps.decaturil.gov/arcgis/rest/services/Test/FeatureServer/0", { mode: FeatureLayer.MODE_ONDEMAND, outFields: ["*"] }); map.addLayers([pointFeatureLayer]); map.infoWindow.resize(400, 300); function initEditing(event) { var featureLayerInfos = arrayUtils.map(event.layers, function (layer) { return { "featureLayer": layer.layer }; }); var settings = { map: map, layerInfos: featureLayerInfos }; var params = { settings: settings }; var editorWidget = new Editor(params, 'editorDiv'); editorWidget.startup(); var options = { snapKey: keys.copyKey }; map.enableSnapping(options); } on(dom.byId("templatePickerPane"), "onmousedown", function () { var dnd = new Moveable(dom.byId("templatePickerPane")); }); } ); </script> </head> <body class="soria"> <div id="mapDiv"> </div> <div id="templatePickerPane"> <div id="panelHeader"> Default Editor </div> <div style="padding:10px;" id="editorDiv"> </div> </div> </body> </html>
... View more
12-02-2014
12:09 PM
|
0
|
1
|
2068
|
|
POST
|
I tried adding my dynamic layer and my tiled layer with the feature layer in add layers. It didn't like that. Once I just added just the feature layer in the map.addLayers, it worked. Thanks again.
... View more
12-02-2014
10:09 AM
|
0
|
0
|
1538
|
|
POST
|
Okay I changed that and I do have an error now: TypeError: Unable to draw graphic (geometry:null, symbol:null): undefined is not a functionmessage: "Unable to draw graphic (geometry:null, symbol:null): undefined is not a function"stack: (...)get stack: function () { [native code] }set stack: function () { [native code] }__proto__: Error "TypeError: Unable to draw graphic I was thinking that the error is telling me that I don't have a symbol defined. Is there something that I am missing in my web service: Layer: Test Points (ID: 0) And here is my geometry service: Utilities/Geometry (GeometryServer) Also I clicked on ArcGIS.com Map and the points are editable and I can add new ones as well.
... View more
12-02-2014
09:58 AM
|
0
|
2
|
1538
|
|
POST
|
I wrote code for an editor widget based on this page: Default editing widget | ArcGIS API for JavaScript It looks like I have all the required information in my code, but I don't see my symbols displaying in the editorDiv and I can not edit the symbols on the feature layer on the map. The feature layer is set up for editing. I don't receive any errors in Google Chrome. Any ideas what is wrong with this code: <!DOCTYPE html> <html> <head> <title>Decatur Graphics Editor</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1,maximum-scale=1, user-scalable=no"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/dijit/themes/soria/soria.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css"> <style> html, body, #mapDiv { padding:0; margin:0; height:100%; width:100%; position:absolute; z-index:0; } /* Editor style begin */ #templatePickerPane { width: 200px; height:300px; overflow: hidden; z-index:50; top:50%; right:0%; position:absolute; } #panelHeader { background-color: #92A661; border-bottom: solid 1px #92A860; color: #FFF; font-size: 18px; height: 24px; line-height: 22px; margin: 0; overflow: hidden; padding: 10px 10px 10px 10px; } #editorDiv { background-color:White; } .esriEditor .templatePicker { padding-bottom: 5px; padding-top: 5px; height: 500px; border-radius: 0px 0px 4px 4px; border: solid 1px #92A661; } .dj_ie .infowindow .window .top .right .user .content, .dj_ie .simpleInfoWindow .content { position: relative; } /* Editor Style End */ </style> <script src="http://js.arcgis.com/3.11/" type="text/javascript"></script> <script type="text/javascript"> var map; require(["esri/map", "esri/config", "esri/geometry/Extent", "esri/dijit/editing/Editor", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/layers/ArcGISTiledMapServiceLayer", "esri/layers/FeatureLayer", "esri/SnappingManager", "esri/tasks/GeometryService", "esri/toolbars/draw", "dojo/dom", "dojo/keys", "dojo/on", "dojo/parser", "dojo/_base/array", "dojo/i18n!esri/nls/jsapi", "dojo/dnd/Moveable", "dojo/domReady!"], function (Map, esriConfig, Extent, Editor, ArcGISDynamicMapServiceLayer, ArcGISTiledMapServiceLayer, FeatureLayer, SnappingManager, GeometryService, Draw, dom, keys, on, parser, arrayUtils, i18n, Moveable ) { parser.parse(); //snapping is enabled for this sample - change the tooltip to reflect this i18n.toolbars.draw.start += "<br/>Press <b>CTRL</b> to enable snapping"; i18n.toolbars.draw.addPoint += "<br/>Press <b>CTRL</b> to enable snapping"; /* The proxy comes before all references to web services */ /* Files required for security are proxy.config, web.config and proxy.ashx - set security in Manager to Private, available to selected users and select Allow access to all users who are logged in (Roles are not required) /* The proxy section is defined on the ESRI sample. I have included it as part of the documentation reads that the measuring will not work. I thought that might be important. */ // Proxy Definition Begin //identify proxy page to use if the toJson payload to the geometry service is greater than 2000 characters. //If this null or not available the project and lengths operation will not work. // Otherwise it will do a http post to the proxy. esriConfig.defaults.io.proxyUrl = "proxy.ashx"; esriConfig.defaults.io.alwaysUseProxy = true; // Proxy Definition End // declare geometry service esriConfig.defaults.geometryService = new GeometryService("http://maps.decaturil.gov/arcgis/rest/services/Utilities/Geometry/GeometryServer"); // set custom extent var initialExtent = new Extent({ "xmin": 777229.03, "ymin": 1133467.92, "xmax": 848340.14, "ymax": 1185634.58, "spatialReference": { "wkid": 3435 } }); // create map and set slider style to small map = new Map("mapDiv", { showAttribution: false, sliderStyle: "small", extent: initialExtent }); map.on("layers-add-result", initEditing); // add imagery var tiled = new ArcGISTiledMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Aerial_2014_Tiled/MapServer"); map.addLayer(tiled); // set operational layers var operationalLayer = new ArcGISDynamicMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Public/InternetVector/MapServer", { "opacity": 0.5 }); // add operational layers map.addLayer(operationalLayer); // add point feature layer var pointFeatureLayer = new FeatureLayer("http://maps.decaturil.gov/arcgis/rest/services/Test/FeatureServer/0", { mode: FeatureLayer.MODE_ONDEMAND, outFields: ["*"] }); map.addLayer(pointFeatureLayer); map.infoWindow.resize(400, 300); function initEditing(event) { var featureLayerInfos = arrayUtils.map(event.layers, function (layer) { return { "featureLayer": layer.layer }; }); var settings = { map: map, layerInfos: featureLayerInfos }; var params = { settings: settings }; var editorWidget = new Editor(params, 'editorDiv'); editorWidget.startup(); var options = { snapKey: keys.copyKey }; map.enableSnapping(options); } } ); </script> </head> <body class="soria"> <div id="mapDiv"> </div> <div id="templatePickerPane"> <div id="panelHeader"> Default Editor </div> <div style="padding:10px;" id="editorDiv"> </div> </div> </body> </html>
... View more
12-02-2014
09:24 AM
|
0
|
4
|
3736
|
|
POST
|
Exactly what I was looking for. Thanks again Robert!
... View more
11-26-2014
02:30 PM
|
0
|
0
|
1020
|
|
POST
|
I need to know how to capture the event. The print task works.
... View more
11-26-2014
12:38 PM
|
0
|
1
|
1020
|
|
POST
|
I have extended my print widget so that I can enter a title, choose the layout and format, by creating a second button to input these values prior to clicking on print. How do I remove the print_button after the printing has completed? I tried writing a printer on complete function, but it did not work. <!DOCTYPE html> <html> <head> <title>Print a Map</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1,maximum-scale=1, user-scalable=no"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/dijit/themes/soria/soria.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css"> <style> html, body, #mapDiv { padding:0; margin:0; height:100%; width:100%; position:absolute; z-index:0; } /* Printer CSS Begin */ h3 { margin: 0 0 5px 0; border-bottom: 1px solid #444; padding: 0 0 5px 0; text-align: center; } .shadow { -moz-box-shadow: 0 0 5px #888; -webkit-box-shadow: 0 0 5px #888; box-shadow: 0 0 5px #888; } #feedback { background: #fff; border: 2px solid #666; border-radius: 5px; bottom: 20px; color: #666; font-family: arial; height: auto; left: 20px; margin: 5px; padding: 10px; position: absolute; width: 300px; z-index: 40; visibility:hidden; } #feedback a { border-bottom: 1px solid #888; color: #666; text-decoration: none; } #feedback a:hover, #feedback a:active, #feedback a:visited { border: none; color: #666; text-decoration: none; } #note { padding: 0 0 10px 0; } #info, #information { padding: 10px 0 0 0; } /* Printer CSS End */ #showTools { height:20px; width:20px; position:absolute; top:200px; left:20px; z-index:50; padding:5px 6px 5px 6px; background-color:#f9f8f8; border-radius:5px; visibility:visible; } #hideTools { height:20px; width:20px; position:absolute; top:200px; left:20px; z-index:50; padding:5px 6px 5px 6px; background-color:#f9f8f8; border-radius:5px; visibility:hidden; } #printer { height:20px; width:20px; position:absolute; top:240px; left:20px; z-index:50; padding:5px 6px 5px 6px; background-color:#f9f8f8; border-radius:5px; visibility:hidden; } </style> <script src="http://js.arcgis.com/3.11/"></script> <script> var app = {}; require(["esri/map", "esri/config", "esri/dijit/Print", "esri/geometry/Extent", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/layers/ArcGISTiledMapServiceLayer", "esri/layers/FeatureLayer", "esri/tasks/GeometryService", "esri/tasks/PrintTemplate", "dojo/_base/array", "dojo/dom", "dojo/on", "dojo/parser", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!"], function (Map, esriConfig, Print, Extent, ArcGISDynamicMapServiceLayer, ArcGISTiledMapServiceLayer, FeatureLayer, GeometryService, PrintTemplate, arrayUtils, dom, on, parser ) { parser.parse(); /* The proxy comes before all references to web services */ /* Files required for security are proxy.config, web.config and proxy.ashx - set security in Manager to Private, available to selected users and select Allow access to all users who are logged in (Roles are not required) /* The proxy section is defined on the ESRI sample. I have included it as part of the documentation reads that the measuring will not work. I thought that might be important. */ // Proxy Definition Begin //identify proxy page to use if the toJson payload to the geometry service is greater than 2000 characters. //If this null or not available the project and lengths operation will not work. // Otherwise it will do a http post to the proxy. esriConfig.defaults.io.proxyUrl = "proxy.ashx"; esriConfig.defaults.io.alwaysUseProxy = false; // Proxy Definition End // set custom extent var initialExtent = new Extent({ "xmin": 777229.03, "ymin": 1133467.92, "xmax": 848340.14, "ymax": 1185634.58, "spatialReference": { "wkid": 3435 } }); // create map and set slider style to small var map = new Map("mapDiv", { showAttribution: false, sliderStyle: "small", extent: initialExtent }); // add imagery var tiled = new ArcGISTiledMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Aerial_2014_Tiled/MapServer"); map.addLayer(tiled); // set operational layers var operationalLayer = new ArcGISDynamicMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Public/InternetVector/MapServer", { "opacity": 0.5 }); // add operational layers map.addLayer(operationalLayer); // add point feature layer var pointFeatureLayer = new FeatureLayer("http://maps.decaturil.gov/arcgis/rest/services/Test/FeatureServer/0"); map.addLayer(pointFeatureLayer); // declare geometry service esriConfig.defaults.geometryService = new GeometryService("http://maps.decaturil.gov/arcgis/rest/services/Utilities/Geometry/GeometryServer"); // begin print widget app.printUrl = "http://maps.decaturil.gov/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"; function createPrintDijit(printTitle) { var layoutTemplate, templateNames, mapOnlyIndex, templates; // create an array of objects that will be used to create print templates var layouts = [{ //name: "Letter ANSI A Landscape", label: "Landscape (PDF)", //format: "pdf", options: { legendLayers: [], // empty array means no legend scalebarUnit: "Miles", titleText: printTitle } }]; // create print templates var templates = arrayUtils.map(layouts, function (lo) { var t = new PrintTemplate(); t.layout = document.getElementById("printLayoutId").value; t.label = lo.label; t.format = document.getElementById("printFormatId").value; t.layoutOptions = lo.options; return t; }); app.printer = new Print({ map: map, templates: templates, url: app.printUrl }, dom.byId("print_button")); } // end of print widget // Hides print button app.printer.on('print-complete', function () { document.getElementById("print_button").style.visibility = 'hidden'; }); // Activates printer on(dom.byId("btnPrintReady"), "click", function () { createPrintDijit(document.getElementById("printTitleId").value); app.printer.startup(); }); // Hides print widget on(dom.byId("closePrint"), "click", function () { document.getElementById("feedback").style.visibility = 'hidden'; }); // Shows tools on(dom.byId("showTools"), "click", function () { document.getElementById("showToolsButton").style.visibility = 'hidden'; document.getElementById("hideToolsButton").style.visibility = 'visible'; document.getElementById("printer").style.visibility = 'visible'; }); // Hide tools on(dom.byId("hideTools"), "click", function () { document.getElementById("showToolsButton").style.visibility = 'visible'; document.getElementById("hideToolsButton").style.visibility = 'hidden'; document.getElementById("printer").style.visibility = 'hidden'; document.getElementById("feedback").style.visibility = 'hidden'; }); // Show print widget on(dom.byId("showPrintWidget"), "click", function () { document.getElementById("feedback").style.visibility = 'visible'; }); } ); </script> </head> <body class="soria"> <!-- Map Div Begin --> <div id="mapDiv"> <div id="showTools"> <input type="image" id="showToolsButton" src="images/hammer.png" alt="Show Tools" title="Show Tools" /> </div> <div id="hideTools"> <input type="image" id="hideToolsButton" src="images/close.ico" alt="Hide Tools" title="Hide Tools" /> </div> <div id="printer"> <input type="image" id="showPrintWidget" src="images/print.ico" alt="Print" title="Print" /> </div> <form id="frmPrint" action="" onsubmit="return false;"> <div id="feedback"> <h3> City of Decatur Print Service </h3> <div id="information"> <div id="note"> Note: Select the format that you would like to print your map from the dropdowns below. </div> <!-- used for the print dijit --> <label id="lblPrintTitle">Enter a print title</label><br /> <input type="text" id="printTitleId" name="printTitle" value="Street Light Inventory" /> <br /><br /> <select name="printLayout" id="printLayoutId"> <option value="A3 Landscape" selected>A3 Landscape</option> <option value="A3 Portrait">A3 Portrait</option> <option value="A4 Landscape">A4 Landscape</option> <option value="A4 Portrait">A4 Portrait</option> <option value="Letter ANSI A Landscape">Letter ANSI A Landscape</option> <option value="Letter ANSI A Portrait">Letter ANSI A Portrait</option> <option value="Tabloid ANSI B Landscape">Tabloid ANSI B Landscape</option> <option value="Tabloid ANSI B Portrait">Tabloid ANSI B Portrait</option> </select> <select name="printFormat" id="printFormatId"> <option value="pdf" selected>PDF</option> <option value="png32">PNG32</option> <option value="png8">PNG8</option> <option value="jpg">JPG</option> <option value="gif">GIF</option> <option value="eps">EPS</option> <option value="svg">SVG</option> <option value="svgz">SVGZ</option> </select> <br /><br /> <button type="button" id="btnPrintReady">Print Ready</button> <div id="print_button"></div> <div id="info"> This print service is to be used for City business only. <input type="image" id="closePrint" src="images/close.ico" alt="Close" title="Close" /> </div> </div> </div> </form> </div> <!-- Map Div End --> </body> </html>
... View more
11-26-2014
12:20 PM
|
0
|
5
|
2153
|
|
POST
|
I got it to work. There is one small glitch; it duplicates the button with each printout: <!DOCTYPE html> <html> <head> <title>Print a Map</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1,maximum-scale=1, user-scalable=no"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/dijit/themes/soria/soria.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css"> <style> html, body, #mapDiv { padding:0; margin:0; height:100%; width:100%; position:absolute; z-index:0; } /* Printer CSS Begin */ h3 { margin: 0 0 5px 0; border-bottom: 1px solid #444; padding: 0 0 5px 0; text-align: center; } .shadow { -moz-box-shadow: 0 0 5px #888; -webkit-box-shadow: 0 0 5px #888; box-shadow: 0 0 5px #888; } #feedback { background: #fff; border: 2px solid #666; border-radius: 5px; bottom: 20px; color: #666; font-family: arial; height: auto; left: 20px; margin: 5px; padding: 10px; position: absolute; width: 300px; z-index: 40; visibility:hidden; } #feedback a { border-bottom: 1px solid #888; color: #666; text-decoration: none; } #feedback a:hover, #feedback a:active, #feedback a:visited { border: none; color: #666; text-decoration: none; } #note { padding: 0 0 10px 0; } #info, #information { padding: 10px 0 0 0; } /* Printer CSS End */ #showTools { height:20px; width:20px; position:absolute; top:200px; left:20px; z-index:50; padding:5px 6px 5px 6px; background-color:#f9f8f8; border-radius:5px; visibility:visible; } #hideTools { height:20px; width:20px; position:absolute; top:200px; left:20px; z-index:50; padding:5px 6px 5px 6px; background-color:#f9f8f8; border-radius:5px; visibility:hidden; } #printer { height:20px; width:20px; position:absolute; top:240px; left:20px; z-index:50; padding:5px 6px 5px 6px; background-color:#f9f8f8; border-radius:5px; visibility:hidden; } </style> <script src="http://js.arcgis.com/3.11/"></script> <script> var app = {}; require(["esri/map", "esri/config", "esri/dijit/Print", "esri/geometry/Extent", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/layers/ArcGISTiledMapServiceLayer", "esri/layers/FeatureLayer", "esri/tasks/GeometryService", "esri/tasks/PrintTemplate", "dojo/_base/array", "dojo/dom", "dojo/on", "dojo/parser", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!"], function (Map, esriConfig, Print, Extent, ArcGISDynamicMapServiceLayer, ArcGISTiledMapServiceLayer, FeatureLayer, GeometryService, PrintTemplate, arrayUtils, dom, on, parser ) { parser.parse(); /* The proxy comes before all references to web services */ /* Files required for security are proxy.config, web.config and proxy.ashx - set security in Manager to Private, available to selected users and select Allow access to all users who are logged in (Roles are not required) /* The proxy section is defined on the ESRI sample. I have included it as part of the documentation reads that the measuring will not work. I thought that might be important. */ // Proxy Definition Begin //identify proxy page to use if the toJson payload to the geometry service is greater than 2000 characters. //If this null or not available the project and lengths operation will not work. // Otherwise it will do a http post to the proxy. esriConfig.defaults.io.proxyUrl = "proxy.ashx"; esriConfig.defaults.io.alwaysUseProxy = false; // Proxy Definition End // set custom extent var initialExtent = new Extent({ "xmin": 777229.03, "ymin": 1133467.92, "xmax": 848340.14, "ymax": 1185634.58, "spatialReference": { "wkid": 3435 } }); // create map and set slider style to small var map = new Map("mapDiv", { showAttribution: false, sliderStyle: "small", extent: initialExtent }); // add imagery var tiled = new ArcGISTiledMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Aerial_2014_Tiled/MapServer"); map.addLayer(tiled); // set operational layers var operationalLayer = new ArcGISDynamicMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Public/InternetVector/MapServer", { "opacity": 0.5 }); // add operational layers map.addLayer(operationalLayer); // add point feature layer var pointFeatureLayer = new FeatureLayer("http://maps.decaturil.gov/arcgis/rest/services/Test/FeatureServer/0"); map.addLayer(pointFeatureLayer); // declare geometry service esriConfig.defaults.geometryService = new GeometryService("http://maps.decaturil.gov/arcgis/rest/services/Utilities/Geometry/GeometryServer"); // begin print widget app.printUrl = "http://maps.decaturil.gov/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"; function createPrintDijit(printTitle) { var layoutTemplate, templateNames, mapOnlyIndex, templates; // create an array of objects that will be used to create print templates var layouts = [{ //name: "Letter ANSI A Landscape", label: "Landscape (PDF)", //format: "pdf", options: { legendLayers: [], // empty array means no legend scalebarUnit: "Miles", titleText: printTitle } }]; // create print templates var templates = arrayUtils.map(layouts, function (lo) { var t = new PrintTemplate(); t.layout = document.getElementById("printLayoutId").value; t.label = lo.label; t.format = document.getElementById("printFormatId").value; t.layoutOptions = lo.options; return t; }); app.printer = new Print({ map: map, templates: templates, url: app.printUrl }, dom.byId("print_button")); } // end of print widget on(dom.byId("btnPrintReady"), "click", function () { createPrintDijit(document.getElementById("printTitle").value); app.printer.startup(); }); // Hides print button after printout complete // app.printer.on('print-complete',function(evt){ // document.getElementById("print_button").style.visibility = 'hidden'; // }); // Hides print widget on(dom.byId("closePrint"), "click", function () { document.getElementById("feedback").style.visibility = 'hidden'; }); // Shows tools on(dom.byId("showTools"), "click", function () { document.getElementById("showToolsButton").style.visibility = 'hidden'; document.getElementById("hideToolsButton").style.visibility = 'visible'; document.getElementById("printer").style.visibility = 'visible'; }); // Hide tools on(dom.byId("hideTools"), "click", function () { document.getElementById("showToolsButton").style.visibility = 'visible'; document.getElementById("hideToolsButton").style.visibility = 'hidden'; document.getElementById("printer").style.visibility = 'hidden'; document.getElementById("feedback").style.visibility = 'hidden'; }); // Show print widget on(dom.byId("showPrintWidget"), "click", function () { document.getElementById("feedback").style.visibility = 'visible'; }); } ); </script> </head> <body class="soria"> <!-- Map Div Begin --> <div id="mapDiv"> <div id="showTools"> <input type="image" id="showToolsButton" src="images/hammer.png" alt="Show Tools" title="Show Tools" /> </div> <div id="hideTools"> <input type="image" id="hideToolsButton" src="images/close.ico" alt="Hide Tools" title="Hide Tools" /> </div> <div id="printer"> <input type="image" id="showPrintWidget" src="images/print.ico" alt="Print" title="Print" /> </div> <form id="frmPrint" action="" onsubmit="return false;"> <div id="feedback"> <h3> City of Decatur Print Service </h3> <div id="information"> <div id="note"> Note: Select the format that you would like to print your map from the dropdowns below. </div> <!-- used for the print dijit --> <label id="lblPrintTitle">Enter a print title</label><br /> <input type="text" id="printTitle" name="printTitle" value="Street Light Inventory" /> <br /><br /> <select name="printLayout" id="printLayoutId"> <option value="A3 Landscape" selected>A3 Landscape</option> <option value="A3 Portrait">A3 Portrait</option> <option value="A4 Landscape">A4 Landscape</option> <option value="A4 Portrait">A4 Portrait</option> <option value="Letter ANSI A Landscape">Letter ANSI A Landscape</option> <option value="Letter ANSI A Portrait">Letter ANSI A Portrait</option> <option value="Tabloid ANSI B Landscape">Tabloid ANSI B Landscape</option> <option value="Tabloid ANSI B Portrait">Tabloid ANSI B Portrait</option> </select> <select name="printFormat" id="printFormatId"> <option value="pdf" selected>PDF</option> <option value="png32">PNG32</option> <option value="png8">PNG8</option> <option value="jpg">JPG</option> <option value="gif">GIF</option> <option value="eps">EPS</option> <option value="svg">SVG</option> <option value="svgz">SVGZ</option> </select> <button type="button" id="btnPrintReady">Print Ready</button> <div id="print_button"></div> <div id="info"> This print service is to be used for City business only. <input type="image" id="closePrint" src="images/close.ico" alt="Close" title="Close" /> </div> </div> </div> </form> </div> <!-- Map Div End --> </body> </html>
... View more
11-26-2014
09:48 AM
|
0
|
0
|
817
|
|
POST
|
I have a working print task, but I want the user to be able to select the layout and format independently. How do I get the values of the title, layout and format before the user selects print? Here is my code: <!DOCTYPE html> <html> <head> <title>Print a Map</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1,maximum-scale=1, user-scalable=no"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/dijit/themes/soria/soria.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css"> <style> html, body, #mapDiv { padding:0; margin:0; height:100%; width:100%; position:absolute; z-index:0; } /* Printer CSS Begin */ h3 { margin: 0 0 5px 0; border-bottom: 1px solid #444; padding: 0 0 5px 0; text-align: center; } .shadow { -moz-box-shadow: 0 0 5px #888; -webkit-box-shadow: 0 0 5px #888; box-shadow: 0 0 5px #888; } #feedback { background: #fff; border: 2px solid #666; border-radius: 5px; bottom: 20px; color: #666; font-family: arial; height: auto; left: 20px; margin: 5px; padding: 10px; position: absolute; width: 300px; z-index: 40; /*visibility:hidden; */ } #feedback a { border-bottom: 1px solid #888; color: #666; text-decoration: none; } #feedback a:hover, #feedback a:active, #feedback a:visited { border: none; color: #666; text-decoration: none; } #note { padding: 0 0 10px 0; } #info, #information { padding: 10px 0 0 0; } /* Printer CSS End */ #showTools { height:20px; width:20px; position:absolute; top:200px; left:20px; z-index:50; padding:5px 6px 5px 6px; background-color:#f9f8f8; border-radius:5px; visibility:visible; } #hideTools { height:20px; width:20px; position:absolute; top:200px; left:20px; z-index:50; padding:5px 6px 5px 6px; background-color:#f9f8f8; border-radius:5px; visibility:hidden; } #printer { height:20px; width:20px; position:absolute; top:240px; left:20px; z-index:50; padding:5px 6px 5px 6px; background-color:#f9f8f8; border-radius:5px; visibility:hidden; } #printButton { visibility:visible; } </style> <script src="http://js.arcgis.com/3.11/"></script> <script> var app = {}; require(["esri/map", "esri/config", "esri/dijit/Print", "esri/geometry/Extent", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/layers/ArcGISTiledMapServiceLayer", "esri/layers/FeatureLayer", "esri/tasks/GeometryService", "esri/tasks/PrintTemplate", "dojo/_base/array", "dojo/dom", "dojo/on", "dojo/parser", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!"], function (Map, esriConfig, Print, Extent, ArcGISDynamicMapServiceLayer, ArcGISTiledMapServiceLayer, FeatureLayer, GeometryService, PrintTemplate, arrayUtils, dom, on, parser ) { parser.parse(); /* The proxy comes before all references to web services */ /* Files required for security are proxy.config, web.config and proxy.ashx - set security in Manager to Private, available to selected users and select Allow access to all users who are logged in (Roles are not required) /* The proxy section is defined on the ESRI sample. I have included it as part of the documentation reads that the measuring will not work. I thought that might be important. */ // Proxy Definition Begin //identify proxy page to use if the toJson payload to the geometry service is greater than 2000 characters. //If this null or not available the project and lengths operation will not work. // Otherwise it will do a http post to the proxy. esriConfig.defaults.io.proxyUrl = "proxy.ashx"; esriConfig.defaults.io.alwaysUseProxy = false; // Proxy Definition End // set custom extent var initialExtent = new Extent({ "xmin": 777229.03, "ymin": 1133467.92, "xmax": 848340.14, "ymax": 1185634.58, "spatialReference": { "wkid": 3435 } }); // create map and set slider style to small var map = new Map("mapDiv", { showAttribution: false, sliderStyle: "small", extent: initialExtent }); // add imagery var tiled = new ArcGISTiledMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Aerial_2014_Tiled/MapServer"); map.addLayer(tiled); // set operational layers var operationalLayer = new ArcGISDynamicMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Public/InternetVector/MapServer", { "opacity": 0.5 }); // add operational layers map.addLayer(operationalLayer); // add point feature layer var pointFeatureLayer = new FeatureLayer("http://maps.decaturil.gov/arcgis/rest/services/Test/FeatureServer/0"); map.addLayer(pointFeatureLayer); // declare geometry service esriConfig.defaults.geometryService = new GeometryService("http://maps.decaturil.gov/arcgis/rest/services/Utilities/Geometry/GeometryServer"); // begin print widget app.printUrl = "http://maps.decaturil.gov/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"; createPrintDijit(document.getElementById("printTitle").value); function createPrintDijit(printTitle) { var layoutTemplate, templateNames, mapOnlyIndex, templates; // create an array of objects that will be used to create print templates var layouts = [{ //name: "Letter ANSI A Landscape", label: "Landscape (PDF)", //format: "pdf", options: { legendLayers: [], // empty array means no legend scalebarUnit: "Miles", titleText: printTitle } }]; // create print templates var templates = arrayUtils.map(layouts, function (lo) { var t = new PrintTemplate(); t.layout = document.getElementById("printLayoutId").value; t.label = lo.label; t.format = document.getElementById("printFormatId").value; t.layoutOptions = lo.options; return t; }); app.printer = new Print({ map: map, templates: templates, url: app.printUrl }, dom.byId("print_button")); app.printer.startup(); } // end of print widget // Hides print widget on(dom.byId("closePrint"), "click", function () { document.getElementById("feedback").style.visibility = 'hidden'; }); // Shows tools on(dom.byId("showTools"), "click", function () { document.getElementById("showToolsButton").style.visibility = 'hidden'; document.getElementById("hideToolsButton").style.visibility = 'visible'; document.getElementById("printer").style.visibility = 'visible'; }); // Hide tools on(dom.byId("hideTools"), "click", function () { document.getElementById("showToolsButton").style.visibility = 'visible'; document.getElementById("hideToolsButton").style.visibility = 'hidden'; document.getElementById("printer").style.visibility = 'hidden'; document.getElementById("feedback").style.visibility = 'hidden'; }); // Show print widget on(dom.byId("showPrintWidget"), "click", function () { document.getElementById("feedback").style.visibility = 'visible'; }); } ); </script> </head> <body class="soria"> <!-- Map Div Begin --> <div id="mapDiv"> <div id="showTools"> <input type="image" id="showToolsButton" src="images/hammer.png" alt="Show Tools" title="Show Tools" /> </div> <div id="hideTools"> <input type="image" id="hideToolsButton" src="images/close.ico" alt="Hide Tools" title="Hide Tools" /> </div> <div id="printer"> <input type="image" id="showPrintWidget" src="images/print.ico" alt="Print" title="Print" /> </div> <form id="frmPrint" action=""> <div id="feedback"> <h3> City of Decatur Print Service </h3> <div id="information"> <div id="note"> Note: Select the format that you would like to print your map from the dropdowns below. </div> <!-- used for the print dijit --> <label id="lblPrintTitle">Enter a print title</label><br /> <input type="text" id="printTitle" name="printTitle" value="Street Light Inventory" /> <br /><br /> <select name="printLayout" id="printLayoutId"> <option value="A3 Landscape" selected>A3 Landscape</option> <option value="A3 Portrait">A3 Portrait</option> <option value="A4 Landscape">A4 Landscape</option> <option value="A4 Portrait">A4 Portrait</option> <option value="Letter ANSI A Landscape">Letter ANSI A Landscape</option> <option value="Letter ANSI A Portrait">Letter ANSI A Portrait</option> <option value="Tabloid ANSI B Landscape">Tabloid ANSI B Landscape</option> <option value="Tabloid ANSI B Portrait">Tabloid ANSI B Portrait</option> </select> <select name="printFormat" id="printFormatId"> <option value="pdf" selected>PDF</option> <option value="png32">PNG32</option> <option value="png8">PNG8</option> <option value="jpg">JPG</option> <option value="gif">GIF</option> <option value="eps">EPS</option> <option value="svg">SVG</option> <option value="svgz">SVGZ</option> </select> <div id="print_button"></div> <div id="info"> This print service is to be used for City business only. <input type="image" id="closePrint" src="images/close.ico" alt="Close" title="Close" /> </div> </div> </div> </form> </div> <!-- Map Div End --> </body> </html>
... View more
11-25-2014
01:28 PM
|
0
|
2
|
2214
|
|
POST
|
Yea, a URL would've definitely have helped. I added that in; caught my typo before, but I changed the map:app.map to map:map and it's working now. Thanks again.
... View more
11-24-2014
02:30 PM
|
0
|
3
|
1341
|
|
POST
|
I removed that block and replaced it with createPrintDijit("Print Map"); I also added the following line before my proxy information: parser.parse(); I am now receiving an error when I attempt to select one of the print options: Uncaught TypeError: Cannot read property 'layerIds' of undefined PrintTask.js:21
... View more
11-24-2014
01:47 PM
|
0
|
5
|
1341
|
|
POST
|
We have our own map server and I am trying to use the Print webmap example to create our print task, but it's not working. There is an error stating this is not a defined function: map.then(function (resp) { app.mapInfo = resp.itemInfo.item; app.map = resp.map; createPrintDijit(app.mapInfo.title); }); I am using the example located at: Print webmap | ArcGIS API for JavaScript The reason that I am using this code is that the print example does not show you how the code selects the type of printout: Print | ArcGIS API for JavaScript Any ideas how I get this to work? Here is my code: <!DOCTYPE html> <html> <head> <title>Create a Map</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1,maximum-scale=1, user-scalable=no"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/dijit/themes/soria/soria.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css"> <style> html, body, #mapDiv { padding:0; margin:0; height:100%; width:100%; position:absolute; z-index:0; } /* Printer CSS Begin */ h3 { margin: 0 0 5px 0; border-bottom: 1px solid #444; padding: 0 0 5px 0; text-align: center; } .shadow { -moz-box-shadow: 0 0 5px #888; -webkit-box-shadow: 0 0 5px #888; box-shadow: 0 0 5px #888; } #feedback { background: #fff; border: 2px solid #666; border-radius: 5px; bottom: 20px; color: #666; font-family: arial; height: auto; left: 20px; top:50%; margin: 5px; padding: 10px; position: absolute; width: 300px; z-index: 40; } #feedback a { border-bottom: 1px solid #888; color: #666; text-decoration: none; } #feedback a:hover, #feedback a:active, #feedback a:visited { border: none; color: #666; text-decoration: none; } #note { padding: 0 0 10px 0; } #info, #information { padding: 10px 0 0 0; } /* Printer CSS End */ </style> <script src="http://js.arcgis.com/3.11/"></script> <script> var map; var app = {}; require(["esri/map", "esri/config", "esri/dijit/Print", "esri/geometry/Extent", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/layers/ArcGISTiledMapServiceLayer", "esri/layers/FeatureLayer", "esri/tasks/GeometryService", "esri/tasks/PrintTemplate", "dojo/_base/array", "dojo/dom", "dojo/on", "dojo/parser", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!"], function (Map, esriConfig, Print, Extent, ArcGISDynamicMapServiceLayer, ArcGISTiledMapServiceLayer, FeatureLayer, GeometryService, PrintTemplate, arrayUtils, dom, on, parser ) { /* The proxy comes before all references to web services */ /* Files required for security are proxy.config, web.config and proxy.ashx - set security in Manager to Private, available to selected users and select Allow access to all users who are logged in (Roles are not required) /* The proxy section is defined on the ESRI sample. I have included it as part of the documentation reads that the measuring will not work. I thought that might be important. */ // Proxy Definition Begin //identify proxy page to use if the toJson payload to the geometry service is greater than 2000 characters. //If this null or not available the project and lengths operation will not work. // Otherwise it will do a http post to the proxy. esriConfig.defaults.io.proxyUrl = "proxy.ashx"; esriConfig.defaults.io.alwaysUseProxy = false; // Proxy Definition End // set custom extent var initialExtent = new Extent({ "xmin": 777229.03, "ymin": 1133467.92, "xmax": 848340.14, "ymax": 1185634.58, "spatialReference": { "wkid": 3435 } }); // create map and set slider style to small var map = new Map("mapDiv", { showAttribution: false, sliderStyle: "small", extent: initialExtent }); // add imagery var tiled = new ArcGISTiledMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Aerial_2014_Tiled/MapServer"); map.addLayer(tiled); // set operational layers var operationalLayer = new ArcGISDynamicMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Public/InternetVector/MapServer", { "opacity": 0.5 }); // add operational layers map.addLayer(operationalLayer); // declare geometry service esriConfig.defaults.geometryService = new GeometryService("http://maps.decaturil.gov/arcgis/rest/services/Utilities/Geometry/GeometryServer"); map.then(function (resp) { app.mapInfo = resp.itemInfo.item; app.map = resp.map; createPrintDijit(app.mapInfo.title); }); function createPrintDijit(printTitle) { var layoutTemplate, templateNames, mapOnlyIndex, tempplates; // create an array of object that will be used to create print templates var layouts = [{ name: "Letter ANSI A Landscape", label: "Landscape (PDF)", format: "pdf", options: { legendLayers: [], // empty array means no legend scalebarUnit: "Miles", titleText: printTitle + ", Landscape PDF" } }, { name: "Letter ANSI A Portrait", label: "Portrait (Image)", format: "jpg", options: { legendLayers: [], scalebarUnit: "Miles", titleText: printTitle + ", Portrait JPG" } }]; // create print templates var templates = arrayUtils.map(layouts, function (lo) { var t = new PrintTemplate(); t.layout = lo.name; t.label = lo.label; t.format = lo.format; t.layoutOptions = lo.options; return t; }); app.printer = new Print({ map: app.map, templates: templates, url: app.printUrl }, dom.byId("print_button")); app.print.startup(); } } ); </script> </head> <body class="soria"> <div id="mapDiv"> <!-- Feedback Begin --> <div id="feeback"> <h3> ArcGIS.com Webmap and the Print Dijit </h3> <!-- Info Begin --> <div id="info"> <!-- Note Begin --> <div id="note"> Note: This sample uses an ArcGIS Server version 10.1 export web map task. </div> <!-- Note End --> <!-- Used for the print dijit --> <div id="print_button"></div> <!-- Info Begin --> <div id="information"> The map is <a href="https://developers.arcgis.com/javascript/jsapi/esri.arcgis.utils-amd.html#createmap">created from an ArcGIS.com webmap</a> and <a href="https://developers.arcgis.com/javascript/jsapi/printtemplate-amd.html">print templates</a> are created manually. Refer to the documentation for more print template options (output formats, additional layouts, etc.). </div> <!-- Information End --> </div> <!-- Info End --> </div> <!-- Feeback End --> </div> </body> </html>
... View more
11-24-2014
08:17 AM
|
0
|
7
|
6765
|
|
POST
|
My proxy was right. The error was the esri.arcgis.utils. Thanks.
... View more
11-24-2014
07:08 AM
|
0
|
0
|
597
|
|
POST
|
I am trying to add proxy information to my site and my JavaScript, but it's returning errors. I don't need these urls to be secure. The following is my code for my application and my proxy.config file for the application published at: maps.decaturil.gov/decaturPrint App Code: <!DOCTYPE html> <html> <head> <title>Create a Map</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <meta name="viewport" content="initial-scale=1,maximum-scale=1, user-scalable=no"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/dijit/themes/soria/soria.css"> <link rel="stylesheet" href="http://js.arcgis.com/3.11/esri/css/esri.css"> <style> html, body, #mapDiv { padding:0; margin:0; height:100%; width:100%; } #feedback { background: #fff; border: 2px solid #666; border-radius: 5px; bottom: 20px; color: #666; font-family: arial; height: auto; left: 20px; margin: 5px; padding: 10px; position: absolute; width: 300px; z-index: 40; } #feedback a { border-bottom: 1px solid #888; color: #666; text-decoration: none; } #feedback a:hover, #feedback a:active, #feedback a:visited { border: none; color: #666; text-decoration: none; } #note { padding: 0 0 10px 0; } #info { padding: 10px 0 0 0; } </style> <script src="http://js.arcgis.com/3.11/"></script> <script> var map; require(["esri/map", "esri/config", "esri/arcgis/utils", "esri/dijit/Print", "esri/geometry/Extent", "esri/layers/ArcGISDynamicMapServiceLayer", "esri/layers/ArcGISTiledMapServiceLayer", "esri/layers/FeatureLayer", "esri/tasks/GeometryService", "esri/tasks/PrintTemplate", "dojo/_base/array", "dojo/dom", "dojo/on", "dojo/parser", "dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dojo/domReady!"], function (Map, esriConfig, arcgisutils, Print, Extent, ArcGISDynamicMapServiceLayer, ArcGISTiledMapServiceLayer, FeatureLayer, GeometryService, PrintTemplate, arrayUtils, dom, on, parser ) { /* The proxy comes before all references to web services */ /* Files required for security are proxy.config, web.config and proxy.ashx - set security in Manager to Private, available to selected users and select Allow access to all users who are logged in (Roles are not required) /* The proxy section is defined on the ESRI sample. I have included it as part of the documentation reads that the measuring will not work. I thought that might be important. */ // Proxy Definition Begin //identify proxy page to use if the toJson payload to the geometry service is greater than 2000 characters. //If this null or not available the project and lengths operation will not work. // Otherwise it will do a http post to the proxy. esriConfig.defaults.io.proxyUrl = "proxy.ashx"; esriConfig.defaults.io.alwaysUseProxy = true; // Proxy Definition End // set custom extent var initialExtent = new Extent({ "xmin": 777229.03, "ymin": 1133467.92, "xmax": 848340.14, "ymax": 1185634.58, "spatialReference": { "wkid": 3435 } }); // create map and set slider style to small var map = new arcgisutils.createMap("mapDiv", { showAttribution: false, sliderStyle: "small", extent: initialExtent }); // add imagery var tiled = new ArcGISTiledMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Aerial_2014_Tiled/MapServer"); map.addLayer(tiled); // set operational layers var operationalLayer = new ArcGISDynamicMapServiceLayer("http://maps.decaturil.gov/arcgis/rest/services/Public/InternetVector/MapServer", { "opacity": 0.5 }); // add operational layers map.addLayer(operationalLayer); // declare geometry service esriConfig.defaults.geometryService = new GeometryService("http://maps.decaturil.gov/arcgis/rest/services/Utilities/Geometry/GeometryServer"); } ); </script> </head> <body class="soria"> <div id="mapDiv"></div> </body> </html> proxy.config file <?xml version="1.0" encoding="utf-8" ?> <ProxyConfig allowedReferers="*" mustMatch="false"> <serverUrls> <!-- serverUrl options: url = location of the ArcGIS Server, either specific URL or stem matchAll = true to forward any request beginning with the url token = (optional) token to include for secured service dynamicToken = if true, gets token dynamically with username and password stored in web.config file's appSettings section. --> <serverUrl url="http://maps.decaturil.gov/arcgis/rest/services" matchAll="true"> </serverUrl> </serverUrls> </ProxyConfig> <!-- See https://github.com/Esri/resource-proxy for more information -->
... View more
11-21-2014
01:18 PM
|
0
|
2
|
2853
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 02-26-2015 12:31 PM | |
| 1 | 06-24-2015 06:06 AM | |
| 1 | 07-15-2015 12:34 PM | |
| 1 | 05-21-2015 02:27 PM | |
| 1 | 05-19-2015 11:52 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|