Pages

Friday, December 12, 2008

Use Google maps in Asp.net C#

downloadDownload this with example with code

This is very simple to use Google maps to your application

To use Google map you must have an Google account

go to HTTP://code.google.com/apis/maps/signup.html

login and create key for your website.

Please use the example attached with this post.

After generating key replace this key in web.config.

For any queries please let me know.

10 comments:

  1. mnadeem.abbasi@gmail.comAugust 30, 2009 at 1:54 PM

    Nice work.

    ReplyDelete
  2. I like your work. I like its simpliicty. I want 1 more thing in it. I want to search via ZIP Code.
    Can you tell me how do it possible

    ReplyDelete
  3. Hi,

    I want to add multiple markers at one area based on the Count(Am getting From DB).

    Is it possible to do this

    ReplyDelete
  4. Hi,

    This is possible to put all the pointer at one place. But not be able to view pointers, as they will be overlapped with each other.

    Thanks,
    Narender Singh

    ReplyDelete
  5. Thanks Narender for Replay

    please provide me sample code.Based on the DB.

    I write the code like this


    var myArray = ['Hitech City', 'Banjarahills','Banjarahills'];

    addplacesinmap(myArray);

    function addplacesinmap(myArray)
    {
    alert("method");

    for (var i in myArray)
    {
    geocoder = new GClientGeocoder();
    geocoder.getLatLng(myArray[i], function(point) {
    if (!point) {
    alert(myArray[i] + " not found");
    }
    else {
    var marker = new GMarker(point,markerOptions);
    map.addOverlay(marker);

    }
    });
    }

    It is working fine, but not Multiple markers

    Thanks in Advance.

    ReplyDelete
  6. I want to create a aspx page where I have 2 text boxes (from address and miles), 1 pulldown and 1 submit.

    Initial user will enter Address or zip code and also enter 100 i.e. "100 miles" and click on submit button thne I will read the zip code from the sql server table and copmapre the entered addres/zip code and sqlserver zip code using google map api for near by 100 miles. If any record found thne add it into pulldown.

    Please let me know is this possible

    Regards

    Disha

    ReplyDelete
  7. Yes, It is feasible, you need to study Google Maps API. Google API is already providing API for the task you have

    ReplyDelete
  8. Yes it is possible, Just store the Zip values in DB and search in DB.
    As per Narender you need to work out on Google API and JS

    ReplyDelete
  9. how to develop a webpage with google map which displays all nearby schools,restraurenrs shopping malls etc...on checking on checkbox in asp.net

    ReplyDelete
  10. Hi,

    Try Google Play Ground to check implementations.

    http://code.google.com/apis/ajax/playground/#map_simple

    Narender Singh

    ReplyDelete