26 (edited by negruj0w1tsch 2020-11-02 11:44:22)

Re: Extend Online Maps to create a horizon

Hello,

Due to some script related dependencies I have to rotate my map object in the scene. It's basically got a rotation 0/180/0 e.g. upside down than the default rotation. This, however causes an issue with the HorizonWithoutElevation script. The content of the map on the horizon tiles doesn't fit the main map. Any quick way to fix this while still keeping the 0/180/0 rotation of the map object?

Cheers,

Jürgen

Re: Extend Online Maps to create a horizon

It was not planned in this script that the map could be rotated.
Email me (support@infinity-code.com) and I will send you a modified script.

Kind Regards,
Infinity Code Team.

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

Re: Extend Online Maps to create a horizon

How do you use the scripts you publish?I used horizon. Cs directly.This is the error I got:

Assets\Infinity Code\Online maps\Scripts\Horizon2.cs(76,45): error CS0117: 'OnlineMapsUtils' does not contain a definition for 'GetWWW'
Assets\Infinity Code\Online maps\Scripts\Horizon2.cs(79,18): error CS1061: 'OnlineMapsTile' does not contain a definition for 'customData' and no accessible extension method 'customData' accepting a first argument of type 'OnlineMapsTile' could be found (are you missing a using directive or an assembly reference?)
...........

Re: Extend Online Maps to create a horizon

For Online Maps v3 you need to use Horizon2_OM3 script.

Kind Regards,
Infinity Code Team.

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

Re: Extend Online Maps to create a horizon

Alex Vertax wrote:

For Online Maps v3 you need to use Horizon2_OM3 script.

Thanks,But ,I used the script you mentioned, but my program did not get  OnlineMapsBingMapsElevationManager.instance:

Re: Extend Online Maps to create a horizon

This example requires Bing Maps Elevation Manager.
If you don't need elevations, see HorizonWithoutElevation script in the package.

Kind Regards,
Infinity Code Team.

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

Re: Extend Online Maps to create a horizon

Alex Vertax wrote:

Horizon 2 ArcGIS has many ways to fix this:
1. Decrease Position Y Offset, for example to “-25”.
2. Decrease In Map View Y Offset, for example to “-70”.
3. Increase Render Queue Offset, for example to "300".

Hi Alex, playing with elevation with the horizon_OM3.cs and the elevation manager, I wanted to have the small detailed map above the horizon one in the rendering. I wanted the y position at the same level for both the first option but then there was some overlap with the first option so no. I fail to see the purpose of the In Map View Y offset, could you explain a bit more?
I tried the third option but I've read that on the URP we had to set the ZTest property of the material to Always so that it shows up alwais on top.
The urp and shadergraph does not expose this property. The solution for me then was to play with the camera stacking with base and overlay, and have as many renderPipelineAsset and layers as I needed horizons.
I found this path a bit tedious but it works well, and I thought maybe there was a simpler option you had come up with?

Thank you for your time smile

Re: Extend Online Maps to create a horizon

Unfortunately, I am not an expert on shaders, and each of them was given to me through a lot of pain.
So I can't tell you which way is better here.

Kind Regards,
Infinity Code Team.

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

34

Re: Extend Online Maps to create a horizon

Hello Alex, I'm trying to figure out why Horizon keeps generating this kind of offset in the terrains around my central map?

This is right from a fresh map add with all values set to 1024

Post's attachments

Attachment icon mapsissue.jpg 82.44 kb, 55 downloads since 2022-04-29 

Re: Extend Online Maps to create a horizon

These scripts always use whole tiles, and it can have some offset from the main map.
You need to adjust Camera / Clipping Planes to make the user not see it.

Kind Regards,
Infinity Code Team.

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

36 (edited by mcb 2022-05-11 16:02:12)

Re: Extend Online Maps to create a horizon

Alex, how would I go about adding markers to the horizon terrains?

I'm using the Bing maps version if it matters

Re: Extend Online Maps to create a horizon

The horizon is not part of the map and cannot have markers.

Kind Regards,
Infinity Code Team.

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

38

Re: Extend Online Maps to create a horizon

ugh, ok, gonna have to come up with a different solution then, it looks so bad seeing markers just disappear when they hit the horizon terrains

Re: Extend Online Maps to create a horizon

Have a look at OnlineMapsMarkerFlatDrawer.OnCheckMarker2DVisibility.  Using this event, you can change the visibility check rules and make the markers visible from the outside of the map.

Kind Regards,
Infinity Code Team.

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

Re: Extend Online Maps to create a horizon

Hi Alex,

I have read the thread above. I am getting NullReferenceException "if (OnlineMapsElevationManagerBase.isActive) OnlineMapsBingMapsElevationManager.instance.SetElevationData(heights)" at this line in "Horizon2_OM3" script.

I am using source as Mapbox, Satellite in onlineMaps component. And Mapbox elevation component on the maps gameobject.
Is there anything wrong I am doing?

As in one reply you have mentioned to use  this "Horizon2_OM3" script with mapbox and in one reply you said it to use with Bing. What is the right way to use it with mapbox?
Also I want to use it for cached data, how to that too. Please help me do that.

Thanks,
Pooja Garg

Re: Extend Online Maps to create a horizon

Hello.

Horizon2_OM3 requires Bing Maps Elevation Manager.
This will download the elevation tiles from Mapbox and pass them to Bing Maps Elevation Manager, so you won't actually be making requests to Bing Maps Elevation API.

Kind Regards,
Infinity Code Team.

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

Re: Extend Online Maps to create a horizon

Hi Alex,
Thanks for the response!
Can change "Horizon2_OM3" script from using BingMaps by setting elevation data like this "OnlineMapsBingMapsElevationManager.instance.SetElevationData(heights)" to using "SetElevationTexture(Tile tile, Texture2D texture)" in "OnlineMapsMapboxElevationManager" script.

Also how will Horizon2_OM3 script work with cached data?

Re: Extend Online Maps to create a horizon

This script does not cache elevation data.
My goal was to give an example of how to show a map outside of a map in order to extend this, and not to make some kind of universal solution.

Kind Regards,
Infinity Code Team.

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

Re: Extend Online Maps to create a horizon

I think, there is some misunderstanding.
My question is, if I have already cached data for some region then how can we use this Horizon script to load cached tile textures and elevation data from cached folder in offline mode.

Re: Extend Online Maps to create a horizon

Modify the script and before downloading the elevation data, check its presence in the cache.
If present, read the data from the cache.
If missing, download the data and cache it.

Kind Regards,
Infinity Code Team.

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

Re: Extend Online Maps to create a horizon

Hi Alex,
Thanks for the help! It really gave me direction.
I have added the code to load the elevation data from cache using "OnlineMapsCache.Get(string key)" while keeping internet off.
But something wrong must be there, I am not able to load the cached elevation in offline mode for horizon.

Does any of the Horizon scripts you have shared in this thread has the feature to load the elevation from cache?

Please help me into this.
Regards,
Pooja Garg

Re: Extend Online Maps to create a horizon

You can use OnlineMapsTiledElevationManager.SetElevationToCache and TryLoadFromCache as an example of writing to and reading from a custom cache.

Kind Regards,
Infinity Code Team.

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

Re: Extend Online Maps to create a horizon

Hello, I'm trying to make the Horizon 2_bing Maps script work with camera Orbit. Could you give me some guidance?

Re: Extend Online Maps to create a horizon

Please ask your question in more detail, or describe in detail the problem you are having.

Kind Regards,
Infinity Code Team.

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

Re: Extend Online Maps to create a horizon

I have added the script Horizon 2_Bing Maps, and when I rotate to look around in the map with the elevations on, It clips and still shows the end of the map. How can I stop this clipping?

Is there a way that I can allow rotation movements in the map, have a horizon that does not show the end of the map, and make it do not clip when I zoom in?

Post's attachments

Attachment icon ProblemInPictures.png 880.23 kb, 43 downloads since 2022-10-26