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.
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.
On Dec 17, 12:47 am, Ben Appleton <apple...@google.com> wrote:Thanks Ben,
> 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.
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.
> 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.
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...
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:
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
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
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
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
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
-----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
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
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
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.
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
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 ?
--
--
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).
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
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)"