<?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: Cannot make GraphicsLayer the first layer in MapView in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/cannot-make-graphicslayer-the-first-layer-in/m-p/479672#M3300</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found the solution by changing how I instantiate the GraphicsLayer to use the other constructor:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;GraphicsLayer graphicsLayer = new GraphicsLayer(webMercator, null);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 21 Feb 2012 04:37:31 GMT</pubDate>
    <dc:creator>StephenQuan</dc:creator>
    <dc:date>2012-02-21T04:37:31Z</dc:date>
    <item>
      <title>Cannot make GraphicsLayer the first layer in MapView</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/cannot-make-graphicslayer-the-first-layer-in/m-p/479671#M3299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I got the Hello World Map sample working with a GraphicsLayer containing two points (two points on the ESRI Redlands campus). When I run the sample with the World_Street_Map ArcGIS Online layer as the first layer in my MapView it all works fine. However, when I remove the ArcGIS Online layer the GraphicsLayer and its points are no longer shown. Instead, I get a blank empty white screen. I just simply want a map that has the GraphicsLayer, any advice on how to do that?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;package com.esri.android.test; import android.app.Activity; import android.graphics.Color; import android.os.Bundle; import com.esri.android.map.GraphicsLayer; import com.esri.android.map.MapView; import com.esri.android.map.ags.ArcGISDynamicMapServiceLayer; import com.esri.core.geometry.GeometryEngine; import com.esri.core.geometry.Point; import com.esri.core.geometry.SpatialReference; import com.esri.core.map.Graphic; import com.esri.core.symbol.SimpleMarkerSymbol; import com.esri.core.symbol.SimpleMarkerSymbol.STYLE;&amp;nbsp; public class HelloWorldMapActivity extends Activity {&amp;nbsp; MapView map = null;&amp;nbsp; SpatialReference webMercator = SpatialReference.create(102100);&amp;nbsp; SpatialReference wgs84 = SpatialReference.create(4326);&amp;nbsp;&amp;nbsp; public void onCreate(Bundle savedInstanceState) { &amp;nbsp; super.onCreate(savedInstanceState); &amp;nbsp; setContentView(R.layout.main);&amp;nbsp; &amp;nbsp; // Retrieve the map and initial extent from XML layout &amp;nbsp; map = (MapView)findViewById(R.id.map); &amp;nbsp; /* &amp;nbsp; map.addLayer(new ArcGISDynamicMapServiceLayer("" + &amp;nbsp;&amp;nbsp;&amp;nbsp; "http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer")); &amp;nbsp; */ &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; GraphicsLayer graphicsLayer = new GraphicsLayer(); &amp;nbsp; Point redlands1 = (Point) GeometryEngine.project(new Point(-117.1990, 34.05564), wgs84, webMercator); &amp;nbsp; Point redlands2 = (Point) GeometryEngine.project(new Point(-117.1922, 34.05797), wgs84, webMercator); &amp;nbsp; graphicsLayer.addGraphic(new Graphic(redlands1, new SimpleMarkerSymbol(Color.GREEN, 15, STYLE.CIRCLE))); &amp;nbsp; graphicsLayer.addGraphic(new Graphic(redlands2, new SimpleMarkerSymbol(Color.RED, 15, STYLE.CIRCLE))); &amp;nbsp; map.addLayer(graphicsLayer);&amp;nbsp; &amp;nbsp; Object init = getLastNonConfigurationInstance(); &amp;nbsp; if (init != null) { &amp;nbsp;&amp;nbsp; map.restoreState((String) init); &amp;nbsp; }&amp;nbsp; }&amp;nbsp;&amp;nbsp; protected void onPause() { &amp;nbsp; super.onPause(); &amp;nbsp; map.pause();&amp;nbsp; }&amp;nbsp;&amp;nbsp; protected void onResume() { &amp;nbsp; super.onResume(); &amp;nbsp; map.unpause();&amp;nbsp; } }&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 04:01:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/cannot-make-graphicslayer-the-first-layer-in/m-p/479671#M3299</guid>
      <dc:creator>StephenQuan</dc:creator>
      <dc:date>2012-02-21T04:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Cannot make GraphicsLayer the first layer in MapView</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/cannot-make-graphicslayer-the-first-layer-in/m-p/479672#M3300</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I found the solution by changing how I instantiate the GraphicsLayer to use the other constructor:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;GraphicsLayer graphicsLayer = new GraphicsLayer(webMercator, null);&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Feb 2012 04:37:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/cannot-make-graphicslayer-the-first-layer-in/m-p/479672#M3300</guid>
      <dc:creator>StephenQuan</dc:creator>
      <dc:date>2012-02-21T04:37:31Z</dc:date>
    </item>
  </channel>
</rss>

