Click here to Skip to main content
15,882,152 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My code is failing here with this error message:
Microsoft JScript runtime error: 'GBounds' is undefined
JavaScript
GBounds.prototype.containsPoint = function (point) {
  var outer = this;
  return (outer.minX <= point.x &&
          outer.maxX >= point.x &&
          outer.minY <= point.y &&
          outer.maxY >= point.y);
};

Can someone please tell me how to fix this problem? From what I understand Javascript API v3 doesn't support GBounds. Any alternative?

Thanks
Lieyo
Posted
Updated 15-Jan-13 11:29am
v3

1 solution

If GBounds is undefined, then you need to define it before you attempt to use it.
Make sure a line something along the lines of var GBounds = ... exists where the ... is replaced by the appropriate identifier.

[Update for api v3]
I'm not entirely sure because I haven't tried it myself, but I found this answer on another site that might lead you in the right direction.
Clickey[^]. I know that the answer is technically related to ColdFusion, but the javascript use of the API might be what you are looking for.
 
Share this answer
 
v2
Comments
lieyo 16-Jan-13 8:17am    
GBounds I believe is a class available in v2 that is no longer supported in v3. By the way is there a new Marker Manager for API V3?

Thanks

Lieyo

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900