<?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 Problem of displaying graphics on mapview in ArcGIS Runtime SDK for Android Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/problem-of-displaying-graphics-on-mapview/m-p/28887#M221</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have drawn 2 graphics on the same point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp; 
Graphic graphic = new Graphic(new Point(x, y),new SimpleMarkerSymbol(Color.BLACK, 12, STYLE.CIRCLE));

//...omit some code
PictureMarkerSymbol symbol = new PictureMarkerSymbol(image);
Graphic g = new Graphic(point, symbol);

layer.addGraphic(g);
layer.addGraphic(graphic);

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As shown,one is a circle,another is a picture.They both locate at the same point.And when i double click on the map to zoom ln,the circle is still on the map Point while the picture deviate from the Point.When u zoom in more and more ,the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;deviation becomes larger and larger.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Aug 2012 06:32:08 GMT</pubDate>
    <dc:creator>lujun</dc:creator>
    <dc:date>2012-08-23T06:32:08Z</dc:date>
    <item>
      <title>Problem of displaying graphics on mapview</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/problem-of-displaying-graphics-on-mapview/m-p/28887#M221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have drawn 2 graphics on the same point.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp; 
Graphic graphic = new Graphic(new Point(x, y),new SimpleMarkerSymbol(Color.BLACK, 12, STYLE.CIRCLE));

//...omit some code
PictureMarkerSymbol symbol = new PictureMarkerSymbol(image);
Graphic g = new Graphic(point, symbol);

layer.addGraphic(g);
layer.addGraphic(graphic);

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As shown,one is a circle,another is a picture.They both locate at the same point.And when i double click on the map to zoom ln,the circle is still on the map Point while the picture deviate from the Point.When u zoom in more and more ,the &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;deviation becomes larger and larger.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Aug 2012 06:32:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/problem-of-displaying-graphics-on-mapview/m-p/28887#M221</guid>
      <dc:creator>lujun</dc:creator>
      <dc:date>2012-08-23T06:32:08Z</dc:date>
    </item>
    <item>
      <title>Re: Problem of displaying graphics on mapview</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/problem-of-displaying-graphics-on-mapview/m-p/28888#M222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You are adding your new Graphic, "graphic" at new Point(x,y):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="color: #444444; font-family: Courier New;"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Graphic graphic = new Graphic(new Point(x, y),new SimpleMarkerSymbol(Color.BLACK, 12, STYLE.CIRCLE));&lt;/PRE&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #444444; font-family: Courier New;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt; ...And you are adding your new Graphic "graphic" at "location"&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Graphic g = new Graphic (point,symbol);&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;are "point" and "new Point(x,y);" the same location?&amp;nbsp; Why not just create a new point object and re-use it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
Point p = new Point(x,y);
&lt;SPAN style="color: #444444; font-family: Courier New;"&gt;Graphic graphic = new Graphic(p,new SimpleMarkerSymbol(Color.BLACK, 12, STYLE.CIRCLE));
&lt;/SPAN&gt;Graphic g = new Graphic (p,symbol);
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If these are in fact the same point location, you might want to check and see if your picture marker symbol is being inserted with an offset by default.&amp;nbsp; I'm not 100% sure but picture marker symbols might be inserted lower-left.&amp;nbsp; You can adjust for this using .setOffsetX(); and .setOffsetY();&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgismobile/10.0/apis/android/api/com/esri/core/symbol/MarkerSymbol.html#setOffsetX(float)" rel="nofollow noopener noreferrer" target="_blank"&gt;http://help.arcgis.com/en/arcgismobile/10.0/apis/android/api/com/esri/core/symbol/MarkerSymbol.html#setOffsetX(float)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:09:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-android-questions/problem-of-displaying-graphics-on-mapview/m-p/28888#M222</guid>
      <dc:creator>deleted-user-ATjHIWsdQYmT</dc:creator>
      <dc:date>2021-12-10T21:09:57Z</dc:date>
    </item>
  </channel>
</rss>

