|
POST
|
i use an HTML snippet to determine tool (in my if statements) Yes i know i should use switch/case instead of ifs (my code actually uses onDblClick, but there is an onClick event for the map object as well). dojo.connect(map, "onClick", dojo.hitch(this, function(evt) {
if(dojo.byId("controllerStatus").innerHTML=="Current Action: Zoom Out"){
this.map.centerAndZoom(this.map.toMap(evt.screenPoint),this.map.getLevel()-1);
}
else if(dojo.byId("controllerStatus").innerHTML=="Current Action: Zoom In"){
this.map.centerAndZoom(this.map.toMap(evt.screenPoint),this.map.getLevel()+1);
}
else if(dojo.byId("controllerStatus").innerHTML=="Current Action: Move Map"){
this.map.centerAt(this.map.toMap(evt.screenPoint));
}else if(dojo.byId("controllerStatus").innerHTML==""||!dojo.byId("controllerStatus").innerHTML){
this.map.centerAndZoom(this.map.toMap(evt.screenPoint),this.map.getLevel()+1);
this.map.centerAt(this.map.toMap(evt.screenPoint));
}
}));
... View more
10-26-2012
08:27 AM
|
0
|
0
|
991
|
|
POST
|
I am trying to modify the sample "Query and immediately open info window". I got the sample to open an infoWindow when I click on a polygon. But it does not work for line feature layers. What do I need to do to get it to work? Thanks, Robert more than likely you are just "missing" the line. In the query task, you might want to buffer the click geometry before passing it to the query.
... View more
10-24-2012
12:48 PM
|
0
|
0
|
1021
|
|
POST
|
not on a sub-1mbit air card dont get me wrong, i like it. Even as the default. I just hope there is a map.setPanStyle as legacy or kinetic.
... View more
10-24-2012
10:19 AM
|
0
|
0
|
1701
|
|
POST
|
its my understanding that while "smoother" this effect requires side loading a lot of the surrounding tiles just in case the user pans. Essentially, it is smoother, but slower. Ill take fast and ugly over slow and pretty anyday. But i agree it would nice to enable as an option.
... View more
10-24-2012
09:59 AM
|
0
|
0
|
1701
|
|
POST
|
with limited info my guess: your geometry is complicated enough that it is switching from using a get to a post, which requires a proxy, which is not set up. You can confirm this by using firebug and looking at the error.
... View more
10-22-2012
12:20 PM
|
0
|
0
|
1854
|
|
POST
|
Agreed, the current way to do this has issues... It's like you've been sitting in on our team meetings... I'm not committing to a timeline, but we're planning to add zoom, minZoom, maxZoom, minScale and maxScale properties to map.options to simplify this whole workflow. zoom would be used to specify the zoom level the map starts at, minZoom and maxZoom specify minimum and maxim zoom levels, if that's not obvious ;). These would be awesome!! especially if they modify the zoom slider as well. 🙂
... View more
10-21-2012
06:50 PM
|
0
|
0
|
1691
|
|
POST
|
This is true, the best approach would be to use zero through whatever to number your levels as you specify them in map.options.lods. I should have done this in the example but did a lazy copy/paste. Here's a better example:
lods: [
{"level" : 0, "resolution" : 2445.98490512499, "scale" : 9244648.868618},
{"level" : 1, "resolution" : 1222.99245256249, "scale" : 4622324.434309},
{"level" : 2, "resolution" : 611.49622628138, "scale" : 2311162.217155},
{"level" : 3, "resolution" : 305.748113140558, "scale" : 1155581.108577},
{"level" : 4, "resolution" : 152.874056570411, "scale" : 577790.554289},
{"level" : 5, "resolution" : 76.4370282850732, "scale" : 288895.277144},
{"level" : 6, "resolution" : 38.2185141425366, "scale" : 144447.638572},
{"level" : 7, "resolution" : 19.1092570712683, "scale" : 72223.819286},
{"level" : 8, "resolution" : 9.55462853563415, "scale" : 36111.909643},
{"level" : 9, "resolution" : 4.77731426794937, "scale" : 18055.954822},
{"level" : 10, "resolution" : 2.38865713397468, "scale" : 9027.977411}
]
I don't mean to get the thread of topic, but my concern with the above approach is what happens when we bring in other layers? for example AGO or OSM or a webtiledservice? if you use the {$row}/{$col}/{$lvl} url pattern, and are expecting lvl 10 to be the "universal" definition of 10 based on Google/Bing/ESRI, it causes lots of problems. It would be really really nice if we could just leave the lods default, not have to define anything, and just say map.maxScale = 16 and map.minScale = 6
... View more
10-19-2012
09:02 AM
|
0
|
0
|
1691
|
|
POST
|
be careful though, while it works for max, it does not work for minimum if you use setLevel. for example, if you do LOD 4-16, and then do setLevel(4) it goes to the 4th level, which in this case is level 7. Very counter intuitive.
... View more
10-19-2012
08:03 AM
|
0
|
0
|
1691
|
|
POST
|
from version 3.0 on you need to host the file in a webserver, it no longer works just running from an html file.
... View more
10-19-2012
05:21 AM
|
0
|
0
|
1435
|
|
POST
|
are you logged in? only the thread creator, logged in, can mark as answered
... View more
10-18-2012
11:58 AM
|
0
|
0
|
2167
|
|
POST
|
I just checked the data frame properties and it is already Web Merc Aux Sphere, Also how do I clear the REST Cache? I found this link for clearing REST Cache but it seems that I need to Generate Admin Token. Is that the right process? http://server/arcgis/rest/admin/ or in your case http://msgist2011.grd.arizona.edu/ArcGIS/rest/admin/ log in, clear cache, clear cache now.
... View more
10-18-2012
11:36 AM
|
0
|
0
|
1314
|
|
POST
|
i like my way better, 😉 but glad you found a solution that works for you. please mark odoe's post as the answer.
... View more
10-18-2012
11:00 AM
|
0
|
0
|
2167
|
|
POST
|
I created two different MXDs, one for City of Tucson and another for US States. If you click on the ArcGIS.com Map link above (in the services page), you will see that City of Tucson Layer is overlaid on the basemap properly but the US States is projected somewhere in the ocean. I know this is a projection issue but if you look at the metadata in the services link, both are showing Spatial Reference: 102100 (3857). Now the projection of the City of Tucson is NAD_1983_HARN_StatePlane_Arizona_Central_FIPS_0202_Feet_Intl in the ArcMap and the US States is WGS_1984_Web_Mercator_Auxiliary_Sphere in ArcMap. I tried to change the projection to WGS84 but the layer is still not projected properly. How can I correct it? By "correct it" I mean that the projection should be like City of Tucson where it is projected properly over the basemap in ArcGIS.com. You should leave your data in its own coordinate system. Then set the DATA FRAME properties to Web Merc aux sphere and refresh your service. (You should also clear your REST cache after changing a service)
... View more
10-18-2012
10:52 AM
|
0
|
0
|
1314
|
|
POST
|
the syntax i use is
var task = new esri.tasks.QueryTask(url);
task.execute(q, dojo.hitch(this, "searchCallback", linklayer, layerdesc, titleField, outfields, zoomScale, linkField)); and the callback (note this is in a widget, so the format is a little different) searchCallback: function(layerId, layerdesc, titleField, fields, zoomScale, linkField, featureSet ) {
... View more
10-17-2012
12:19 PM
|
0
|
0
|
2167
|
|
POST
|
in your function, you could try var iframe = dojo.create("iframe", { "src": response.content, "style": "width: 100%; height: 100%; display: block; padding: 0px; margin: 0px;", "frameborder":"0", width:"100%", height:"100%" }) deferred.callback(iframe); not sure on the syntax of the parameters.. but should be close
... View more
10-15-2012
10:51 AM
|
0
|
0
|
847
|
| 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
|