I'm attempting to use MQA.TileMap.zoomToRect
to set the view-port of a given bounding box.
var cust;
var rect = new MQA.RectLL();
for (var i = 0, len = custs.length; i < len; i++) {
cust = custs[i];
poi = new MQA.Poi({lat:cust.lat, lng:cust.lng});
map.addShape(poi); // This works
rect.extend(poi.latLng); // Does nothing to `rect'.
}
map.zoomToRect(rect, false); // This fails
It appears that the rect
values remain as 0,0
for both lr
and ul
properties. The call results in the following output in firebog
"NetworkError: 500 Internal Server Error - http://coverage.mqcdn.com/coverage?format=json&jsonp=MQA._covCallback&loc=NaN,NaN,NaN,NaN&zoom=2&projection=sm&cat=map%2Chyb%2Csat"
EDIT: I've added notes to the example that adding a shape works fine, so the poi object is fine, also inspecting poi.latLng
is fine.