POST
|
Hi. There are 2 small errors in the "Install notes for the ArcGIS API for JavaScript". Configuration options for compact build: [...] 2. Open C:\Inetpub\wwwroot\arcgis_js_api\library\3.0\jsapi\js\dojo\dojo\dojo.js in a text editor [...] 3. Open C:\Inetpub\wwwroot\arcgis_js_api\library\3.0\jsapi\js\dojo\dojo\dojo.js.uncompressed.js [...] It has to be: 2. Open C:\Inetpub\wwwroot\arcgis_js_api\library\3.0\jsapicompact\js\dojo\dojo\dojo.js 3. Open C:\Inetpub\wwwroot\arcgis_js_api\library\3.0\jsapicompact\js\dojo\dojo\dojo.js.uncompressed.js The two files for the compact build are under the jsapicompact directory. HTH and best regards, Axel
... View more
06-25-2012
03:19 AM
|
0
|
0
|
281
|
POST
|
+1 Also it would be a good idea to pack the SDK ZIP in a way, that the files are under a folder that represents the version number (like the library ZIP does). For example: ...\arcgis_js_api\sdk\2.7 Below you see a representation of my emotions in my Windows-system: Library: C:\inetpub\wwwroot\arcgis_js_api\library\2.7 SDK: C:\inetpub\wwwroot\arcgis_js_api\sdk\ ==> 😞 Library: C:\inetpub\wwwroot\arcgis_js_api\library\2.7 SDK: C:\inetpub\wwwroot\arcgis_js_api\sdk\2.7 ==> 🙂 Also: install.htm -> install_2.7.htm, install_linux.htm -> install_linux_2.7.htm Things like that would make (installation-) life a bit easier. 🙂 Best regards, Axel
... View more
03-29-2012
12:12 AM
|
0
|
0
|
175
|
POST
|
Nice. Thank you! However some files are missing in the download archive: Default.ashx, index.jsp, index.php are missing in the jsapi and the jsapicompact folder. I copied the Default.ashx from the 2.6 release. Also the installation documentation has a small typo: Step 23: "Access the [...]: http://<myserver>/arcgis_js_api/library/2.7/arcgis/". Should be http://<myserver>/arcgis_js_api/library/2.7/jsapi/ Best regards, Axel
... View more
02-13-2012
11:44 PM
|
0
|
0
|
536
|
POST
|
One additional hint if you are using windows authentication: In Internet Explorer, the authenticated user is passed automatically to the webapplication. Firefox is asking for user-credentials (the domain/workgroup user). You can avoid that with an entry in Firefox' about:config. See here: http://kb.mozillazine.org/Network.automatic-ntlm-auth.trusted-uris
... View more
01-30-2012
02:05 AM
|
0
|
0
|
603
|
POST
|
I downloaded the API and noticed some changes that are not reflected in the installation documentation. System here: Windows. I install the API and the default path is: c:\inetpub\wwwroot\arcgis_js_api\library\2.6\jsapi\ The install path on the previous versions was c:\inetpub\wwwroot\arcgis_js_api\library\2.6\arcgis\ The install.htm says you have to adjust the 3 files and change [HOSTNAME_AND_PATH_TO_JSAPI] to axxlserver/arcgis_js_api/library/2.6/arcgis/ it should be: Change [HOSTNAME_AND_PATH_TO_JSAPI] to axxlserver/arcgis_js_api/library/2.6/jsapi/ Same with the Test Code. It refers to the "arcgis" URL path of the installation. Should be "jsapi". Same with the compact build. It's now "jsapicompact" not the old "arcgis_compact". I don't know how the API works, if you change the folders to the old names. I installed it successfully with the above changes in the 3 files: C:\inetpub\wwwroot\arcgis_js_api\library\2.6\jsapi\js\esri\esri.js C:\inetpub\wwwroot\arcgis_js_api\library\2.6\jsapi\js\dojo\dojo\dojo.xd.js C:\inetpub\wwwroot\arcgis_js_api\library\2.6\jsapi\js\dojo\dojo\dojo.xd.js.uncompressed.js And the test sample is now with this two URLs (which are different to the 2.5 release):
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Simple Map</title>
<link rel="stylesheet" type="text/css" href="http://axxlserver/arcgis_js_api/library/2.6/jsapi/js/dojo/dijit/themes/tundra/tundra.css">
<script type="text/javascript" src="http://axxlserver/arcgis_js_api/library/2.6/jsapi/"></script>
<script type="text/javascript">
dojo.require("esri.map");
function init() {
var myMap = new esri.Map("mapDiv");
//note that if you do not have public Internet access then you will need to point this url to your own locally accesible cached service.
var myTiledMapServiceLayer = new esri.layers.ArcGISTiledMapServiceLayer("http://server.arcgisonline.com/ArcGIS/rest/services/NGS_Topo_US_2D/MapServer");
myMap.addLayer(myTiledMapServiceLayer);
}
dojo.addOnLoad(init);
</script>
</head>
<body class="tundra">
<div id="mapDiv" style="width:900px; height:600px; border:1px solid #000;"></div>
</body>
</html>
Hope that helps, Axel
... View more
12-19-2011
12:21 AM
|
0
|
0
|
361
|
POST
|
Have you tried this:
function zoomToScale(scale){
map.setExtent(esri.geometry.getExtentForScale(map, scale));
}
regards, a.
... View more
09-05-2011
03:34 AM
|
0
|
0
|
343
|
POST
|
"Studio 3 simplified greatly the concept of adding JavaScript content assist." Typical ESRI -- by 'simplify' they mean making things 5 times more difficult, and basically unusable! That quote didn't come from Esri but from the Aptana WIKI. Please try to read the quotes correctly before bashing someone here. Right now Aptana 3 doesn't even have an official and/or up-to-date Code Assist for DOJO.
... View more
09-05-2011
03:30 AM
|
0
|
0
|
700
|
POST
|
My 2 cent: Check if all variables are declared with var. Sometime IE has side-effects if the declaration is missing. If you have declared your map object somewhere else, check if you did it with "var map...". If you once have declared it, don't do it a second time. HTH. Axel
... View more
08-12-2011
12:56 AM
|
0
|
0
|
489
|
POST
|
http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm map.setLevel(level) Sets the map to the specified level ID. Zooms to the new level based on the current map center point. Valid only with an ArcGISTiledMapService layer. Or for example: map.setExtent(esri.geometry.getExtentForScale(map, scale), fit?) Second: Don't mess the JS-API with the dojo library. Dojo 1.6.1 is shipped with the JS-API. You refer to: <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dojo/dojo.xd.js" djConfig="parseOnLoad: true"></script> and <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.4"></script> and your CSS is coming from: <link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/dojo/1.6/dijit/themes/claro/claro.css"/> You only need: <link rel="stylesheet" type="text/css" href="http://serverapi.arcgisonline.com/jsapi/arcgis/2.4/js/dojo/dijit/themes/claro/claro.css"> and <script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=2.4"></script> It's possible to use another DOJO version with the JS-API but I guess you don't need that yet. I advice you to read the Concepts at: http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp_start.htm and check the basic examples in the documentation. Hope that helps Axel
... View more
08-09-2011
04:07 AM
|
0
|
0
|
536
|
POST
|
Just for information, since the discussion is always coming up and people may end up in this thread. Another nice example of a TOC is here: http://www.arcgis.com/home/item.html?id=9c43bdf76a23452ba1d95684f7cd76d8 by nliu. It integrates the legend directly under the layer-control, works also with group-layers (although I don't know if you can switch them seperately), has a transparency control, a scale dependecy and other nice things.
... View more
08-09-2011
01:56 AM
|
0
|
0
|
532
|
POST
|
1.) You can access a tiled mapservice with the esri.layers.ArcGISDynamicMapServiceLayer but I can't say if it's "highly discouraged". Anyway you can zoom beyond the last cache level and get the (pixelized) image from the cache. 2.) I think it's worth to review your basemap. Although this is a very basic concept, that you already might know: The basemap/operational layers paradigm is the first step to user-acceptance. Check if your basemap is really a basemap and if your operational services contain only the operational ones. I don't know exactly why you need to switch from a cached service to the dynamic version. The only reason I know is that it takes too long or you don't have the disc-space. But if you really cache your basemap down to the level and the region you're working at and put only the operational layers on top with dynamic services, you're requirement should fit. If you need a very high scale (1:500) you can pre-cache only the region you need (to decrease the needed disc-space). This is the first step and a concept of how to disassemble your layers into different services for different projects. I know that it depends on the projects and doesn't fit in reality every time. But I hope that helps a bit. Axel
... View more
08-09-2011
01:40 AM
|
0
|
0
|
536
|
POST
|
If "img.document.execCommand('saveas', null, imgsrc);" throws an exception, there has to be an error with that function. http://lmgtfy.com/?q=execCommand+saveas Solution: "execCommand" seems to be a sloppy thing and only supported by IE. You have to check that and search for a hack or implement your functionality in a different way, for example with a server roundtrip (PHP, SOAP, REST, anything else), because a server can provide a download dialog in the TCP/IP stack. Or you experiment with HTML 5 like Derek mentioned. I hope, that clarifies what you have to do.
... View more
08-02-2011
12:09 AM
|
0
|
0
|
734
|
POST
|
Hi. I want to view the attachments of my feature in the JS-API. But I see a gap between the provided samples and the functionality I want to have. My JS-API application shows several map-services, one of them has an attachment. I have implemented an Identify on all visible map-services, showing the results in a table (not with popups because I needed to have a robust, conservative interface). The identify doesn't show attachments, even not the info if a feature has an attachment. The samples in the JS-API use the attachment functionality only in editing scenarios, with the Attachment Editor widget (and there inserting/deleting attachments is solved really trivial. I played around with that and didn't find a way to make it read-only, except hacking the css). Also, you need a feature-service, which I can't do and can't provide. So, based on my map-services: Which way should I go to view attachments? Is there a path in the JS-API to get to my feature with attachments? One possible way for discussion: Identify the feature. Get the layer-ID of your returned feature. Check if hasAttachmens are true. Grab the Object-ID of your feature. Provide a link to the REST-URL of your feature with the attachment endpoint. For example: http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/MapServer/0/2096559/attachments Alternatively provide links to all "attachmentInfo" objects on the JSON response: http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/MapServer/0/2096559/attachments?f=json&pretty=true But it's a lot of implementation to do and you have to dig deep in the identify functionality until any response is shown in the interface. Also you have to access the REST-URLs by hand. Do you know any better solutions? Any implementations how you did that? Did you ever used an additional feature-service that you asked for that? I appreciate any help and discussion on that topic (and don't bother about my implementation with the tables, because it's also missing for the standard identify widgets). For me it's a missing link to the standard identify in an ArcMap session (where the attachments are listed simply in the identify). Providing the access only with feature-layers and in an editing-workflow is a bit to short, I guess. So: Any idea to get to a workflow for that would be really helpful for all, I hope. 🙂 Thanks and best regards, Axel
... View more
07-28-2011
01:00 AM
|
0
|
2
|
967
|
POST
|
Hi. AFAIK, you cannot save files via plain JavaScript. You need a server roundtrip to a webserver (Apache, IIS, Tomcat, etc.). This one will provide you with a download dialog. Axel
... View more
07-26-2011
04:23 AM
|
0
|
0
|
734
|
POST
|
HI. "esri.geometry.geographicToWebMercator()" is an internal function in the JS-API. "geometryService.Project()" uses an GeometryService. As far as I know, the first one came up as a helper utility with the change of ArcGIS Online from WGS84 to WebMercator. Axel
... View more
07-26-2011
04:16 AM
|
0
|
0
|
481
|
Title | Kudos | Posted |
---|---|---|
1 | 10-01-2010 12:09 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:22 AM
|