POST
|
Thanks David. I tried this but it did not work. I really wish it were that easy. For now I have removed all of the these and replaced them with dijit.form.MultiSelect. It is uglier but they seem to work fine. Thanks to all who tried to help.
... View more
08-01-2014
04:26 AM
|
0
|
0
|
241
|
POST
|
We have IIS but I tested it using our webserver name. If I can't use it from their it won't do me any good. It is an intranet site.
... View more
07-24-2014
06:57 AM
|
0
|
1
|
888
|
POST
|
Lucas: Thanks so much for helping and taking the time out of your schedule to try and help me. I download your zip file and tried it but it still does not work. I put the files in the same folder and tried to run them. The only place in your code where you reference the json file is below. Should I have put it someplace else. xhr("Region_Filters.json", { handleAs: "Json", sync: "true" }).then(lang.hitch(document, function(data){ Region_List = JSON.parse(data); console.log(Region_List); var sel = document.getElementById("Region_filter"); for (var i=0;i<Region_List.length;i++) { sel.options=new Option(Region_List.text,Region_List.val); } }));
... View more
07-24-2014
04:43 AM
|
0
|
3
|
888
|
POST
|
Thanks Ken. I know about AMD and only used the legacy because it was just the quickest way to get the code out there for you guys to view. I looked at the bookmark example but because it is a widget vs a CheckedMultiSelect box I'm not sure how to equate one to the other. Your eample shows me how to do it all in the one html file but I really want to seperate out the values just like the bookmarks. I have a feeling it would take you like 5 minutes to whip up an example like this. You seem to be a guru at this stuff.
... View more
07-23-2014
10:58 AM
|
0
|
0
|
241
|
POST
|
Thanks for the responses. When I turned parseOnLoad: from true to false I could see my values now. <script type='text/javascript' src='http://archive.dojotoolkit.org/nightly/dojotoolkit/dojo/dojo.js' data-dojo-config="has:{'dojo-firebug':true}, parseOnLoad:false, async:true"></script> However, the boxes don't look normal I have no idea what the parse does but feel it is very important. Not sure the order of how to load things but it seems like I should do this after putting these values into the CheckedMultiSelect. However, I thought that was one of the first things I was doing using this line of code. <script type="text/javascript" src="jsfiles/Real_Estate_Filters2.js"></script>
... View more
07-23-2014
10:53 AM
|
0
|
0
|
888
|
POST
|
Thanks for the quick response but that could make the code extremely long. For instance we have over 60 Districts. I would rather not have all of those listed in the html file if I can help it..
... View more
07-23-2014
08:48 AM
|
0
|
5
|
888
|
POST
|
I am creating a simple application where I am going to have a lot of different dropdown type boxes. I really like the dojox/form/CheckedMultiSelect. However, I am having an issue when trying to load the contents of it from a .js file. I've attached my test file and the js file. It seems to be working okay in IE but is not working in Safari or Chrome. I have no idea why? As you can see from my code the dojox/form/CheckedMultiSelect seems to work in Safari and Chrome. It only seems to be an issue when I am trying to populate it via the .js code. Any help would be very much appreciated as this is very frustrating and I have been working on this for a few days now. Thanks, Michael
... View more
07-23-2014
06:03 AM
|
0
|
13
|
2552
|
POST
|
Anyone have a good example of a sample that uses the Export Web Map task but allows the users the ability to select if they want to do pdf/jpeg etc .. Having trouble finding anything like that. Also if I am using this service on the same web server as my arcgis server behind our firewall (big company) do I need to worry about proxy server? I can use this service with the Flex API without having to worry about proxy server stuff. Getting these errors though. Do I need to require anything. I require - "esri/dijit/Print" LOG: esri.config.defaults.io.proxyUrl is not set. LOG: Error: esri.config.defaults.io.proxyUrl is not set. Error: esri.config.defaults.io.proxyUrl is not set. SCRIPT5022: No region setting for fpMeasurement I thought this would work:
function Print(){
alert("Found Printing Start");
var printUrl = "http://myserver:6080/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task";
//REST URL: http://myserver:6080/arcgis/rest/services/Utilities/PrintingTools/GPServer
//SOAP URL: http://myserver:6080/arcgis/services/Utilities/PrintingTools/GPServer
//Set up print stuff
var printTask = new esri.tasks.PrintTask(printUrl);
var params = new esri.tasks.PrintParameters();
var template = new esri.tasks.PrintTemplate();
params.map = map;
alert("Found Mark 1");
template.exportOptions = {
width: 595,
height: 842,
dpi: 96
};
template.format = "PDF"
template.layout = "Letter ANSI A Landscape";
template.preserveScale = false;
alert("Found Mark 2");
params.template = template;
alert("Found Mark 3");
//dojo.connect(map, "onLoad", function() {//Fire the print task
printTask.execute(params, printResult, printError);
setTimeout(function(){printTask.execute(params, printResult, printError);},2500);
alert("Found Mark 4");
};
function printResult(result){
console.log(result.url)
}
function printError(result){
console.log(result);
}
... View more
06-19-2014
07:05 AM
|
0
|
2
|
1101
|
POST
|
Thanks Ken. I took a look at that but that code looks pretty old and with the example not working I've decided to go in another direction. You would think the enhancedgrid export piece would be simple with already having the data loaded in the grid. hmmm. Any suggestions anyone???
... View more
06-18-2014
10:42 AM
|
0
|
0
|
475
|
POST
|
Not sure how to go about this. We need to be able to export the data in the data grid to excel or csv. Our application will be used on PC and tablets. I thought the EnhancedGrid might be the answer with the dojox.grid.enhanced.plugins.exporter.CSVWriter. However, I'm not having much luck. I thought I would just need to do this since my datagrid was already loaded with the correct data: 1.) Add plugins { exporter: true } to my datagrid but not sure how to do this. 2.) Add this functions to the script function exportAll(){ dijit.byId("gridCE").exportGrid("csv", function(str){ dojo.byId("output").value = str; }); }; function exportSelected(){ var str = dijit.byId("gridCE").exportSelected("csv"); dojo.byId("output").value = str; }; 3.) Create buttons <button onclick="exportAll()">Export all to CSV</button> <button onclick="exportSelected()">Export Selected Rows to CSV</button> 4.) Add references "dojox/grid/EnhancedGrid", "dojox/data/CsvStore", "dojox.grid.enhanced.plugins.exporter.CSVWriter" Current Data Grid.
<button onclick="exportAll()">Export all to CSV</button>
<button onclick="exportSelected()">Export Selected Rows to CSV</button>
<table data-dojo-type="dojox.grid.EnhancedGrid" jsid="gridCE" id="gridCE" selectionMode="single">
<thead>
<tr>
<th field="FID" formatter="makeZoomButton" width="30px">
<img alt="+" src="assets/images/GenericSearch32.png"/>
</th>
<th field="FID" width="100px">FID</th>
<th field="DIVISIONNA" width="100px">DIVISIONNA</th>
<th field="GSF" width="60px">GSF</th>
<th field="OPENED" width="100px">OPENED</th>
<th field="TYPE" width="70px">TYPE</th>
<th field="MALLNAME" width="200px">MALLNAME</th>
<th field="MALL_GRADE" width="70px">MALL GRADE</th>
<th field="DISTRICT" width="150px">DISTRICT</th>
<th field="MACYS_MALL" width="100px">MACYS_MALL</th>
<th field="WebLon_X" width="100px">WebLon_X</th>
<th field="WebLat_Y" width="100px">WebLat_Y</th>
</tr>
</thead>
</table>
Shortened code for putting into data grid:
var emptyCells = { items: "" };
var emptyStore = new dojo.data.ItemFileWriteStore({data: emptyCells});
grid = dijit.byId('gridCE');
grid.setStore(emptyStore);
//Put values in array for datagrid
var attValues = resultFeatures.attributes;
dataForGrid.push(attValues);
};
var data = {
identifier : "FID",
label : "FID",
items : dataForGrid
};
var store = new dojo.data.ItemFileReadStore({data: data});
grid.setSortIndex(2,"true"); //sort on the state name
grid.setStore(store);
... View more
06-18-2014
06:56 AM
|
0
|
2
|
3166
|
POST
|
Thanks Daniel. That was problem. I've been working on this issue for hours. Augh. I knew it was something simple as I thought I was doing everything correctly. Just was not sure what the heck was the problem. Thank-you so much for your help.
... View more
06-17-2014
08:18 AM
|
0
|
0
|
613
|
POST
|
thanks. those both seemed to work. Only problem I have is that once I clear out the layer I can't post to it anymore. I have a feeling that it is because I am creating this layer inside the function and when I go through it a second time it is trying to create it again. otherRetailerLayer = new esri.layers.GraphicsLayer(); otherRetailerLayer.id = 'otherRetailers'; map.addLayer(otherRetailerLayer); otherRetailerLayer.add(resultFeatures); I tried to add it at the start of my code when I load other things like this but then my function does not see the layer. var otherRetailerLayer = new GraphicsLayer(); otherRetailerLayer.id = 'otherRetailers'; map.addLayers([dlDRegionDistrictPolygons,flMCY_Stores,flMCY_Stores_Regions,dlMCY_Stores,otherRetailerLayer]); Then in my function I tried a couple of things like this: var layer = map.getLayer(otherRetailerLayer); layer.add(resultFeatures);
... View more
06-17-2014
03:38 AM
|
0
|
0
|
613
|
POST
|
I am trying to clear out graphics on a graphicsLayer so that I can get a new selection. Everything works with my Query task but I can't seem to clear out the old results. All I end up doing is adding to the new results. I've tried a lot of different stuff but it is not working. How can I do this? I thought a graphics layer would allow me to do this and seems to be my best choice since I have a couple of other layers I want to be able to filter as well as different results. I tried up at the top putting the code up top where I add in some ArcGISDynamicMapServiceLayers but in my function it does not recognize my add layer and just bombs out. Works in my function though. However, I have a feeling it is creating multiple instances of otherRetailers. //Where should I put this in my code. otherRetailerLayer = new esri.layers.GraphicsLayer(); otherRetailerLayer.id = 'otherRetailers'; map.addLayer(otherRetailerLayer); //Why does this not clear out my layer? map.graphics.clear(otherRetailerLayer); function showCEResults(featureSet) { // Clear Datagrid //create an empty store and then bind to grid var emptyCells = { items: "" }; var emptyStore = new dojo.data.ItemFileWriteStore({data: emptyCells}); grid = dijit.byId('gridCE'); grid.setStore(emptyStore); //alert ("Found InfoTemplate"); //Popup window settings var content = "<b>FID</b>: ${FID}" + "<br><b>MALLID</b>: ${MALLID}" + "<br><b>Mall Grade</b>: ${MALL_GRADE}" + "<br><b>District</b>: ${DISTRICT}" + "<br><b>MALL NAME</b>: ${MALLNAME}"; var infoTemplate = new esri.InfoTemplate("${DIVISIONNA}", content); var symbol = new esri.symbol.SimpleMarkerSymbol({ "color": [120,120,120,255], "size": 8, "type": "esriSMS", "style": "esriSMSSquare", "outline": { "color": [0,0,0,255], "width": 2, "type": "esriSLS", "style": "esriSLSSolid" }}); var symbolRedShinyPin = new esri.symbol.PictureMarkerSymbol({ "angle": 0, "xoffset": 0, "yoffset": 12, "type": "esriPMS", "url": "http://static.arcgis.com/images/Symbols/Basic/RedShinyPin.png", "contentType": "image/png", "width": 18, "height": 18 }); var symbolShinyPin = new esri.symbol.PictureMarkerSymbol({ "angle": 0, "xoffset": 0, "yoffset": 12, "type": "esriPMS", "url": "http://static.arcgis.com/images/Symbols/Basic/ShinyPin.png", "contentType": "image/png", "width": 18, "height": 18 }); //alert ("Found DataGrid and Graphics"); var dataForGrid = []; var temp = ""; var varRetailer = ""; //remove all graphics on the maps graphics layer otherRetailerLayer = new esri.layers.GraphicsLayer(); otherRetailerLayer.id = 'otherRetailers'; map.addLayer(otherRetailerLayer); //map.graphics.clear(otherRetailerLayer); //Performance enhancer - assign featureSet array to a single variable. var resultFeatures = featureSet.features; //Loop through each feature returned for (var i=0, il=resultFeatures.length; i<il; i++) { //Get the current feature from the featureSet. //Feature is a graphic var graphic = resultFeatures; varRetailer = resultFeatures.attributes.RETAILERID; if (varRetailer == "3000"){ resultFeatures.setSymbol(symbolRedShinyPin ); } else { resultFeatures.setSymbol(symbolShinyPin); } resultFeatures.setInfoTemplate(infoTemplate); otherRetailerLayer.add(resultFeatures); //Put values in array for datagrid var attValues = resultFeatures.attributes; dataForGrid.push(attValues); }; //var grid = registry.byId("gridCE"); var data = { identifier : "FID", label : "FID", items : dataForGrid }; var store = new dojo.data.ItemFileReadStore({data: data}); grid.setSortIndex(2,"true"); //sort on the state name grid.setStore(store); grid.on("rowclick", onRowClickHandler); //window.map.centerAndZoom(graphic.geometry); }
... View more
06-16-2014
10:53 AM
|
0
|
5
|
1326
|
POST
|
Ken I updated everything you said but still am having the issue. Did I update everything to be the same versions of the stylesheets and the JSAPI? I have everything at 3.9!!
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dijit/themes/claro/claro.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dijit/themes/nihilo/nihilo.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/esri/css/esri.css">
<link rel="stylesheet" href="css\MyMobileMacysMaps.css">
<link rel="stylesheet" type="text/css" href="https://community.esri.com//js.arcgis.com/3.9/js/dojo/dojox/layout/resources/FloatingPane.css">
<link rel="stylesheet" type="text/css" href="https://serverapi.arcgisonline.com/jsapi/arcgis/3.9/js/dojo/dojox/layout/resources/ResizeHandle.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/dojo/dojox/grid/resources/Grid.css">
<link rel="stylesheet" href="http://js.arcgis.com/3.9/js/esri/css/esri.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" type="text/javascript"></script>
<script>
var dojoConfig = {
parseOnLoad: true,
packages: [{
"name": "agsjs",
"location": 'http://gmaps-utility-gis.googlecode.com/svn/tags/agsjs/latest/build/agsjs' // for xdomain load
}]
};
</script>
<script src="http://js.arcgis.com/3.9/"></script>
<script type="text/javascript" src="bookmarks/District_bookmarks.js"></script>
<script type="text/javascript" src="bookmarks/Store_bookmarks.js"></script>
<script src="jsfiles\Real_Estate_Filters.js"></script>
require([
"esri/map",
"esri/graphic",
"esri/tasks/FindTask",
"esri/tasks/FindParameters",
"esri/symbols/SimpleMarkerSymbol",
"esri/symbols/SimpleLineSymbol",
"esri/symbols/SimpleFillSymbol",
"esri/symbols/Font",
"esri/symbols/TextSymbol",
"esri/Color",
"dojo/on",
"dojo/dom",
"dijit/registry",
"dojo/_base/array",
"dojo/_base/connect",
"dojox/grid/DataGrid",
"dojo/data/ItemFileReadStore",
"dijit/form/Button",
"dojo/parser",
"dijit/layout/BorderContainer",
"dijit/layout/ContentPane",
"dojox/widget/TitleGroup",
"dijit/layout/AccordionContainer",
"dijit/layout/TabContainer",
"esri/dijit/Bookmarks",
"esri/dijit/LocateButton",
"esri/dijit/HomeButton",
"esri/dijit/BasemapGallery",
"esri/layers/ArcGISDynamicMapServiceLayer",
"esri/layers/FeatureLayer",
"esri/dijit/Measurement",
"esri/dijit/InfoWindowLite",
"esri/InfoTemplate",
"agsjs/dijit/TOC",
//Floating Panel
"dojox/layout/FloatingPane",
"dojox/layout/Dock",
"dojox/layout/ResizeHandle",
"dojo/dnd/move",
"esri/tasks/query",
//"esri.symbols.SimpleMarkerSymbol",
//Datagrid
"dojo/data/ItemFileWriteStore",
"esri/tasks/QueryTask",
"dojo/_base/Color",
"esri/Color",
"dojo/_base/connect",
"dijit/dijit",
"dojo/fx",
"esri/arcgis/utils",
"dijit/form/ToggleButton",
"dijit/TitlePane",
"dojox/form/CheckedMultiSelect",
"dojo/domReady!"
], function(
Map, Graphic, FindTask, FindParameters, SimpleMarkerSymbol, SimpleLineSymbol, SimpleFillSymbol, Font, TextSymbol,Color, on, dom, registry, arrayUtils, connect, DataGrid, ItemFileReadStore, Button, parser, BorderContainer, ContentPane, TitleGroup, AccordionContainer, TabContainer, Bookmarks, LocateButton, HomeButton, BasemapGallery, ArcGISDynamicMapServiceLayer, FeatureLayer, Measurement, InfoWindowLite, InfoTemplate, TOC, FloatingPane, Dock, ResizeHandle, move, query, ItemFileWriteStore, QueryTask, Color, ESRIColor, connect, dijit,fx, utils, ToggleButton, TitlePane
) {
... View more
06-04-2014
08:42 AM
|
0
|
0
|
296
|
POST
|
The AMD version of connect is on, like this: map.on("layers-add-result", function (results) { I tried this but still not getting anything:
map.on("layers-add-result", function (results) {
//alert("Test")
var standardTOC = new agsjs.dijit.TOC({
map: map
//noLegend: true
}, 'standardDiv');
standardTOC.startup();
//alert("test2")
var sliderTOC = new agsjs.dijit.TOC({
map: map,
layerInfos: [
{
noLayers: true,
showGroupCount: true,
layer: flMCY_Stores_Regions,
title: "Macy's Stores District"},
{
noLayers: true,
layer: flMCY_Stores,
title: "Macy's Stores Region",
},
{
noLayers: true,
layer: dlDRegionDistrictPolygons,
title: "Boundary Files",
slider: true
}
], style:'inline'
}, 'sliderDiv');
sliderTOC.startup();
});
//map.addLayers([dlDRegionDistrictPolygons]);
map.addLayers([dlDRegionDistrictPolygons,flMCY_Stores,flMCY_Stores_Regions,dlMCY_Stores]);
... View more
06-04-2014
08:36 AM
|
0
|
0
|
296
|
Title | Kudos | Posted |
---|---|---|
1 | 04-18-2014 06:58 AM | |
6 | 08-11-2014 06:27 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|