heremaps / here-map-widget-for-jupyter

Use HERE Maps API for JavaScript in your Jupyter Notebook.
https://here-map-widget-for-jupyter.readthedocs.io/en/latest/
MIT License
36 stars 9 forks source link

3D shapes with extrusion values > 2047 are not rendered #35

Open deeplook opened 2 years ago

deeplook commented 2 years ago

I want to display really big geometric shapes on the surface of a map, think boxes of arbitrary height using the extrusion parameter of a Rectangle, say. But in code like below, similar to this the rectangle is rendered only for values up to a maximum of 2047 (meters?). Above this number no rectangle is rendered.

The official documentation mentions map.Polygon.MAX_EXTRUDE_HEIGHT, but it seems not to be supported in Python. Can it be set higher than 2047 and can it be exposed in Python?

import os
from here_map_widget import Bbox, Map, Rectangle

api_key = os.environ["LS_API_KEY"]
lon, lat = [50, 13]
m = Map(api_key=api_key, center=[lon, lat], zoom=8)
style = {"strokeColor": "#829", "lineWidth": 4}
bbox = Bbox(top=lon + 0.5, left=lat - 0.5, bottom=lon - 0.5, right=lat + 0.5)
rectangle = Rectangle(bbox=bbox, style=style, elevation=0, extrusion=2047)
m.add_object(rectangle)
m
screenshot