<?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 How to correctly display and center a WMTS-service with EPSG 2056 (Swiss CH1903+ / LV95)? in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-correctly-display-and-center-a-wmts-service/m-p/1146846#M76440</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm really new to the ArcGIS API for Javascript 4.x. I'm trying to get my basemap (a WMTS service from swisstopo) correctly displayed. &lt;A href="https://codepen.io/nwp_nadja_bernhard/pen/YzEvxdw" target="_blank" rel="noopener"&gt;https://codepen.io/nwp_nadja_bernhard/pen/YzEvxdw&lt;/A&gt;&amp;nbsp;with editor-view shows my code of my best attempt.&lt;/P&gt;&lt;P&gt;I've managed to get the service displayed (see displayed_wmts_service.jpg), but I'm encountering a problem in the centering of the map. No matter which center coordinates I choose (LV95 - x, y or y, x, WGS84), the WMTS-service gets displayed in the top-left corner. The currently chosen center-coordinates however are in the center of Switzerland, see center_coordinates.jpg.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like the WMTS-service to be displayed in such way, that the entire Switzerland is shown and that it is centered. What am I missing?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best wished,&lt;/P&gt;&lt;P&gt;Nadja&lt;/P&gt;</description>
    <pubDate>Tue, 08 Mar 2022 10:43:05 GMT</pubDate>
    <dc:creator>nadja</dc:creator>
    <dc:date>2022-03-08T10:43:05Z</dc:date>
    <item>
      <title>How to correctly display and center a WMTS-service with EPSG 2056 (Swiss CH1903+ / LV95)?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-correctly-display-and-center-a-wmts-service/m-p/1146846#M76440</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm really new to the ArcGIS API for Javascript 4.x. I'm trying to get my basemap (a WMTS service from swisstopo) correctly displayed. &lt;A href="https://codepen.io/nwp_nadja_bernhard/pen/YzEvxdw" target="_blank" rel="noopener"&gt;https://codepen.io/nwp_nadja_bernhard/pen/YzEvxdw&lt;/A&gt;&amp;nbsp;with editor-view shows my code of my best attempt.&lt;/P&gt;&lt;P&gt;I've managed to get the service displayed (see displayed_wmts_service.jpg), but I'm encountering a problem in the centering of the map. No matter which center coordinates I choose (LV95 - x, y or y, x, WGS84), the WMTS-service gets displayed in the top-left corner. The currently chosen center-coordinates however are in the center of Switzerland, see center_coordinates.jpg.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like the WMTS-service to be displayed in such way, that the entire Switzerland is shown and that it is centered. What am I missing?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best wished,&lt;/P&gt;&lt;P&gt;Nadja&lt;/P&gt;</description>
      <pubDate>Tue, 08 Mar 2022 10:43:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-correctly-display-and-center-a-wmts-service/m-p/1146846#M76440</guid>
      <dc:creator>nadja</dc:creator>
      <dc:date>2022-03-08T10:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to correctly display and center a WMTS-service as a basemaps with EPSG 2056 (Swiss CH1903+ / LV95)?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-correctly-display-and-center-a-wmts-service/m-p/1147341#M76468</link>
      <description>&lt;P&gt;Hi there,&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can only pass in long/lat as an array of numbers for the MapView.center. But in your case, it won't work. To center your map in your coordinate system, you need to set the &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-views-MapView.html#center" target="_self"&gt;mapView.center&lt;/A&gt; to a point object in the spatial reference of your view.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can do this and it will work.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt; const view = new MapView({
   container: "viewDiv",
   map: map,
   center: {
     type: "point", 
     x: 2657560, 
     y: 1194592,
     spatialReference: {
       wkid: 2056 
     }
   },
   scale: 1500000,
   spatialReference: {
     wkid: 2056 
   }
 });&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Feb 2022 23:57:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-correctly-display-and-center-a-wmts-service/m-p/1147341#M76468</guid>
      <dc:creator>UndralBatsukh</dc:creator>
      <dc:date>2022-02-23T23:57:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to correctly display and center a WMTS-service as a basemaps with EPSG 2056 (Swiss CH1903+ / LV95)?</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-correctly-display-and-center-a-wmts-service/m-p/1150263#M76570</link>
      <description>&lt;P&gt;Thank you UndralBatsukh. It worked &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Mar 2022 17:34:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/how-to-correctly-display-and-center-a-wmts-service/m-p/1150263#M76570</guid>
      <dc:creator>nadja</dc:creator>
      <dc:date>2022-03-03T17:34:41Z</dc:date>
    </item>
  </channel>
</rss>

