jQuery-Mapbox icon indicating copy to clipboard operation
jQuery-Mapbox copied to clipboard

Mapbox Not Working

Open crbreingan opened this issue 11 years ago • 1 comments

I can't seem to get the newest version of this js code to work. I can't figure out why the newest code isn't working. I open up the example.html in my browser and it shows the image, but it just doesn't zoom when I scroll my mouse wheel.

My current solution to this is that I'm using the old version found here: http://wayfarerweb.com/js/mapbox.js. The old version works ok. But there are still problems. Any idea what I can try to get the newer version working? Or can someone help me fix the problem where I can't see the bottom of the image unless I zoom in all the way in the old version?

Thanks.

crbreingan avatar Mar 17 '14 04:03 crbreingan

Wasnt working for me either.

I fixed it by adding class="map-layer" to all the divs for each of the layers, as a code change that was made in the last couple of changes seemed to have changed this.

So, in the example, it should be like this:

<div id="viewport">
  <div style="background: url(images/layer1.png) no-repeat; width: 469px; height: 400px;" class='map-layer'> 
      <!--top level map content goes here--> 
  </div> 
  <div style="height: 1097px; width: 1286px;" class="map-layer"> 
      <img src="images/layer2.jpg" alt="" /> 
      <div class="mapcontent"> 
          <!--map content goes here--> 
      </div> 
  </div> 
  <div style="height: 1794px; width: 2104px;" class="map-layer"> 
      <img src="images/layer3.jpg" alt="" /> 
       <div class="mapcontent"> 
          <!--map content goes here--> 
      </div> 
  </div> 
  <div style="height: 2492px; width: 2922px;" class="map-layer"> 
      <img src="images/layer4.jpg" alt="" /> 
       <div class="mapcontent"> 
          <!--map content goes here--> 
      </div> 
  </div> 
</div>

HTHs,

Rob.

RobDonovan avatar Nov 12 '14 17:11 RobDonovan