Load zoom/loading all locations not working
Permalink Browser Info Environment
I uploaded my locations and ran the geocoder. I then edited my view.php file to zoom to the center of Nebraska using the coordinates, then placed the js to load all of my locations on page load. Neither are working.
function load<?php echo $controller->bID?>() { var latlng = new google.maps.LatLng(41.9347785, -99.9080043); // Nebraska Centered var options = { zoom: 7, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP };
Type: | Discussion |
---|---|
Status: | New |
Thanks, that worked to get the map to initiate a search on page load, but since the form is set to 10 mile radius on page load, it's only giving me a 10 mile radius (I'm assuming this).
I added
back into it to get a default radius on load, but it's still only giving me a 10 mile radius.
I added
var radius = $('#ccm-locator-search-<?php echo $controller->bID?> #radius').val(1000); searchLocations();
back into it to get a default radius on load, but it's still only giving me a 10 mile radius.
yeah I think you might have better luck just setting radius to an integer there.
$(...).val(500) is just going to set that selected element's value. val() gets the value of that element and assigns it to radius.
http://api.jquery.com/val/
$(...).val(500) is just going to set that selected element's value. val() gets the value of that element and assigns it to radius.
http://api.jquery.com/val/
searchLocations() just searches based on that address input, so that's going to be blank on load.