|
POST
|
Update - I tried the same code, but on my personal domain, and it works fine - which seems to point at some sort issue internal issue. But, 😄 it has enabled me to get permission to "test" IE8 on my PC (8 is as far as we can go until we move off XP) - as not only do I have this issue, but I had another scripting issue that just failed on IE7. I feel your pain, just happy we finally got off ie6!
... View more
11-17-2011
03:50 AM
|
0
|
0
|
702
|
|
POST
|
I did a little more testing. It appears that dojo.require("esri.layers.KMLLayer"); is responsible for pulling in all the chart stuff. I too it out as I'm not currently using KMLLayers. Is this a bug? Rex Bradford Direct Relief International no its not a bug. If it is required for KML to work, it is required. same with OSM.
... View more
11-16-2011
08:42 AM
|
0
|
0
|
1339
|
|
POST
|
That makes sense, and what I assumed, but I was surprised for instance to see all of the charting stuff pulled in, when not called for explicitly. Does Dialog pull these in too, or something else? I have no idea why, but those are all pulled in when you dojo.require("esri.layers.osm"); an must be an embedded component of OpenStreetMap
... View more
11-16-2011
08:33 AM
|
0
|
0
|
1339
|
|
POST
|
Gladly. Please post back and let us know what you find. Just wanted to report back i confirmed in your example it is being properly id'd, and in every test case (except my app) it behaves properly. Baffling, ..
... View more
11-16-2011
07:57 AM
|
0
|
0
|
760
|
|
POST
|
you are calling them, just indirectly. For example you call dojo.require(dijit.Dialog) which has code if(!dojo._hasResource["dijit.Dialog"]){
dojo._hasResource["dijit.Dialog"]=true;
dojo.provide("dijit.Dialog");
dojo.require("dojo.dnd.move");
dojo.require("dojo.dnd.TimedMoveable");
dojo.require("dojo.fx");
dojo.require("dojo.window");
dojo.require("dijit._Widget");
dojo.require("dijit._Templated");
dojo.require("dijit._CssStateMixin");
dojo.require("dijit.form._FormMixin");
dojo.require("dijit._DialogMixin");
dojo.require("dijit.DialogUnderlay");
dojo.require("dijit.layout.ContentPane");
dojo.requireLocalization("dijit","common",null,"ROOT,ar,ca,cs,da,de,el,es,fi,fr,he,hu,it,ja,kk,ko,nb,nl,pl,pt,pt-pt,ro,ru,sk,sl,sv,th,tr,zh,zh-tw");
dojo.require("dijit.TooltipDialog");
dojo.declare("dijit._DialogBase",[dijit._Templated,dijit.form._FormMixin,dijit._DialogMixin,dijit._CssStateMixin],{
so as you can see alot of the requires are being loaded by why you required.
... View more
11-16-2011
06:50 AM
|
0
|
0
|
1339
|
|
POST
|
Hi When a user first uses a page of mine, which uses API 2.5, it hangs when initially loading, before it gets as far as the CSS, so all the items are showing unstyled. Event logs show Hanging application iexplore.exe, version 7.0.6000.17103, hang module hungapp, version 0.0.0.0, hang address 0x00000000. Killing iexplorer and starting again and it all works fine. Deleting temp internet files causes this to happen a second time. I'm guessing it is some conflict with the downloading of all the API code at once. Any ideas? ACM I havent seen this, but i do have problems with ie7 loading this badly out of order (like before dojo is loaded) . DO you ahve a public link or html sample?
... View more
11-16-2011
05:50 AM
|
0
|
0
|
702
|
|
POST
|
Looking forward to see what you come up with. This service has several layers with coded value domains: http://sampleserver5.arcgisonline.com/ArcGIS/rest/services/Energy/Geology/MapServer We query each layer for the layer description. We then pass the resulting featureset through a function to replace names with aliases, format numbers, and replace domains with their values Function to do formatting/aliases/domains org.mymanatee.common.util.getAliasDomainFormat=function(layerdesc, fieldName, field_val){
dojo.forEach(layerdesc.fields, dojo.hitch(this, function(ldf){
if(ldf.name==fieldName){
//replace with aliases
fieldName = ldf.alias;
// alert(ldf.name+" : "+ldf.type);
if(ldf.type=="esriFieldTypeDate"){
// alert(ldf.type);
field_val= dojo.date.locale.format(new Date(field_val), {datePattern: "MM/dd/yyyy"});
// alert(field_val);
}
if(ldf.type=="esriFieldTypeDouble"){
// alert(ldf.type);
field_val= dojo.number.format(field_val,{places: 2 });
// alert(field_val);
}
if(ldf.domain){
dojo.forEach(ldf.domain.codedValues, dojo.hitch(this, function(domain){
if(field_val==domain.code){
field_val=domain.name;
}
}));
}
}
}));
return [fieldName,field_val];
} function to get the layer description (by querying url with the ?f=json parameter) - ignore the replaces they are a cross-domain hack org.mymanatee.common.util.getLayerDesc=function(url){
var desc;
var layerurl= ""+url.replace("http://home.intranet","")+"/?f=json";
layerurl= ""+layerurl.replace("http://www.mymanatee.org","");
var params = {
url: layerurl,
handleAs: "json",
sync: true
};
var deferred =dojo.xhrGet(params);
desc= deferred.results[0];
return desc;
}
... View more
11-16-2011
05:48 AM
|
1
|
0
|
2063
|
|
POST
|
ok that is odd, i need to figure out why my code is not adding the id then. thank you for double checking.
... View more
11-15-2011
08:56 AM
|
0
|
0
|
760
|
|
POST
|
What are you trying to do? We would normally recommend that you stick to using public API functions to interact with your layers. What is the API missing? I am using the public api, its for my own print function. At 2.2, when you added a dynamic layer, it creates <div id="map_layername"><img id="map_layername_randomnumber">/<img></div> which is true at 2.5 as well, unless the service only has annotation, in which case, for some reason, the div does not get an id, only the img does. For now i am just querying for the layers that only have annotation (i have to hardcode the names) and manually id'ing the divs. Just wondering why the change.
... View more
11-15-2011
08:04 AM
|
0
|
0
|
760
|
|
POST
|
Trying to confirm this. If you add a dynamic layer to a map, the div is id'd with map_layername, and then it contains a child image with the png in it with map_layername_randonumbers as the id If you do the same on a mapservice that only contains annotation, the div does not get id'd, only the child image. Is this a change/bug with 2.4/2.5? I have confirmed this was not the case with 2.2, and it makes it very difficult to get at the layers thanks http://www.mymanatee.org/arcgis/rest/services/common-operational/streetnames-for-aerials/MapServer for a service with only annotation.
... View more
11-15-2011
05:04 AM
|
0
|
6
|
1181
|
|
POST
|
Jeff, I don't agree with you since it zooms more than current every time when it is called by user. Well since by default a point does not have an extent, you have to assume one. If you want to stay at the current, you are not zooming, you are panning, in which case just call map.centerAt(pt).
... View more
11-14-2011
03:41 AM
|
0
|
0
|
600
|
|
POST
|
Just thought I would share. Hope that is okay. Just very happy we have such an active and sharing development community here for Javascript. It looks like Adobe is killing Flash on Mobile, and Silverlight 5 might be the last release from Microsoft, both in favor of HTML5 and JS!! http://slashdot.org/story/11/11/09/1920247/microsoft-killing-silverlight
... View more
11-09-2011
11:14 AM
|
0
|
1
|
1293
|
|
POST
|
Is this still the method to zoom to a point using the ESRI Javascript API?
var PointExtent = new esri.geometry.Extent();
PointExtent.xmin = selectedAddress.geometry.x - .001;
PointExtent.ymin = selectedAddress.geometry.y - .001;
PointExtent.xmax = selectedAddress.geometry.x + .001;
PointExtent.ymax = selectedAddress.geometry.y + .001;
map.setExtent(PointExtent);
Or, is there a new method? Thanks in advance, M Since its a point, I prefer map.centerAndZoom(selectedAddress.geometry,19); // 19 or whatever zoom scale you prefer.
... View more
11-09-2011
09:09 AM
|
0
|
0
|
600
|
|
POST
|
You can use a geometry service's labelPoints method. Or you could use a custom GP service. We don't have a way to do this client side. Bummer. feature request? a getCenter ({inside:true}) method on geometry would be very very useful.
... View more
11-09-2011
05:54 AM
|
0
|
0
|
612
|
|
POST
|
I am having a problem in an application because of a highly irregular (cresent shaped) parcel, that is resulting in a a center point outside of its bounds. Is there any way to get a center of a feature/graphic inside a polygon (i.e. ArcToolbox Feature to Point with the "Inside (optional)" box checked)?
... View more
11-09-2011
05:19 AM
|
0
|
3
|
1716
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 05-22-2014 08:35 AM | |
| 1 | 05-02-2012 04:56 AM | |
| 1 | 10-29-2021 07:40 AM | |
| 1 | 10-28-2021 05:26 AM | |
| 1 | 07-17-2012 08:48 AM |
| Online Status |
Offline
|
| Date Last Visited |
03-01-2022
02:00 PM
|