Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: Map
My code is failing here with this error message:
Microsoft JScript runtime error: 'GBounds' is undefined
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?
Posted 15-Jan-13 10:20am
Edited 15-Jan-13 12:29pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
lieyo at 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?

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

  Print Answers RSS
0 Dnyaneshwar@Pune 719
1 CPallini 245
2 CHill60 235
3 Sergey Alexandrovich Kryukov 230
4 TheRealSteveJudge 208
0 Sergey Alexandrovich Kryukov 9,078
1 OriginalGriff 6,771
2 Peter Leow 4,262
3 Zoltán Zörgő 3,809
4 Richard MacCutchan 2,663

Advertise | Privacy | Mobile
Web03 | 2.8.150128.1 | Last Updated 16 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100