Topic: Zoom in further than zoom level 20?

Is it possible to change the parameters in the OnlineMaps to allow you to zoom in further than zoom level 20?

I would like to simulate 2-lane traffic and have a potential zoom level of 20-25. Is this possible?

Regards
Brian

2 (edited by brian4342 2017-09-29 14:04:54)

Re: Zoom in further than zoom level 20?

Some other questions I have is trying to match the buildings to the map. As you can see from the screenshot the buildings are offset from where they should be.

This is the code I use to initialize the map (then I just add the building script).

//Set Map
        gameObject.transform.position = new Vector3(1200, 0, -164);
        OnlineMaps.instance.width = 4500;
        OnlineMaps.instance.height = 2400;
        OnlineMaps.instance.tilesetSize = new Vector2(4500, 2400);

        // Set Zoom and Zoom Range
        OnlineMaps.instance.zoomRange = new OnlineMapsRange(15, 20);
        OnlineMaps.instance.zoom = 17;

        //Position Map + Get Routes
        OnlineMaps.instance.position = new Vector2(-2.990789f, 53.434323f);

The same happens when I use the google routing api to draw a line from start to end points.
I am currently using OpenStreetMaps as the provider but I have tried it with others and got the same results.


Finally, could I also ask where you got your building textures from that are shown in the asset store?

Regards
Brian

Post's attachments

Attachment icon screenshot.png 1000.12 kb, 209 downloads since 2017-09-29 

Re: Zoom in further than zoom level 20?

Hello.

Try it. You need to modify the constant OnlineMaps.MAXZOOM.
I do not know what will happen.
Theoretically this should work correctly up to zoom = 28.

The width / height of the map should be 256 * N.
Otherwise, all conversions do not work correctly.
This is a known problem, and we are working on a solution.
Get around this is very easy - use a size (width and height) equal to N * 256, for example 4608x2560.
tilesetSize can have any value.

Enter something like "skyscraper wall texture" or "building wall texture" in google search, and you'll find many suitable textures.

Kind Regards,
Infinity Code Team.

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