[OpenLayers-Users] Aspect Ratio/Projection Problem

Eric Lemoine eric.c2c at gmail.com
Fri Jun 6 02:22:53 EDT 2008


On Fri, Jun 6, 2008 at 12:43 AM, Michael Langford
<michael.langford at rowdylabs.com> wrote:
> After switching to openlayers.org from google maps, we're almost ready
> to launch my customer's new site.
>
> One problem though: His overlay image is "squished" on OpenLayers,
> where it looks great using the image overlay of Google Maps API. It
> involves way too many hours of hand lettered text on it to contemplate
> redoing in the new aspect ratio, so I need to find a technical
> solution to make OpenLayers.org display it properly.
>
> I've been fiddling with projections, and have not seen a way out of
> this forest, as nothing appears to change the display of the image.
>
> When I look, I keep finding pointers on the web to the extremely brief
> comment about projections on the FAQ, which doesn't help me at all.
>
> It seems like I'd like to display in EPSG:900313 as that is what
> Google uses (that may not be the exact name, I deleted it after it
> seemed clear it wasn't working).
>
> I'm not exactly sure the role the proj4js plays in this, but it seems
> like it probably does.
>
> I've attached the picture of what the overlay looks like when applied
> to google's map, and what the overlay looks like when applied to open
> layers. In addition, it is available at
> http://rowdylabs.com/ng/RightAndWrong.GIF in case the mailing list
> doesn't like attachments.
>
> Hopefully someone can provide something like the following:
>
>   You properly include proj4js at the top of your html file like so,
> and you create your map with arguments like so.

Hello

I'm not sure I understand your problem. But if what you want is have
overlays over google maps you'll need to use SphericalMercator. See
some doc here <http://trac.openlayers.org/wiki/SphericalMercator> and
some example there
<http://www.openlayers.org/dev/examples/spherical-mercator.html>. Hope
this will help you do what you want.

Cheers,

--
Eric



More information about the Users mailing list