In [5]:
from arcgis.gis import GIS
my_gis = GIS()
map = my_gis.map()
map
In [6]:
print("Anonymous ArcGIS Online login:")
print("{:-<50}".format(''))
print("\tDefault Basemap: {}".format(map.basemap))
print("\tMap Center: {}".format(map.center))
print("\tMap Zoom Level: {}".format(map.zoom))
In [7]:
import getpass
password = getpass.getpass("Enter password: ")
#p_gis = GIS(<YOUR PORTAL HOME URL>, <USERNAME>, password)
p_gis = GIS("https://www.arcgis.com", "jgravois", password)
# Entering a specific location and Zoom Level controls how the map draws
p_map = p_gis.map("Cannon Beach, OR", 12)
print("Successfully logged in as: " + p_gis.properties.user.username)
p_map
In [8]:
p_map.zoom = 15
p_map.height = '175px'
p_map.center = [45.889332, -123.960452] # center needs to be a list of longitude, latitude coordinates
In [ ]: