<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Hi Robert,<br>
      <br>
        Looking at the OverviewMap source code, in the draw method it
      checks if this.map.baseLayer is defined and won't actually draw
      the control, nor create the map, unless the baseLayer is set.  I'm
      not sure what's going on here, but it could be related to
      something else.<br>
      <br>
        You could try adding your control after initializing your main
      map view (extent / center) and see if it works.  You could also
      try to put a breakpoint on this line using firebug and look at the
      call stack to see when this gets called and why.  The line you
      refer is inside the map zoomToExtent method.  See what calls it
      and why.<br>
      <br>
      HTH,<br>
      <br>
      Alexandre<br>
      <br>
      <br>
      On 13-07-08 01:11 PM, Rob Hyx wrote:<br>
    </div>
    <blockquote
cite="mid:CAF-PjvwX7HX-O7Xgc9QGYxJK-zDqKVF4ayXXWe8niwBW=TWduQ@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>All,<br>
                        <br>
                      </div>
                      I am getting an error when trying to add an
                      overview map to my current map. This is how I am
                      adding the object:<br>
                      <br>
                    </div>
                    var overviewMap = new
                    OpenLayers.Control.OverviewMap();<br>
                  </div>
                  map.addControl(overviewMap);<br>
                  <br>
                  The error:<br>
                  <br>
                </div>
                TypeError: this.baseLayer is null (OpenLayers.debug.js
                line 9808)<br>
              </div>
              if (this.baseLayer.wrapDateLine) {<br>
              <br>
            </div>
            I've tried adding a check before the line OL errors on and
            then adding in the baseLayer from the layers property, and
            that works, but I don't want to be adding in lines of code
            to OL. Is there something I can pass into the OverviewMap
            constructor to fix this?<br>
            <br>
          </div>
          The actual map renders fine and it does have a baseLayer so I
          would expect the overview to just inherit that.<br>
          <br>
        </div>
        Using OL 2.12 and Firefox 17.0.6<br>
        <br>
        Thanks in advance!<br clear="all">
        <div>
          <div>
            <div>
              <div>
                <div>
                  <div>
                    <div>
                      <div>
                        <div>
                          <div><br>
                            -- <br>
                            <div style="text-align:left"><b>HYX</b> </div>
                            <div style="text-align:left"><a
                                moz-do-not-send="true"
                                href="http://hyx-music.com"
                                target="_blank">http://hyx-music.com</a></div>
                          </div>
                        </div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a>
</pre>
    </blockquote>
    <br>
    <br>
    <pre class="moz-signature" cols="72">-- 
Alexandre Dubé
Mapgears
<a class="moz-txt-link-abbreviated" href="http://www.mapgears.com">www.mapgears.com</a>
</pre>
  </body>
</html>