Topic: Full refresh
Hi,
I want to implement a button to change the type of the map (like in google maps, I want the user to be able to change from terrain, to satellite and so on) how can I force a full refresh of the map when the type is changed?
You are not logged in. Please login or register.
Infinity Code Forum → Online Maps Help → Full refresh
Hi,
I want to implement a button to change the type of the map (like in google maps, I want the user to be able to change from terrain, to satellite and so on) how can I force a full refresh of the map when the type is changed?
Hello.
Redrawing the map when changing the type of map occurs automatically.
Example of how to change the type of map:
http://infinity-code.com/atlas/online-m … ample.html
awesome thanks!
Hi, this solution doesn't seem to work for me. I have a Mapbox map integrated into the asset (works), but if I try to alter the mapID, I need to do it somehow like this:
OnlineMaps.instance.mapType = mapTypeID;
OnlineMapsProvider.MapType mapType = OnlineMapsProvider.FindMapType(mapTypeID);
OnlineMapsProvider.ExtraField field = GetExtraField(mapType.extraFields, "mapid");
field.value = Mapbox_ID_Light;This actually changes the map to the correct one, whenever I scroll over an uncached area, but it doesn' refresh the existing tiles.
I tried below, without success:
OnlineMapsCache.instance.ClearFileCache();
foreach (OnlineMapsTile tile in OnlineMapsTile.tiles) tile.Dispose();
OnlineMapsTile.tiles.Clear();
OnlineMaps.instance.Redraw();
OnlineMaps.instance.tileManager.Reset();Hi.
When you use multiple map types from the same provider, you'd better register your own providers and/or map types.
Example:
https://infinity-code.com/atlas/online- … ample.html
Infinity Code Forum → Online Maps Help → Full refresh
Powered by PunBB, supported by Informer Technologies, Inc.