[Geomoose-users] How to set max Zoom?

Brent Fraser bfraser at geoanalytic.com
Thu Aug 6 11:34:10 PDT 2020


Well I had tried 

app.setView({
center: [ -8950659, 4738816 ],
zoom: 8,
maxZoom: 20
});

as well, but no effect.  So I expect GM maybe laundering the options somewhere.

Thanks!

----------------------------------------

From: TC Haddad <tchaddad at gmail.com>
Sent: 8/6/20 12:10 PM
To: Brent Fraser <bfraser at geoanalytic.com>
Subject: Re: [Geomoose-users] How to set max Zoom?

I'm sure you've already been here, just just incase:

there is minZoom and maxZoom on the layer level, but sounds like you want it on the view level?

https://openlayers.org/en/latest/apidoc/module-ol_View-View.html

https://openlayers.org/en/latest/examples/zoom-constrained.html

view: new View({
center: [-13553864, 5918250],
zoom: 11,
minZoom: 9,
maxZoom: 13,
}),

On Thu, Aug 6, 2020 at 10:32 AM Brent Fraser <bfraser at geoanalytic.com> wrote:

Hi All,

I'd like to set the maximum zoom level of my map.  Any thoughts on how to do that?

I've tried:

var app = new gm3.Application({
mapserver_url: CONFIG.mapserver_url,
mapfile_root: CONFIG.mapfile_root,

map: {
maxZoom: 20,
scaleLine: {
enabled: true,
units: 'imperial'
}
}

});

but no go.

Thanks!
Brent_______________________________________________
Geomoose-users mailing list
Geomoose-users at lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/geomoose-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20200806/26345cce/attachment.html>


More information about the Geomoose-users mailing list