Skip to content

Commit

Permalink
fix bug on maps zoom
Browse files Browse the repository at this point in the history
  • Loading branch information
dobri1408 committed Aug 21, 2024
1 parent e2df116 commit 7d76531
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/Arcgis/Layer/Layer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,8 @@ class $Layer extends EventEmitter {
if (this.#layer?.queryExtent && this.#props.zoomToExtent) {
this.#layer.when(async () => {
const data = await this.#layer.queryExtent();
if (!$map.view) return;
if (!$map.view?.ready) return;
$map.view.goTo(data.extent).then(() => {
if (!$map.view?.ready) return;
const homeWidget = $map.view.ui.find('Home');
if (!homeWidget) return;
homeWidget.viewpoint = new $map.modules.AgViewpoint({
Expand Down

0 comments on commit 7d76531

Please sign in to comment.