Hey, I'm kinda stumped on this one, but I'm sure it's not that
complicated.
I'm using jmaps to load a google map, and i can set the zoom with
mapZoom by manually entering 'mapZoom: 12', etc.
However I have a form, and I am trying to adjust the maps zoom based
on the range selected in the form.
I have an alert, and it shows the right value, and the other value
from the .split (range) works perfectly, and is below the 'zoom2', but
zoom2 just doesn't work.
Can you see my mistake? I can't find it.
[code]
function getList(event, page){
var distance = $('#distance').val();
var split_distance=distance.split("-");
var zoom2 = split_distance[1];
var range = split_distance[0];
var genre = $('#genre').val();
var addressQ = $('#address').val();
$('#filterList').hide();
$('.searchHolder').html('searching '+ genre + ' playing within
'+
range + ' miles of '+ addressQ ).show();
$('#map').jmap("searchAddress", {
address: $('#address').val()
},
function(options, point) {
alert(zoom2);
$('#map').jmap({pointLatLng:[point.y, point.x], pointHTML:
'Address' + options.address });
$('#map').jmap('init', {mapCenter: [point.y, point.x], mapZoom:
zoom2});
$('#holdBands').html('<div class=\"over\" style=\"margin-top: 1px
\"><center><img src=\"images/ajax-loader.gif\"></center></div>');
$.ajax({
type: "POST",
url: "processes/showList.php",
data:
"lat="+point.y+"&long="+point.x+"&genre="+genre+"&page="+page
+"&address="+addressQ+"&distance="+range,
success: function(response){
[/code]
i'd appreciate any help on this,
Thanks
Pete