What does the height and width properties of a WebMap object actually do?

276
0
08-16-2022 02:40 AM
Clubdebambos
Occasional Contributor III

The WebMap object has a height and a width property but what do they control? What is their purpose?

See the height property in the API Document

See the width property in the API Document.

from arcgis import GIS
from arcgis.mapping import WebMap

## connect to AGOL
agol = GIS("home")

## get the WebMap content item
wm_item = agol.content.get("item_id")

## create as a WebMap object
webmap = WebMap(wm_item)

## print the webmap height and width properties
print(webmap.height) # prints 1
print(webmap.width) # prints 1

## update the height and width
webmap.height = 0.5
webmap.width = 0.5

## update the WebMap definition to save changes
webmap.update()

 

When I re-access the height and width properties they are still set at 1.

from arcgis import GIS
from arcgis.mapping import WebMap

## connect to AGOL
agol = GIS("home")

## get the WebMap content item
wm_item = agol.content.get("item_id")

## create as a WebMap object
webmap = WebMap(wm_item)

## print the webmap height and width properties
print(webmap.height) # prints 1
print(webmap.width) # prints 1

 

Any info greatly appreciated.

~ Mapping my way to retirement
0 Kudos
0 Replies