Select to view content in your preferred language

Map is not showing in ArcGIS API for Python demo test.

8999
29
07-03-2018 08:13 AM
by Anonymous User
Not applicable

Getting started with ArcGIS API for Python, and something seems amiss. I was hoping to simply get to the point where I could see a simple map and feel a nice sense of progress, but, while I get no error messages when I try to display the map, I also get no map.

This is probably something VERY simple, but I haven't been able to figure out under my own power. See image, please.

Thank you,

Randy McGregor

29 Replies
by Anonymous User
Not applicable

Still having issues?

0 Kudos
by Anonymous User
Not applicable

It appears as though I don't have permission to make a necessary update, and since I am just testing for now, I don't want to push this too far. I appreciate the help and insights. When it's go time, I'll revisit.

Thank you,

Randy

0 Kudos
NicholeSalinger
New Contributor III

I am having a similar issue as Randy but I'm able to get layer's added to 'map1' but you don't see the underlying basemap. I've tried all sorts of things but can't seem to figure this one out. Any ideas?

Screenshot of the sample notebook with layer but no basemap. Jeff Bigos‌@

0 Kudos
DarrenWiens2
MVP Honored Contributor

It will be hard to say what's going on without seeing the code that came before. Does the following work on its own?

from arcgis.gis import GIS
gis = GIS()
map = gis.map("Paris")
map
NicholeSalinger
New Contributor III

I'm just using the sample notebook that I downloaded from ESRI's page -> index | ArcGIS for Developers 

I tried running the code like you have and it fails

0 Kudos
DarrenWiens2
MVP Honored Contributor

Just out of curiosity, what do you get if you run `print(map)`? I get: 

MapView(basemaps=['dark-gray', 'dark-gray-vector', 'gray', 'gray-vector', 'hybrid', 'national-geographic', 'oceans', 'osm', 'satellite', 'streets', 'streets-navigation-vector', 'streets-night-vector', 'streets-relief-vector', 'streets-vector', 'terrain', 'topo', 'topo-vector'], center=[0, 0])
NicholeSalinger
New Contributor III

I got: 

<arcgis.widgets.MapView object at 0x00000216BDB31320>

0 Kudos
NicholeSalinger
New Contributor III

does it help to know that I just tried ESRI's sandbox version and it ran fine   

0 Kudos
NicholeSalinger
New Contributor III

Also - I tried testing my install according to ESRI's guidance but keep getting the same problem. 

Install and set up | ArcGIS for Developers 

Test your install with jupyter notebookhttps://developers.arcgis.com/python/guide/install-and-set-up/#Test-your-install-with-jupyter-notebo...

From the Jupyter Notebook dashboard:

  • Windows:  Click New > Python 3
  • macOS and Linux:  Click New > Python[default]

Enter the following lines of code:

from arcgis.gis import GIS my_gis = GIS() my_gis.map()

and I get this....

0 Kudos
simoxu
by MVP Regular Contributor
MVP Regular Contributor

A little more info about the environment will be helpful:

And, does it work in another popular web browser? let's say Chrome if you are using IE.

Last, you can open the browser console (F12 for Chrome) to see some errors there and post the error message which will also help people to diagnose the problem.