Skip to content

encodeView

github-actions[bot] edited this page Sep 21, 2026 · 1 revision

Function: encodeView()

Imported from @elite-dangerous-almanac/galaxy-map.

encodeView(view, grid?): string

Turns a view into the text of a URL fragment, without the leading #. grid writes the coordinate grid switch as &g=1 or &g=0. The field is written only when the caller gives a boolean, so a page that does not use the grid writes the four view fields alone and no reader of the old format breaks.

Parameters

view

MapView

grid?

boolean

Returns

string

Clone this wiki locally