[GOOGLE MAP 0.5.0e] Map does not display in IE6

swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Mon, 2006-03-20 02:55

The map refuses to display; I just get a blank area with the navigation icons. This occurs with G2 standalone or embedded using WP 2.0.2.
Map displays fine in Firefox.

The IE error is:
Line: 368
Char: 29
Error: 'this.Z.width' is null or not an object

Line 368 in the web page source is:
function createMarkerHTML(px, py, itemLink, title, thumbLink, created, zoomlevel, thw, thh, summary, description, icon, type) {


Gallery version = 2.1-rc-2a core 1.0.34
PHP version = 4.4.2-gentoo apache
Webserver = Apache/1.3.34 (Unix) (Gentoo) mod_gzip/1.3.26.1a PHP/4.4.2-gentoo mod_ssl/2.8.25 OpenSSL/0.9.7i
Database = mysql 4.0.25, lock.system=flock
Toolkits = Exif, Ffmpeg, NetPBM, ArchiveUpload, Thumbnail, Gd, mplayer, ImageMagick, Dcraw
Acceleration = full/900, full/900
Operating system = Linux digi-archive 2.6.15-gentoo-r1 #1 SMP Sun Feb 5 12:13:48 PST 2006 i686
Default theme = matrix
Locale = en_US
Browser = Firefox 1.5.0.1 & IE6

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Wed, 2006-03-22 09:07

Are you trying to use Google Map PI v2 ?

If it's the case then you're experiencing an error that I wasn't able to reproduce and I would need more info to fix it (like some access for example :-)).

I would like to get this osrted out before V2 becomes the only available api for google map :-)

thanks for the report
-------------------------
The Termite :-)

 
dotnature
dotnature's picture

Joined: 2005-10-26
Posts: 224
Posted: Wed, 2006-03-22 16:56

I put this bug on forge a while ago It must be api2 its same error

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sat, 2006-03-25 23:36

EDIT:See the followup post below. I think that
MapHeader.tpl will work much better.

-----
EDIT: I would say that I've made a mess with all I
say/did below. Maybe it can be helpful to somebody
that knows what they're doing (I obviously have little
clue). :-( :-) While it does solve a few things, it
makes a mess of others. Sorry.
----------
Well, since Gallery 2.1 was released I thought, why not.
Along with that I have delved into 0.5.0e and found that it works
OK using API 1.x in both FF and IE. Attempting to use API 2.x is
a different stoty.

In FF:
Works except for the red arrows that should appear as you mousevover
the thumbnails.

In IE:
Does not work at all.

I banged about for some time trying to track some of this down and found
the error reporting in IE to be less than helpful. I did discover that
the report was actually referring to the API js file and not anything
Map Module. The reference by swordfish above to 'this.Z.width' is
different now that the API has changed. It now would be 'this.$.width'
with the current API version (2.43). I found the function, in the API,
where this is located; but, that is not relevent to the -actual-
problem (only a symptom). The actual problem is with GControlPosition.

The red arrow/thumbnail problem is caused by the use of an old un-documented
thing (marker.display). That is cured by using addOverlay/removeOverlay
instead. The red arrows get elongated in API 2.x.

Both of these problem are dealt with in MapHeader.tpl. I have attached
a MapHeader.tpl that will work in both FF and IE -and- API 1.x and 2.x.

I have marked the areas of interest with the work 'Changed'. If you search
for that you will find the lines that require changing.

One other minor thing... the line that is meant to hide the "Loading"
line causes a javascript error in IE so I commented it out. I think it gets
covered up by the map anyway (but maybe someone smarter than me can fix it
properly).

    //Hide the loading message now that everything is loaded :-)
//Changed    document.getElementById("loading").innerHTML="";

A word for Termite... Please don't tell me you already fixed all of this
and it will be included in tonights release (after all my work). :-)

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2006-03-26 19:50
galmoid wrote:
............The actual problem is with GControlPosition..............

GControlPosition() was a undocumented V1 feature. It controls the position of the stock navigation arrows and slider.
Does anybody use it?
I have only used it once and did not like it much as one gets use to the location in the top left... as almost all other maps have the contols at this location.

If nobody uses this feature (even for V1 of the API) then I suggest we drop it altogether as we have custom contols ( that very few people use as well )

Dave

 
galmoid

Joined: 2005-11-07
Posts: 364
Posted: Sun, 2006-03-26 20:40

OK, I think I've solved the problems I created by replacing the
'marker.display' use with 'map.addOverlay'/'map.removeOverlay'.
I found a post in Google-Map-API by d_henderson that offered
a replacement function. I used that for a replacement and this
appears to do the task without the side effects. Attached is a
new MapHeader.tpl file. Please see if it helps/works.
It still contains the GControlPosition (with the if/else
to determine API version) until we dispense with it.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2006-03-27 02:41
galmoid wrote:
A word for Termite... Please don't tell me you already fixed all of this
and it will be included in tonights release (after all my work). :-)

Saying that would be lying I was travelling for the last 14 hours away from any computer (imagine that ;-)) I thank you for your work tho. I know there is MANY bug with v2 of the API but I wasn't gonna start fixing them until the v2 was offically released :-)

I also know that all show/hide are not gonna work in v2 (for example:))

Thanks a lot tho, it'll help a lot !!

 
swordfish
swordfish's picture

Joined: 2004-10-01
Posts: 388
Posted: Thu, 2006-03-30 04:31

Galmoid,

SWEET! Upgraded to release version 2.0 of the Wordpress Gallery2 WPG2 Plugin; applied the MapHeader.tpl and now the map works great in both FF and IE using Google map API v2.x. Looks to be some minor bugs in both API versions though.

 
Termitenshort
Termitenshort's picture

Joined: 2005-10-09
Posts: 1894
Posted: Mon, 2006-04-03 23:35

For information the above fix isn't sufficient anymore. Since v2.44 of the API the images property of the markers is gone and there is many things relying on this :(:(

I need to find some more fix. for the time being i'll be putting a warning in the Admin Panel that it doesn't work really for now :-)
-------------------------
The Termite :-)

 
barun

Joined: 2009-01-06
Posts: 1
Posted: Tue, 2009-01-06 13:28

Hi All

I have made a site in which I can access Google maps/API I am accessing it in localhost but I am unable to access it when I have uploaded it..

 
SiliconFiend
SiliconFiend's picture

Joined: 2006-12-27
Posts: 508
Posted: Tue, 2009-01-06 18:43

Please don't re-use this thread as it's unrelated to your problem. Start a new thread and give details about versions, etc. so we can have a chance of helping you.