Joe Sharples
Posts: 0
Joined: Mon Aug 18, 2014 1:31 pm

Uncaught TypeError: Cannot read property 'getBounds' of null

I'm receiving this error in the console.

Uncaught TypeError: Cannot read property 'getBounds' of null
Rba
(anonymous function)

What does it mean?

Joe Sharples
Posts: 0
Joined: Mon Aug 18, 2014 1:31 pm

Uncaught TypeError: Cannot read property 'getBounds' of null

I deleted the map component on the page and now theres no error.

The map component is causing it.
I have a service mapping an 'address' field to the map and marker address.

Ihor Didevych
Posts: 0
Joined: Wed Nov 19, 2014 7:55 pm

Uncaught TypeError: Cannot read property 'getBounds' of null

Hi Joe,

1) can provide at least screenshot with full stack trace ?
2) what service do you calling at that point ?

Joe Sharples
Posts: 0
Joined: Mon Aug 18, 2014 1:31 pm

Uncaught TypeError: Cannot read property 'getBounds' of null

to isolate the problem in removed all existing events on page load/show.

The page name is NightInfo.

Image

Image

M&M
Posts: 0
Joined: Tue Nov 11, 2014 6:59 am

Uncaught TypeError: Cannot read property 'getBounds' of null

One of the possibilities could be that the map component has not finished loading. You want to move the REST call to a button click event or something first to isolate the event?

I dunno if this will help but what I did was to add a small delay in calling the REST API on my page show event...and so far things have been fine....

Here's the snippet just in case it'd help

code
// Change the map component name to match your's
var map;

function initialize() {
map = Apperyio("googlemap1").gmap;
if (!map)
{
setDelay();
}
else
{
restNearbyPlaces.execute();
}
}

function setDelay()
{
setTimeout(initialize, 50);
}

initialize();
/code

Joe Sharples
Posts: 0
Joined: Mon Aug 18, 2014 1:31 pm

Uncaught TypeError: Cannot read property 'getBounds' of null

Hi M&M,

Thank you for your response, although I'm not sure which REST API you mean?
By REST API call do you mean the services that I have created under the pages data tab inside appery builder?
I still receive the error when these service haven't been executed.

or are you referring to the other rows under the network tab of chrome dev tools that are shown in my previous screenshot?

Murali
Posts: 0
Joined: Mon Jan 26, 2015 2:01 pm

Uncaught TypeError: Cannot read property 'getBounds' of null

have you used any external javascript libraries?

Lee Kraus
Posts: 0
Joined: Mon Jan 05, 2015 12:54 am

Uncaught TypeError: Cannot read property 'getBounds' of null

I am getting the same error

Murali
Posts: 0
Joined: Mon Jan 26, 2015 2:01 pm

Uncaught TypeError: Cannot read property 'getBounds' of null

Are you using the google map component as well?

Return to “Issues”