Welcome to ESRI Blogs

Version 1.2 of the ArcGIS JavaScript API released

Version 1.2 of the ArcGIS JavaScript API is now available! You can begin referencing it in your code with this tag:

<script type="text/javascript" src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=1.2"></script>

This release corresponds with the release of ArcGIS Server 9.3 Service Pack 1. However, the ArcGIS JavaScript API 1.2 can work with services from both ArcGIS Server 9.3 Final and 9.3 SP1.

This post details some of the most important new features in the ArcGIS JavaScript API 1.2. You can also find various samples in the online SDK that demonstrate these features.

Support for Image Services

You can add ArcGIS Server Image Services to the map using ArcGISImageServiceLayer. Image services represent file-based raster datasets or raster collections published with the ArcGIS Server Image extension. You can control the image type, compression type for JPG, image bands, and interpolation type.

Support for Dojo 1.2.

When you reference the ArcGIS JavaScript API in your code, you also have access to version 1.2 of the Dojo Toolkit. See the Dojo 1.2 Release Notes for migration information and a full list of improvements.

More flexibility with cached and dynamic layers

You can now define which tile levels of a cached service are exposed in the map. For example, you may want to use ArcGIS Online data for small scales only, then switch to your own cached data at large scales. Or you may want to make a cached service available at large scales only in order to focus the map on a certain geographic area.

You can also force dynamic maps to conform to the scale levels in a tiling scheme. This allows you to show a cached map at small scales, then easily switch to a dynamic map at large scales.

Refreshable map layers

Map service layers have a refresh() method. This is useful if back-end editors are modifying the data and you want to ensure the end user of the application sees the most recent data from the server.

Improved graphics performance

The performance of the graphics layer is improved when adding a large number of graphics to the map.

Projection of dynamic map services on the fly

Dynamic map services can be projected on the fly to match the spatial reference you set for the map. Previously, the spatial reference was defined by the base layer. Now the map can be defined using any spatial reference. Valid only with dynamic map layers.

New methods for the geometry service

GeometryService has new methods that allow for creating points in polygons for labeling purposes, and determining spatial relations of geometries. These geometries do not have to come from a map service; they can be geometries returned from a task or a query to a non-ArcGIS Web service.

Bug fixes

The following bugs have been fixed in version 1.2:

  • NIM034356 Double-click zoom is a default navigation type for the JavaScript API at version 1.2.
  • NIM036958 Style Attributes (STYLE_DASHDOTDOT and STYLE_NULL) of SimpleLineSymbol now work as expected.
  • NIM036833 Graphic.attribute names that contain decimal points (mytable.area) can be used in an InfoWindow through the Graphic.InfoTemplate.

We’d be happy to read your feedback about version 1.2 as comments to this post.

Contributed by the ArcGIS JavaScript API Team

Published Friday, November 21, 2008 9:13 AM by sterlingdq
Filed under:

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# re: Version 1.2 of the ArcGIS JavaScript API released

I noticed that when you zoom in using the scroll wheel on the mouse in IE. IE continues to process the page. The status bar says "http://localhost/null..." I'm testing this with Visual Studios web server.
Friday, November 21, 2008 12:13 PM by Donny V.

# re: Version 1.2 of the ArcGIS JavaScript API released

Thanks for sharing.. one of my colleague is using this javascript. regards Web Mapping services
Friday, November 21, 2008 8:53 PM by web mapping services

# re: Version 1.2 of the ArcGIS JavaScript API released

Will be the new version of API available for local publishing? I haven't found any notice about .js files among SP1 files.
Monday, November 24, 2008 4:31 AM by dond

# re: Version 1.2 of the ArcGIS JavaScript API released

Hey Sterling, some of your links point to 'resourcesstg', you might want to update these to 'resources' so we can click through to them.
Monday, November 24, 2008 8:40 AM by Scott K

# http://spatiallyadjusted.com/2008/11/21/esri-releases-version-12-of-the-arcgis-javascript-api/

Monday, November 24, 2008 9:44 AM by TrackBack

# re: Version 1.2 of the ArcGIS JavaScript API released

@Scott-  Thanks for the heads up. I think I fixed all these now but let me know if you run into anything else.

Monday, November 24, 2008 10:00 AM by sterlingdq

# http://labgeo.blogspot.com/

Wednesday, November 26, 2008 5:12 PM by TrackBack

# http://industry.slashgeo.org/article.pl?sid=08/11/24/140208&from=rss

Wednesday, November 26, 2008 5:13 PM by TrackBack

# re: Version 1.2 of the ArcGIS JavaScript API released

Hi Is the graphics problem in 1.2 is removed? The problem was when you resize the map and then pan it, the graphics were not correctly shown. Please answer this question.
Wednesday, November 26, 2008 10:45 PM by Abbid

# re: Version 1.2 of the ArcGIS JavaScript API released

I haven't got hold of 1.2 yet (we need to install locally due to firewall restrictions). Does anyone know if it resolves the issues with cross domain loading that were a problem in 1.1?

Thursday, November 27, 2008 9:16 AM by nranicar

# re: Version 1.2 of the ArcGIS JavaScript API released

Will a future release of the JS API have a function that behaves like VE clustering shapes (without using VE)? Would be very useful! "http://blogs.msdn.com/veplatform/archive/2008/10/12/clustering-pushpins-with-the-virtual-earth-map-control-api.aspx"
Thursday, November 27, 2008 12:17 PM by Bryan

# How to make sure that a geoprocessing task to carry out its full execution

I tested use of it as geoprocessing tool/task in Javascript API. It works but keeps failing to carry out full execution? Can anyone point ways to improve a geoprocessing script’s efficiency? And in any ways, to make sure that a geoprocessing script to carry out its full executing without stopping. I managed to use Javascript API gp.execute and gp.submitJob. Both these methods having fired off the geoprocessing task as two separate services. However, both of them have no means to make sure that the geoprocessing tasks to carry out full execution. What can I do to make sure that it does full run?
Monday, December 01, 2008 9:53 AM by david

# re: Version 1.2 of the ArcGIS JavaScript API released

Monday, December 01, 2008 11:08 AM by david

# re: Version 1.2 of the ArcGIS JavaScript API released

Why does the portland example not work correctly if you change the api versions from 1 to 1.2? Same with the css references.
Monday, December 01, 2008 3:03 PM by steve

# re: Version 1.2 of the ArcGIS JavaScript API released

In IE7, it appears that clicking on any anchor tag on the page causes the map to unload. Is anyone else experiencing this? This is not happening in Firefox.
Tuesday, December 02, 2008 7:59 AM by Kelly Bigley

# re: Version 1.2 clicking on any anchor tag on the page causes the map to unload

Yes, I am also seeing that once I switch to the 1.2 api clicking on any anchor tag on the page causes the map to unload. Only in IE7, but all the links on my pages consistently cause this to happen.
Tuesday, December 02, 2008 10:23 AM by Michael Jenkins

# re: Version 1.2 of the ArcGIS JavaScript API released

@Kelly and Michael,

We have seen some issues with Anchor tags with Dojo 1.2 if you call a JavaScript function from the href element instead of the onclick element.

Change your anchor tag so that it does this...

<a href='#' onclick='showFeature(" + layerName + ".features[" + i + "]); return false;'>(show)</a>

Instead of this…

<a href='javascrit:showFeature(" + layerName + ".features[" + i + "]);'>(show)</a>

Jeremy

Wednesday, December 03, 2008 6:03 AM by Jeremy

# re: Version 1.2 of the ArcGIS JavaScript API released

@David, Make sure you can run the gp task in Services Directory outside of the JavaScript API. "callback=dojo.io.script.jsonp_dojoIoScript1._jsonpCallback%22%3E" Is the function that will get called when REST returns a successful response to the JS client. Jeremy
Wednesday, December 03, 2008 6:06 AM by Jeremy

# re: Version 1.2 of the ArcGIS JavaScript API released

On Nov 26 Abbid asked: Hi Is the graphics problem in 1.2 is removed? The problem was when you resize the map and then pan it, the graphics were not correctly shown. Please answer this question. I had experienced the same issue. Does anybody else experienced it? Is it solved in 1.2?
Wednesday, December 03, 2008 9:25 AM by Oscar

# re: Version 1.2 of the ArcGIS JavaScript API released

there's also an issue that version 1.2 introduced where fading does not work in ie6 anymore. Any ideas on why that is?
Wednesday, December 03, 2008 10:53 AM by steve

# re: Version 1.2 of the ArcGIS JavaScript API released

It would be great if there was a sample in 1.2 of  creating a dojox grid for query results, as in the prop owner notification sample.

Thursday, December 04, 2008 7:40 AM by tmellnik

# re: Version 1.2 of the ArcGIS JavaScript API released

@tmellnik-  This sample uses a Dojo 1.2 DataGrid: http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jssamples/find_map_datagrid.html

It uses a Find Task but a Query Task would be very similar to wire up.

You can click on a record in the grid to zoom to the parcel.

Monday, December 08, 2008 11:53 AM by sterlingdq

# re: Version 1.2 of the ArcGIS JavaScript API released

how can i use this API in others web site w/o much coding. i can see two options

1. Develop own MyMap.JS file, deployed on my server, add <SCRIPT src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=1.2" type=text/javascript mce_src="http://serverapi.arcgisonline.com/jsapi/arcgis/?v=1.2"></SCRIPT> in head, call one function from "MyMap.js" file. Map with functions will get loaded in user-defined div

2. developed own HTML page, access the page in others web site using <IFRAME></IFRAME>

now which will be better as far as performance is concern

Saturday, January 17, 2009 10:36 AM by Shra

Leave a Comment

(required) 
required 
(required)