<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Set service URL for KML layers? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-service-url-for-kml-layers/m-p/56575#M4970</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can you set the service URL for KML layers?&amp;nbsp; The default is &lt;A class="jive-link-external-small" href="http://utility.arcgis.com/sharing/kml" rel="nofollow" target="_blank"&gt;http://utility.arcgis.com/sharing/kml&lt;/A&gt;&lt;SPAN&gt;, but I want to have it use our local Portal for ArcGIS (i.e. &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://myserver/arcgis/sharing/kml" rel="nofollow" target="_blank"&gt;https://myserver/arcgis/sharing/kml&lt;/A&gt;&lt;SPAN&gt;).&amp;nbsp; The Flex API had a serviceURL property in the KML layer class:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A class="jive-link-external-small" href="https://developers.arcgis.com/flex/api-reference/com/esri/ags/layers/KMLLayer.html#serviceURL" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/flex/api-reference/com/esri/ags/layers/KMLLayer.html#serviceURL&lt;/A&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, there is no such property in the JavaScript API.&amp;nbsp; I also looked in esri.config and arcgis.utils, but I don't see any corresponding property in those, either.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Aug 2014 22:21:14 GMT</pubDate>
    <dc:creator>MichaelLacy</dc:creator>
    <dc:date>2014-08-26T22:21:14Z</dc:date>
    <item>
      <title>Set service URL for KML layers?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-service-url-for-kml-layers/m-p/56575#M4970</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How can you set the service URL for KML layers?&amp;nbsp; The default is &lt;A class="jive-link-external-small" href="http://utility.arcgis.com/sharing/kml" rel="nofollow" target="_blank"&gt;http://utility.arcgis.com/sharing/kml&lt;/A&gt;&lt;SPAN&gt;, but I want to have it use our local Portal for ArcGIS (i.e. &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://myserver/arcgis/sharing/kml" rel="nofollow" target="_blank"&gt;https://myserver/arcgis/sharing/kml&lt;/A&gt;&lt;SPAN&gt;).&amp;nbsp; The Flex API had a serviceURL property in the KML layer class:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;A class="jive-link-external-small" href="https://developers.arcgis.com/flex/api-reference/com/esri/ags/layers/KMLLayer.html#serviceURL" rel="nofollow" target="_blank"&gt;https://developers.arcgis.com/flex/api-reference/com/esri/ags/layers/KMLLayer.html#serviceURL&lt;/A&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, there is no such property in the JavaScript API.&amp;nbsp; I also looked in esri.config and arcgis.utils, but I don't see any corresponding property in those, either.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Aug 2014 22:21:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-service-url-for-kml-layers/m-p/56575#M4970</guid>
      <dc:creator>MichaelLacy</dc:creator>
      <dc:date>2014-08-26T22:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Set service URL for KML layers?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-service-url-for-kml-layers/m-p/56576#M4971</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are you looking for something similar to this sample?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/javascript/jssamples/layers_kml.html" title="https://developers.arcgis.com/javascript/jssamples/layers_kml.html"&gt;KML | ArcGIS API for JavaScript&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 07:00:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-service-url-for-kml-layers/m-p/56576#M4971</guid>
      <dc:creator>RiyasDeen</dc:creator>
      <dc:date>2014-08-27T07:00:48Z</dc:date>
    </item>
    <item>
      <title>Re: Set service URL for KML layers?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-service-url-for-kml-layers/m-p/56577#M4972</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Riyas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply.&amp;nbsp; I am loading the KML layer as in the example you cited.&amp;nbsp; However, I want to change the KML service that is used to convert the KML into features.&amp;nbsp; The example is just using the default service, and I haven't found a way to change it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 13:56:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-service-url-for-kml-layers/m-p/56577#M4972</guid>
      <dc:creator>MichaelLacy</dc:creator>
      <dc:date>2014-08-27T13:56:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set service URL for KML layers?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-service-url-for-kml-layers/m-p/56578#M4973</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What happens when you replace &lt;SPAN class="str" style="color: #999999;"&gt;&lt;A class="jive-link-external-small" href="http://dl.dropbox.com/u/2654618/kml/Wyoming.kml" rel="nofollow" target="_blank"&gt;http://dl.dropbox.com/u/2654618/kml/Wyoming.kml&lt;/A&gt;&lt;/SPAN&gt; with your URL?&lt;/P&gt;&lt;P&gt;If your kml is a public url please share. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;One thing I noticed is your sample url has &lt;STRONG&gt;https&lt;/STRONG&gt;, if it is secured then you should use credential.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 14:17:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-service-url-for-kml-layers/m-p/56578#M4973</guid>
      <dc:creator>RiyasDeen</dc:creator>
      <dc:date>2014-08-27T14:17:50Z</dc:date>
    </item>
    <item>
      <title>Re: Set service URL for KML layers?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-service-url-for-kml-layers/m-p/56579#M4974</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The KML URL is irrelevant.&amp;nbsp; I want to change the URL for the KML service that converts the KML into features.&amp;nbsp; When you create a KML layer, the KML URL is passed to the service, which then downloads and parses the KML, converts it into features, and returns a JSON string to the client.&amp;nbsp; By default, it uses the ESRI service at &lt;A href="http://utility.arcgis.com/sharing/kml"&gt;http://utility.arcgis.com/sharing/kml&lt;/A&gt;, but I want to know if it's possible to change that and have it use our own.&amp;nbsp; The motivation is that (in theory), our service would be able to handle URLs on our internal servers that the ESRI service cannot access.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 15:18:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-service-url-for-kml-layers/m-p/56579#M4974</guid>
      <dc:creator>MichaelLacy</dc:creator>
      <dc:date>2014-08-27T15:18:43Z</dc:date>
    </item>
    <item>
      <title>Re: Set service URL for KML layers?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-service-url-for-kml-layers/m-p/56580#M4975</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will have to override &lt;STRONG&gt;esri.layers.KMLLayer &lt;/STRONG&gt;with your own custom class. set your service url for serviceUrl property. your class will look something like below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14091535335926424 jive_text_macro" jivemacro_uid="_14091535335926424" modifiedtitle="true"&gt;
&lt;P&gt;var myKmlLayer = declare(esri.layers.KMLLayer,{&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; serviceUrl: "&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="https://myserver/arcgis/sharing/kml" rel="nofollow" target="_blank"&gt;https://myserver/arcgis/sharing/kml&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;});&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;var kmlLayer = new myKmlLayer();&lt;/P&gt;
&lt;P&gt;map.addLayer(kmlLayer)&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Reference: &lt;A href="http://dojotoolkit.org/documentation/tutorials/1.9/declare/" title="http://dojotoolkit.org/documentation/tutorials/1.9/declare/"&gt;Classy JavaScript with dojo/_base/declare - The Dojo Toolkit&lt;/A&gt;&amp;nbsp; might help further.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 15:37:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-service-url-for-kml-layers/m-p/56580#M4975</guid>
      <dc:creator>RiyasDeen</dc:creator>
      <dc:date>2014-08-27T15:37:03Z</dc:date>
    </item>
    <item>
      <title>Re: Set service URL for KML layers?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-service-url-for-kml-layers/m-p/56581#M4976</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Riyas,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think that will work.&amp;nbsp; I say "think", because there are some security issues on our server (unrelated to the JavaScript API) that are preventing it from actually downloading the KML.&amp;nbsp; However, looking at it in Fiddler, it *is* accessing the KML service on our server now, instead of the default ESRI service.&amp;nbsp; Thanks for your help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mike&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 Aug 2014 19:12:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/set-service-url-for-kml-layers/m-p/56581#M4976</guid>
      <dc:creator>MichaelLacy</dc:creator>
      <dc:date>2014-08-27T19:12:54Z</dc:date>
    </item>
  </channel>
</rss>

