<< September, 2008 >>
SMTWTFS
123456
78910111213
14151617181920
21222324252627
282930
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

30 May 2006
ArcIMS and Google Maps version 2
I was able to dive in and play with Google Maps version two last week.  There are quite a few changes between version one and version two.  Basic things like map type name changes, reversal of the zoom level (0 is the coarsest now), changes to the GLatLng class, numerous method name changes, and addition of an overview map control.   One of the key things for us tile replacers is that most of the undocumented functions available in version one have been changed or are no longer supported. 

Version two actually makes it easier to create new tiles and integrate (merge) them with eachother or with the data that Google provides.  Take the following code...

    // Create tile layers
    // Kansas orthos.  2002 1meter Ortho Photos from the Kansas Data Access and Support Center
    var ks_orthos= new GTileLayer(copycol,1,17);
    ks_orthos.myBaseURL='http://geoportal.kgs.ku.edu/googlemaps/arcims/arcims_image.cfm?servername=geoportal.kgs.ku.edu&mapservice=ks_ImageViewer&layer_id=1,0&cache_name=ks2002orthos';
    ks_orthos.getTileUrl=CustomGetTileUrl;

Here we have created a new GTileLayer (copyright, minscale, maxscale), assigned the base url to the tile object, called the custom javascript file that converts the Google Map request to a geographic bounding box.  The custom javascript file then sets the url to my service that takes the parameters and either pulls from a cached tile or generates the map on the fly (as Mercator projection). 

The really cool thing about how the Google Maps two is built is that you can add multiple GTileLayers to a custom GMapType.

    var layer5=[lawr_orthos,G_HYBRID_MAP.getTileLayers()[1],parcels];
    var lwOrthoParcel = new GMapType(layer5, G_SATELLITE_MAP.getProjection(), "Lawrence Parcels Ortho", G_SATELLITE_MAP);
    map.addMapType(lwOrthoHybrid);

So here I am adding local orthos from the city of Lawrence (bottom), Google hybrid road maps, and parcels from the city of lawrence (top).  Not a bad way to integrate multiple datasource into one view.  Check it out...

googlemaps1

So view the source code and give it a try. 

http://geoportal.kgs.ku.edu/googlemaps2/gm_arcims_ex.html

Thanks to John Deck for reworking the overlay code to work with Gooogle Maps version two.

Questions/comments?

Jeremy
Posted by jbartley at 5:04 PM | Link | 6 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
We're looking to dive back into GMaps development now that custom tiles are formally part of the API and easier to implement.

Thanks for the tips!


BT
Posted by Brian Timoney on May 30, 2006 at 7:28 PM

Re: ArcIMS and Google Maps version 2
I've been playing with John Deck's overlay code and plugging data into Geoserver. It works quite well. but uncached tiles take forever to render. I'm stalled for the time being because I want to do more with custom SLDs, but I don't know the (average) scale denominators corresponding to the different GMap zoom levels. Bueller?
Posted by Seth on May 30, 2006 at 10:01 PM

Re: ArcIMS and Google Maps version 2
For most circumstances, if you don't use cached data it is pointless to do this kind of customization with Google Maps (or any of the others for that matter).

That is not to say that how you are storing your data and using it within your applications is not useful. The large amount of tiling that the Google/Yahoo's of the world use is good for them, but is a heavy burden for most organizations to try and pass data to. Frankly it is more efficient to reuqest one image (or four if you want seamless panning) of an area from a properly configured data source (that is what pyramids are for with rasters!) than it is to break that same image up into 35 tiles on the fly.

Now the parcel data above is not cached and is coming in real time. That data changes weekly and it is pointless to build and mangage a chaching system for something that changes that often.

Try this example for one that uses a non-cached map service to plot thousands of points on top of Google Maps. It is fairly fast and is more efficient that sending a large xml/kml file to the Google Maps engine for plotting.

http://geoportal.kgs.ku.edu/googlemaps2/earthchem_cachev2_2.cfm

You can also select and query the samples too...

Jeremy
Posted by jbartley on May 31, 2006 at 2:02 PM

Re: ArcIMS and Google Maps version 2
Motivated from the performance of latest JS example I'd like to ask for the meaning of some params of the baseUrl:

Is servername=server and mapservice=layername and layer_id=layerid comparing JS and XML search results attributes?

Are tiles with transparency possible as gif and png for all layers. If not, how to determine?

Is transparency only uncached possible?

Is cache_name a friendly name ?

Are there hidden params like background color ?

Many thanks.
Posted by noiv on June 7, 2006 at 12:30 PM

Re: ArcIMS and Google Maps version 2
The url parameters are required for input into the service that I wrote that generates a map from an ArcIMS server/service for particular layers. The service takes that information along with the information that the ArcIMS js function creates (from the Google Map parameters for each tile) and generates the image for the particular tile. See here for more information.

http://www.mapdex.org/blog/1/2005/10/Using-ArcIMS-to-build-Google-Map-tiles.cfm

PNG works for all ArcIMS services, but transparency is not honored with PNGs with Internet Explorer. Transparent GIF files work in all browsers, but some ArcIMS sites to not have the appropriate gif license to generate the images.

Cache_name is really my application. I take that cache name and use that as a parameter to name the tile after I create it for the first time. If you want to implement the cache on the fly methodology for your site you should move that service to your application server (the link above has the code, rewriting it in another language should be straightforward).

There are no hidden parameters.

Good luck!

Jeremy
Posted by jbartley on June 8, 2006 at 8:43 AM

Re: ArcIMS and Google Maps version 2
Speaking of rewriting it to another language... I have translated the arcims_image.cfm and coord_conversion.cfc to classic ASP. I'm no cracker-jack programmer, so I'm sure it could be improved, but it is functional. I will provide the code to you Jeremy so you can post it (thanks for your help in getting it going too!). Those of you interested in seeing it in action can go to http://ims.wingis.org/gmap/arcims_GMapCache.htm . I don't know how long it will live there, but you can take a look for now.
Posted by cmcgarry on June 20, 2006 at 10:55 AM

Commenting has been disabled for this entry.