[GIS] Problem loading KMZ in Google Earth API

arcgis-10.0google earthjavascriptkmlkmz

I am building a Google Earth API application using a map service (using ArcGIS Server 10) that has KMZ/KML capabilities. For some reason, I am able to access the KMZ layer within our network. But, does not work outside our network.

I am loading the KMZ file using the fetchKML method:
google.earth.fetchKml(ge, IMG_URL_TO_LOAD, finished_and_visible);

I am using IIS7 as the web server and have added MIME types for both KMZ and KML.

Any suggestions to what might be the problem?

Best Answer

When constructing a custom KML network link using Manager, the KMZ file is automatically copied to your virtual root directory and is available at http:/// /kml for everyone to access. Simply open this location in a browser to view all the custom KML Network Links for your server.

enter image description here

for ArcGIS 10 Server

Click the Services tab in Manager.
Click KML Network Links.
Click Create Network Link.
Specify the name of your link. The name will be embedded in the Name tag in the file and will be used as the file name. Optionally, you can provide a short and long description. The long description allows embedded HTML tags and URLs.

When you've finished typing names and descriptions, click Next.
Choose the map service for which you want to create a network link. Map services for which you have disabled the KML capability are not available.
Check the layers from the service that you want to include in your network link. By default, all layers are checked.
Specify how the layers should draw. The first two options will return rasterized representations of your vector features. The third option will return the actual vectors. Once you've finished setting this property, click Next.
Set the Refresh, View, and Hostname options according to the way you want the network link to behave. The default options are sufficient for many network links.
Optionally, use Google Earth to edit the link, enhance its properties, or embed it within a new link. You can save the enhanced link as KMZ, then use the steps below to publish it back to your server.

http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Creating_a_KML_network_link_from_a_map_service/005300000038000000/

How can you find the URL for a particular service?

enter image description here http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//005300000036000000