Topic: How Exact is the Road data?

Hello,

I'm working on a VR game for Unity and I've been looking at several mapping solutions and I came across Online Maps for Unity. But, I have some sort of strange needs using real world street data to figure out road length to do some object generation at run time. I'm wondering if Online Maps gives me access to the following:

Node - point specified by latitude and longitude. Used to define some POI (Place Of Interest) on map.

Way - open polyline specified by two or more points. Common usage is roads.

Area - closed polygon specified by three or more points. Widely used for simple buildings, terrain regions (green zones, water, etc.)

Relation - union of nodes, ways, areas or relations. Used for specifying complex shaped buildings, terrain regions, etc.

Also, I can't tell from the videos - but do map tiles that are generated support height information as well or are all of the maps flat?

Thanks,
Steve

Re: How Exact is the Road data?

Hello,

Also wondering if it's possible to generate street geometry at run time?

Re: How Exact is the Road data?

Hello.

Unfortunately, I'm not sure that I understood your question correctly.

If you want to get this information, use OSM Overpass API.
Example:
http://infinity-code.com/atlas/online-m … ample.html

If you want to draw a map based on your own data - unfortunately, Online Maps can not do this.
Online Maps has a drawing API, but it is not designed for such use.

Kind Regards,
Infinity Code Team.

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

Re: How Exact is the Road data?

Hi Alex,

Thanks for the information - I've been looking through the API and it looks quite robust! But, I'm wondering with the drawing API and the building Node class, could I replace buildings with my own prefabs?

Also, sorry, but I'm still unclear about drawing the road surface - looks like there is stuff for this with the OnlineMapsDrawingPoly Class? Could I then lay that over a tile and generate the road surfaces?

I have a VR game where I want to put the player in some real world based locations, but customize that location a bit, stuff like roads, buildings, and then add some prefab game objects at certain points. From what I've been learning about OSM data and getting that into Unity - it looks like there are some 'standardized' ways of getting the data for stuff like 'roads' or 'landuse' or 'building'. I've looked into Mapbox as well, but it seems a bit limited in it's VR usages and the API for getting particular things isn't very clear to me. The API with Online Maps looks really perfect for my use case, I think.

Again, thank you so much for the information and help,

Steve

Re: How Exact is the Road data?

Yes, you can do it.
But it's much better to use 3D markers for these purposes.

Yes, theoretically you can draw a polygon or line.
But as I already wrote above: Drawing API is not designed for such use.
This means that with a large number of drawing elements your application will run slowly.
In this case it's much better to implement your own way of generating roads, which will be optimized for your specific application.
Online Maps does not force you to use the built-in Drawing API.
You can generate mesh yourself, use LineRenderer or GL.

No, there is no standardized way.
There are only a few services here, each of which has advantages and disadvantages, for example: OSM Overpass API and Mapbox / Mapzen vector tiles.
Vector tiles are much smaller, faster to download and parse (especially if it's protobuf). But this data is VERY difficult to use for calculations.
OSM data is fairly easy to use, but the server response can be a few megabytes in size. It's very slow to load and parse such XML.

What a way to use it is only your choice.

Kind Regards,
Infinity Code Team.

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