<?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 Re: Check MapService Availability in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/check-mapservice-availability/m-p/223288#M20748</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;when you creates an object for layer, you can use build-in method onError - its tests if service is avaliable&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var baseMap = new esri.layers.ArcGISDynamicMapServiceLayer('http://youservice', {
 id : 'layerBaseMap'
});
baseMap.onError = function(error) {
 console.log(error);
};
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but it only launch when the service link is correct link to your arcgis server. If you add wrong address to whole arcgis server it will NOT fires up.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 10:51:42 GMT</pubDate>
    <dc:creator>Krystianp</dc:creator>
    <dc:date>2021-12-11T10:51:42Z</dc:date>
    <item>
      <title>Check MapService Availability</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/check-mapservice-availability/m-p/223287#M20747</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi guys,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; before to start the user processing on the map in a web application, i.e. loading panels, features, connecting events, etc..., I would like to check if the mapService used within the application is available and working. What I want is to set up an error handling procedure.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How to do this?Is there a specific function or attribute or request in the API to do this?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Oct 2012 06:56:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/check-mapservice-availability/m-p/223287#M20747</guid>
      <dc:creator>demdeberanz</dc:creator>
      <dc:date>2012-10-04T06:56:01Z</dc:date>
    </item>
    <item>
      <title>Re: Check MapService Availability</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/check-mapservice-availability/m-p/223288#M20748</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;when you creates an object for layer, you can use build-in method onError - its tests if service is avaliable&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;for example:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
var baseMap = new esri.layers.ArcGISDynamicMapServiceLayer('http://youservice', {
 id : 'layerBaseMap'
});
baseMap.onError = function(error) {
 console.log(error);
};
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;EDIT: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;but it only launch when the service link is correct link to your arcgis server. If you add wrong address to whole arcgis server it will NOT fires up.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 10:51:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/check-mapservice-availability/m-p/223288#M20748</guid>
      <dc:creator>Krystianp</dc:creator>
      <dc:date>2021-12-11T10:51:42Z</dc:date>
    </item>
  </channel>
</rss>

