Here is the code I have so far. I am using the ArcGIS Python API.
g = GIS("https://www.arcgis.com", "USERNAME", "PASSWORD")
p = {
'type':"CSV",
'title': '2020#12',
'snippet':'hwa',
'description':'test ' + \
'dataframe object to a GIS item',
'tags': 'python',
}
i=g.content.add (item_properties=p,
data="C:/Users/NAME/PycharmProjects/colors/Map/5TXHV8NTC5.csv"
)
q=i.publish ()
print (q)
search = g.content.search(query="owner:USERNAME",
item_type="Feature Layer")
print (search)
from arcgis.mapping import WebMap
#map = WebMap()
map=g.map (location="United States")
item=search [0]
print (item)
map.add_layer(item)
props={'title': '2020#156',
'snippet':'hwa',
'tags': 'python',
"renderer":"autocast",
"field_name": "Threat",
}
map.save (props)1. I realize that I can get the id for the MapView object from the url. However, is there a way I can get this id from Python?
2. When I try an embed my map in my website, credentials are requested. I would like everyone to be able to view my map. Is there a way I can configure sharing privileges for my map from Python?