Smart M.App discussions

Looking for answers in regards to M.Apps, M.App Exchange or M.App Studio? Smart M.App Tech Discussion board is where you can search, ask your questions and assist others by sharing your knowledge. Join the conversation, connect, contribute and share.
Showing results for 
Search instead for 
Do you mean 
Reply
Highlighted
Staff
Posts: 77
Registered: ‎02-03-2016

Scale Limit Restriction

The default scale limit appears to be set to approx 1:2000.

 

Is there a way to change the limit so that users can zoom further in?

Highlighted
Technical Evangelist
Posts: 712
Registered: ‎11-12-2015

Re: Scale Limit Restriction

Thank you for your post. This is a known technical issue/limit currently that is being addressed. The same thing can be seen in the M.App Chest preview window. Specifically can you provide some specifics on zoom level requirements that I can provide as feedback for our team.

Highlighted
Technical Evangelist
Posts: 1,238
Registered: ‎09-11-2015

Re: Scale Limit Restriction

It seems there are limitation on two sides.

  • One is simply the OpenStreetMap layer which does not allow to zoom in closer than 1:2000
  • But if you remove this layer and add e.g. WMS layer using API you should be able to zoom in little further. From my tests it appeared like 1:1000 or 1:500
Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Regular Contributor
Posts: 178
Registered: ‎03-04-2016

Re: Scale Limit Restriction

[ Edited ]

Hello guys,

 

Is there any update on this topic?

 

I'm facing the same issue at the moment.

I'm using OSM (mundialis services http://ows.mundialis.de/services/service?) as basemap.

In GeoMedia i'm able to zoom in pass 1:100.

 

Even without the osm basemap i can't zoom enough.

 

Kind regards

Elodie

Highlighted
Technical Evangelist
Posts: 1,238
Registered: ‎09-11-2015

Re: Scale Limit Restriction

The limit is probably set on the Leaflet map layer. To change the restriction use this code (thanks Piotr Smiley Wink):

 

mainContext.switchingMapViewerAdapter.getMapAdapter().then(function(mapAdapter) {
    mapAdapter.getMap().options.maxZoom = 25;
});

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Frequent Contributor
Posts: 83
Registered: ‎07-17-2017

Re: Scale Limit Restriction

Hi everybody,

 

is there also a way to set the initial map zoom? I tried this but the appearance of the initial map didn't change:

 

var map;
mainContext.switchingMapViewerAdapter.getMapAdapter().then(function(adapter){ map=adapter.getMap(); map.options.maxZoom = 25; map.options.zoom=23; console.log(map); });

 

I'm not sure where I have to place the code because I guess I need to put it somewhere before the map instance is created?

When I log the map object the properties are set correctly and changing the maxZoom property also works fine.

 

 

Marisa

Highlighted
Frequent Contributor
Posts: 83
Registered: ‎07-17-2017

Re: Scale Limit Restriction

This solved the problem:

 

map.setView(L.latLng(21.1, 92.1),14,24);
Highlighted
Contributor
Posts: 75
Registered: ‎02-19-2019

Re: Scale Limit Restriction

Hi ,

Where you put this code ? Thanks !

 

map.setView(L.latLng(21.1, 92.1),14,24);
Highlighted
Technical Evangelist
Posts: 1,238
Registered: ‎09-11-2015

Re: Scale Limit Restriction

In the browser App configuration, switch to customization and choose JS part on the top-right corner:

https://hexagongeospatial.fluidtopics.net/reader/K4ZTIoSZrNXW5_NC_qTp_w/aHFP6epxvdlGzsE72t8dsA

 

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Highlighted
Contributor
Posts: 75
Registered: ‎02-19-2019

Re: Scale Limit Restriction

 

Thank you Jan, Its work for me. 

 

mainContext.switchingMapViewerAdapter.getMapAdapter().then(function(mapAdapter) {
    mapAdapter.getMap().options.maxZoom = 25;
});