Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Look up tile server info in homeserver's .well-known area #7623

Merged
merged 9 commits into from
Jan 27, 2022
9 changes: 3 additions & 6 deletions src/components/views/location/LocationPicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ interface IState {
class LocationPicker extends React.Component<IProps, IState> {
public static contextType = MatrixClientContext;
public context!: React.ContextType<typeof MatrixClientContext>;
private map?: maplibregl.Map;
private geolocate?: maplibregl.GeolocateControl;
private marker?: maplibregl.Marker;
private map?: maplibregl.Map= null;
andybalaam marked this conversation as resolved.
Show resolved Hide resolved
private geolocate?: maplibregl.GeolocateControl = null;
private marker?: maplibregl.Marker = null;

constructor(props: IProps) {
super(props);
Expand All @@ -64,9 +64,6 @@ class LocationPicker extends React.Component<IProps, IState> {
position: undefined,
error: undefined,
};
this.map = null;
this.geolocate = null;
this.marker = null;
}

private getMarkerId = () => {
Expand Down
3 changes: 1 addition & 2 deletions src/components/views/messages/MLocationBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export default class MLocationBody extends React.Component<IBodyProps, IState> {
private coords: GeolocationCoordinates;
private bodyId: string;
private markerId: string;
private map?: maplibregl.Map;
private map?: maplibregl.Map = null;

constructor(props: IBodyProps) {
super(props);
Expand All @@ -60,7 +60,6 @@ export default class MLocationBody extends React.Component<IBodyProps, IState> {
this.bodyId = `mx_MLocationBody_${idSuffix}`;
this.markerId = `mx_MLocationBody_marker_${idSuffix}`;
this.coords = parseGeoUri(locationEventGeoUri(this.props.mxEvent));
this.map = null;

this.state = {
error: undefined,
Expand Down