javascript - Radius through input -


i wonder if provide make map application input , display 3km radius of specified location. thank much. sorry bad english (jejeje)

it sounds want geocode address , plant circle around it. keep in mind have bind google map dom element, sample code div id of "map".

function geocodeandmap(address) {   var geocoder = new google.maps.geocoder();    geocoder.geocode( { 'address': address}, function(results, status) {     if (status == google.maps.geocoderstatus.ok) {       var myoptions = {         zoom: 16,         center: results[0].geometry.location,         maptypeid: google.maps.maptypeid.roadmap       };        var map = new google.maps.map(document.getelementbyid("map"), myoptions);         var addressmarker = new google.maps.marker({         map: map,         position: results[0].geometry.location       });        var circle = new google.maps.circle({         map: map,         radius: 3000,         fillcolor: '#660000'       });       circle.bindto('center',addressmarker,'position');   }); } 

Comments

Popular posts from this blog

php - cannot display multiple markers in google maps v3 from traceroute result -

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -