Click here to Skip to main content
15,886,199 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
SQL
hello, sorry for asking too many questions but I am blocked and the clock is ticking me

I have a google map inserted in a asp.net page, I filled a dropdownlist, I select an item from the list, I locate on the map, I put a marker, I displays an info window on the map

I need your help to extract the current image of my card and give the user the option to save it





JavaScript
function findAddress() {
    var address = document.getElementById("ddlAdr").value;

    // script uses our 'geocoder' in order to find location by address name
    geocoder.geocode({ 'address': address }, function(results, status) {
        if (status == google.maps.GeocoderStatus.OK) { // and, if everything is ok

            // we will center map
            var addrLocation = results[0].geometry.location;
            map.setCenter(addrLocation);

            // store current coordinates into hidden variables
            document.getElementById('lat').value = results[0].geometry.location.$a;
            document.getElementById('lng').value = results[0].geometry.location.ab;

            // and then - add new custom marker
            var addrMarker = new google.maps.Marker({
            
                position: addrLocation,
                map: map,
                title: results[0].formatted_address
            });
        } else {
            alert('Geocode was not successful for the following reason: ' + status);
        }
    });
}


Thanks for your help
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900