I have Windows Application which host a browser control to show the
map. But I have couple issue printing the map. (I uses window.print()
to print the map).
1. The map is not re-centered when printing. I have a big screen and
it is nice to see a large area. But it only print out half of the map
because of the page size. How can I re-center it?
2. My custom marker/icon is not showing up. it shows the default icon.
Could it be that I am using marker manager?
On Nov 4, 2:55 pm, jzerohn <jzerohnc...@gmail.com> wrote:
> I have Windows Application which host a browser control to show the
> map. But I have couple issue printing the map. (I uses window.print()
> to print the map).
Where is the map?
> 1. The map is not re-centered when printing. I have a big screen and
> it is nice to see a large area. But it only print out half of the map
> because of the page size. How can I re-center it?
I don't know that this is really a "Google Maps API" question, I would
think it would be a general html/css question and the answer would
involve print specific css.
> 2. My custom marker/icon is not showing up. it shows the default icon.
> Could it be that I am using marker manager?
A link to your map would help...
What are you setting the icon print images to?
If I understand your centering issue correctly, you need to size your
map to the printer. In other words, find what web page width will fit
your printer and make sure the page, including the map is no larger
than that. As Larry suggested, this is an html/css issue.
For the icons, you need to specify different icons for your markers to
use for printing.
Look at the GIcon class section of the GMaps docs. You will need to
supply the icons for printImage and/or mozPrintImage. Be aware that
there are issues printing transparent images on some browsers like
IE6.
Web browsers generally do a very poor job printing, the web was never
designed with printing in mind, and all of the browser developers are
basically ignoring the proposed solutions in CSS 3.
- Brad
On Nov 4, 4:05 pm, "geocode...@gmail.com" <geocode...@gmail.com>
wrote:
> On Nov 4, 2:55 pm, jzerohn <jzerohnc...@gmail.com> wrote:
> > I have Windows Application which host a browser control to show the
> > map. But I have couple issue printing the map. (I uses window.print()
> > to print the map).
> Where is the map?
> > 1. The map is not re-centered when printing. I have a big screen and
> > it is nice to see a large area. But it only print out half of the map
> > because of the page size. How can I re-center it?
> I don't know that this is really a "Google Maps API" question, I would
> think it would be a general html/css question and the answer would
> involve print specific css.
> > 2. My custom marker/icon is not showing up. it shows the default icon.
> > Could it be that I am using marker manager?
> A link to your map would help...
> What are you setting the icon print images to?
> If I understand your centering issue correctly, you need to size your
> map to the printer. In other words, find what web page width will fit
> your printer and make sure the page, including the map is no larger
> than that. As Larry suggested, this is an html/css issue.
> For the icons, you need to specify different icons for your markers to
> use for printing.
> Look at the GIcon class section of the GMaps docs. You will need to
> supply the icons for printImage and/or mozPrintImage. Be aware that
> there are issues printing transparent images on some browsers like
> IE6.
> Web browsers generally do a very poor job printing, the web was never
> designed with printing in mind, and all of the browser developers are
> basically ignoring the proposed solutions in CSS 3.
> - Brad
> On Nov 4, 4:05 pm, "geocode...@gmail.com" <geocode...@gmail.com>
> wrote:
> > On Nov 4, 2:55 pm, jzerohn <jzerohnc...@gmail.com> wrote:
> > > I have Windows Application which host a browser control to show the
> > > map. But I have couple issue printing the map. (I uses window.print()
> > > to print the map).
> > Where is the map?
> > > 1. The map is not re-centered when printing. I have a big screen and
> > > it is nice to see a large area. But it only print out half of the map
> > > because of the page size. How can I re-center it?
> > I don't know that this is really a "Google Maps API" question, I would
> > think it would be a general html/css question and the answer would
> > involve print specific css.
> > > 2. My custom marker/icon is not showing up. it shows the default icon.
> > > Could it be that I am using marker manager?
> > A link to your map would help...
> > What are you setting the icon print images to?
My suggestion is, you have to find a web service that capture your page and
save it to a pdf file, jpeg,gif or a html file just like this,
http://aviary.com/launch/talon.
I have worked this before but I forgot the link of web service,from this
your image from your big screen will be converted into a pdf or jpeg, or gif
format , of course your image will be adjusted to fit the normal size of the
rendered file.
Then ,you are now free to print your map, the problem here is
the orientation of the page so have to adjust manually the orientation of
the page.
On Thu, Nov 5, 2009 at 1:56 PM, bradlymathews <bradlymath...@gmail.com>wrote:
> If I understand your centering issue correctly, you need to size your
> map to the printer. In other words, find what web page width will fit
> your printer and make sure the page, including the map is no larger
> than that. As Larry suggested, this is an html/css issue.
> For the icons, you need to specify different icons for your markers to
> use for printing.
> Look at the GIcon class section of the GMaps docs. You will need to
> supply the icons for printImage and/or mozPrintImage. Be aware that
> there are issues printing transparent images on some browsers like
> IE6.
> Web browsers generally do a very poor job printing, the web was never
> designed with printing in mind, and all of the browser developers are
> basically ignoring the proposed solutions in CSS 3.
> - Brad
> On Nov 4, 4:05 pm, "geocode...@gmail.com" <geocode...@gmail.com>
> wrote:
> > On Nov 4, 2:55 pm, jzerohn <jzerohnc...@gmail.com> wrote:
> > > I have Windows Application which host a browser control to show the
> > > map. But I have couple issue printing the map. (I uses window.print()
> > > to print the map).
> > Where is the map?
> > > 1. The map is not re-centered when printing. I have a big screen and
> > > it is nice to see a large area. But it only print out half of the map
> > > because of the page size. How can I re-center it?
> > I don't know that this is really a "Google Maps API" question, I would
> > think it would be a general html/css question and the answer would
> > involve print specific css.
> > > 2. My custom marker/icon is not showing up. it shows the default icon.
> > > Could it be that I am using marker manager?
> > A link to your map would help...
> > What are you setting the icon print images to?
> You received this message because you are subscribed to the Google Groups
> "Google Maps API" group.
> To post to this group, send email to google-maps-api@googlegroups.com.
> To unsubscribe from this group, send email to
> google-maps-api+unsubscribe@googlegroups.com<google-maps-api%2Bunsubscribe@ googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-api?hl=en.
On Nov 5, 6:51 am, Rene Florendo <reneflore...@gmail.com> wrote:
> My suggestion is, you have to find a web service that capture your page and
> save it to a pdf file, jpeg,gif
While there's no reason not to suggest that, I would also suggest that
it's against several of the Terms of Service (eg 10.1, 10.2, 10.3).
The recommended method is to create a map the right size for the
printer.
I gave up trying to get my map to resize properly when printed. I
wanted to define the map width to something like 80% in the browser,
and something else appropriate for the printed page. However, it never
properly centered when printed. I did all kinds of things to try to
fix it, none worked. I did things like using a second map sync'd to
the first that would only be displayed on printed media, trying to set
a listener for resize of the map div, trying to re-center the map
every 500 ms--none of the things I tried worked.
I finally ended up just defining the map div in pixels, and it seems
to print fine. I agree with Brad, web browsers do a horrible job
printing. And trying to make your page work across browsers makes it
even worse. Your best bet is to use a link that opens a new window
with your map div defined in pixels, sized appropriately for printing.
When the new map div is created it should be centered properly. Then
you print from the new window. I didn't do that because I personally
don't like having to click a link for a printable version. I preferred
having a pixel-sized div to that. With CSS that shouldn't be needed,
but it just doesn't work the way it should.
Don't know what to say about your custom markers.
-Brian
On Nov 5, 5:19 am, Andrew Leach <acle...@btinternet.com> wrote:
> On Nov 5, 6:51 am, Rene Florendo <reneflore...@gmail.com> wrote:
> > My suggestion is, you have to find a web service that capture your page and
> > save it to a pdf file, jpeg,gif
> While there's no reason not to suggest that, I would also suggest that
> it's against several of the Terms of Service (eg 10.1, 10.2, 10.3).
> The recommended method is to create a map the right size for the
> printer.
1. For print custom markers. I added printImage and it worked. But I
get not get rid of the shadow.
Following is the code.
function getIcon(myImage, w, h)
{
var icon = new GIcon(G_DEFAULT_ICON);
icon.image = "images/" + myImage; // 1. the image
is a simple gif file.
icon.printImage = "images/" + myImage; // 2. After I
added this. It WORKED.
icon.iconSize = new GSize(w, h);
icon.iconAnchor = new GPoint(w/2, h/2);
icon.shadow = "";
icon.printShasow = "images/1x1.GIF";
// 3. I tried empty string also. just can NOT get rid of the
shadow. HELP
return icon;
}
2. I am developing a Windows (not web pages) application. That's why I
don't have a web page for you for look at. But this brought up my new
question about licensing. Do I have to use the premier service? (Note:
My application is for a major chain store. Map is part of the
application. But there are sensitive store information that they do
not want to disclose to the public)
Thanks again for all your help.
John
On Nov 5, 11:23 am, Brian P <brianpey...@gmail.com> wrote:
> I gave up trying to get my map to resize properly when printed. I
> wanted to define the map width to something like 80% in the browser,
> and something else appropriate for the printed page. However, it never
> properly centered when printed. I did all kinds of things to try to
> fix it, none worked. I did things like using a second map sync'd to
> the first that would only be displayed on printed media, trying to set
> a listener for resize of the map div, trying to re-center the map
> every 500 ms--none of the things I tried worked.
> I finally ended up just defining the map div in pixels, and it seems
> to print fine. I agree with Brad, web browsers do a horrible job
> printing. And trying to make your page work across browsers makes it
> even worse. Your best bet is to use a link that opens a new window
> with your map div defined in pixels, sized appropriately for printing.
> When the new map div is created it should be centered properly. Then
> you print from the new window. I didn't do that because I personally
> don't like having to click a link for a printable version. I preferred
> having a pixel-sized div to that. With CSS that shouldn't be needed,
> but it just doesn't work the way it should.
> Don't know what to say about your custom markers.
> -Brian
> On Nov 5, 5:19 am, Andrew Leach <acle...@btinternet.com> wrote:
> > On Nov 5, 6:51 am, Rene Florendo <reneflore...@gmail.com> wrote:
> > > My suggestion is, you have to find a web service that capture your page and
> > > save it to a pdf file, jpeg,gif
> > While there's no reason not to suggest that, I would also suggest that
> > it's against several of the Terms of Service (eg 10.1, 10.2, 10.3).
> > The recommended method is to create a map the right size for the
> > printer.