Search code examples
javascriptmapshere-api

HERE maps Get cardinal points using Bounds


I need to get the location of the cardinal points using Here Api javascript, I am using the following code:

var bounds = map.getViewModel().getLookAtData().bounds;
                console.log(bounds.getBoundingBox());

And the result that I get is these values and I don't know what value is north, south, east and west.

K {ba: -79.39228887213605, ga: -79.38982123984238, ja: 43.6432819654959, la: 43.641401124059136, b: null, …}
a: null
b: null
ba: -79.39228887213605
c: null
ga: -79.38982123984238
ja: 43.6432819654959
la: 43.641401124059136
__proto__: Wf

Solution

  • I resolved my question with the following lines of code:

    var bounds = map.getViewModel().getLookAtData().bounds;
    var points = bounds.getBoundingBox();
    var top = points.getTop();
    var left = points.getLeft();
    var right = points.getRight();
    var bottom = points.getBottom();