Did you find a solution? We have similar situation but not using
silverlight.
On Thursday, December 9, 2010 5:35:04 AM UTC-5, R4cOOn wrote:
>
> Hello,
>
> I've developed a Silverlight application that uses the Google Maps to
> show vehicle routes and positions.
>
>
> I've been tasked to create a printing feature. Provided that the map
> is within the Silverlight application, I can't just call the browser's
> print method.
>
> I managed to get the currently displayed map by opening a new window
> and calling the following code:
>
> <script language="javascript" type="text/javascript">
> var contents =
> window.opener.document.getElementById("mapContainer");
> mapContent.innerHTML = contents.innerHTML;
>
> mapContent.style.position = "absolute";
> mapContent.style.height = contents.firstChild.offsetHeight +
> "px";
> mapContent.style.width = contents.firstChild.offsetWidth +
> "px";
>
> window.print();
> </script>
>
> This works fine and I've got a new window popping open with the map in
> it and all my overlays.
>
>
> The problem is that the result isn't really user-friendly:
> - the map cannot be resized to fit on the page
> - the markers' background colour isn't printed unless the customer
> sets the "print background images" option in the browser
>
>
> The static maps aren't an option because:
> - they're too small
> - only allow a maximum of 5 custom markers (with icons) and I need
> plenty of custom points
> - the URL size is limited to 2k or something and I'm afraid with my
> big polyline and my 100+ markers I'll need more characters
>
>
> I'd like to know what Google's solution is to printing.
> The ideal solution would be a big PNG / PDF / whatever that the user
> can directly print of the correct (as in fit on one sheet of paper)
> size.
>
> Cheers.
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/google-maps-js-api-v3/-/KrTISiIq--EJ.
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.