From f7916a0161657e641717dca19f7c81af2d081ec4 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 1 Mar 2023 17:47:51 -0500 Subject: Added basic search functionality: : --- src/client/views/collections/CollectionMenu.tsx | 2 +- src/client/views/nodes/MapBox/MapBox.tsx | 40 +++++++++++++++++++++++++ 2 files changed, 41 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/client/views/collections/CollectionMenu.tsx b/src/client/views/collections/CollectionMenu.tsx index 17f02711d..c83f4e689 100644 --- a/src/client/views/collections/CollectionMenu.tsx +++ b/src/client/views/collections/CollectionMenu.tsx @@ -746,7 +746,7 @@ export class CollectionFreeFormViewChrome extends React.Component{ + const location = await this.bingGeocode(this._bingMap, this.bingSearchBarContents); + this._bingMap.current.setView({ + center: new this.MicrosoftMaps.Location(location.latitude, location.longitude), + zoom: 15, + }); + } + + + bingViewOptions = { center: { latitude: defaultCenter.lat, longitude: defaultCenter.lng }, mapTypeId: 'grayscale', @@ -617,12 +637,31 @@ export class MapBox extends ViewBoxAnnotatableComponent + +
{renderAnnotations(this.transparentFilter)}
{renderAnnotations(this.opaqueFilter)} {SnappingManager.GetIsDragging() ? null : renderAnnotations()} {this.annotationLayer} + + + {!MapBox.UseBing ? null : + this.bingSearchBarContents = newText} + placeholder="..." + size="medium" + text="Boston, MA" + />} + {!MapBox.UseBing ? null : + } + + + + {!MapBox.UseBing ? null : } +
@@ -647,6 +686,7 @@ export class MapBox extends ViewBoxAnnotatableComponent +
{!this._marqueeing || !this._mainCont.current || !this._annotationLayer.current ? null : (