ThinkGeo.com    |     Documentation    |     Premium Support

Add ‘Scale’ property to MarkerZoomLevel class

Dear ThinkGeo team,

We use your Desktop edition Map Suite version 9.0.

ThinkGeo.MapSuite.Core.ZoomLevel class has ‘Scale’ property. When map layer’s scales are beyond scales of default Zoom Level 01 to 20, we can change the Scale that allows the map-control to show these layers.

However, MarkerZoomLevel class does not have ‘Scale’ property. So we cannot change the zoom-levels’ scale when the map layer’s scales are beyond scales of default Zoom Level 01 to 20. Now we are in troubles that these mark layers cannot show in the map-control when the map layer scales are beyond scales of default Zoom Levels.

Please add ‘Scale’ property to MarkerZoomLevel class as ZoomLevel class does.

Thank you very much,

Mengbo

Hi Mengbo,

MarkerZoomLevel is different with other zoomlevel. The index of it is the zoomlevel id, so if you use custom zoomlevels for map, you need add the same number markerZoomLevel to make sure it can be rendered.

As below can simple shows how it works.

ScaleValue1 <-- Zoomlevel1 <–> Index 1 <–> MarkerZoomLevel1 --> Marker style 1

Wish that’s helpful.

Regards,

Ethan

Hi Ethan,

Thank you for your tips. This is helpful for maps with scales less than ZoomLevel1.

But some of our maps’ smallest scales are much greater than scale ZoomLevel1. So only MarkerZoomLevel1 works. We cannot show different mark styles for different zoom levels. This is why we need your help in adding Scale property to MarkerZoomLevel class.

Thank you,

Mengbo

Hi Mengbo,

We cannot add the scale property to MarkerZoomLevel, because if we added it, the map don’t know which scale need be used for marker. The MarkerZoomLevel have to be bind to map default zoomlevel.

And I want to know how you set your zoomlevel much greater than zoomlevel1, are you using custom zoomlevels here?

If you want to make it works, I think you can directly change the scale value of default zoomlevels. Because if your default zoomlevels don’t support to render to a specified level, the MarkerZoomLevel is meaningless because it even cannot be accessed on map.

Please show us how you set your zoomlevels, so we can try to reproduce it.

Regards,

Ethan

Hi Ethan,

The full map extent scale of our shape files is 23,951,369,805,668. It is 40,554 times larger than scale 590,591,790 of default ZoomLevel01.

We want to show three mark-styles at three zoom-levels at
23,951,369,805,668: mark-style-1
2,993,921,225,708: mark-style-2
374,240,153,213: mark-style-3

You can see the smallest scale still much larger than the scale of default ZoomLevel01. So we can only show one mark-style by using default ZoomLevels.

Our shape files are attached. Please help with sample code to show three mark-styles at three zoom-levels at:
23,951,369,805,668: mark-style-1
2,993,921,225,708: mark-style-2
374,240,153,213: mark-style-3

Thank you very much,

Mengbo

larger-scale-shapefiles.zip (1.9 MB)

Hi Mengbo,

Please refer this sample: 9153.zip (1.9 MB)

Wish that’s helpful.

Regards,

Ethan

Hi Ethan,

Your sample works.

Thank you very much for your help!

Have a nice day!

Mengbo

Hi Mengbo,

I am glad to hear that works.

Regards,

Ethan