ArcGIS Runtime SDK for WPF - Library Reference
Url Property
See Also 
ESRI.ArcGIS.Client.Toolkit.DataSources Namespace > KmlLayer Class : Url Property

Gets or sets the Url to the KML document.

Syntax

Visual Basic (Declaration) 
Public Property Url As Uri
C# 
public Uri Url {get; set;}

Remarks

Accessing a KmlLayer is unique in that ArcGIS Server is not required to view geographic information. Since the KmlLayer is based upon a KML or KMZ file, all that is required is a web server to host the KML/KMZ file. NOTE: ArcGIS Server has the ability to host geographic web services created in ArcMap as native KML/KMZ files.

Developers who wish to test the KmlLayer functionality using KML/KMZ files locally on their development machine have the followings options:

Option #1: Developers can place a KML/KMZ file anywhere on the local hard drive and provide the file path as the KmlLayer.Url (example: Url="C:\TEST_KML_FILES\Test.kml").

Option #2: If the developer has installed a web server on the same computer as Visual Studio (for example: Internet Information Server (IIS)), then they can place the KML/KMZ file in an application directory of their local web server (i.e. http://localhost). Using this option has the additional requirements of:

  • Setting up the correct MIME type on the web server to handle KML/KMZ files
  • Adding a crossdomain.xml file to the root of the web server
  • Making use of a proxy to avoid Security Exception error messages

NOTE: WPF does not use proxies so the use of KmlLayer.ProxyUrl is not necessary (even though the local KML file may have resource links (i.e. http://) to locations outside of the local network).

Requirements

Target Platforms: Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows 7, Windows 8

See Also

© ESRI, Inc. All Rights Reserved.