|
POST
|
Hi Craig, Just tested this issue using a sample and can't reproduce. Can you post a code sample that will allow us to reproduce the problem? Kelly, I've attached my code and app. Thanks for helping Odoe, I tried that and am still seeing the same issue. Thanks for your help. I've looked into the CSS and removed the CSS file altogether and the map still doesn't resize when it opens in a non maximized window.
... View more
11-15-2012
03:45 AM
|
0
|
0
|
924
|
|
POST
|
Yes, it is from one of the samples. I thought that might be the issue and took it out, but it didn't make a difference so I just kept it in for now. It is placed inside the init function. No custom css for map.
... View more
11-14-2012
05:14 AM
|
0
|
0
|
924
|
|
POST
|
I'm getting some odd behavior when I resize my map app. If the application opens in a maximized window, I can resize to a smaller window and back to the maximized extent without any issues. If the application opens in a window that is not maximized and I then try to maximize the window, the map does not resize and my application gets blank white space in the area that is new from the resize. I'm not seeing any errors related to this in developer tools or firebug. My resize code is: dojo.connect(map, 'onLoad', function(theMap) { //resize the map when the browser resizes dojo.connect(dijit.byId('map'), 'resize', map,map.resize); });
... View more
11-14-2012
03:18 AM
|
0
|
6
|
1254
|
|
POST
|
EDIT** Turns out I had two showResults functions. Deleted one, and now the results return. I'm enrolled in the Building Web Applications Using ArcGIS API for JavaScript class this Thurs and Fri so hopefully I'll learn more about how to test and implement this stuff! Until then, I'm going to continue beating my head against the desk.
... View more
11-06-2012
09:02 AM
|
0
|
0
|
890
|
|
POST
|
I'm getting a error with dojox.grid.DataGrid I had a test application that I used to get the code how I wanted it, it worked. I then switched the code to my full application and it no longer works. When I do the search in my full app it does the search and returns the results (that I can see in firebug) however, the grid is not populated and the graphic is not returned on the map. Below is what firebug is showing me: [ATTACH=CONFIG]19055[/ATTACH] And below is the code I am using to perform the search: function doFind() { //Set the search text to the value in the box findParams.searchText = dojo.byId("parcel").value; //grid.showMessage("Loading..."); //Shows the Loading Message until search results are returned. findTask.execute(findParams,showResults); } function showResults(results) { //This function works with an array of FindResult that the task returns map.graphics.clear(); var symbol = new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([98,194,204]), 2), new dojo.Color([98,194,204,0.5])); //create array of attributes var items = dojo.map(results,function(result){ var graphic = result.feature; graphic.setSymbol(symbol); map.graphics.add(graphic); return result.feature.attributes; }); //Create data object to be used in store var data = { identifier: "Parcel Identification Number", //This field needs to have unique values. USES THE ALIAS!!! label: "PARCELID", //Name field for display. Not pertinent to a grid but may be used elsewhere. items: items }; //Create data store and bind to grid. store = new dojo.data.ItemFileReadStore({ data:data }); var grid = dijit.byId('grid'); grid.setStore(store); //Zoom back to the initial map extent map.setExtent(startExtent); } //Zoom to the parcel when the user clicks a row function onRowClickHandler(evt){ var clickedTaxLotId = grid.getItem(evt.rowIndex).PARCELID; var selectedTaxLot; dojo.forEach(map.graphics.graphics,function(graphic){ if((graphic.attributes) && graphic.attributes.PARCELID === clickedTaxLotId){ selectedTaxLot = graphic; return; } }); var taxLotExtent = selectedTaxLot.geometry.getExtent(); map.setExtent(taxLotExtent); } There are other parts of the code obviously, not sure what will be relevant to find the answer/error.
... View more
11-06-2012
03:28 AM
|
0
|
3
|
2592
|
|
POST
|
Thanks. I had actually just ran across that and have successfully inserted the loading message in the sample referenced in my first post using: grid.hideMessage("Loading..."); and grid.showMessage("Loading..."); . Now trying to edit that sample code so that it references and displays my data in the grid. Surprisingly more difficult than I would have thought.
... View more
10-31-2012
06:16 AM
|
0
|
0
|
751
|
|
POST
|
in my research it looks like there is a default loading message built into the dojox.grid.DataGrid // loadingMessage: String
// Message that shows while the grid is loading
loadingMessage: "<span class='dojoxGridLoading'>${loadingState}</span>"
I'm trying to access it in the sample without much success. Any ideas? Wouldn't it make sense for this to be visible by default?
... View more
10-31-2012
04:35 AM
|
0
|
0
|
751
|
|
POST
|
Its taking approx 10 seconds to run through my parcel search using the datagrid. I'm ok with this since its a fairly large database. Is there a good way to add a status bar (spinning circle, percentage, searching...) to the datagrid to let the user know that the search is being performed and then disappears when the search is complete? So far the best I can find is dojox.widget.Standby. Would this be a good fit to integrate into the datagrid code? If so, I'm a little confused on where to put the hide after the search is complete.
... View more
10-29-2012
06:48 AM
|
0
|
4
|
1155
|
|
POST
|
Jeff, Thanks for your feedback. I wound up using map.addLayer() to add the layers seperately, however, it wouldn't work until I also added the layer within the code I have that builds a layer list. Now it works like I'd like. Thanks again. Craig
... View more
10-29-2012
04:40 AM
|
0
|
0
|
529
|
|
POST
|
I have two dynamic layers I need to add to my map. Both draw, but one (a parcel layer) is drawing underneath the zoning layer. I'd like them to draw so that both are visible. The parcels layer is outline only symbology so that shouldn't be the dealbreaker. Here is what I have, with my legend code mixed in. I haven't changed the legend code to add the parcels layer yet as I'm just focusing on seeing both layers at the same time. layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://gisprod2/ArcGIS/rest/services/Dynamic/Zoning/MapServer"); parcellayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://gisprod2/ArcGIS/rest/services/Dynamic/Parcels/MapServer"); //Add the Legend legendLayers.push({layer:layer,title:''}); dojo.connect(map,'onLayersAddResult',function(results){ var legend = new esri.dijit.Legend({ map:map, layerInfos:legendLayers },"legendDiv"); legend.startup(); }); map.addLayers([parcellayer,layer]); if (layer.loaded) { buildLayerList(layer); } else { dojo.connect(layer, "onLoad", buildLayerList); }
... View more
10-26-2012
07:07 AM
|
0
|
2
|
894
|
|
POST
|
Using the Show find task results in a DataGrid sample and can't seem to get it to respond fully to my own data. Trying to create a parcel search. I can get it to search and find the parcel(s). The search field is "PARCELID" however, it will only zoom to the first one I click on, it will not respond or zoom to any subsequent parcels in the datagrid.
... View more
10-24-2012
10:04 AM
|
0
|
0
|
580
|
|
POST
|
Rookie mistake. I had my external JS references in the wrong spot. Now the map loads all at once. **EDIT** Well. Looks like the issue is two pronged. When I moved the external JS files to their (what I think is) correct location, the map loads quickly and all at once... EXCEPT for one of the files (a series of 3 dojo.fx.Toggler functions) does not execute from the external files. When I place the contents of the external file into the main default.html code file the toggler functions work... However, the map requires the additional refresh again... Stumped Here is my toggle code FWIW. Thanks for any heads up you all might be able to give. //Toggles
function basemapToggle() {
basemaptoggler = new dojo.fx.Toggler({
node: "basemaptoggle",
showFunc : dojo.fx.wipeIn,
showDuration: 1000,
hideDuration: 1000,
hideFunc : dojo.fx.wipeOut
})
}
dojo.addOnLoad(basemapToggle);
function layerToggle() {
layertoggler = new dojo.fx.Toggler({
node: "layertoggle",
showFunc : dojo.fx.wipeIn,
showDuration: 750,
hideDuration: 750,
hideFunc : dojo.fx.wipeOut
})
}
dojo.addOnLoad(layerToggle);
function legendToggle() {
legendtoggler = new dojo.fx.Toggler({
node: "legendtoggle",
showFunc : dojo.fx.wipeIn,
hideFunc : dojo.fx.wipeOut
})
}
dojo.addOnLoad(legendToggle);
... View more
10-17-2012
11:07 AM
|
0
|
0
|
578
|
|
POST
|
any idea on the best way to go about finding why I need to refresh? Attached is a screenshot of the errors I get in firebug.
... View more
10-17-2012
07:48 AM
|
0
|
0
|
578
|
|
POST
|
there is a spelling error early in your code. This may or may not be the problem: var landsResults, riversResutls; It is spelled correctly when you reference it later in the code.
... View more
10-16-2012
06:41 AM
|
0
|
0
|
738
|
|
POST
|
When I launch my application in a browser it shows the shell (header and other panes) but it does not show the map itself. When I refrefresh the browser everything draws... Any idea what might be causing this. Happens in all browsers. Here is my init function: function init() {
dojo.connect(dijit.byId("gridParcel"), "onRowClick", onRowClickHandler);
//Slash Screen Message
var myMessage = "<snip>;
dojo.byId('divLoadMessage').innerHTML = myMessage;
dijit.byId('dialogLoadMessage').show();
var initExtent = new esri.geometry.Extent({"xmin":-9199621.530456403,
"ymin":3365235.5214724857,
"xmax":-9077475.159256855,
"ymax":3443965.6606061114,
"spatialReference":{"wkid":102100}});
//setup the popup window
var popup = new esri.dijit.Popup({
fillSymbol: new esri.symbol.SimpleFillSymbol(esri.symbol.SimpleFillSymbol.STYLE_SOLID, new esri.symbol.SimpleLineSymbol(esri.symbol.SimpleLineSymbol.STYLE_SOLID, new dojo.Color([255,0,0]), 2), new dojo.Color([255,255,0,0.25]))
}, dojo.create("div"));
map = new esri.Map("map", {
infoWindow:popup,
extent:initExtent,
logo:false
});
dojo.connect(map,"onLoad",mapReady);
//Set The Initial Basemap
var initBasemap = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer");
map.addLayer(initBasemap);
createBasemapGallery();
//Create Find Task using the URL of the map service to search
findTaskParcel = new esri.tasks.FindTask("http://gisprod2/arcgis/rest/services/Dynamic/ParcelsTestSDE/MapServer");
//Create the find parameters
findParamsParcel = new esri.tasks.FindParameters();
findParamsParcel.returnGeometry = true;
findParamsParcel.layerIds = [0];
findParamsParcel.searchFields = ["PARCELID", "SITEADDRESS"];
findParamsParcel.outSpatialReference = map.spatialReference;
//Create Find Task using the URL of the map service to search
findTaskYear = new esri.tasks.FindTask("http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/TaxParcel/TaxParcelQuery/MapServer/");
//Create the find parameters
findParamsYear = new esri.tasks.FindParameters();
findParamsYear.returnGeometry = true;
findParamsYear.layerIds = [0];
findParamsYear.searchFields = ["RESYRBLT"];
findParamsYear.outSpatialReference = map.spatialReference;
//resize the map when the browser resizes
dojo.connect(map, 'onLoad', function (theMap) {
//resize the map when the browser resizes
dojo.connect(dijit.byId('map'), 'resize', map, map.resize);
});
locator = new esri.tasks.Locator("http://tasks.arcgis.com/ArcGIS/rest/services/WorldLocator/GeocodeServer");
dojo.connect(locator, "onAddressToLocationsComplete", showResults);
map.infoWindow.resize(300,125);
//parcellayer = new esri.layers.ArcGISDynamicMapServiceLayer("http://gisprod2/arcgis/rest/services/Dynamic/ParcelsTestSDE/MapServer");
layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://gisprod2/arcgis/rest/services/Dynamic/Zoning/MapServer");
//Add the Legend
legendLayers.push({layer:layer,title:''});
dojo.connect(map,'onLayersAddResult',function(results){
var legend = new esri.dijit.Legend({
map:map,
layerInfos:legendLayers
},"legendDiv");
legend.startup();
});
map.addLayers([layer]);
if (layer.loaded) {
buildLayerList(layer);
}
else {
dojo.connect(layer, "onLoad", buildLayerList);
}
}
... View more
10-15-2012
10:50 AM
|
0
|
3
|
1022
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 01-16-2014 09:52 AM | |
| 6 | 06-12-2013 08:01 AM |
| Online Status |
Offline
|
| Date Last Visited |
11-11-2020
02:23 AM
|