<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=text/html;charset=iso-8859-1 http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18812"></HEAD>
<BODY style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px"
id=MailContainerBody leftMargin=0 topMargin=0 CanvasTabStop="true"
name="Compose message area">
<DIV><FONT size=2 face=Arial>Thanks Francesco,</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>You got it! Only changing the order in which layer
are added fixed it, the first added google layer being the default among the
other google layers.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>SP.</FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV> </DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <A
title="mailto:f.pennica@gmail.com CTRL + Click to follow link"
href="mailto:f.pennica@gmail.com">Francesco Pennica</A> </DIV>
<DIV><B>Sent:</B> Monday, August 31, 2009 5:58 AM</DIV>
<DIV><B>To:</B> <A
title="mailto:stephane.poirier@usherbrooke.ca CTRL + Click to follow link"
href="mailto:stephane.poirier@usherbrooke.ca">stephane.poirier@usherbrooke.ca</A>
</DIV>
<DIV><B>Cc:</B> <A
title="mailto:users@openlayers.org CTRL + Click to follow link"
href="mailto:users@openlayers.org">users@openlayers.org</A> </DIV>
<DIV><B>Subject:</B> Re: [OpenLayers-Users] switching default layer before
initial map display</DIV></DIV></DIV>
<DIV><BR></DIV>Hello,<BR><BR>I think you just have to change the order when you
add layers to map:<BR><BR>map.addLayers([<FONT
size=2>googlestreetsLayer</FONT>,<FONT
size=2>googlephysicalLayer</FONT>,...]);<BR><BR>to:<BR><BR>map.addLayers([<FONT
size=2>googlephysicalLayer</FONT>,<FONT
size=2>googlestreetsLayer</FONT>,...]);<BR><BR><BR>
<DIV class=gmail_quote>2009/8/31 <SPAN dir=ltr><<A
href="mailto:stephane.poirier@usherbrooke.ca">stephane.poirier@usherbrooke.ca</A>></SPAN><BR>
<BLOCKQUOTE
style="BORDER-LEFT: rgb(204,204,204) 1px solid; MARGIN: 0pt 0pt 0pt 0.8ex; PADDING-LEFT: 1ex"
class=gmail_quote>
<DIV style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px"
name="Compose message area">
<DIV><FONT size=2 face=Arial><FONT size=2>
<P align=left><FONT color=#0000c0>Hi All,</FONT></P>
<P align=left>With the following code, I created a few google layers. Google
streets gets to be the default. Now, how can I change the default layers to
be, say, the google hybrid map?</P></FONT>
<P align=left><B><FONT color=#0000c0 size=2><FONT color=#0000c0
size=2>if</FONT></FONT></B></P></FONT><FONT color=#5c5c5c size=2><FONT
color=#5c5c5c size=2>(</FONT></FONT><FONT size=2>myepsg</FONT><FONT
color=#5c5c5c size=2><FONT color=#5c5c5c size=2>==</FONT></FONT><FONT
color=#005c00 size=2><FONT color=#005c00
size=2>"EPSG:900913"</FONT></FONT><FONT color=#5c5c5c size=2><FONT
color=#5c5c5c size=2>)<BR></FONT></FONT><FONT color=#5c5c5c size=2><FONT
color=#5c5c5c size=2>{<BR></FONT></FONT><FONT
size=2> googlestreetsLayer</FONT><FONT color=#5c5c5c
size=2><FONT color=#5c5c5c size=2>=</FONT></FONT><B><FONT color=#0000c0
size=2><FONT color=#0000c0 size=2>new</FONT></FONT></B><FONT size=2>
OpenLayers</FONT><FONT color=#5c5c5c size=2><FONT color=#5c5c5c
size=2>.</FONT></FONT><FONT size=2>Layer</FONT><FONT color=#5c5c5c
size=2><FONT color=#5c5c5c size=2>.</FONT></FONT><FONT
size=2>Google</FONT><FONT color=#5c5c5c size=2><FONT color=#5c5c5c
size=2>(</FONT></FONT><FONT color=#005c00 size=2><FONT color=#005c00
size=2>"Google Streets"</FONT></FONT><FONT color=#5c5c5c size=2><FONT
color=#5c5c5c size=2>,{</FONT></FONT><FONT color=#005c00 size=2><FONT
color=#005c00 size=2>"sphericalMercator"</FONT></FONT><FONT color=#5c5c5c
size=2><FONT color=#5c5c5c size=2>:</FONT></FONT><FONT size=2> </FONT><FONT
color=#800040 size=2><FONT color=#800040 size=2>true</FONT></FONT><FONT
color=#5c5c5c size=2><FONT color=#5c5c5c size=2>,</FONT></FONT><FONT
size=2>minZoomLevel</FONT><FONT color=#5c5c5c size=2><FONT color=#5c5c5c
size=2>:</FONT></FONT><FONT size=2> </FONT><FONT color=#004080 size=2><FONT
color=#004080 size=2>2</FONT></FONT><FONT color=#5c5c5c size=2><FONT
color=#5c5c5c size=2>});<BR></FONT></FONT><FONT
size=2> googlephysicalLayer</FONT><FONT color=#5c5c5c
size=2><FONT color=#5c5c5c size=2>=</FONT></FONT><B><FONT color=#0000c0
size=2><FONT color=#0000c0 size=2>new</FONT></FONT></B><FONT size=2>
OpenLayers</FONT><FONT color=#5c5c5c size=2><FONT color=#5c5c5c
size=2>.</FONT></FONT><FONT size=2>Layer</FONT><FONT color=#5c5c5c
size=2><FONT color=#5c5c5c size=2>.</FONT></FONT><FONT
size=2>Google</FONT><FONT color=#5c5c5c size=2><FONT color=#5c5c5c
size=2>(</FONT></FONT><FONT color=#005c00 size=2><FONT color=#005c00
size=2>"Google Physical"</FONT></FONT><FONT color=#5c5c5c size=2><FONT
color=#5c5c5c size=2>,{</FONT></FONT><FONT size=2>type</FONT><FONT
color=#5c5c5c size=2><FONT color=#5c5c5c size=2>:</FONT></FONT><FONT size=2>
G_PHYSICAL_MAP</FONT><FONT color=#5c5c5c size=2><FONT color=#5c5c5c
size=2>,</FONT></FONT><FONT size=2> </FONT><FONT color=#005c00 size=2><FONT
color=#005c00 size=2>"sphericalMercator"</FONT></FONT><FONT color=#5c5c5c
size=2><FONT color=#5c5c5c size=2>:</FONT></FONT><FONT size=2> </FONT><FONT
color=#800040 size=2><FONT color=#800040 size=2>true</FONT></FONT><FONT
color=#5c5c5c size=2><FONT color=#5c5c5c size=2>,</FONT></FONT><FONT
size=2>minZoomLevel</FONT><FONT color=#5c5c5c size=2><FONT color=#5c5c5c
size=2>:</FONT></FONT><FONT size=2> </FONT><FONT color=#004080 size=2><FONT
color=#004080 size=2>2</FONT></FONT><FONT color=#5c5c5c size=2><FONT
color=#5c5c5c size=2>});<BR></FONT></FONT><FONT
size=2> googlesatelliteLayer</FONT><FONT color=#5c5c5c
size=2><FONT color=#5c5c5c size=2>=</FONT></FONT><B><FONT color=#0000c0
size=2><FONT color=#0000c0 size=2>new</FONT></FONT></B><FONT size=2>
OpenLayers</FONT><FONT color=#5c5c5c size=2><FONT color=#5c5c5c
size=2>.</FONT></FONT><FONT size=2>Layer</FONT><FONT color=#5c5c5c
size=2><FONT color=#5c5c5c size=2>.</FONT></FONT><FONT
size=2>Google</FONT><FONT color=#5c5c5c size=2><FONT color=#5c5c5c
size=2>(</FONT></FONT><FONT color=#005c00 size=2><FONT color=#005c00
size=2>"Google Satellite"</FONT></FONT><FONT color=#5c5c5c size=2><FONT
color=#5c5c5c size=2>,{</FONT></FONT><FONT size=2>type</FONT><FONT
color=#5c5c5c size=2><FONT color=#5c5c5c size=2>:</FONT></FONT><FONT size=2>
G_SATELLITE_MAP</FONT><FONT color=#5c5c5c size=2><FONT color=#5c5c5c
size=2>,</FONT></FONT><FONT size=2> </FONT><FONT color=#005c00 size=2><FONT
color=#005c00 size=2>"sphericalMercator"</FONT></FONT><FONT color=#5c5c5c
size=2><FONT color=#5c5c5c size=2>:</FONT></FONT><FONT size=2> </FONT><FONT
color=#800040 size=2><FONT color=#800040 size=2>true</FONT></FONT><FONT
color=#5c5c5c size=2><FONT color=#5c5c5c size=2>,</FONT></FONT><FONT
size=2>minZoomLevel</FONT><FONT color=#5c5c5c size=2><FONT color=#5c5c5c
size=2>:</FONT></FONT><FONT size=2> </FONT><FONT color=#004080 size=2><FONT
color=#004080 size=2>2</FONT></FONT><FONT color=#5c5c5c size=2><FONT
color=#5c5c5c size=2>});<BR></FONT></FONT><FONT
size=2> googlehybridLayer </FONT><FONT color=#5c5c5c
size=2><FONT color=#5c5c5c size=2>=</FONT></FONT><FONT size=2> </FONT><B><FONT
color=#0000c0 size=2><FONT color=#0000c0 size=2>new</FONT></FONT></B><FONT
size=2> OpenLayers</FONT><FONT color=#5c5c5c size=2><FONT color=#5c5c5c
size=2>.</FONT></FONT><FONT size=2>Layer</FONT><FONT color=#5c5c5c
size=2><FONT color=#5c5c5c size=2>.</FONT></FONT><FONT
size=2>Google</FONT><FONT color=#5c5c5c size=2><FONT color=#5c5c5c
size=2>(</FONT></FONT><FONT color=#005c00 size=2><FONT color=#005c00
size=2>"Google Hybrid"</FONT></FONT><FONT color=#5c5c5c size=2><FONT
color=#5c5c5c size=2>,{</FONT></FONT><FONT size=2>type</FONT><FONT
color=#5c5c5c size=2><FONT color=#5c5c5c size=2>:</FONT></FONT><FONT size=2>
G_HYBRID_MAP</FONT><FONT color=#5c5c5c size=2><FONT color=#5c5c5c
size=2>,</FONT></FONT><FONT size=2> </FONT><FONT color=#005c00 size=2><FONT
color=#005c00 size=2>"sphericalMercator"</FONT></FONT><FONT color=#5c5c5c
size=2><FONT color=#5c5c5c size=2>:</FONT></FONT><FONT size=2> </FONT><FONT
color=#800040 size=2><FONT color=#800040 size=2>true</FONT></FONT><FONT
color=#5c5c5c size=2><FONT color=#5c5c5c size=2>,</FONT></FONT><FONT
size=2>minZoomLevel</FONT><FONT color=#5c5c5c size=2><FONT color=#5c5c5c
size=2>:</FONT></FONT><FONT size=2> </FONT><FONT color=#004080 size=2><FONT
color=#004080 size=2>2</FONT></FONT><FONT color=#5c5c5c size=2><FONT
color=#5c5c5c size=2>});<BR></FONT></FONT><FONT color=#5c5c5c size=2><FONT
color=#5c5c5c size=2>}</FONT></FONT><FONT color=#5c5c5c size=2><FONT
color=#5c5c5c size=2></FONT></FONT></DIV>
<DIV><FONT size=2 face=Arial></FONT> </DIV>
<DIV><FONT size=2 face=Arial>Stephane Poirier, M.Sc. Optic Physics <BR>Remote
Sensing Application Software Developer<BR>Université de Sherbrooke<BR>2500 Bd
Université, Sherbrooke, Qc J1K 2R1 Canada<BR><A
title="http://www.usherbrooke.ca/cartel CTRL + Click to follow link"
href="http://www.usherbrooke.ca/cartel"
target=_blank>www.usherbrooke.ca/cartel</A><BR><A
href="mailto:Stephane.Poirier@Usherbrooke.ca"
target=_blank>Stephane.Poirier@Usherbrooke.ca</A><BR>+1 (514) 509-8833 (actual
work site
telephone)<BR></FONT></DIV></DIV><BR>_______________________________________________<BR>Users
mailing list<BR><A
href="mailto:Users@openlayers.org">Users@openlayers.org</A><BR><A
href="http://openlayers.org/mailman/listinfo/users"
target=_blank>http://openlayers.org/mailman/listinfo/users</A><BR><BR></BLOCKQUOTE></DIV><BR></BODY></HTML>