Make your marker variable global in scope (define it with var marker outside of your initialize function, and don't use "var" inside the function). When you click on clear, have it execute marker.setMap(null), which will remove the marker.
There is no positive way to limit a geoCoding. You could start by asking your user to "enter the house number and street", and then in your javascript add on ", Plymouth, MN" before handing it to the geoCoder. But if you can't trust your users to follow directions, detecting that they have added a city you don't want is a tedious exercise. - Jeff On Mar 28, 10:50 am, Jared Noelting <[email protected]> wrote: > I've been searching for a way to clear all geocode results with a simple > button, can anyone help me out? > > http://maptest.plymouthmn.gov/index3.htm > > I'm also be interested in defining my search to the jurisdiction of > Plymouth, MN and haven't seen how to do that if it is possible. > > Thanks for any help. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
