Link to home
Start Free TrialLog in
Avatar of solution1368
solution1368

asked on

google api, javascript, asp.net

Currently working on google map api 3 with the initizlize part. Basically, what I try to do is
to take the user current IP address as the locator, and make google map default
to where the user locates. Just like when you are at home, I use your IP address to determine where you are and default the google map image for you.

1. Is it possible? If yes, please show me how in codes.
2. Do you think capture IP address is helping to do that? What I am afraid is if I am at home but my IP address is actually in another location. Then the concept does not work....

3. If I want to search business type by enter zip codes, like I put zip codes 11111 within 10 miles, show me all of the restaurant. Can you show me how to do that as well? I also need to know there is any sold business type list I can use with google.

4. About the custom Icon for google map. If I allow user enter zip codes, I wan to show
all restaurants under zip codes using icon a.jpg and
all gas station under zip codes using icon b.jpg.

And I will have a list of checkboxes to allow users to enter business types, such as
restaurants, gas stations, and etc. Can this done by one function initialize() in javascript?
If yes, please show me how.

How can I do that?

Thanks

<script type="text/javascript">
var map, mapGeo;
function initialize() {
   map = new google.maps.Map(document.getElementById('map_canvas'), {
          mapTypeId: google.maps.MapTypeId.ROADMAP
   });
   mapGeo = new google.maps.Geocoder();
   mapGeo.geocode({'address': 'US'}, function (results, status) {
       var ne = results[0].geometry.viewport.getNorthEast();
       var sw = results[0].geometry.viewport.getSouthWest();

       map.fitBounds(results[0].geometry.viewport);              
   });
}
ASKER CERTIFIED SOLUTION
Avatar of Tom Beck
Tom Beck
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of solution1368
solution1368

ASKER

Detailed and helpful information.