FYI: New Release

132 views
Skip to first unread message

Ben Appleton

unread,
Dec 14, 2009, 4:19:39 AM12/14/09
to google-map...@googlegroups.com
We just released a new version of the JS v3 API.

Please note: we have removed the deprecated get_foo/set_foo methods.
Our logs show that few sites still use these methods.

If there are no major issues, we'll post a full announcement of this
release in the next 24-48 hours. In the meantime, please report any
regression issues you see in the discussion group.

Thanks!
Ben

NicholasCanzoneri

unread,
Dec 14, 2009, 10:47:51 AM12/14/09
to Google Maps JavaScript API v3
I know this will only be marginally helpful, I'll try to push my
project to a public site later but:

I am getting the following error in Chrome 3.0.195.33 and Chromium
4.0.270.0 (34457):

"Uncaught TypeError: Cannot read property 'push' of undefined" in
http://maps.gstatic.com/intl/en_us/mapfiles/api-3/24/main.js on line
22.

The map area is just white space.

In Firefox 3.5.5, I'm getting the same white space where the map
should be, but with the error of:
"b.j is undefined." in
http://maps.gstatic.com/intl/en_us/mapfiles/api-3/24/main.js on line
22.

Surprisingly, IE8 works fine.
IE8 in IE7 compatibility mode gives the following error:
" 'j' is null or not an object." in
http://maps.gstatic.com/intl/en_us/mapfiles/api-3/24/main.js on line
22 char 923

In the meantime, I'll try to track down in my code what is causing the
error.

--Nick Canzoneri

NicholasCanzoneri

unread,
Dec 14, 2009, 12:29:02 PM12/14/09
to Google Maps JavaScript API v3
Alright I think I tracked down the problem (but still no solution).

You can see the problem occur here: http://www.dvrpc.org/asp/test/gmap/

On the page I have a map and Google translation widget. The map will
not load (errors occur as per my previous post) if the translation
code executes before the map code. See the link for the exact code.

Any thoughts?

On Dec 14, 10:47 am, NicholasCanzoneri <ac3...@gmail.com> wrote:
> I know this will only be marginally helpful, I'll try to push my
> project to a public site later but:
>
> I am getting the following error in Chrome 3.0.195.33 and Chromium
> 4.0.270.0 (34457):
>
> "Uncaught TypeError: Cannot read property 'push' of undefined" inhttp://maps.gstatic.com/intl/en_us/mapfiles/api-3/24/main.json line
> 22.
>
> The map area is just white space.
>
> In Firefox 3.5.5, I'm getting the same white space where the map
> should be, but with the error of:
> "b.j is undefined." inhttp://maps.gstatic.com/intl/en_us/mapfiles/api-3/24/main.json line
> 22.
>
> Surprisingly, IE8 works fine.
> IE8 in IE7 compatibility mode gives the following error:
> " 'j' is null or not an object." inhttp://maps.gstatic.com/intl/en_us/mapfiles/api-3/24/main.json line

Daniel Lee

unread,
Dec 14, 2009, 6:56:21 PM12/14/09
to Google Maps JavaScript API v3
Hey Nick,

Can you strip out the translation widget and jQuery dependencies from
your example?

It would help confirm whether this is a bug with the v3 API versus it
being a byproduct of combining maps with the two other components.



Thanks,

Dann

Ben Appleton

unread,
Dec 14, 2009, 6:59:59 PM12/14/09
to google-map...@googlegroups.com
Thanks for your test page, I've tracked down the issue. The translate
widget modifies Function.prototype which breaks the Maps API. I've
added a workaround to the Maps API so our next release will fix your
page. I've also filed a bug with the translate team so they play well
with other APIs.

- Ben
> --
>
> You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
> To post to this group, send email to google-map...@googlegroups.com.
> To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>
>

NicholasCanzoneri

unread,
Dec 14, 2009, 8:38:17 PM12/14/09
to Google Maps JavaScript API v3
Thanks Ben.

And sorry I was unclear Daniel. The map does work fine without the
translation widget on the page, it was the combination of the two
causing problems.

Quick work Google Maps team!

--Nick

bratliff

unread,
Dec 15, 2009, 9:40:51 AM12/15/09
to Google Maps JavaScript API v3
I am encountering "Security Errors" on many pages.

http://www.polyarc.us/polycluster/polygon.html

produces:

Security Error: Content at http://maps.gstatic.com/intl/en_us/mapfiles/api-3/24/main.js
may not load data from http://www.provide.net/~bratliff/polycluster/polygon.html.

Error: a.A is not a function
Source File: http://maps.gstatic.com/intl/en_us/mapfiles/api-3/24/main.js
Line: 33

in the Firefox Error Console.

v3.23 was OK

Ben Appleton

unread,
Dec 16, 2009, 12:15:26 AM12/16/09
to google-map...@googlegroups.com
Got it:
- PolyCluster (http://www.provide.net/~bratliff/polycluster/polycluster.js)
inherits from google.maps.OverlayView
- (google.maps.)OverlayView inherits from google.maps.MVCObject
- which defines MVCObject.prototype.L
But:
- PolyCluster.prototype.repair includes this code:
l=this.L; if(l) { ... }
The first time PolyCluster runs, the existence of
MVCObject.prototype.L confuses the if statement, and PolyCluster
proceeds to presume that .L is a DOM element.

Esa

unread,
Dec 16, 2009, 3:06:39 AM12/16/09
to Google Maps JavaScript API v3
MVCArray.push() and pop() are highly useful methods.

bratliff

unread,
Dec 16, 2009, 11:40:00 AM12/16/09
to Google Maps JavaScript API v3
On Dec 16, 5:15 am, Ben Appleton <apple...@google.com> wrote:
> Got it:
> - PolyCluster (http://www.provide.net/~bratliff/polycluster/polycluster.js)
> inherits from google.maps.OverlayView
> - (google.maps.)OverlayView inherits from google.maps.MVCObject
> - which defines MVCObject.prototype.L
> But:
> - PolyCluster.prototype.repair includes this code:
> l=this.L; if(l) { ... }
> The first time PolyCluster runs, the existence of
> MVCObject.prototype.L confuses the if statement, and PolyCluster
> proceeds to presume that .L is a DOM element.

Thanks Ben,

I have been concerned about namespace collisions. I believe Mike
Williams said you always used two character names where the first
character is lower case. I have started to move everything to child
properties of one parent object which will reduce the chance of a
conflict. I will also explicitly set instance "this.whatever"
variables to "null" rather than assuming "undefined". Do you have
safe naming guidelines ?

bratliff

unread,
Dec 16, 2009, 12:20:11 PM12/16/09
to Google Maps JavaScript API v3

I have added the following to the initialization routine:

for (i=0;l="ABCDEFGHIJKLMNOPQRSTUVWXYZ".charAt(i);i++)
{
this[l]=0;
}

It is still causing security violations.

I also tried:

this.L=null;

without success.

Ben Appleton

unread,
Dec 16, 2009, 7:47:14 PM12/16/09
to google-map...@googlegroups.com
I have just submitted fixes and automated tests to ensure that in future we do not leak any obfuscated properties on non-final classes, ie. MVCObject and OverlayView.  These fixes should go out with the next release.  However the next scheduled release is 3 weeks away since many people are on vacation, so let's consider workarounds for the meantime.

Yes; when MVCObject calls method .L it expects to find a function rather than 0 or null.  The essential problem is that PolyCluster .L and OverlayView .L collide on the shared property namespace.  This hasn't been a big deal previously, but I suspect this will become a common problem as minifiers/compilers become more widely used.

If you're using a minifier/compiler, a simple workaround is to "extern" the properties of PolyCluster so that they are not minified/obfuscated.  This will increase the size of polycluster.js a little, but after gzip compression or property aliasing (if you're using a compiler) I would hope the increase is small.  Perhaps this is acceptable for a few weeks; certainly this is the simplest short-term solution.

Another solution is to delegate the work from PolyCluster (which extends OverlayView) to another class such as PolyClusterImpl.  I can't find polycluster.js to test this code, but the following should work:

/**
 * The original PolyCluster, which does all the work.
 * This should be hidden from clients.
 */
function PolyClusterImpl() {
  ... existing implementation of PolyCluster ...
}
... existing implementation of PolyCluster ...

/**
 * Proxy class which extends OverlayView and is intended for clients to use.
 */
function PolyCluster() {
  this['delegate'] = new PolyClusterImpl;
}
PolyCluster.prototype = new OverlayView;

/**
 * Helper function, which takes a method name and returns a method implementation which delegates.
 * @param {string} property A method name
 * @return {Function} Delegating method
 */
function makeDelegateMethod(property) {
  return function() {
      return PolyClusterImpl.prototype[property].apply(this['delegate'], arguments);
  };
}

for (var property in PolyClusterImpl.prototype) {
  // Do not copy obfuscated properties
  if (property.length < 3) continue;

  // Copy prototype properties
  if (typeof PolyClusterImpl.prototype[property] == 'function') {
    // Delegate method calls
    PolyCluster.prototype[property] = makeDelegateMethod(property);
  } else {
    // Copy non-function properties.  This is the best we can do in Internet Explorer as it lacks getter/setter methods.
    PolyCluster.prototype[property] = PolyClusterImpl.prototype[property];
  }
}

// Copy static properties (optional)
for (var property in PolyClusterImpl) {
  PolyCluster[property] = PolyClusterImpl[property];

bratliff

unread,
Dec 17, 2009, 8:05:04 AM12/17/09
to Google Maps JavaScript API v3
On Dec 17, 12:47 am, Ben Appleton <apple...@google.com> wrote:
> I have just submitted fixes and automated tests to ensure that in future we
> do not leak any obfuscated properties on non-final classes, ie. MVCObject
> and OverlayView. These fixes should go out with the next release. However
> the next scheduled release is 3 weeks away since many people are on
> vacation, so let's consider workarounds for the meantime.

Thanks Ben,

Actually, I fixed it yesterday. I am not using an obfuscator. "L" is
the actual variable name. I have moved all single character variables
to properties of the same parent object. "this.L" is "this._.L."
Ditto for the others. I use "var _=this._;" to reduce the code size.
I am assuming I can use "this._" safely. I must make similar changes
to "sparsetile.js".

You must have moved some of your code into an iframe. Otherwise, I do
not understand the sudden appearance of the many security violations.
I use "this.A" also. It receives an error message too.

Thanks again for your help.

bratliff

unread,
Dec 17, 2009, 10:45:09 AM12/17/09
to Google Maps JavaScript API v3
On Dec 17, 1:05 pm, bratliff <bratl...@umich.edu> wrote:

Actually, I may be able to abandon the use of OverlayView entirely.

The only things I am using are:

this.getProjection().fromLatLngToDivPixel(this.getMap.getCenter
());

plus

this.getPanes();

If both getProjection() & getPanes() were methods of the map, I could
eliminate OverlayView. Everything happens in the "idle" & "draw"
event listeners for the map. "idle" has to be added because it is not
automatic. "draw" could be replaced by "zoomChanged". Because
"PolyCluster" manages many polys, it is never removed.

Ben Appleton

unread,
Dec 17, 2009, 5:53:16 PM12/17/09
to google-map...@googlegroups.com
On Fri, Dec 18, 2009 at 12:05 AM, bratliff <brat...@umich.edu> wrote:
On Dec 17, 12:47 am, Ben Appleton <apple...@google.com> wrote:
> I have just submitted fixes and automated tests to ensure that in future we
> do not leak any obfuscated properties on non-final classes, ie. MVCObject
> and OverlayView.  These fixes should go out with the next release.  However
> the next scheduled release is 3 weeks away since many people are on
> vacation, so let's consider workarounds for the meantime.

Thanks Ben,

Actually, I fixed it yesterday.  I am not using an obfuscator.  "L" is
the actual variable name.  I have moved all single character variables
to properties of the same parent object.  "this.L" is "this._.L."
Ditto for the others.  I use "var _=this._;" to reduce the code size.
I am assuming I can use "this._" safely.  I must make similar changes
to "sparsetile.js".

I believe it is safe to use _.
 
You must have moved some of your code into an iframe.  Otherwise, I do
not understand the sudden appearance of the many security violations.
I use "this.A" also.  It receives an error message too.

No iframes.  The same bugs manifested for me as plain old exceptions, not security issues.
 
Thanks again for your help.

Ben Appleton

unread,
Dec 17, 2009, 5:59:47 PM12/17/09
to google-map...@googlegroups.com
The projection and the panes are in delay-loaded code, so they're not synchronously available.  So far we've worked to avoid exposing asynchronously loaded code.  The projection is a common request though, so we're thinking about how to provide it.

bratliff

unread,
Dec 18, 2009, 8:56:04 AM12/18/09
to Google Maps JavaScript API v3
On Dec 17, 10:59 pm, Ben Appleton <apple...@google.com> wrote:

> The projection and the panes are in delay-loaded code, so they're not
> synchronously available. So far we've worked to avoid exposing
> asynchronously loaded code. The projection is a common request though, so
> we're thinking about how to provide it.

Automatically calling the "idle" event like you do for the "draw"
event would be a nice addition too.

OvelayView.prototype.idle=function(){};

If I override it, you call mine. If I do not override it, yours
returns immediately. It eliminates explicit event listeners for every
OverlayView.

Ben Appleton

unread,
Dec 18, 2009, 7:48:03 PM12/18/09
to google-map...@googlegroups.com

Good point.  Extrapolating, for each event the event system could look for a corresponding method and call it.  That also helps avoid memory leaks.  We'll think about it.

On 19 Dec 2009 00:56, "bratliff" <brat...@umich.edu> wrote:

On Dec 17, 10:59 pm, Ben Appleton <apple...@google.com> wrote: > The projection and the panes are i...

Automatically calling the "idle" event like you do for the "draw"
event would be a nice addition too.

   OvelayView.prototype.idle=function(){};

If I override it, you call mine.  If I do not override it, yours
returns immediately.  It eliminates explicit event listeners for every
OverlayView.

-- You received this message because you are subscribed to the Google Groups "Google Maps JavaScri...

bratliff

unread,
Dec 31, 2009, 9:10:21 PM12/31/09
to Google Maps JavaScript API v3
I am trying to add Internet Explorer support using VML rather than
"excanvas". I am running into another bug. It might be my error but
it appears in the API, not in my code. It only occurs in Internet
Explorer. It always occurs at line 397 in the API.

I have moved everything to just two instance variable structures.
"this._" contains the unique variables for every instance. "this.$"
contains the common variables shared among instances using the same
"proxy".

Try:

http://www.polyarc.us/polycluster/examine.html.

with Internet Explorer. Click any state on the sidebar. It will
produce the error.

An unobfoscated copy of the JS code can be found at:

http://www.polyarc.us/cluster.js

bratliff

unread,
Jan 6, 2010, 8:04:42 AM1/6/10
to Google Maps JavaScript API v3

Ben and crew,

I am trying to add Internet Explorer support to PolyCluster but I
cannot debug it without your help. VML is broken on my machine. I
have tried unsuccessfully to reinstall both Internet Explorer and
Windows. I have to check out my changes on my next door neighbor's
machine.

An unobfuscated copy of the source code lives at:

http://www.polyarc.us/cluster.js

The suspicious lines unique to Internet Explorer are 990-1036.
Everything else works correctly in other browsers. The error only


occurs in Internet Explorer. It always occurs at line 397 in the API.

Thanks very much for your help.

Berry

Paul Kulchenko

unread,
Jan 7, 2010, 3:12:39 AM1/7/10
to Google Maps JavaScript API v3
Berry,

I don't get any errors in IE7, but I don't see any changes either:
states don't change their colors. This may be related to the fact that
buttons at the top of the page don't change their states (view0 is not
selected as it is in FF). I haven't had a chance to look deeper yet.

Paul.

bratliff

unread,
Jan 8, 2010, 9:54:40 AM1/8/10
to Google Maps JavaScript API v3
On Jan 7, 8:12 am, Paul Kulchenko <paulclin...@gmail.com> wrote:
> Berry,
>
> I don't get any errors in IE7, but I don't see any changes either:
> states don't change their colors. This may be related to the fact that
> buttons at the top of the page don't change their states (view0 is not
> selected as it is in FF). I haven't had a chance to look deeper yet.
>
> Paul.

Hi Paul,

Thanks for looking at it. I am seeing the little yellow icon in the
lower left corner of the screen. If I click it, it displays an error
at char 3 of line 397 (object does not support the method) I believe.
If I reposition my code, the error does not change. I assume it is in
the API which is obfuscated thus difficult to examine.

I have made several changes to deal with the state of Alaska. Some
small islands are in the Eastern Hemisphere. Dragging the map across
the International Date Line was not working.

I have also encountered the one pixel center shift you described a
couple of months ago. It was causing polys to be rebuilt too often.
I am using fixed point arithmetic with shifting. Google is using
floating point arithmetic with rounding. To reconcile the
differences, I am passing the results back to Google in a "LatLng"
object to recalculate "fromLatLngToDivPixel" with an adjusted center.
It is a little extra work but it eliminates the occasional
discrepency.

Perhaps Ben can confirm whether the Internet Explorer error is my
fault or a bug in the API. The code I am using is very similar to
"excanvas" & to the API. The main difference is the way the DOM is
built. I am using "document.createElement()". "excanvas" uses
"object.insertAdjacent Html()". For a lot of polys, I believe direct
manipulation of the DOM will be quicker.

I suspect it is a naming conflict. Perhaps I cannot use the "v"
namespace safely. I have no clue what is causing the error. I am
desparate for some direction from Google.

Berry

Ozgur Yogurtcu

unread,
Jan 8, 2010, 10:09:02 AM1/8/10
to google-map...@googlegroups.com
Berry,

Same as Paul here. I also checked it in IE 7, IE 8 and IE 8 in compatibility
mode. The states are not colored when you click on the names and no
Javascript error. Though in IE7, the view 0 button seems selected in my
experience. Not in IE8. When you click on the state you see the downloading
on related data but no coloring.

When you have the library running in IE, will it be available in v2 too?

Ozgur

bratliff

unread,
Jan 8, 2010, 10:44:30 AM1/8/10
to Google Maps JavaScript API v3
On Jan 8, 3:09 pm, "Ozgur Yogurtcu" <oyogur...@bluenettech.com> wrote:
> Berry,
>
> Same as Paul here. I also checked it in IE 7, IE 8 and IE 8 in compatibility
> mode. The states are not colored when you click on the names and no
> Javascript error. Though in IE7, the view 0 button seems selected in my
> experience. Not in IE8. When you click on the state you see the downloading
> on related data but no coloring.
>
> When you have the library running in IE, will it be available in v2 too?
>
> Ozgur

Hi Ozgur,

Thanks very much for your help. All of the other demos use an
obfuscated version of the same code. If it will help, I will
deobfuscate the others.

Do you see the same thing for:

http://www.polyarc.us/polycluster/hawaii.html
http://www.polyarc.us/polycluster/alaska.html

etc.

Yours is the first request for V2 support. It will be easy to add. I
will do it in the next few days. I have also considered doing a
static map version. It will require a device with JavaScript
capability.

Berry

Ozgur Yogurtcu

unread,
Jan 8, 2010, 11:34:38 AM1/8/10
to google-map...@googlegroups.com
Same. Nothing drawn and no JavaScript error in both.

I need a lightweight poly for v2 before v3 goes into production. I slightly
modified polygonzo and have been using that. I was hoping to open source but
never found the time. Your library seems to perform better so if it might
work for IE and v2 I'd be happy to help.

Ozgur

-----Original Message-----
From: google-map...@googlegroups.com
[mailto:google-map...@googlegroups.com] On Behalf Of bratliff
Sent: Friday, January 08, 2010 10:45 AM
To: Google Maps JavaScript API v3
Subject: [Google Maps API v3] Re: FYI: New Release

bratliff

unread,
Jan 8, 2010, 1:05:49 PM1/8/10
to Google Maps JavaScript API v3
On Jan 8, 4:34 pm, "Ozgur Yogurtcu" <oyogur...@bluenettech.com> wrote:
> Same. Nothing drawn and no JavaScript error in both.
>
> I need a lightweight poly for v2 before v3 goes into production. I slightly
> modified polygonzo and have been using that. I was hoping to open source but
> never found the time. Your library seems to perform better so if it might
> work for IE and v2 I'd be happy to help.
>
> Ozgur

You are helping a lot by telling me what is happening in your
browser. I cannot debug it because VML is broken on my machine.

I just moved everything to a different XML namespace assuming I might
not be playing well with the API in the "v" namespace. I am about to
pester my next door neighbor to see if it makes a difference.

PolyGonzo uses one very large CANVAS rather than breaking it into
tiles. The initial display is quicker but it runs out of gas if you
drag it beyond the edges of the CANVAS. Mike Geary is a very talented
programmer but his coding style is too bizarre for me. I am sure mine
appears bizarre to him.

I was not aware V2 was an issue. It will be easy to add. I prefer
the GOverlay class to the OverlayView class because it does not
require additional event listeners. The "redraw" method works the way
the "draw/idle" methods ought to work for V3.

bratliff

unread,
Jan 8, 2010, 1:15:09 PM1/8/10
to Google Maps JavaScript API v3
On Jan 8, 6:05 pm, bratliff <bratl...@umich.edu> wrote:
> You are helping a lot by telling me what is happening in your
> browser. I cannot debug it because VML is broken on my machine.
>
> I just moved everything to a different XML namespace assuming I might
> not be playing well with the API in the "v" namespace. I am about to
> pester my next door neighbor to see if it makes a difference.
>
> PolyGonzo uses one very large CANVAS rather than breaking it into
> tiles. The initial display is quicker but it runs out of gas if you
> drag it beyond the edges of the CANVAS. Mike Geary is a very talented
> programmer but his coding style is too bizarre for me. I am sure mine
> appears bizarre to him.
>
> I was not aware V2 was an issue. It will be easy to add. I prefer
> the GOverlay class to the OverlayView class because it does not
> require additional event listeners. The "redraw" method works the way
> the "draw/idle" methods ought to work for V3.

P.S.

If you do try it, be sure to clear your cache.

Thanks again for yuour help.

Ozgur Yogurtcu

unread,
Jan 8, 2010, 1:10:57 PM1/8/10
to google-map...@googlegroups.com
Sure let me know. I also looked at the code to debug but I don't know much
about Canvas or Svg and did not spend much time to find out. I stepped
through the code and it seemed to be going fine. If you can give me pointers
and ask specific questions I can do that for you. It's kind of weird that
you get a JavaScript error. Probably it's specific to your system as I
tested on two different computers. Also there's Paul's.

Ozgur

-----Original Message-----
From: google-map...@googlegroups.com
[mailto:google-map...@googlegroups.com] On Behalf Of bratliff
Sent: Friday, January 08, 2010 1:06 PM
To: Google Maps JavaScript API v3
Subject: [Google Maps API v3] Re: FYI: New Release

bratliff

unread,
Jan 8, 2010, 3:04:39 PM1/8/10
to Google Maps JavaScript API v3
On Jan 8, 6:10 pm, "Ozgur Yogurtcu" <oyogur...@bluenettech.com> wrote:
> Sure let me know. I also looked at the code to debug but I don't know much
> about Canvas or Svg and did not spend much time to find out. I stepped
> through the code and it seemed to be going fine. If you can give me pointers
> and ask specific questions I can do that for you. It's kind of weird that
> you get a JavaScript error. Probably it's specific to your system as I
> tested on two different computers. Also there's Paul's.
>
> Ozgur

I agree. I tested it about a week ago. I have made some changes
since. It may be an inadvertant side effect.

I believe VML is an optional installation component with Internet
Explorer. Perhaps my neighbor does not have VML. He is a dentist
with no idea what is on his computer. I have to be careful not to
damage his environment.

If you try:

http://www.polyarc.us/polycluster/examine.html

you will see an "Examine" button at the bottom of the screen. It will
display the current DOM structure. Please look at it both before &
after you try to load a state. You should see several "shape" /
"fill" / "stroke" elements being added to the DOM. Please let me know
whether the elements do actually appear.

Thanks again.

Berry

Ozgur Yogurtcu

unread,
Jan 8, 2010, 3:40:06 PM1/8/10
to google-map...@googlegroups.com
Berry, the examine button gives a the output you want before I click any of
the states but gives a Javascript error if I click it after clicking any of
the states (Which makes me think sth is added to the DOM). On the other
hand, I looked at the DOM in the IE8 debugger both before and after clicking
and did not see a significant change.

Here's the error line (397):

for (i in {width:"",height:"",id:"",status:"",title:"",src:""})
{
if (call[i]) k+=i+":"+call[i]+";";
}

Error
call[i] Object doesn't support this property or method

Watch
i "width" String

I'm sending you (direct to your email) the before and after files of the DOM
as shown by IE in a minute. You can reply to my mail directly if you like
instead of going through the group.

Thanks,
Ozgur

-----Original Message-----
From: google-map...@googlegroups.com
[mailto:google-map...@googlegroups.com] On Behalf Of bratliff
Sent: Friday, January 08, 2010 3:05 PM
To: Google Maps JavaScript API v3
Subject: [Google Maps API v3] Re: FYI: New Release

bratliff

unread,
Jan 8, 2010, 5:04:44 PM1/8/10
to Google Maps JavaScript API v3
On Jan 8, 8:40 pm, "Ozgur Yogurtcu" <oyogur...@bluenettech.com> wrote:
> Berry, the examine button gives a the output you want before I click any of
> the states but gives a Javascript error if I click it after clicking any of
> the states (Which makes me think sth is added to the DOM). On the other
> hand, I looked at the DOM in the IE8 debugger both before and after clicking
> and did not see a significant change.

Well, I feel like a real idiot. The error is in the HTML file not in
the JS file. I have not changed the HTML file in several months. It
never occurred to me it could be the cause of the error. Thanks very
much for finding it. I believe I have fixed it. If you have the
patience, please try it again with a cleared cache.

I feel like I have hyjacked the thread. Sorry. I would like others
like Ben Appleton, Paul, Esa & others to be able to contribute since
my knowledge of VML is very limited.

Ozgur Yogurtcu

unread,
Jan 8, 2010, 5:18:11 PM1/8/10
to google-map...@googlegroups.com
I tried but unfortunately there's not much change (I cleared the cache.). I
assume you changed the
http://www.provide.net/~bratliff/polycluster/examine.html right? When I
click on the states still nothing drawn on screen and no JavaScript error.
When I click on examine, error in the same line. But this time the type of
error is different. The error is: Attribute only valid on v:image

Did you get the DOM documents I sent you? The elements are there but not
visible on the screen for some reason. I assume those are the elements you
add to DOM.

<shape style="POSITION: absolute; WIDTH: 1px; HEIGHT: 1px; TOP: 0px;
BEHAVIOR: url(#default#VML); LEFT: 0px" status=" st06(83)">
<fill style="BEHAVIOR: url(#default#VML)" color="#000000"></fill>
<stroke style="BEHAVIOR: url(#default#VML)" color="#000000" opacity="1"
weight="1px" endcap="round" joinstyle="round"></stroke>
</shape>


And just to double check, the Javascript error I mentioned is in the examine
button and not related to the drawing of the polygons.

Ozgur

-----Original Message-----
From: google-map...@googlegroups.com
[mailto:google-map...@googlegroups.com] On Behalf Of bratliff
Sent: Friday, January 08, 2010 5:05 PM
To: Google Maps JavaScript API v3
Subject: [Google Maps API v3] Re: FYI: New Release

bratliff

unread,
Jan 8, 2010, 6:40:40 PM1/8/10
to Google Maps JavaScript API v3
On Jan 8, 10:18 pm, "Ozgur Yogurtcu" <oyogur...@bluenettech.com>
wrote:

> Did you get the DOM documents I sent you? The elements are there but not
> visible on the screen for some reason. I assume those are the elements you
> add to DOM.

Yes - thanks very much.

I believe it is related to "coordorigin" & "coordsize" which I will
play with without bothering you. I must not be applying the pixel
scaling factor correctly.

I notice the API is drawing every shape twice. I suspect it is
related to mouse events. Otherwise, it appears to be a bug. Ben, are
you aware every VML DOM element has an identical twin ?

Ben Appleton

unread,
Jan 10, 2010, 6:08:20 PM1/10/10
to google-map...@googlegroups.com
I can't replicate this behavior in IE7.  Which browser are you using?  Can you link a page which demonstrates the issue?

Thanks
Ben

--

Ben Appleton

unread,
Jan 10, 2010, 6:23:01 PM1/10/10
to google-map...@googlegroups.com
Berry,

I have a simplistic, unobfuscated poly renderer here:
http://appleton-static.appspot.com/static/small_poly_test.html
This includes a snippet to render VML.  Creating VML is an art.  I suggest you cut-and-paste working code and then carefully modify it to your needs, verifying that it still works after each small change.  You'll want a VML-capable browser.

Good luck!
Ben

--

bratliff

unread,
Jan 10, 2010, 9:15:07 PM1/10/10
to Google Maps JavaScript API v3
On Jan 10, 11:23 pm, Ben Appleton <apple...@google.com> wrote:
> Berry,
>
> I have a simplistic, unobfuscated poly renderer here:http://appleton-static.appspot.com/static/small_poly_test.html
> This includes a snippet to render VML. Creating VML is an art. I suggest
> you cut-and-paste working code and then carefully modify it to your needs,
> verifying that it still works after each small change. You'll want a
> VML-capable browser.
>
> Good luck!
> Ben

Thanks Ben,

I have made some changes to fix a bug in the "Examiner". Apparently
attempting to display a non-existent "shape" property kills the
browser. Thanks to Ozcur for isolating it.

I am trying to avoid the use of "insertAdjacentHtml" with a series of
"createElement" statements instead. I have looked at the way both the
API & "excanvas" use VML. It looks like each "shape" can be either
"filled" or "stroked" but not both. Another identical "shape" is
required to do the other half. To be safe, I am applying
"style.behavior" to every VML DOM element. I am also adding the "v"
name space if it is missing. I am using simple "coordorigin" &
"coordsize" values to avoid confusion. I am ready to throw in the
towel on VML support figuring developers ought to unite to kill off
Internet Explorer.

I will keep an unobfuscated copy of the source code at:

http://www.polyarc.us/cluster.js

in case anyone else feels like playing with it. The relevant lines of
code are 1000-1070 today. Their position might change a bit in the
future. I will look into it again tomorrow once my disgust with
Microsoft has subsided. I have wasted the entire week on their
pathetic browser.

Thanks very much for your help.

Berry

P.S.

I added fast point reduction for points along the interpolation line.
For states like Colorado with a lot of straight borders, it makes a
big difference. The rendering speed is essentially the same but the
size of each cached path element is reduced. It also helps
reliability for large tiles (1024x1024).

bratliff

unread,
Jan 11, 2010, 8:54:42 AM1/11/10
to Google Maps JavaScript API v3
On Jan 10, 11:23 pm, Ben Appleton <apple...@google.com> wrote:
> Berry,
>
> I have a simplistic, unobfuscated poly renderer here:http://appleton-static.appspot.com/static/small_poly_test.html
> This includes a snippet to render VML. Creating VML is an art. I suggest
> you cut-and-paste working code and then carefully modify it to your needs,
> verifying that it still works after each small change. You'll want a
> VML-capable browser.
>
> Good luck!
> Ben

Your small poly test is extremely useful. I am making some progress.
I will start another thread if I am successful. Thanks again for your
help.

Berry

Susannah (Google Employee)

unread,
Jan 12, 2010, 12:41:23 AM1/12/10
to Google Maps JavaScript API v3
We have just released a new version of the JS v3 API. If there are no
major issues, we will make a full announcement of this release, with
updated documentation, in 24-48 hours. Please report in the group if
you see any regression issues.

Nicholas Canzoneri

unread,
Jan 12, 2010, 12:13:32 PM1/12/10
to Google Maps JavaScript API v3
I realize this isn't a direct Google issue, but any help would be
appreciated.

I've been using the ArcGISMapOverlay V3 port in the demos gallery.
Today, I started getting an error, most likely because I think the
port is accessing private/undocumented items of the overlay class
that might have changed. Any tips to modify the code would be helpful.

Link:
http://www.dvrpc.org/asp/test/arcgis

IE gave a cryptic error, FF gave no error, but the error in Chrome was
the most helpful:

Uncaught TypeError: Property 'redraw_' of object #<an Y> is not a
function in maps.gstatic.com/intl/en_us/mapfiles/api-3/25/main.js:34


On Jan 12, 12:41 am, "Susannah (Google Employee)"

Nicholas Canzoneri

unread,
Jan 12, 2010, 3:46:19 PM1/12/10
to Google Maps JavaScript API v3
Commenting out the lines containing redraw_ makes the Overlays work
again. I think this introduces some race conditions between the map
loading/changing and the service loading, but we'll see when/if ESRI
produces a new port of their JavaScript API.
Reply all
Reply to author
Forward
0 new messages