[OpenLayers-Users] OpenLayers Question: Google Physical Projections
and epsg:26915
Matthew Pettis
matthew.pettis at gmail.com
Fri Jun 27 19:23:35 EDT 2008
Hi All,
I added the projection from
http://spatialreference.org/ref/user/google-projection/mapfile/ into my
mapfile. I then used the file below. The weird thing is that I am getting
a google maps projection, but instead of for Minnesota (which is where my
ol_ms layer gets me, I get some region of Europe between Barcelona, Sp and
Marseilles, Fr. Any further suggestions?
Thanks,
Matt
=========================================================================
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>OpenLayers Example</title>
<!-- <script src="http://www.openlayers.org/api/OpenLayers.js"></script>
-->
<script src="http://localhost/_common//OpenLayers-2.6/OpenLayers.js
"></script>
<script src="
http://maps.google.com/maps?file=api&v=2&key=ABQIAAAAytPEybOjkPfSINF9aqMnSRRV_Z48x51l4m6KiJWs2Yue7BruuxS9q420SXqAbRhYk8GzmgwCugf2Fw
"
type="text/javascript"></script>
<script type="text/javascript">
var map = null;
function init(){
map = new OpenLayers.Map(
'map',
{
maxResolution: 'auto'
, maxExtent: new
OpenLayers.Bounds(184056.505,4809728.25,767381.245,5478975.75)
}
);
var ol_ms = new OpenLayers.Layer.MapServer(
"Mapserver Untiled"
, "
http://localhost/cgi-bin/mapserv.exe?map=C:\\ms4w\\Apache\\htdocs\\ol\\map.map
"
, {layers: 'state'}
, {singleTile: true}
);
map.addLayer(ol_ms);
var gmap = new OpenLayers.Layer.Google(
"Google Streets"
, {sphericalMercator: true}
);
map.addLayer(gmap);
map.zoomToMaxExtent();
map.addControl(new OpenLayers.Control.LayerSwitcher());
}
</script>
</head>
<body onload="init()">
<div id="map" class="smallmap" style="width:400;height:300"></div>
</body>
</html>
=========================================================================
--
It is from the wellspring of our despair and the places that we are broken
that we come to repair the world.
-- Murray Waas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080627/b2ed2091/attachment.html
More information about the Users
mailing list