Topic: Marker Scale by Zoom Example

http://infinity-code.com/atlas/online-m … ample.html

I'm trying to understand the following code:

        float originalScale = 1 << defaultZoom;
        float currentScale = 1 << OnlineMaps.instance.zoom;

It looks to me like you're using the binary shift operator. Is that the case, or are you overloading it in some way? If you are, could you explain your logic here just a bit?

Thanks!

Re: Marker Scale by Zoom Example

Hello.

The map has the size (tiles):
Size = 2 ^ Zoom

Zoom: tiles
0: 1x1
1: 2x2
2: 4x4
3: 8x8

The fastest way to calculate the size - it is a binary shift.

http://www.maptiler.org/google-maps-coo … rojection/
https://msdn.microsoft.com/en-us/library/bb259689.aspx

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.