OpenRoadCode
Public API reference for OpenRoadCode
Loading...
Searching...
No Matches
map_renderer.map_request_handler.MapRequestHandler Class Reference

Maintain user-controlled camera state and issue native map commands. More...

Inheritance diagram for map_renderer.map_request_handler.MapRequestHandler:
ui.navigation.map_request_handler_if.MapRequestHandlerIf

Public Member Functions

None observe_camera (self, GeoPoint center, float zoom, float bearing_rad, float pitch_rad)
 Retain the actual rendered camera without issuing another command.
 
None request_recenter (self)
 Recenter the map on the latest known follow position.
 
None request_follow (self, bool enabled)
 Enable or disable automatic map following.
 
None request_center_on (self, GeoPoint position)
 Center the map on a geographic position.
 
None request_pan (self, float north_m, float east_m)
 Pan the map by geographic offsets.
 
None request_pan_screen (self, float right_px, float up_px)
 Request a camera pan in screen-relative pixels.
 
None request_zoom (self, float zoom_level)
 Set the requested map zoom level.
 
None request_bearing (self, float bearing_rad)
 Set the requested map bearing.
 
None request_pitch (self, float pitch_rad)
 Set the requested map camera pitch.
 
None request_poi_focus (self, str|None category)
 Highlight a semantic POI category or clear the focus.
 
None request_poi_results (self, tuple[MapMarker,...] markers, str category)
 Replace the dynamic nearby-POI marker set without changing the camera.
 
None request_style (self, str style_id)
 Select the active map style.
 
None request_fit_bounds (self, float south, float west, float north, float east, float padding=60.0)
 Frame explicit bounds and suspend follow so the result stays visible.
 
None request_dataset_overview (self, float padding=24.0)
 Frame the installed offline dataset without inventing a position.
 
None refresh_renderer_state (self, *float|None zoom_level=None, float|None bearing_rad=None, float|None pitch_rad=None)
 Replay state, optionally with a non-persistent presentation camera.
 

Detailed Description

Maintain user-controlled camera state and issue native map commands.

Member Function Documentation

◆ request_bearing()

None map_renderer.map_request_handler.MapRequestHandler.request_bearing (   self,
float  bearing_rad 
)

Set the requested map bearing.

Parameters
bearing_radClockwise map bearing in radians.

Reimplemented from ui.navigation.map_request_handler_if.MapRequestHandlerIf.

◆ request_center_on()

None map_renderer.map_request_handler.MapRequestHandler.request_center_on (   self,
GeoPoint  position 
)

Center the map on a geographic position.

Parameters
positionGeographic position to place at the map center.

Reimplemented from ui.navigation.map_request_handler_if.MapRequestHandlerIf.

◆ request_follow()

None map_renderer.map_request_handler.MapRequestHandler.request_follow (   self,
bool  enabled 
)

Enable or disable automatic map following.

Parameters
enabledTrue to follow the current position; False for manual camera control.

Reimplemented from ui.navigation.map_request_handler_if.MapRequestHandlerIf.

◆ request_pan()

None map_renderer.map_request_handler.MapRequestHandler.request_pan (   self,
float  north_m,
float  east_m 
)

Pan the map by geographic offsets.

Parameters
north_mNorthward offset in meters.
east_mEastward offset in meters.

Reimplemented from ui.navigation.map_request_handler_if.MapRequestHandlerIf.

◆ request_pan_screen()

None map_renderer.map_request_handler.MapRequestHandler.request_pan_screen (   self,
float  right_px,
float  up_px 
)

Request a camera pan in screen-relative pixels.

Parameters
right_pxHorizontal screen offset in pixels, positive to the right.
up_pxVertical screen offset in pixels, positive upward.

Reimplemented from ui.navigation.map_request_handler_if.MapRequestHandlerIf.

◆ request_pitch()

None map_renderer.map_request_handler.MapRequestHandler.request_pitch (   self,
float  pitch_rad 
)

Set the requested map camera pitch.

Parameters
pitch_radCamera pitch in radians.

Reimplemented from ui.navigation.map_request_handler_if.MapRequestHandlerIf.

◆ request_poi_focus()

None map_renderer.map_request_handler.MapRequestHandler.request_poi_focus (   self,
str | None  category 
)

Highlight a semantic POI category or clear the focus.

Parameters
categorySemantic POI category to highlight, or None to clear focus.

Reimplemented from ui.navigation.map_request_handler_if.MapRequestHandlerIf.

◆ request_poi_results()

None map_renderer.map_request_handler.MapRequestHandler.request_poi_results (   self,
tuple[MapMarker, ...]  markers,
str  category 
)

Replace the dynamic nearby-POI marker set without changing the camera.

Parameters
markersDynamic POI markers to present.
categorySemantic POI category represented by the markers.

Reimplemented from ui.navigation.map_request_handler_if.MapRequestHandlerIf.

◆ request_style()

None map_renderer.map_request_handler.MapRequestHandler.request_style (   self,
str  style_id 
)

Select the active map style.

Parameters
style_idIdentifier of the map style to activate.

Reimplemented from ui.navigation.map_request_handler_if.MapRequestHandlerIf.

◆ request_zoom()

None map_renderer.map_request_handler.MapRequestHandler.request_zoom (   self,
float  zoom_level 
)

Set the requested map zoom level.

Parameters
zoom_levelMapLibre-compatible zoom level.

Reimplemented from ui.navigation.map_request_handler_if.MapRequestHandlerIf.


The documentation for this class was generated from the following file: