J
Jedrin
I am displaying a map using openlayers, on the left I have a sidebar
which I can show/hide through ruby on rails/ajax. The problem is that
when my sidebar appears, the map pushes out to the right and causes a
slider to appear at the bottom. I want it to work the same way that
google maps works where the map resizes and no slider appears at the
bottom.
Any advice on the general direction, what approach or API to look
into would be appreciated.
The general layout I use is with the sidebar is below
=====================
<style type='text/css'>
<!--
#sidebar {
background-color: #999999;
margin: 0px;
padding: 5px;
border-right-width: thin;
border-top-style: none;
border-right-style: dotted;
border-bottom-style: none;
border-left-style: none;
border-right-color: #990000;
overflow: auto;
float: left;
width: 150px;
height: 100%;
}
-->
</style>
<span id='sidebar' style='display:none'>
<%= link_to_remote '<<<<', :url => {:action => 'hide_sidebar'} %>
<%= render artial => 'map/georec_form',
:locals => {:recs => @recs} %>
</span>
<div id='main_content'>
<div>  
<span id='sidebar_button'>
<%= link_to_remote '>>>>', :url => {:action => 'show_sidebar'} %>
</span>
</div>
<%= yield %>
</div>
which I can show/hide through ruby on rails/ajax. The problem is that
when my sidebar appears, the map pushes out to the right and causes a
slider to appear at the bottom. I want it to work the same way that
google maps works where the map resizes and no slider appears at the
bottom.
Any advice on the general direction, what approach or API to look
into would be appreciated.
The general layout I use is with the sidebar is below
=====================
<style type='text/css'>
<!--
#sidebar {
background-color: #999999;
margin: 0px;
padding: 5px;
border-right-width: thin;
border-top-style: none;
border-right-style: dotted;
border-bottom-style: none;
border-left-style: none;
border-right-color: #990000;
overflow: auto;
float: left;
width: 150px;
height: 100%;
}
-->
</style>
<span id='sidebar' style='display:none'>
<%= link_to_remote '<<<<', :url => {:action => 'hide_sidebar'} %>
<%= render artial => 'map/georec_form',
:locals => {:recs => @recs} %>
</span>
<div id='main_content'>
<div>  
<span id='sidebar_button'>
<%= link_to_remote '>>>>', :url => {:action => 'show_sidebar'} %>
</span>
</div>
<%= yield %>
</div>