<?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: Graphics without a base map in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372345#M34544</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;excellent derek thanks for the answer and links&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;vvoovv if you feel like derek (Swingley) answered your question, please click the little check mark on the right side of his post to mark it as "answered"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 24 Aug 2012 16:17:05 GMT</pubDate>
    <dc:creator>JeffPace</dc:creator>
    <dc:date>2012-08-24T16:17:05Z</dc:date>
    <item>
      <title>Graphics without a base map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372335#M34534</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am unable to use graphics without a base map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It's written in the doc for Map.onLoad:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Fires when the first or base layer has been successfully added to the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So I do the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.connect(map,"onLoad", init);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var graphics = new esri.layers.GraphicsLayer();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.addLayer(graphics);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But I'm getting an error after map.addLayer(graphics):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Uncaught TypeError: Cannot read property '_surface' of null &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How can I use graphics without a base map?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Vladimir&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 09:34:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372335#M34534</guid>
      <dc:creator>VladimirElistratov</dc:creator>
      <dc:date>2012-08-24T09:34:37Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics without a base map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372336#M34535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am unable to use graphics without a base map.&lt;BR /&gt;&lt;BR /&gt;It's written in the doc for Map.onLoad:&lt;BR /&gt;Fires when the first or base layer has been successfully added to the map.&lt;BR /&gt;&lt;BR /&gt;So I do the following:&lt;BR /&gt;&lt;BR /&gt;dojo.connect(map,"onLoad", init);&lt;BR /&gt;var graphics = new esri.layers.GraphicsLayer();&lt;BR /&gt;map.addLayer(graphics);&lt;BR /&gt;&lt;BR /&gt;But I'm getting an error after map.addLayer(graphics):&lt;BR /&gt;Uncaught TypeError: Cannot read property '_surface' of null &lt;BR /&gt;&lt;BR /&gt;How can I use graphics without a base map?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Vladimir&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Off the top of my head, the first layer you add (i.e. the base layer) cannot be a graphics layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I don't know if this is documented anywhere or whether I'm 100% correct, perhaps someone from ESRI can confirm?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 11:32:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372336#M34535</guid>
      <dc:creator>__Rich_</dc:creator>
      <dc:date>2012-08-24T11:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics without a base map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372337#M34536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;How about adding a dummy non-graphics layer?.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;How to add a dummy non-graphics layer?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 11:37:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372337#M34536</guid>
      <dc:creator>VladimirElistratov</dc:creator>
      <dc:date>2012-08-24T11:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics without a base map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372338#M34537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;How to add a dummy non-graphics layer?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Add a different layer type that doesn't inherit from esri.layers.GraphicsLayer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Although, I wonder if this occurs if you add a esri.layers.FeatureLayer as your base layer?&amp;nbsp; Worth a try?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any reason why you don't want a 'normal' base layer?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 12:11:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372338#M34537</guid>
      <dc:creator>__Rich_</dc:creator>
      <dc:date>2012-08-24T12:11:46Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics without a base map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372339#M34538</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Just add layer from AGO (like the world basemap), then set the visibility off.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 12:12:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372339#M34538</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2012-08-24T12:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics without a base map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372340#M34539</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;jeff.pace:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You solution does works, e.g.:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;dojo.connect(map,"onLoad", init);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;SPAN&gt;var agoLayer = new esri.layers.ArcGISTiledMapServiceLayer("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer" rel="nofollow" target="_blank"&gt;http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer&lt;/A&gt;&lt;SPAN&gt;");&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;agoLayer.setVisibility(false);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.addLayer(agoLayer);&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, this looks like a kind of hack.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I hope, someone from ESRI comes to this thread to provide clarifications.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;geos_rfleet:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A base map is simply not need for my app.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 13:13:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372340#M34539</guid>
      <dc:creator>VladimirElistratov</dc:creator>
      <dc:date>2012-08-24T13:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics without a base map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372341#M34540</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Its definitely a hack, that's why i suggested it.&amp;nbsp; You should see my code &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Have you tried manually setting the spatial reference of the map after creating it? I know that is what happens when the first layer loads, so maybe that is all that is missing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 13:15:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372341#M34540</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2012-08-24T13:15:56Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics without a base map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372342#M34541</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;jeff.pace:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It looks like the spatial reference of the map is set to the spatial reference of the map's extent.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I checked this in the debugger&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 13:47:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372342#M34541</guid>
      <dc:creator>VladimirElistratov</dc:creator>
      <dc:date>2012-08-24T13:47:58Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics without a base map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372343#M34542</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;jeff.pace:&lt;BR /&gt;&lt;BR /&gt;It looks like the spatial reference of the map is set to the spatial reference of the map's extent.&lt;BR /&gt;I checked this in the debugger&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Ok, sounds like other stuff that the graphics layer is dependent on is not created in the map object until a layer is added.&amp;nbsp; Unfortunate in your scenario, but probably necessary in general.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 13:58:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372343#M34542</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2012-08-24T13:58:40Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics without a base map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372344#M34543</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It is not currently possible to use only a graphics layer (or a feature layer in your map). A dynamic or tiled map service layer is required. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What you can do is subclass dynamic map service layer and override getImageUrl so that it does nothing. This way you end up with an empty layer, and you can use whatever spatial reference you like. This is shown in the &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/javascript/arcgis/help/jshelp/intro_javascript_classes.htm" rel="nofollow" target="_blank"&gt;writing a class conceptual help topic&lt;/A&gt;&lt;SPAN&gt; and here's an example of it:&amp;nbsp; &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://servicesbeta.esri.com/demos/using-classes-with-javascript/legacy/empty_basemap.html" rel="nofollow" target="_blank"&gt;http://servicesbeta.esri.com/demos/using-classes-with-javascript/legacy/empty_basemap.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 14:45:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372344#M34543</guid>
      <dc:creator>derekswingley1</dc:creator>
      <dc:date>2012-08-24T14:45:05Z</dc:date>
    </item>
    <item>
      <title>Re: Graphics without a base map</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372345#M34544</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;excellent derek thanks for the answer and links&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;vvoovv if you feel like derek (Swingley) answered your question, please click the little check mark on the right side of his post to mark it as "answered"&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Aug 2012 16:17:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/graphics-without-a-base-map/m-p/372345#M34544</guid>
      <dc:creator>JeffPace</dc:creator>
      <dc:date>2012-08-24T16:17:05Z</dc:date>
    </item>
  </channel>
</rss>

