We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 208c422 commit 6efc28fCopy full SHA for 6efc28f
src/components/MapContainer.tsx
@@ -40,14 +40,13 @@ export const MapContainer = ({ onClick }: { onClick?: __esri.ViewImmediateClickE
40
};
41
42
const xyUrlParam = getUrlParameter<number[]>('center', 'number[]');
43
- if (xyUrlParam) {
+ if (xyUrlParam && xyUrlParam.length === 2) {
44
viewOptions.center = {
45
x: xyUrlParam[0],
46
y: xyUrlParam[1],
47
spatialReference: { wkid: 3857 },
48
49
- }
50
- if (xyUrlParam && xyUrlParam.length === 2) {
+
51
const scaleUrlParam = getUrlParameter<number>('scale', 'number', 10000);
52
if (scaleUrlParam) {
53
viewOptions.scale = scaleUrlParam;
0 commit comments