Select to view content in your preferred language

converting a google map project to arcGIS project

916
4
07-25-2012 07:03 AM
TravisD
Emerging Contributor
Hi, I've been giving a project to work on which consists of converting a Google maps API service to an ArcGIS JavaScript API service.

I am familiar with JavaScript, but by no means am I an expert so I was wondering if anyone would be able to help me get started on this. Such as what are some common things that would generally be troublesome when converting.


Thanks
0 Kudos
4 Replies
StephenLead
Honored Contributor
I'd start by playing around with the Samples page.

Then build a basic map based on the ArcGIS API, and gradually add the functionality you need by reading the doco for that function.

Having a working Google Maps example should help you to port across the functionality piecemeal, since you'll know what you need to emulate.
0 Kudos
TravisD
Emerging Contributor
So you think it would be easier to start new and gradually add in the different sections rather than just editing what I already have?

I ask this because it is a decently large amount of code (~1100 lines) and not all of it is part of the Google API with some of it being AJAX and such.
0 Kudos
StephenLead
Honored Contributor
Hi Travis,

It's hard to give specific advice without seeing your site. But my experience in doing something similar (I reproduced an ArcGIS JS API site in OpenLayers) was to isolate the parts of my code which were specific to ArcGIS, and replicate them in OpenLayers.

Like you I had a lot of non-ArcGIS code which I could re-use - the HTML and CSS were unchanged, and other functions like changing basemaps had an equivalent method in OpenLayers.

Once you're familiar with how the ArcGIS JS API works (by playing with the samples), you should have a better feel for the changes you'll need to make.

Eg, if your current site adds a polygon overlay to Google Maps, figure out how to do the same thing in ArcGIS. Same with changing basemaps, zooming to a bookmark, adding a KML layer, etc.

Cheers,
Steve
0 Kudos
TravisD
Emerging Contributor
That sounds great. Thanks for the help.
0 Kudos