Select to view content in your preferred language

Map Services won't display in Google API  but work fine in our Flex Application

823
4
09-16-2010 04:51 PM
CarmenDurham
Frequent Contributor
Help!  This has got to be easy - but I have been programming in Flex and needed to do javascript to embed a simple map into a website.

We have two map services we want to display in a VERY simple app. One is a race route and the other is a lead vehicle location (through AVL - but set up as a map service).  Both work fine in a Flex application - can view while on City's network and off city's network from IE, Firefox, etc.

But the simple javascript app won't display the map services from anywhere outside the City's network.  They work great while I am on the City's network.   The google key matches one that we use for a StreetMap viewer within Flex so we know it is good for that internet server.

Off City's network - I can even view the rest services "using javascript" within the Rest Services Directory and they display fine individually.

Sorry if this is such an easy question - but I can't find the answer and we needed to have it working by Friday noon! 

http://gis.greenvillesc.gov/pmt.html  is an example of what we have.

Thanks,
Carmen
0 Kudos
4 Replies
LeoDonahue
Deactivated User
I was not able to get a token.  Firefox indicates that the "server - citygisweb" was not found when using this URL:  https://citygisweb/ArcGIS/tokens/gettoken.html

It doesn't appear that you are passing dynmapcallback anything.  Are you supposed to?
0 Kudos
StephenLead
Honored Contributor
Hi Carmen,

I haven't used AGS with Google Maps v2 API so I'm not positive, but I'd guess that the API key is incorrect or invalid.

http://google-maps-utility-library-v3.googlecode.com/svn/trunk/arcgislink/docs/examples.html contains instructions on using AGS with Google Maps v3 API, which avoids the need for the API key.

Good luck,
Steve
0 Kudos
NianweiLiu
Frequent Contributor
You are right, it is an easy one.
The map service you setup used http://citygisweb/arcgisoutput/ as output location. You should change that to something like http://gis.greenvillesc.gov/arcgisoutout in arccatalog.
0 Kudos
CarmenDurham
Frequent Contributor
Thanks -- This was the fix.  Make sure you have connected to the admin connection in ArcCatalog. Right-click and choose "server properties" and go to the directories tab and change it there.  If you haven't actually connected to the service and just right click on the server while its disconnected, you will not get these options. Which is what I must have done at first because I wasn't seeing the server properties. 

I actually made the change within ArcServer Manager because I found the option there after not seeing it in ArcCatalog.

You will have to restart the service before the .cfg file is changed for that service. 

Carmen
0 Kudos