Hi all,
I'm creating a widget and want it to zoom to a particular lat/lon. All functionality of the widgit works great except the zoom. It will pan to the point but not zoom in no matter what zoom level I put. There are no zoom restrictions on the map itself, whatever zoom level the map is in, it stays at and pans to the point. I've tried several different ways to do this, here is my latest relevant code. Here mapViewRef refers to a JimuMapView instance.
```
const searchAndZoomToLocation = () => {
if (mapViewRef.current && inputLatitude && inputLongitude) {
const lat = parseFloat(inputLatitude);
const lon = parseFloat(inputLongitude);
if (!isNaN(lat) && !isNaN(lon)) {
// Add point to the specified location
const point = new Point({
longitude: lon,
latitude: lat
});
const pointGraphic = new Graphic({
geometry: point,
symbol: pointSymbol.current
});
mapViewRef.current.view.goTo({target: point, zoom: 14}); // Zoom to point
mapViewRef.current.view.graphics.removeAll(); // Remove existing graphics
mapViewRef.current.view.graphics.add(pointGraphic);
}
}
```
Any ideas why this only pans and doesn't zoom? What ever number I set zoom to, it doesn't change the result.