Feeds:
Posts
Comments

After seeing a post about going from ArcGIS Server to Google Maps ,via GeoJason, I decided to write up a quick blurb about going the other way…

the why…

When I came back after spending a week eating Thai & Indian food @ the 2010 ESRI Developer’s Summit, I pretty much had my mind made up.  From talking with other devs and seeing what’s coming (now available in beta), it was a very easy decision.  Some of the those features:

  • Feature Layers/Editing
    • You get a bunch of pre-defined dijits if you’re down with dojo, plus, it’s relatively easy to deconstruct them and make your own editors/templates/etc.
  • Time-Aware …ness?
    • Another pre-defined slider dijit that lets you alter time.  This is a solid addition and will become even better when they get a decent css styling scheme.  Am I the only one who thinks the dojo css is stuck in the late-90s?  Strange, it being a time-slider and all..
  • Querying Stand-Alone Tables
    • Pretty solid enhancement if you’re ok with storing those tables in a map service.
  • Network Analyst
    • Since we are primarily an ESRI-shop, packing up some core Network Analyst tools to run on the client is nice.  No more crazy GP models and dealing with random 500 error responses.
  • Much more …

Bringing this around to the topic at hand, the main point is that the ESRI ArcGIS Server Javascript for Google Maps (and Bing Maps) will not support ANY of these enhancements at version 2.0.  Pret-ty lame, Milhouse.  I’m a little surprised that there hasn’t been more discussion on this.

*One other point to note is that Google does not allow direct access to their tiled images.  This would make it impossible (legally-speaking) to integrate Google with version 2.0.  It does, however, open up Bing as a potential suitor seeing as they do allow the aforementioned access.  DECISIONS TO MAKE!

the bad…

So giving up Google has some bad side effects.  All obvious and echoed from GeoJason, but still worth repeating:

  • Base-maps that are visually pleasing and familiar to users
  • Overall speed and quick updates
    • I’m not sure how frequent ESRI makes updates to their cached base maps or if anyone has asked them.  It’d probably be good to know.
  • ESRI JavaScript = Dojo
    • I started with jQuery and am now using ExtJS so my experience with Dojo is still growing,  however, I normally don’t like to be stuck in one dev box.
  • Community Support
    • Definitely agree with GeoJason on this one.  The ESRI online dev community needs to get movin’.  The new forums are a good start but I’d like to see a more open style of bug reporting & enhancement requests.  I know the ArcGIS Ideas site launched recently and that has serious potential but one site to handle EVERYTHING that is even remotely ArcGIS-related seems a bit overwhelming.  Developers need a simple, clean UI to track bugs and “vote” on enhancements or features.  I don’t see this yet from the Ideas site.

so…what?

It’s all about what works best for your setup.  We are an ESRI-shop so using ArcGIS Server makes sense.  We have some pretty heavy data needs and requirements so querying related tables and/or stand alone tables is a huge plus.  Should an update to the Google Maps Extension come up soon, I’ll definitely take another look but for now, it’s all about 2.0.

I figure it’s about time to take this blog thing seriously.  After all, if we don’t give blogging a chance, it may not make it.

Anyway, geo-nerds will have another home and hopefully I’ll be able to contribute something to the #geoglobaldomination I’ve been hearing so much about lately.

Be on the look out for some serious ArcGIS Server JavaScript related posts and for the time being, I’ll be taking requests for anyone who needs some help in the afore mentioned discipline.

Take a look at my original posts and have a few laughs.  It was when the .NET ADF was all I knew!  *tear*

code on.

Well, here is Part I of using the Polygon Tool in the Web ADF that I promised a while ago. As you can see from the screen shot below, this tool will let the user create a polygon area and retrieve some stats about the area they defined. Let me state right away that I don’t work for ESRI and by using this code you do so at your own risk.

polyAverageWithGraphics

Anyway, let’s get to it shall we?

In my mock up AGS App shown in the screenshot I’m using all ESRI base data. The points layer is a Zip Codes feature class with some random attributes such as population, population per SQMI, SQMI, etc. I used this layer because it was the first one I saw that I could use for computing some averages. You can use any layer (obviously..), just make the necessary changes.

I have two (2) services in my MapResourceManager: 1. “Graphics” (in Memory Layer) 2. “BaseMap” (pooled service created from ESRI Base Data) . We’ll use the graphics layer to return a graphic of what the user defined as their polygon area. You can go through the attached code (clsCreateGraphicPoly) and change the color, transparency, etc. of the graphic that is returned.

As for the code, here are the bullet points:

  • First we add the custom Polygon tool to the toolbar in the code view of the Default.aspx page
    • If you are using the Web Mapping Template in VS 2005 you can use the “measure-polygon.png” already included in the Images folder.
    • You may also need to resize the toolbar for our new tool to show up properly
    • Here is the HTML for the Polygon tool:

    <esri:Tool DefaultImage=”images/measure-poly.png” JavaScriptFile=”" HoverImage=”images/measure-poly.png” ClientAction=”Polygon” ToolTip=”Polygon” SelectedImage=”images/measure-poly.png” Name=”Polygon” Text=”Polygon”></esri:Tool>

    • Note that ClientAction=”Polygon”
  • Now we can start adding code when the Map1_Polygon event is fired in the Default.aspx.vb/cs
    • I think I’ve commented the code fairly well so I’m not going to go through it line by line
    • What we basically do is first create the graphic (as an ElementGraphicsLayer) and add it to the Graphics resource
    • Then we send the map points (from the user created polygon) into a function that uses a SpatialFilter to query out records and perform calculations on them
    • Once the calculations are returned from the function, we then automatically expand the Results Panel and use some of the Web ADF javascript functions to change the innerHTML of the panel to our averages

Pretty cool huh? Maybe? A little? Well I think so.

Code is below. Sorry about the word .docs…I think it’s the only way I can attach it. Still new to wordpress…

Oh and why Wisconsin in the screenshot?? Because Wisconsin is awesome.

Leave some comments!!

-Adam

clsCreateGraphicPolyDOC

clsPolyAverageDOC

map1_polygonDOC

Oh yeah…

I forgot I had started a blog there for a second…

Actually just swamped with real-world work. I promise by next week sometime some fun with using a polygon tool to select things on a map and graphics and so on…

Anyway. Sorry for the lack of well, anything recently. I’ll get on that.

-Adam

ESRI Data & Maps 2007 Update

ESRI is offering an update to their 2007 Data & Maps. Pretty quick turn around time, I received mine in less than a week.

Hopefully another post involving the polygon tool and graphics by tomorrow.

-Adam

Byyyah!

(photo courtesy of james’ blog)

Let’s start off slow. 

This one took me a while to figure out when it first came up.  Looking back now I can’t believe it gave me problems.  What I really can’t believe is that ESRI Tech Support couldn’t help me.  Don’t get me wrong, those guys have come through in the past but this seems so remedial…Anyway.

Let’s say you have an application or two up and running with AGS.  And you, as a good GIS Developer, follow the company policy to change your password when prompted.  After doing so, however, your AGS apps no longer work!  The most likely cause of the problem in this scenario is that the application only recognizes your initial Identity that you used when setting up AGS.

One remedy:  modify the web.config file in your application.  This can be done by double-clicking on the web.config file in the Solution Explorer of Visual Studio (or VWD).  Once it opens, scroll down to just after the part that is commented out under the <system.web> tag.  Then add the following code:

<identity impersonate=trueuserName=domain\username password=password/>

You will obviously need to fill in the username and password with your own credentials. Image shown below:
webconfig.jpg

Hopefully your app will shoot back up and you’ll be back in business plotting those local squirrel attacks.  People think you’re paranoid but believe me, it’s not paranoia if they really are out to get you.

-Adam

Welcome to another GIS-related blog. I figure since everyone has one, I’d better get in on the action before their brother gets one too. I plan on using this blog to discuss fairly simple topics regarding ESRI’s ArcGIS Server (.NET). If you actually care who I am then go ahead and check out the About tab up there. If not then ok. I can handle that too.

I plan on posting some simple things that has tripped me up in the past along with things that are currently sticking their legs out along the GIS development pathway. Basically, anything I want and/or get suggestions for.

So yeah, let’s do this huh?

Follow

Get every new post delivered to your Inbox.