James Fee GIS Blog

Geospatial Technology, Web Mapping and Spatial Services

James Fee GIS Blog header image 2

Simple Layer List From the ArcGIS Server Using the JavaScript API

July 16th, 2008 · 11 Comments · GIS

Jason Harris of ROK Technologies describes how easy it is to work with the new ESRI ArcGIS JavaScript API.

I thought it was time to put my money where my mouth has been these past couple of months. I have been yapping about how easy the new ArcGIS javascript api is to work with, so I thought I’d share a very simple example.

The ease and speed of developing with the JavaScript/REST API at 9.3 will probably pull many developers back into ESRI who have left over the WebADF. I predicted that we’d see many ArcIMS developers finally move off of working with those wacky AXL XML files and to a very RESTful process.

Careful when you grab it though, rocks may still fall on your head

Even Indiana Gilles likes what ESRI has done

Speaking of AXL being a PITA, ESRI’s REST[ful] API uses JSON which in my humble opinion is enough reason to switch off of ArcIMS, I noticed today that Safe Software is now supporting GeoJSON 1.0 in FME. ESRI isn’t supporting GeoJSON with ArcGIS Server, but maybe they will in the future. JSON with ArcGIS Server REST[ful] API is a least a step in the right direction.



Tags: ······

11 responses so far ↓

  • 1 Sean Gorman // Jul 16, 2008 at 10:15 am

    Maybe I am missing something, but the output of the demo did not exactly blow my socks off:

    http://maps.roktech.net/demo/layerlist.cfm

    The drive time generator on the ESRI site was more impressive, but are folks aware of anything that shows off the power of what is possible?

  • 2 ArnoldW // Jul 16, 2008 at 10:23 am

    Sean, I can’t speak for others but…

    The “mashups” that most people have taken for granted used to require hours of work for ESRI developers. This simple example (yes it is simple) highlights the nightmare we used to have to deal with. To display layers like that with ArcIMS would have required tons of work.

    Those who haven’t known the pain of the WebADF and the ActiveX connector won’t understand what we’ve gone through.

    It isn’t the demo itself that is impressive, it is the fact that it is a couple lines of JavaScript code.

  • 3 Sean Gorman // Jul 16, 2008 at 10:28 am

    Good point on the simplicity from the last generation of technology. I guess my question is if you look at this without an ESRI perspective what is the big Ah Ha. Since the consumer of these services are not going to be GIS folks what is going to differentiate it. Seems like there is lots of potential but would be great to see some examples.

  • 4 Adam Conner // Jul 16, 2008 at 11:36 am

    Sean,
    None of the example so far are full blow mapping apps, but the code gallery gives a glimpse of different things that can be done.

    http://resources.esri.com/arcgisserver/apis/javascript/arcgis/index.cfm?fa=codeGallery

    The big Ah Ha is geoprocessing, that is what differentiates this from the more consumer oriented API’s.

  • 5 Sean Gorman // Jul 16, 2008 at 12:00 pm

    Many thanks - that was what I’d been hoping to see. I thought the store locator and earthquake population querying were impressive examples.

    http://mapapps.esri.com/serverdemos/siteselection/index.html

    http://serverx.esri.com/arcgisjavascriptapi/codegallery/EarthquakePopulation.html

    Those two seemed the best I’ve seen of showing how the API allows you to exceed current mashup implementations. It will be interesting to see how complex an application can become.

    Has anyone heard the extent to which these apps can scale to handle web scale traffic?

  • 6 Donny V // Jul 16, 2008 at 12:52 pm

    The Javascript API is very impressive but from a developer that has done development using the ActiveX connector I can see some problems with this.

    If anyone remembers, the ActiveX connector always seemed to be a little behind what was possible with ArcXML. I remember when ESRI talked about a .NET connector which was suppose to come out and how that would solve my .NET needs and have 100% of ArcXML capabilities. Well that never came out and the only thing we got was a simple .NET Link.

    I also can’t see my self building really big complicated sites with Javascript. It just pains me to think of not having an IDE to compile and debug the code. I know Visual Studio has an in process javascript debugger but it doesn’t come close to native C# or VB.NET development.

    I think maybe building a hybrid of the 2 may be a better fit. Using server side code to talk directly with Server using the REST API and than letting the Javascript API handle the map functions and graphics.

    At least now we have real options instead of the WebADF.

  • 7 bender // Jul 16, 2008 at 1:38 pm

    js-debugging (firebug, dragonfly) is obscene. web-adf is just obscure. let’s face it: whenever you create a webmapapp you are entering hades.

  • 8 Donny V // Jul 16, 2008 at 2:14 pm

    What would really make development a lot easier is if ESRI would come out with a map control for Silverlight…hint hint ;-)

  • 9 CarolQ // Jul 16, 2008 at 7:42 pm

    Where do you come up with these great graphics James? Your images just crack me up.

  • 10 David Stevenson // Jul 17, 2008 at 11:22 am

    We’ve been working with the JavaScript API and agree it is refreshing to work with. However, I think it is worth pointing out that for organizations wanting to build enterprise-level web-GIS applications that are carefully managed and integrated into SOAs, there are some trade-offs, and it would be ill-advised to look at these new offerings as some sort of panacea. While the JS API will allow increasingly sophisticated work, so will Web ADF become increasingly accessible to the average developer. The latter is important because Web ADF is valuable, unique technology for leveraging the broad power of ArcGIS Server in a server-side development model.

    The technologies can be complementary and better leveraged side-by-side; playing to the unique strengths of each as requirements dictate. At most of the types of organizations with whom we work, I anticipate a blend of the APIs and Web ADF in the future.

    In the meantime, I’m stoked that these APIs will help facilitate more ArcGIS Server success stories.

  • 11 ChrisW // Jul 19, 2008 at 8:53 am

    Re. Javascript IDEs - yes, coding and debugging JS is a real pain. However, you could try one of the plugins for Eclipse IDE to see if they’re any good. For example, the Standard version of MyEclipse (http://www.myeclipseide.com/) includes JS IDE plugins, and the Professional version claims to have a JS debugger too. I haven’t used these JS tools, but I’ve used MyEclipse from time to time for Java work and it’s not bad. It’s a subscription based bundle of Eclipse + lots of (mainly Java oriented) plug-ins. You pay around $30 a year for the Standard version, and $60 for the Professional version, and the subscription covers all the upgrades in that period. And you can still use any other third-party Eclipse plug-ins e.g. for Python etc.

Leave a Comment

Note: This post is over a month old. You may want to check later in this blog to see if there is new information relevant to your comment.