Hi!
In my case, I have a button for printing and I don't have this problem

What to do? Try to see if $(document).ready fires when the map finish to
load. If not, you could use the tilesloaded or idle events to fire the patch

I don't investigate so much about that

Could you send an email to the list when you decide how to solve that?
Perhaps will be useful for more people

Cheers

2010/10/27 pkh80 <[email protected]>

> Garito -
> Thanks for this fix! I think it has the potential to solve my
> problems, but I am trying to implement it as part of my web page so it
> works automatically.
>
> I can't seem to get it to work outside of Firebug. If I have it
> execute as part of my pages initialization, google maps hasn't
> finished drawing yet. Do you know of an event that fires after google
> maps is loaded and drawn?
>
> Thanks!
>
> On Oct 13, 8:56 am, Garito <[email protected]> wrote:
> > Hi all!
> > There are a bunch of discussions on this group about people having
> > problems printing the maps
> >
> > When you try toprintamapgenerated by the API, the images and the
> > markers don't renderproperly
> >
> > This is because how are the maps made
> >
> > Themapquadrants and the markers are setted as a div with a
> > background image with the quadrant or the marker ( url(url-to-the-
> > quadrant-image-or-marker) )
> >
> > If you want toprintproperlythe generatedmap, you only need to read
> > the div's with a background image and replace it with a real HTML
> > image object
> >
> > Here is how to do that with jQuery (it's only a proof of concept, you
> > need to adapt it to your needs):
> >
> > $('#mapaAgrupat div').each(function(i, elem) {
> >         var $elem = $(elem), background = $elem.css('background-image');
> >         if(background != 'none') {
> >                 background = background.replace('url("', '');
> >                 background = background.replace('")', '');
> >                 $elem.append('<img src="' + background + '" />');
> >                 $elem.css('background-image', '');
> >         }
> >
> > });
> >
> > Where #mapaAgrupat is the id of themapdiv (the same you pass to
> themapobject)
> >
> > At this stage of the test, I use firebug to run this code and works
> > fine for that purpose
> >
> > Then, the step by step process to reproduce what I'm saying:
> >
> > 1.- Launch firefox
> > 2.- Load yourmap
> > 3.- Open Firebug tab
> > 4.- Copy the code to the console
> > 5.- Change the id of the div mapaAgrupat to the id of the div that
> > contains yourmap
> > 6.-Printthemap(if you use Mac OS X as me, you don't need to reallyprint,
> you could previsualize it to check it)
> >
> > Hope this solve yourprintproblems




-- 
Mi twitter: http://twitter.com/garito

Temet nosce

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to