<?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: Hello i am working with java desktop application and want to plot a point in arcgis map using google lat long. I am using mmpk file to load offline map in java but unable to put marker on correct location. can you please tell me how to convert google in Java Maps SDK Questions</title>
    <link>https://community.esri.com/t5/java-maps-sdk-questions/hello-i-am-working-with-java-desktop-application/m-p/754083#M2243</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think all you need to do is to use&amp;nbsp;&lt;A href="https://developers.arcgis.com/java/latest/api-reference/reference/com/esri/arcgisruntime/mapping/view/Graphic.html#Graphic(double,%20double)" rel="nofollow noopener noreferrer" target="_blank"&gt;Graphic (double latitude, double longitude)&lt;/A&gt;&amp;nbsp;which will create a graphic from your lat, lon point. The graphic should automatically re-project to match your map when you add it to the graphics overlay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;SimpleMarkerSymbol symbol &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;SimpleMarkerSymbol&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;SimpleMarkerSymbol&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Style&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DIAMOND&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0xFFFF0000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;12&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
Graphic graphic &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Graphic&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lat&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lon&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
graphicsOverlay&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getGraphics&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 08:00:06 GMT</pubDate>
    <dc:creator>ColinAnderson1</dc:creator>
    <dc:date>2021-12-12T08:00:06Z</dc:date>
    <item>
      <title>Hello i am working with java desktop application and want to plot a point in arcgis map using google lat long. I am using mmpk file to load offline map in java but unable to put marker on correct location. can you please tell me how to convert google lat</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/hello-i-am-working-with-java-desktop-application/m-p/754082#M2242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;public class Map1 extends Application {&lt;BR /&gt; private MapView mapView;&lt;BR /&gt; static MainApplication mm ; &lt;BR /&gt; private ArcGISTiledLayer tiledLayer;&lt;BR /&gt; ArrayList mainList=new ArrayList();&lt;BR /&gt; ArcGISMap mapp;&lt;BR /&gt; @Override&lt;BR /&gt; public void start(Stage stage) {&lt;BR /&gt; String latt="76.8467,95.9462",lonn="26.9234,81.9573";&lt;/P&gt;&lt;P&gt;try {&lt;BR /&gt; if(mainList.size()&amp;lt;=0)&lt;BR /&gt; {&lt;BR /&gt; String lat1="26.990237,80.768091",lat2="26.9234,81.9573";&lt;BR /&gt; mainList.add(lat1);&lt;BR /&gt; mainList.add(lat2);&lt;BR /&gt; &lt;BR /&gt; }&lt;BR /&gt; // create stack pane and application scene&lt;BR /&gt; StackPane stackPane = new StackPane();&lt;BR /&gt; Scene scene = new Scene(stackPane);&lt;/P&gt;&lt;P&gt;// set title, size, and add scene to stage&lt;BR /&gt; stage.setTitle("Open Mobile Map Package Sample");&lt;BR /&gt; stage.setWidth(800);&lt;BR /&gt; stage.setHeight(700);&lt;BR /&gt; stage.setScene(scene);&lt;BR /&gt; stage.show();&lt;/P&gt;&lt;P&gt;// create a map view&lt;BR /&gt; mapView = new MapView();&lt;/P&gt;&lt;P&gt;//load a mobile map package&lt;BR /&gt; final String mmpkPath = new File("C:/sqlite/Map.mmpk").getAbsolutePath();&lt;BR /&gt; MobileMapPackage mobileMapPackage = new MobileMapPackage(mmpkPath);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mobileMapPackage.loadAsync();&lt;BR /&gt; mobileMapPackage.addDoneLoadingListener(() -&amp;gt; {&lt;BR /&gt; if (mobileMapPackage.getLoadStatus() == LoadStatus.LOADED &amp;amp;&amp;amp; mobileMapPackage.getMaps().size() &amp;gt; 0) {&lt;BR /&gt; //add the map from the mobile map package to the map view&lt;BR /&gt; mapp=mobileMapPackage.getMaps().get(0);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; int index=latt.indexOf(",");&lt;BR /&gt; &lt;BR /&gt; double latd=Double.parseDouble(latt.substring(0,index));&lt;BR /&gt; double lond=Double.parseDouble(latt.substring(index+1,latt.length()));&lt;BR /&gt; //MapPoint mpLatLon = Esri.ArcGISRuntime.Geometry.GeometryEngine.Project(mapPointObjectToConvert, SpatialReferences.Wgs84) as MapPoint;&lt;/P&gt;&lt;P&gt;final SpatialReference webMercator =SpatialReference.create(4326);;&lt;BR /&gt; Point p=new Point(lond,latd, SpatialReference.create(102113)); &lt;BR /&gt;Point pointGeometry = (Point) GeometryEngine.project(23.63733,37.94721, SpatialReference.create(102113));&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; Point pp = (Point)GeometryEngine.project(p, SpatialReference.create(102113) );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Thread th=new Thread(new Runnable(){&lt;/P&gt;&lt;P&gt;@Override&lt;BR /&gt; public void run() {&lt;BR /&gt; // TODO Auto-generated method stub&lt;BR /&gt; Viewpoint viewpoint = new Viewpoint(g, 75000);&lt;BR /&gt; mapp.setInitialViewpoint(viewpoint);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; mapView.setMap(mapp);&lt;BR /&gt; GraphicsOverlay graphicsOverlay = new GraphicsOverlay();&lt;BR /&gt; mapView.getGraphicsOverlays().add(graphicsOverlay);&lt;/P&gt;&lt;P&gt;// set initial view point to the ArcGISMap&lt;BR /&gt; SimpleMarkerSymbol symbol = new SimpleMarkerSymbol(SimpleMarkerSymbol.Style.DIAMOND, 0xFFFF0000, 12);&lt;BR /&gt; Graphic graphic = new Graphic(g, symbol); &lt;BR /&gt; graphicsOverlay.getGraphics().add(graphic);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;}});&lt;BR /&gt; th.start();&lt;BR /&gt; &lt;BR /&gt; } else {&lt;BR /&gt; Alert alert = new ;&lt;BR /&gt; alert.show();&lt;BR /&gt; }&lt;BR /&gt; });&lt;BR /&gt; &lt;BR /&gt; // add the map view to stack pane&lt;BR /&gt; &lt;BR /&gt; stackPane.getChildren().add(mapView);&lt;BR /&gt; } catch (Exception e) {&lt;BR /&gt; // on any error, display the stack trace.&lt;BR /&gt; infoBox(String.valueOf(e),"Error");&lt;BR /&gt; e.printStackTrace();&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; /**&lt;BR /&gt; * Stops and releases all resources used in application.&lt;BR /&gt; */&lt;BR /&gt; @Override&lt;BR /&gt; public void stop() {&lt;/P&gt;&lt;P&gt;if (mapView != null) {&lt;BR /&gt; mapView.dispose();&lt;BR /&gt; }&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;/**&lt;BR /&gt; * Opens and runs application.&lt;BR /&gt; *&lt;BR /&gt; * @param args arguments passed to this application&lt;BR /&gt;// */&lt;BR /&gt; public static void main(String[] args) {&lt;BR /&gt; &lt;BR /&gt; Application.launch(args);&lt;BR /&gt; }&lt;BR /&gt; public static void infoBox(String infoMessage, String titleBar)&lt;BR /&gt; {&lt;BR /&gt; JOptionPane.showMessageDialog(null, infoMessage, "InfoBox: " + titleBar, JOptionPane.INFORMATION_MESSAGE);&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;//////////////////////////////&lt;/P&gt;&lt;P&gt;I want to put marker from google lattitude and longitude.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" class="image-1 jive-image j-img-original" src="/legacyfs/online/423308_lucknow map.PNG" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 30 Sep 2018 12:20:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/hello-i-am-working-with-java-desktop-application/m-p/754082#M2242</guid>
      <dc:creator>NishantRaju</dc:creator>
      <dc:date>2018-09-30T12:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Hello i am working with java desktop application and want to plot a point in arcgis map using google lat long. I am using mmpk file to load offline map in java but unable to put marker on correct location. can you please tell me how to convert google</title>
      <link>https://community.esri.com/t5/java-maps-sdk-questions/hello-i-am-working-with-java-desktop-application/m-p/754083#M2243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think all you need to do is to use&amp;nbsp;&lt;A href="https://developers.arcgis.com/java/latest/api-reference/reference/com/esri/arcgisruntime/mapping/view/Graphic.html#Graphic(double,%20double)" rel="nofollow noopener noreferrer" target="_blank"&gt;Graphic (double latitude, double longitude)&lt;/A&gt;&amp;nbsp;which will create a graphic from your lat, lon point. The graphic should automatically re-project to match your map when you add it to the graphics overlay.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Something like...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;SimpleMarkerSymbol symbol &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;SimpleMarkerSymbol&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;SimpleMarkerSymbol&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Style&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;DIAMOND&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;0xFFFF0000&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="number token"&gt;12&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
Graphic graphic &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;new&lt;/SPAN&gt; &lt;SPAN class="token class-name"&gt;Graphic&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lat&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; lon&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt; 
graphicsOverlay&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;getGraphics&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;graphic&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:00:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/java-maps-sdk-questions/hello-i-am-working-with-java-desktop-application/m-p/754083#M2243</guid>
      <dc:creator>ColinAnderson1</dc:creator>
      <dc:date>2021-12-12T08:00:06Z</dc:date>
    </item>
  </channel>
</rss>

