<?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: Can't setting SpatialReference and get Latitude/Longitude QML in Qt Maps SDK Questions</title>
    <link>https://community.esri.com/t5/qt-maps-sdk-questions/can-t-setting-spatialreference-and-get-latitude/m-p/1056080#M4112</link>
    <description>&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;I can get.&lt;/P&gt;</description>
    <pubDate>Mon, 10 May 2021 00:12:03 GMT</pubDate>
    <dc:creator>KanjaSousuke</dc:creator>
    <dc:date>2021-05-10T00:12:03Z</dc:date>
    <item>
      <title>Can't setting SpatialReference and get Latitude/Longitude QML</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/can-t-setting-spatialreference-and-get-latitude/m-p/1052058#M4065</link>
      <description>&lt;P&gt;I use Esri.ArcGISRuntime 100.9 and Qt5.15.0.&lt;/P&gt;&lt;P&gt;I want to get Latitude and Longitude, but can't get.&lt;/P&gt;&lt;P&gt;My code is&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;ApplicationWindow {
    id: appWindow
    width: 800
    height: 600
    title: "MapTest2"

    property int count: 0

    // add a mapView component
    MapView {
        id: mapView
        anchors.fill: parent
        // set focus to enable keyboard navigation
        focus: true

        // add a map to the mapview
        Map {
            // add the BasemapTopographic basemap to the map
            BasemapTopographic {}
        }

        MultipointBuilder{
            id: clickPoint
            spatialReference: SpatialReference {
                    wkid: 6668
                }
        }

        onMouseClicked: {
            console.log(mouse.mapPoint.x)
            console.log(clickPoint.points.addPoint(screenToLocation(mouse.x,mouse.y)))
            console.log(clickPoint.points.point(count).x)
            count++
        }
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This code display the following statement in the console.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;qml: 11170910.901105005&lt;BR /&gt;qml: -1&lt;BR /&gt;qrc:/qml/main.qml:50: TypeError: Cannot read property 'x' of null&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I think this problem is [SpatialReference].&lt;/P&gt;&lt;P&gt;Because,&amp;nbsp;when I did the following and got no errors or anything.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;        MultipointBuilder{
            id: clickPoint
            spatialReference: mapView.spatialReference
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, this code can't get Latitude/Longitude in wkid:6668&lt;/P&gt;&lt;P&gt;Is there any way we can solve this problem?&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 02:16:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/can-t-setting-spatialreference-and-get-latitude/m-p/1052058#M4065</guid>
      <dc:creator>KanjaSousuke</dc:creator>
      <dc:date>2021-04-28T02:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Can't setting SpatialReference and get Latitude/Longitude QML</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/can-t-setting-spatialreference-and-get-latitude/m-p/1052260#M4068</link>
      <description>&lt;P&gt;I believe the issue might be that your points/coordinates coming from the mapview click event is coming in 3857 (web mercator), and then you are trying to add these points to a builder that is using 6668.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My suggestion is to use GeometryEngine.project to take the 3857-based points and project them into 6668 before you call addPoint on the builder. That way, you are adding the points to the builder in the correct spatial reference&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/qt/qml/api-reference/qml-esri-arcgisruntime-geometryengine.html#project-method" target="_blank"&gt;https://developers.arcgis.com/qt/qml/api-reference/qml-esri-arcgisruntime-geometryengine.html#project-method&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Apr 2021 13:59:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/can-t-setting-spatialreference-and-get-latitude/m-p/1052260#M4068</guid>
      <dc:creator>LucasDanzinger</dc:creator>
      <dc:date>2021-04-28T13:59:55Z</dc:date>
    </item>
    <item>
      <title>Re: Can't setting SpatialReference and get Latitude/Longitude QML</title>
      <link>https://community.esri.com/t5/qt-maps-sdk-questions/can-t-setting-spatialreference-and-get-latitude/m-p/1056080#M4112</link>
      <description>&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;I can get.&lt;/P&gt;</description>
      <pubDate>Mon, 10 May 2021 00:12:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/qt-maps-sdk-questions/can-t-setting-spatialreference-and-get-latitude/m-p/1056080#M4112</guid>
      <dc:creator>KanjaSousuke</dc:creator>
      <dc:date>2021-05-10T00:12:03Z</dc:date>
    </item>
  </channel>
</rss>

