|
POST
|
In firebug, I get this error when I zoom to the visibility scale of the 'props' layer: exception in animation handler for: onEnd...?v=2.8 (line 14)
TypeError: _69.color is Null...Legend.xd.js (line 19) If I remove the props layer from both the map and legend objects, the error is gone. Here's what I have: dojo.addOnLoad(init);
var mapLayers = [];
var legendLayers = [];
//Function to initialize the map and read data from Configuration file
function init() {
setupFindTask();
//asp.net proxy page for token service
esri.config.defaults.io.proxyUrl = "proxy.ashx";
//change the location of the map slider
esri.config.defaults.map.slider = { left:"13px", top:"76px", width:null, height:"150px" };
//change zoom options to try and get map to display faster
esri.config.defaults.map.zoomRate = 50;
esri.config.defaults.map.zoomDuration = 1000;
dojo.connect(map, "onLoad", mapLoaded);
dojo.connect(grid1, "onRowClick", onRowClickHandler);
//lets grab the details from the config.txt file
dojo.xhrGet({
url: "Config.txt",
handleAs: "json",
preventCache: true,
load: function (responseObject, ioArgs) {
var mapExtent = responseObject.DefaultExtent;
defaultID = responseObject.defaultID;
defaultFacName = responseObject.defaultFacName;
defaultFacCityState = responseObject.defaultFacCityState;
var startExtent = new esri.geometry.Extent(parseFloat(zoomExtent[0]), parseFloat(zoomExtent[1]),
parseFloat(zoomExtent[2]), parseFloat(zoomExtent[3]), new esri.SpatialReference({ wkid: 102100}));
dojo.byId('imgApp').src = responseObject.ApplicationImage;
dojo.byId('lblAppName').innerHTML = responseObject.ApplicationName;
map = new esri.Map("map", { extent: startExtent});
createBasemapGallery();
dojo.connect(map, "onLoad", MapInitFunction);
}
});
}
//map layers can be added here
function MapInitFunction(map) {
var facils = new esri.layers.FeatureLayer("https://mydomain.com/MapServer/0",{
mode:esri.layers.FeatureLayer.MODE_SNAPSHOT,
id: 'facils',
outFields:["*"]
});
legendLayers.push({layer:facils,title:"Facilities"});
var bndry = new esri.layers.FeatureLayer("https://mydomain.com/MapServer/3",{
mode:esri.layers.FeatureLayer.MODE_SNAPSHOT,
id: 'bndry',
opacity: 0.7,
outFields:["*"]
});
legendLayers.push({layer:bndry,title:"Boundary"});
var props = new esri.layers.FeatureLayer("https://mydomain.com/MapServer/2",{
mode:esri.layers.FeatureLayer.MODE_SNAPSHOT,
id: 'props',
outFields:["*"]
});
legendLayers.push({layer:props,title:"Property Boundaries"});
dojo.connect(map,'onLayersAddResult',function(results){
var legend = new esri.dijit.Legend({
map:map,
layerInfos:legendLayers
},"legendDiv");
//when the map extent is changed, refresh legend layers since layerInfos is used in legend constructor
dojo.connect(map, "onExtentChange", function(){
legend.refresh();
});
legend.startup();
});
map.addLayers([bndry,props,facils]);
dojo.connect(map,'onLayersAddResult',function(results){
//add check boxes
dojo.forEach(legendLayers,function(layer){
var layerName = layer.title;
var checkBox = new dijit.form.CheckBox({
name: "checkBox" + layer.layer.id,
value: layer.layer.id,
checked: layer.layer.visible,
onChange: function(evt) {
var clayer = map.getLayer(this.value);
clayer.setVisibility(!clayer.visible);
this.checked = clayer.visible;
}
});
//add the checkbox and label to the toc
dojo.place(checkBox.domNode,dojo.byId("toggle"),"after");
var checkLabel = dojo.create('label',{'for':checkBox.name, innerHTML:layerName},checkBox.domNode,"after");
dojo.place("<br />",checkLabel,"after");
});
});
} anyone see this problem before? edit: The problem seems to start at v2.7; changing to v2.5 or v2.6 there is no error, and everything works fine.
... View more
04-09-2012
07:59 AM
|
0
|
11
|
8971
|
|
POST
|
I set custom lods in my map, so the user cannot zoom in beyond the extent of the tiled map service. Basically, so they never see the 'imagery cannot be displayed at this scale' message. I can get lods from the arcgisonline World_imagery service by visiting: http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer?f=pjson However, upon changing to a bing maps aerial, the above lods no longer apply for oblivious reasons, and the map zoom slider only works on every few tics. So, on basemap change, I'd like to re-apply the lods specific to the basemap the user selects, thus, changing the map zoom tics on the slider. I can listen for a basemap change
dojo.connect(basemapGallery,"onSelectionChange",function(){
var bm = basemapGallery.getSelected();
if (bm.title == "bing"){
//somehow re-apply lods specific to the user-selected basemap;
}
}
My questions: 1. where do I get the lods info for the bing aerial? I cannot simply append f=pjson to the service like I can for the arcgis World_IMagery service. 2. how would I re-apply lods, changing the basemap tics after the user selects a different basemap? thanks!
... View more
04-04-2012
11:37 AM
|
0
|
2
|
1142
|
|
POST
|
Mo, have you done a test with api 2.8 ? 2.8 identity manager works great for secure services, even if the service is used for find/query. someone correct me if I'm wrong, but the only change to your code is to add:
dojo.require("esri.IdentityManager");
var facils = new esri.layers.FeatureLayer("https://mydomain.com/ArcGIS/rest/services/secured/0",{
mode:esri.layers.FeatureLayer.MODE_ONDEMAND,
outFields:["*"]
});
... View more
04-03-2012
06:11 AM
|
0
|
0
|
2604
|
|
POST
|
decided to just put find results into tab of left content pane, but need a little help getting the dojox.grid.DataGrid to display inside dijit.layout.tabcontainer <div id="leftPane" dojotype="dijit.layout.ContentPane" region="left">
<div dojotype="dijit.layout.TabContainer" >
<div dojoType="dijit.layout.ContentPane" title="Legend" selected="true">
<div id="legendDiv"></div>
</div>
<div id="searchCol" dojoType="dijit.layout.ContentPane" title="Find Results">
<table dojoType="dojox.grid.DataGrid" jsid="grid1" id="grid1" class="searchResultsGrid"
rowsPerPage="10" rowSelector="20px" style="visibility:hidden;">
<thead>
<tr >
<th width="100px" field="site_code">FacID</th>
<th width="185px" field="facil_name">Fac Name</th>
</tr>
</thead>
</table>
<table dojoType="dojox.grid.DataGrid" jsid="grid2" id="grid2" class="searchResultsGrid"
rowsPerPage="10" rowSelector="20px" style="visibility:hidden;">
<thead>
<tr >
<th width="100px" field="site_code">FacID</th>
<th width="185px" field="facil_name">Fac Name</th>
</tr>
</thead>
</table>
</div>
</div>
</div> This is working (TabContainer removed): <div id="searchCol" dojotype="dijit.layout.ContentPane" region="left">
<table dojoType="dojox.grid.DataGrid" jsid="grid1" id="grid1" class="searchResultsGrid"
rowsPerPage="10" rowSelector="20px" style="visibility:hidden;">
<thead>
<tr >
<th width="100px" field="site_code">FacID</th>
<th width="185px" field="facil_name">Fac Name</th>
</tr>
</thead>
</table>
<table dojoType="dojox.grid.DataGrid" jsid="grid2" id="grid2" class="searchResultsGrid"
rowsPerPage="10" rowSelector="20px" style="visibility:hidden;">
<thead>
<tr >
<th width="100px" field="site_code">FacID</th>
<th width="185px" field="facil_name">Fac Name</th>
</tr>
</thead>
</table>
</div> pertinent js function searchMap(){
var searchBox = dojo.byId("txtSearch");
var searchText = searchBox.value;
searchText = searchText.replace(/-/g,"");
findParams.searchText = searchText;
searchBox.value = searchText;
if (searchText != "") {
featureID = "";
startStatusUpdate(1000);
findTask.execute(findParams, showResults);
}
}
function showResults(results){
hidePopup();
searchResults = results;
featureSet = null;
var items = []; //all items to be stored in data store
clearStatusUpdate();
for (var i = 0; i < results.length; i++) {
items.push(results.feature.attributes); //append each attribute list as item in store
}
setSearchResultItems2(items);
}
function setSearchResultItems2(items){
var data = {
identifier: keyFieldAlias, //This field needs to have unique values
label: addressFieldAlias, //Name field for display. Not pertinent to a grid but may be used elsewhere.
items: items
};
dojo.byId("grid1").style.visibility = "hidden";
dojo.byId("grid1").style.display = "none";
dojo.byId("grid2").style.visibility = "visible";
dojo.byId("grid2").style.display = "block";
//Create data store and bind to grid.
store = new dojo.data.ItemFileReadStore({
data: data
});
grid2 = dijit.byId("grid2");
grid2.setStore(store);
grid1HasResults = false;
grid2HasResults = true;
}
... View more
04-02-2012
03:59 PM
|
0
|
0
|
444
|
|
POST
|
Anyone have an example of putting find results into a popup window? I can put them into a stationary data grid, no problem, just can't figure out how to wire up the results to a popup. thanks!
... View more
04-02-2012
12:56 PM
|
0
|
1
|
654
|
|
POST
|
good question; the only way i've been able to generate valid json to load into mobile content server is to create web map on arcgis online, then view the json of the web map. I copy/paste the json structure into the mobile content server, which can then be browsed to on iPad. The way I understand is that all layers you put into arcgis online have to be in WGS84, so I assume the same holds true for the mobile content server, but I could be wrong. Mobile content server capabilities are limited to what can be achieved in arcgis online given my workflow. I havn't been able to find documentation on how to hand-craft valid json for the mobile content server, outside of using arcgis online. IMO, the mobile content server in server v10 is under developed, and hard to find info about. I'd look forward to future development in 10.1 on this portion of server.
... View more
03-30-2012
08:50 AM
|
0
|
0
|
647
|
|
POST
|
anyone use this widget with v2.5 viewer? When I click on the lock icon nothing happens? thanks
... View more
03-27-2012
05:21 AM
|
0
|
0
|
1262
|
|
POST
|
https://domain.com/arcgis/rest/services/service1/FeatureServer <--doesn't work in AGO (never ending username/pass box) unless a token is generated and appended to the end, like so https://domain.com/arcgis/rest/services/service1/FeatureServer?token=xyz Used the above token method and symbolized, organized, config'd pop-ups ect in basic map viewer. Viewed resulting json data structure of AGO map and moved it to our mobilecontent server . After publishing the json map to mob. content server, I removed the tailing ?token= from the rest end point URL's. Connected to/viewed map on ESRI iPad app, and got a 'sign in to view this layer' box, so I did...........and it worked! same exact rest end point, consumed by a dif. client (ESRI app for iOS) and it works.
... View more
03-21-2012
10:21 AM
|
0
|
0
|
2022
|
|
POST
|
Hi Dan, A database connection is made for each ArcGIS Server instance (ArcSOC.exe) that is created for the service(s). The min and max number of instances can be set by right-clicking on the service > Service Properties > Pooling tab. By default, the minimum number of instances is set to 1 and the maximum is set to 2. Therefore, when you start the service 1 connection is made to the SDE geodatabase. By default, an instance is created as Pooled. This means when a request (ie pan/zoom in web app) is made to the service, an instance is taken from the pool, and then returned when the request is over. Once another request is made, say from another web app, that same instance can be used for that service request. So, multiple requests will need to be made at the same time in order for another instance to be created, thus creating another connection to the SDE geodatabase. This will not exceed the maximum number of instances, so by default a service can never exceed two connections to the geodatabase unless this paramter is increased. If the max number of instances is exceeded, the client will have to wait until an instance is returned to the pool before their request is returned. Say the max instances of a service is set to two and both are being used, creating two connections to the SDE geodatabase. Then one of the users is finished accessing the service. The second SDE connection will remain until the idle time expires (set within the Services Properties > Pooling tab). Once the idle time expires, the instance will be removed from the server and the connection deleted from the SDE geodatabase. thanks for the reply. Now I see why the max. # of instances is set to 2 by default. total connections to personal SDE gdb = 3; ArcSOC gets 2, one left for local editing in desktop envir.
... View more
03-21-2012
09:10 AM
|
0
|
0
|
4658
|
|
POST
|
installed SQLServer Express and enabled GDB storage using our ArcEditor (Desktop - Standard) License. Few questions regarding the number of connections to the SQL Server instance, named "sqldb" Lets say I create/publish a .mxd using data from a SDE gdb stored in sqldb. How many clients can simultaneously connect to the service to view the data (read only)? ArcGIS desktop -- client #1 ArcGIS online mapA -- client #2 ArcGIS online mapB -- client #3 JavascriptAPI custom map -- client #4 <---will this client receive the 'maximum number of connections to instance exceeded'? thanks!
... View more
03-21-2012
07:04 AM
|
0
|
17
|
17034
|
|
POST
|
David, Dan, What version of ArcGIS Server are you running? Was it working before and stopped, like maybe after you upgraded? Thanks Mike mine is a brand new install (hardware bundle) from esri that we received 2 wks ago. Not sure how to tell what SP is loaded, but I know for sure it's v10 EDIT: just found the patchfinder.exe for identifying what SP you have...bottom of this page. It doesn't display any SP info, just displays: ArcGIS Server 10 - GIS services ArcGIS Server 10 - Web Applications So...i'm downloading/installing SP4 right now
... View more
03-20-2012
11:13 AM
|
0
|
0
|
2168
|
|
POST
|
I had the same problem today. I found that using the token parameter on my map service URL worked. 1. Create token on behalf of the user identity with Identifier set to http://www.arcgis.com 2. Include that token value on the Map Service URL that is being added to an ArcGIS.com map. Example URL with token as a parameter: http://arcgisserver.domain.name/ArcGIS/rest/services/mySecureService/MapServer?token=6xgjHf9MIcnI1u87Mfw4is_h4zk2hg8yniTclu9TpwMWw0e5E_3tPxDAcXsStl6hsE2Jw2T0dn1SbqxLliJzQQ.. same problem here; secured GIS service using SqlServer db for users/roles; connection to services is https through reverse proxy. When I attempt to "add from web" and specify my secured service, I get the username/password prompt, but every user/pass I enter is invalid. I was able to add the secured service via generating a token as mentioned above, but as soon as the token expires, we're back to square 1. Could is be a sqlserver user/pass store is the problem? Anyone have secured services (windows auth) in AGO?
... View more
03-20-2012
06:35 AM
|
0
|
0
|
2168
|
|
POST
|
i'm having this exact same problem; not being able to view footprints in JS api through reverse proxy. Did you ever find the problem?
... View more
03-16-2012
11:11 AM
|
0
|
0
|
2130
|
|
POST
|
thanks Jake, that makes sense, but I have a few more clarification q's: 1. setup 2 folders inside server root, folderA-view role, folderB-edit role 2. publish a map service into folderA, no feature access 3. put the same map service into folderB, but enable feature access All users in edit role will be able to make local copy of feature data, edit it, then synchronize changes with server? Data that I add to the map, prior to publishing...does it need to be data from an SDE gdb? If so, I assume the sql-server instance would not necessarily need to be open to the internet for direct-editing as described in my 1st post? thanks!!
... View more
02-10-2012
11:18 AM
|
0
|
0
|
731
|
|
POST
|
Ordered a x64 server, pre-installed Win. Server 2008, ArcGIS Server 10 & SQL Server express. After I connect to the SQL instance via ArcCatalog, I'll create a new SDE gdb and c/p all my current file gdb data into the SDE gdb. As I understand, this type of connection, direct from ArcCatalog to the SQL instance is a 'direct connection'? We don't have a windows domain network (AD), and external, (outside the LAN) users will need to connect to the SQL instance and edit a version of the SDE gdb. To do so, would I have to config. the SQL Server to use database auth. as described here?? Setting up a win active directory domain is not an option, the external clients are gov. computers and would never be able to join the domain. thanks!
... View more
02-10-2012
04:19 AM
|
0
|
3
|
2121
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-02-2024 04:44 PM | |
| 1 | 11-04-2025 11:45 AM | |
| 1 | 10-31-2025 06:53 AM | |
| 1 | 02-06-2019 06:41 AM | |
| 1 | 02-18-2025 11:55 AM |
| Online Status |
Offline
|
| Date Last Visited |
04-07-2026
07:13 AM
|