StevenL.3761:

Hi there

Generally speaking, I’m pretty happy with the API documentation. But what is going on with the event_details page? The documentation cuts off right in the middle of the interesting part.

Can someone please explain what the different types of location object are for? Perhaps with some (C#) code samples of what the entities should look like?

Thanks!

Kegsay.7068:

I believe they are used to show you the area you must be inside in order for the event to display on screen. They are formed as 3D shapes (which I guess you could maybe utilise the z-axis for checking if the event is visible on multiple floors?).

From what I can see:
type = a hint on how to generate the the 3d box
center = the center of the event as [x, y, z]
radius = how far out from the center it goes (sphere/cylin only)
height = z length of the event, can probably be ignored if you don’t care about depth, though bear in mind this is the height wrt the center z coord.
z-range = the literal z-min and z-max coords as [min, max]
points = a series of xy coords which make a polygon, as [x, y]
rotation = No clue, as I have no idea on what axis it is rotated around (which I assume it must be axis rotated else a rotation key for a sphere is meaningless)

Basically, if you’re just projecting this onto a 2d map, you can probably get away with:
if sphere or cyl then:
event range is a circle around key ‘center’ with radius ‘radius’.
else if polygon then:
join the dots on the list of ‘points’ and be done with it.

Hope this helps.

StevenL.3761:

I still don’t understand what’s the significance of the z-axis in relation to a flat world map. Am I missing the point, or does it have other uses?

Kegsay.7068:

The z-axis measurements would be more useful if your projections were on a 3d map, but in all probability it isn’t. You can only partly represent depth on the current map via the “floor” of the map. You could potentially work out the z-value of each floor (e.g. -1500 to -500 for floor 3, -500 to +500 for floor 2) and then correctly display the events which are designed to still be visible on different floors. Of course, you have to be careful with this because AN seem to use some floors to mean completely different maps.

For the most part though, this is overly complex for extremely little gain, and it’s far easier to just ignore the concept of floors / z values given in the response.