*thanks Andrew,,, It worked.. :) * On Fri, Feb 26, 2010 at 4:06 PM, Andrew Leach <andrew.leac...@googlemail.com > wrote:
> On Feb 26, 9:56 am, "Ani..." <anu.a...@gmail.com> wrote: > > *Hello Andrew, > > one more help needed.. i would like to have the knob in the slider to be > > placed at center.. as i have the map zoomed to 11 by default.. i tried in > > the script and couldn't find where to fix this... here is the linkhttp:// > www.idxsync.com/sbaor/check_map.php > > Order of statements is very important. You need to add the control and > then set the zoom. The control does not automatically pick up the > map's zoom when it's added. See my example. > > However: it could pick up a starting zoom reasonably easily. In the > yslider1.js javascript file, find this line > map.getContainer().appendChild(container); > and add this line immediately underneath it: > if (map.getZoom()) that.setSlider(map.getZoom()); > > The "if" statement is needed because getZoom returns NaN if the zoom > hasn't been set when the control is added, and although setSlider will > work in Firefox passing NaN as the value to use, it doesn't in all > browsers. (Although my graphics won't work in IE either) > > I've updated my version online, which I would recommend you download > again as I omitted an attribution to Mike which should have been > included. > > Andrew > > -- > You received this message because you are subscribed to the Google Groups > "Google Maps API" group. > To post to this group, send email to google-maps-...@googlegroups.com. > To unsubscribe from this group, send email to > google-maps-api+unsubscr...@googlegroups.com<google-maps-api%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-maps-api?hl=en. > > -- `•.¸¸.•´ With Luv `•.¸.•´ Anitha ----------------------------------------------------------------- -- You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to google-maps-...@googlegroups.com. To unsubscribe from this group, send email to google-maps-api+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.