Skip to content

Commit 58a4d6e

Browse files
Merge pull request #1104 from vinhyan/vinhyan/1080-map-search-box-opens-profile-for-wrong-addresses
Fix: map search box opens profile for wrong addresses
2 parents 63f5b10 + 573a32e commit 58a4d6e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/components/PropertyMap.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ type SearchedProperty = {
6666

6767
const MIN_MAP_ZOOM = 10;
6868
const MAX_MAP_ZOOM = 20;
69-
const MAX_TILE_ZOOM = 16;
7069

7170
const layers = [
7271
'vacant_properties_tiles_polygons',
@@ -193,7 +192,6 @@ const PropertyMap: FC<PropertyMapProps> = ({
193192
coordinates: [-75.1628565788269, 39.97008211622267],
194193
address: '',
195194
});
196-
const [smallScreenToggle, setSmallScreenToggle] = useState<boolean>(false);
197195

198196
useEffect(() => {
199197
const protocol = new Protocol();
@@ -491,7 +489,7 @@ const PropertyMap: FC<PropertyMapProps> = ({
491489
proximity={[
492490
{
493491
type: 'fixed',
494-
coordinates: [-75.1652, 39.9526], // Approxiate center of Philadelphia
492+
coordinates: [-75.1652, 39.9526], // Approximate center of Philadelphia
495493
},
496494
]}
497495
onPick={(feature) => {
@@ -504,6 +502,7 @@ const PropertyMap: FC<PropertyMapProps> = ({
504502
});
505503
map?.easeTo({
506504
center: feature.center,
505+
zoom: 16,
507506
});
508507
}
509508
}}

0 commit comments

Comments
 (0)