<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Do you know why you can't combine them with commercial map providers
like Google Maps?<br>
<br>
Jonathan<br>
<pre wrap="">
</pre>
<br>
Jonathan Wolfe wrote:
<blockquote cite="mid:4AA5095A.2040805@noaa.gov" type="cite">
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
Ok, Thanks! The latter is what I was trying to do...overlay them on
Google Maps. :-(<br>
<br>
Jonathan<br>
<br>
Andreas Hocevar wrote:
<blockquote cite="mid:4AA507AE.1090903@opengeo.org" type="cite">
<pre wrap="">Jonathan Wolfe wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Thanks Andreas,
Your explanation was most helpful! So I imagine people stumble across
this issue a lot... do you have to convince the source to make the
data available in the format desired and if they don't you can't
display the data?
</pre>
</blockquote>
<pre wrap=""><!---->
It takes more CPU power to server a reprojected map image than one in
the native projection. Anyway, you still can display these maps in
OpenLayers, you just cannot combine them with commercial map providers
like Google Maps. Make sure to provide projection, units, maxExtent and
maxResolution when you instantiate the layer.
Regards,
Andreas.
</pre>
<blockquote type="cite">
<pre wrap="">Thanks again,
Jonathan
Andreas Hocevar wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Jonathan Wolfe wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I'm just playing with the examples here
(<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://trac.openlayers.org/wiki/AvailableWMSServices">http://trac.openlayers.org/wiki/AvailableWMSServices</a>) and can't get
this one to plot on a spherical mercator as it gives:
msWMSLoadGetParams(): WMS Server error. Invalid SRS : SRS must be valid
for all selected layers.
Please correct me if I'm wrong, but can't anything be reprojected onto
the google projection?
</pre>
</blockquote>
<pre wrap="">It can, but MapServer only offers the projections that a layer is
configured to support. To see these, just issue a GetCapabilities
request. For the server from your snippet below, this would be
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://www2.dmsolutions.ca/cgi-bin/mswms_gmap?request=GetCapabilities&service=WMS&version=1.1.1">http://www2.dmsolutions.ca/cgi-bin/mswms_gmap?request=GetCapabilities&service=WMS&version=1.1.1</a>
As you can see, most layers in there are only provided in EPSG:42304.
</pre>
<blockquote type="cite">
<pre wrap=""> It's just a reprojection, right? Also, is
mapserver on a remote server? Like in this example, it would be their
mapserver that would need to be changed to reproject the data?
</pre>
</blockquote>
<pre wrap="">Exactly.
Regards,
Andreas.
</pre>
<blockquote type="cite">
<pre wrap="">Hopefully someone can shed some light on how these pieces fit together.
Thanks,
Jonathan
here is the relevant snippets:
var options = {
projection: new
OpenLayers.Projection("EPSG:900913"),
displayProjection: new
OpenLayers.Projection("EPSG:4326"),
units: "m",
maxResolution: 156543.0339,
maxExtent: new
OpenLayers.Bounds(-20037508, -20037508, 20037508, 20037508.34)
};
map = new OpenLayers.Map('map', options);
var dm_wms = new OpenLayers.Layer.WMS( "DM Solutions Demo",
<a moz-do-not-send="true" class="moz-txt-link-rfc2396E"
href="http://www2.dmsolutions.ca/cgi-bin/mswms_gmap">"http://www2.dmsolutions.ca/cgi-bin/mswms_gmap"</a>,
{layers: "bathymetry,land_fn,park,drain_fn,drainage," +
"prov_bound,fedlimit,rail,road,popplace",
transparent: "true", format: "image/png" });
map.addLayer(dm_wms);
_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:Users@openlayers.org">Users@openlayers.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<pre wrap="">------------------------------------------------------------------------
_______________________________________________
Users mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
href="mailto:Users@openlayers.org">Users@openlayers.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<pre wrap=""><!---->
</pre>
</blockquote>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@openlayers.org">Users@openlayers.org</a>
<a class="moz-txt-link-freetext" href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a>
</pre>
</blockquote>
</body>
</html>