<< October, 2008 >>
SMTWTFS
1234
567891011
12131415161718
19202122232425
262728293031
Search Blog

Recent Entries
Recent Comments
Re: A new beginning... (by Casey at 8/15 10:43 AM)
Re: A new beginning... (by Kirk Mower at 8/14 11:16 PM)
Re: A new beginning... (by jbartley at 7/27 10:25 AM)
Re: A new beginning... (by Brian Timoney at 7/26 4:12 PM)
Re: A new beginning... (by Dave at 7/26 1:50 PM)
Re: A new beginning... (by Steven Citron-Pousty at 7/26 1:04 PM)
Re: A new beginning... (by James Fee at 7/26 12:21 PM)
Re: A new beginning... (by Brian Flood at 7/26 12:12 PM)
Re: A new beginning... (by amber at 7/26 11:06 AM)
Re: ArcIMS and Google Maps version 2 for ASP (by rnrwang at 6/28 2:02 PM)
Categories
Archives
Photo Albums
RSS

Powered by
BlogCFM v1.11

21 June 2006
ArcIMS and Google Maps version 2 for ASP
This is why I like blogging...I find some WMS to Google Maps examples from people I don't know (Brian Flood, Just van den Broecke, John Deck, etc), apply their examples to my problem (a cache on the fly ArcIMS interface for Google Maps), and then somebody out of the blue rewrites my code from ColdFusion to classic ASP. 

Google Maps + Cached ArcIMS services


Awesome.  Chris McGarry from the City of Rockford, IL has done the work in translating my arcims_image.cfm and coord_conversion.cfc to classic ASP.  You can get the well documented code here.  And you can check the site out here.

Great job Chris!

Jeremy

Posted by jbartley at 2:09 PM | Link | 12 comments
Subscription Options

You are not logged in, so your subscription status for this entry is unknown. You can login or register here.

Re: ArcIMS and Google Maps version 2 for ASP
Can someone point me in the right direction to implement this ASP? I can see get arcims_GMapCache.htm running fine on my site position to my region of interest. But I'm not sure if ASP is working. I see tile generating in my ArcIMS output directory. But they are just gray. Is the problem related to coordinate system? Why is the coord_conversion from Lat-long to Mercator. Is Mercator the desired coodinate of our own ArcIMS service? Our is CA State Plane Zone 6. Should I apply the approprite coord code there? Any hints will be greately appreciated.
Posted by rnrwang on June 27, 2006 at 11:16 AM

Re: ArcIMS and Google Maps version 2 for ASP
Google Map tiles are in the Mercator projection. So you need to be able to take the lat-long bounding box passed in the url parameters and request data from your map service to be returned projected in the Mercator projection. I believe Chris has it set up to convert the lat-long to mercator and then use those coordinates to request the tile from ArcIMS. Experiment with a single url first to make sure your asp service is working correctly. If you use Firefox go to tools, page info, and then media to see the urls that Google Maps is requesting to your service.

Jeremy
Posted by jbartley on June 27, 2006 at 11:23 AM

Re: ArcIMS and Google Maps version 2 for ASP
Thanks Jermy. I was successful using your map services but not mine. So I know the ASP works. However, are there differences between calling ArcIMS ImageServer vs ImageServerArcMap? Thanks! No more questions.
Posted by rnrwang on June 27, 2006 at 12:55 PM

Re: ArcIMS and Google Maps version 2 for ASP
There shouldn't be a difference. You want to make sure you have your projection defined on all your layers in your service and that the map service has a valid projection identifier (filtercoordsys and featurecoordsys).

Jeremy
Posted by jbartley on June 27, 2006 at 3:57 PM

Re: ArcIMS and Google Maps version 2 for ASP
I'll echo what Jeremy posted regarding needing to set your projection for the map service layers. I am using an Image
ServerArcMap for both the tile generation and the coordinate conversion (I think the projection engines differ between ImageServer and ImageServerArcMap, but I could be mistaken). You can tell from the code that I don't explicity do any coordinate conversion from source data projection (Illinois State Plane, West, NAD 83) to Mercator. ArcIMS handles the reprojection with this code:

axl = axl & ""
axl = axl & ""

So, as long as the projection of your layer is defined, it will reproject it on-the-fly to Mercator (feel free to look up FILTERCOORDSYS on EDN to confirm).

Hope this helps,
Chris
Posted by cmcgarry on June 28, 2006 at 8:22 AM

Re: ArcIMS and Google Maps version 2 for ASP
Ummm... Let's try that again, this time without the greater than/less than symbols...

axl = axl & "FEATURECOORDSYS id=""54004"" "
axl = axl & "FILTERCOORDSYS id=""54004"" "

Also... I'm glad to hear that someone else is using the ASP code. Let me know if you need a hand with it.
Chris
Posted by cmcgarry on June 28, 2006 at 9:22 AM

Re: ArcIMS and Google Maps version 2 for ASP
Hi Chris. I'm pulling my hair out. I know I'm so close...
Like I said to Jeremy, I'm successful using services from the existing script. But I'm having a hell of a time using my service. I see tile created in the ArcIMS output directory, but they are just white imagery. Maybe you can see something I missed.

Here is my AXL


























Also, I'm noticing there are no file created in the cache directory path (directory_path = "d:/wwwroot/gmap/tiles/") when using my service.

But if I use the example
http://t-apps26/gmap/arcims_image.asp?servername=ims.wingis.org&mapservice=parcelMap&LAYER_ID=165&cache_name=orthos&image_type=jpg&BBOX=-89.110107421875,42.261049162113856,-89.09912109375,42.26917949243506&WIDTH=256&HEIGHT=256&X=8273&Y=12131&zoom=2&newzoom=15

I will have something returned to designated cache directory.

Any pointers will be greatly appreciated. Thanks!
Raymond
Posted by rnrwang on June 28, 2006 at 11:49 AM

Re: ArcIMS and Google Maps version 2 for ASP
Oops, I guess the post do not like actual XML. Let me remove the less than charac....

?xml version="1.0" encoding="UTF-8"?>

ARCXML version="1.1">
CONFIG>
ENVIRONMENT>
LOCALE country="US" language="en" variant="" />
UIFONT color="0,0,0" name="SansSerif" size="12" style="regular" />
SCREEN dpi="96" />
/ENVIRONMENT>
MAP>
PROPERTIES>
ENVELOPE minx="5995211.82377392" miny="2088211.803836242" maxx="6207796.77561764" maxy="2292317.227990168" name="Initial_Extent" />
MAPUNITS units="feet" />
FEATURECOORDSYS id="2230" />
FILTERCOORDSYS id="2230" />
/PROPERTIES>
WORKSPACES>
SDEWORKSPACE name="sde_ws-0" server="nbcdparcs01" instance="port:5152" database="" user="eagle" encrypted="true" password="WESBANGTENSQDBDPDE"/>
/WORKSPACES>
LAYER type="image" name="Eagle2004_1M" visible="true" id="Eagle2004">
DATASET name="eagle.EAGLE.EAGLE2004_1M.RASTER" type="image" workspace="sde_ws-0" />
/LAYER>
/MAP>
/CONFIG>
/ARCXML>
Posted by rnrwang on June 28, 2006 at 11:52 AM

Re: ArcIMS and Google Maps version 2 for ASP
Raymond...

Let me make sure I understand. You are getting an image of a white box in your ArcIMS output directory but not getting anything in your directory_path cache location? But if you use my map service & parameters you get a cached image in your directory_path (the way it should work), right?

Are you forming the Google Maps extension to the URL correctly using the arcims_GMv236.js script? I'm just wondering if you are getting the correct bounding box parameters (if they were wrong, it would make sense that you'd get a white box). I know I was also getting some odd results when I wasn't using an ImageServerArcMap for my coordinate conversion. For testing purposes, you can use mine in your ASP function:

' Service to be used for coordinate conversion... This is an ArcMap image service.
coordurl = "http://ims.wingis.org/servlet/com.esri.esrimap.Esrimap?ServiceName=parcelMap"

Let me know how this goes...
Chris
Posted by cmcgarry on June 28, 2006 at 12:23 PM

Re: ArcIMS and Google Maps version 2 for ASP
Hi Chris,
I simply changed var layer1=[orthos] to layer1=[parcels] and remove the comment marks for section relating to Winnebago County Parcels. The result for my extent in California, it makes sense to see white pages. But there are no tiles in my /gmap/tiles directory.

Also, FYI: when using my service, eventhough the tiles are white in my IMSoutput directory, on the webpage, it is simply gray, if I press Photo button again, it simply shows gray grid boxes with "x" on it, like it could not load any imagery. let me know if you are interested in troubleshoot off line, I understand if you choose not to. We all have work to do =) rwang@irvinecompany.com

Raymond
Posted by rnrwang on June 28, 2006 at 12:56 PM

Re: ArcIMS and Google Maps version 2 for ASP
Hey Raymond (and Chris!)

What is the name of your server, the name of your service, and the layer ids that you are querying?

Jeremy
Posted by jbartley on June 28, 2006 at 1:38 PM

Re: ArcIMS and Google Maps version 2 for ASP
Sorry Jeremy, the site is behind the firewall.... could that be the problem?
Posted by rnrwang on June 28, 2006 at 2:02 PM

Commenting has been disabled for this entry.