GMaps v3 - Invalid Argument

326 views
Skip to first unread message

JB

unread,
Mar 5, 2012, 5:21:42 PM3/5/12
to Google Maps JavaScript API v3
We are trying to convert our GMaps v2 ArcGIS for GMaps web app to use
GMaps v3 by leveraging the ArcGIS Server Link lib in the GMaps Utility
lib.

We have done so, but we are still left with 1 bug. This bug also
shows up in the Examples on the site -
http://google-maps-utility-library-v3.googlecode.com/svn-history/r172/trunk/arcgislink/docs/reference.html

When you zoom out aways, and pan around enevtually, you will get this
error:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1;
Trident/
4.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET
CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; MS-RTC LM
8; .NET4.0C; .NET4.0E)
Timestamp: Mon, 5 Mar 2012 21:23:27 UTC


Message: Invalid argument.
Line: 2910
Char: 9
Code: 0
URI: http://google-maps-utility-library-v3.googlecode.com/svn-history/r172/trunk/arcgislink/src/arcgislink.js


Message: Invalid argument.
Line: 2910
Char: 9
Code: 0
URI: http://google-maps-utility-library-v3.googlecode.com/svn-history/r172/trunk/arcgislink/src/arcgislink.js

I have not received the error in FireFox. However, our users are
limited to IE 8 at this time.

We encountered a similar error with version 2, back in March 2010 with
IE 8.

This error does not occur on maps.google.com.

Our tech lead, said it occurs when adding a customer overlay…what
happens is the sw and/or ne points will calculate a negative width and/
or height to set the div style…

Example Code:

// Retrieve the southwest and northeast coordinates of this
overlay
// in latlngs and convert them to pixels coordinates.
// We'll use these coordinates to resize the DIV.
var sw =
overlayProjection.fromLatLngToDivPixel(this.bounds_.getSouthWest());
var ne =
overlayProjection.fromLatLngToDivPixel(this.bounds_.getNorthEast());

// Resize the image's DIV to fit the indicated dimensions.
var div = this.div_;
div.style.left = sw.x + 'px';
div.style.top = ne.y + 'px';
div.style.width = (ne.x - sw.x) + 'px';
div.style.height = (sw.y - ne.y) + 'px';


Thanks,
JB

Nianwei Liu

unread,
Mar 6, 2012, 6:00:20 AM3/6/12
to Google Maps JavaScript API v3
try latest version from trunk to see if problem still exist.
at very small zoom level when map size is larger than sphere width in
pixel, it is possible extra code is needed to handle wrap around.
a live link will be helpful.

On Mar 5, 5:21 pm, JB <jbrad...@amfam.com> wrote:
> We are trying to convert our GMaps v2 ArcGIS for GMaps web app to use
> GMaps v3 by leveraging the ArcGIS Server Link lib in the GMaps Utility
> lib.
>
> We have done so, but we are still left with 1 bug.  This bug also
> shows up in the Examples on the site -http://google-maps-utility-library-v3.googlecode.com/svn-history/r172...
>
> When you zoom out aways, and pan around enevtually, you will get this
> error:
>
> Webpage error details
>
> User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1;
> Trident/
> 4.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET
> CLR 3.0.4506.2152; .NET CLR 3.5.30729; InfoPath.2; MS-RTC LM
> 8; .NET4.0C; .NET4.0E)
> Timestamp: Mon, 5 Mar 2012 21:23:27 UTC
>
> Message: Invalid argument.
> Line: 2910
> Char: 9
> Code: 0
> URI:http://google-maps-utility-library-v3.googlecode.com/svn-history/r172...
>
> Message: Invalid argument.
> Line: 2910
> Char: 9
> Code: 0
> URI:http://google-maps-utility-library-v3.googlecode.com/svn-history/r172...

JB

unread,
Mar 6, 2012, 9:59:26 AM3/6/12
to Google Maps JavaScript API v3
Same issue with latest trunk version example. We use Dynamic
Services, so the Dynamic Service example off of the Examples page with
IE 8 does duplicate our issue and throws the error.

We ran into the same error back in March 2010 with v2. Google Maps
updated with a new version of v2 and it started throwing the same
error. We ended up having to rollback a version.

Our Tech Lead sent this, this morning:

"These would be the operations returning incorrect values…since they
produce the negative bounds for the div…called on the custom
OverlayView’s Projection object…they’re from the Google Maps API…maybe
this version (3.x) isn’t supported on IE8?"

var sw =
overlayProjection.fromLatLngToDivPixel(this.bounds_.getSouthWest());
var ne =
overlayProjection.fromLatLngToDivPixel(this.bounds_.getNorthEast());


JB
> > JB- Hide quoted text -
>
> - Show quoted text -

Nianwei Liu

unread,
Mar 7, 2012, 1:39:14 PM3/7/12
to Google Maps JavaScript API v3
Seems to related to google API does not report bounds correctly when
zoom beyond level 2.
See example here:
http://gmaps-utility-gis.googlecode.com/svn/trunk/v3test/smallscalebounds/smallscalebounds.html

And that may lead to other problems. IE throw an error but Firefox
just ignored it.

Manually adjust the bound send to ArcGIS seems not helpful, so for
now, I guess it's a limitation until the API's getBounds can be fixed.

JB

unread,
Aug 6, 2012, 12:29:55 PM8/6/12
to google-map...@googlegroups.com

Hello,

 

Google has informed us the Bug has been fixed in V3.9. but we continue to see the issue with IE8 throwing the bug. 

 

http://google-maps-utility-library-v3.googlecode.com/svn-history/trunk/arcgislink/examples/dynamap.html (then zoom out)

 

Do you have to change something in the ArcGIS Server Link lib now too?

 

 

Jeff

JB

unread,
Feb 18, 2013, 2:13:46 PM2/18/13
to google-map...@googlegroups.com
We have restarted the Gmaps 3 migration and need to know how we should go about fixing this issue.
 
Google said they fixed it, however your API with IE8 still throws an error.
 
Thanks much.
Reply all
Reply to author
Forward
0 new messages