<?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 Map center is not working in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/map-center-is-not-working/m-p/1226087#M7943</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the same problem every time I try to display a map in Python. Im using Notebook inside CS code.&lt;/P&gt;&lt;P&gt;The map is drawn but the center is not where I specified it to be.&lt;/P&gt;&lt;P&gt;Also the defined polygon is not displayed dispite I wrote the code to display it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The map is displayed but not the polygon and the map center is wrong, se the attached image.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone see if I did something wrong?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="python map.center.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/54585i76E910C0B669DE92/image-size/large?v=v2&amp;amp;px=999" role="button" title="python map.center.png" alt="python map.center.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;#Import modules
from arcgis.gis import GIS
from arcgis.geocoding import geocode
from arcgis.geometry import lengths, areas_and_lengths, project
from arcgis.geometry import Point, Polyline, Polygon, Geometry
import pandas as pd

#Connect to GIS
gis = GIS('home')

#Create a Polygon object
polygon1 = Polygon({'spatialReference': {'latestWkid': 4326}, 
                'rings': [[[-97.06587202923951, 32.75656343500563], [-97.07033522518535, 32.75454232619796],
                           [-97.07179434702324, 32.75443405154119], [-97.073596791488, 32.75475887587208],
                           [-97.07501299810983, 32.75475887587208], [-97.07492716677937, 32.75616643554153],
                           [-97.07595713555828, 32.75602207118053], [-97.07115061698558, 32.75887321736912],
                           [-97.06930525730476, 32.75890930713694], [-97.06479914614289, 32.75739351976198],
                           [-97.06587202923951, 32.75656343500563]]]
                })
polygon1

#Display the Polygon on a map
map3 = gis.map('2201 E Road to Six Flags St, Arlington, TX 76011, United States')
map3.basemap = "topo"
map3.zoom = 16
map3.center = {'x': -97.05815464365813, 'y': 32.75494892021667, 
               "spatialReference" : {"wkid" : 4326}}

#Draw the map
map3

#Draw the Polygon on the map
map3.draw(polygon1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 27 Oct 2022 10:23:46 GMT</pubDate>
    <dc:creator>LarsChristianØstgaard</dc:creator>
    <dc:date>2022-10-27T10:23:46Z</dc:date>
    <item>
      <title>Map center is not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/map-center-is-not-working/m-p/1226087#M7943</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have the same problem every time I try to display a map in Python. Im using Notebook inside CS code.&lt;/P&gt;&lt;P&gt;The map is drawn but the center is not where I specified it to be.&lt;/P&gt;&lt;P&gt;Also the defined polygon is not displayed dispite I wrote the code to display it.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The map is displayed but not the polygon and the map center is wrong, se the attached image.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can someone see if I did something wrong?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="python map.center.png" style="width: 999px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/54585i76E910C0B669DE92/image-size/large?v=v2&amp;amp;px=999" role="button" title="python map.center.png" alt="python map.center.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;#Import modules
from arcgis.gis import GIS
from arcgis.geocoding import geocode
from arcgis.geometry import lengths, areas_and_lengths, project
from arcgis.geometry import Point, Polyline, Polygon, Geometry
import pandas as pd

#Connect to GIS
gis = GIS('home')

#Create a Polygon object
polygon1 = Polygon({'spatialReference': {'latestWkid': 4326}, 
                'rings': [[[-97.06587202923951, 32.75656343500563], [-97.07033522518535, 32.75454232619796],
                           [-97.07179434702324, 32.75443405154119], [-97.073596791488, 32.75475887587208],
                           [-97.07501299810983, 32.75475887587208], [-97.07492716677937, 32.75616643554153],
                           [-97.07595713555828, 32.75602207118053], [-97.07115061698558, 32.75887321736912],
                           [-97.06930525730476, 32.75890930713694], [-97.06479914614289, 32.75739351976198],
                           [-97.06587202923951, 32.75656343500563]]]
                })
polygon1

#Display the Polygon on a map
map3 = gis.map('2201 E Road to Six Flags St, Arlington, TX 76011, United States')
map3.basemap = "topo"
map3.zoom = 16
map3.center = {'x': -97.05815464365813, 'y': 32.75494892021667, 
               "spatialReference" : {"wkid" : 4326}}

#Draw the map
map3

#Draw the Polygon on the map
map3.draw(polygon1)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Oct 2022 10:23:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/map-center-is-not-working/m-p/1226087#M7943</guid>
      <dc:creator>LarsChristianØstgaard</dc:creator>
      <dc:date>2022-10-27T10:23:46Z</dc:date>
    </item>
    <item>
      <title>Re: Map center is not working</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/map-center-is-not-working/m-p/1630602#M11495</link>
      <description>&lt;P&gt;I have a similar problem with the 'center' function - it does not change the map parameters&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jul 2025 11:51:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/map-center-is-not-working/m-p/1630602#M11495</guid>
      <dc:creator>Joanna_Jaczewska</dc:creator>
      <dc:date>2025-07-07T11:51:15Z</dc:date>
    </item>
  </channel>
</rss>

