.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

get the apikey for google maps automatically

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :.NET Framework
i want to get the API key for google maps automatically whenever i install my application on server

View Complete Post

More Related Resource Links

Image gallery with EXIF and Google maps?


I am trying to put together an image gallery display. I am guessing it will need to be a customer control but I am not sure.  So I figured I would ask on the best way to approach this. When the gallery is loaded I want to have one image displayed with thumbs underneath. On the right side I would like to display EXIF data and underneath that a small google map if there is geolocation tagged with the picture. I figure I will probably need to store the gallery info in a database with caption and description.  Maybe even searchable tags if I get cheeky later. 

So should I be using an ajax gallery to display the images and if so how to pass the EXIF and geolocation to the other controls? Or do i pull in all the info into some sort of dataset and then parse it out to a custom control.  I am still fairly new to ASP but I have a fairly good understanding.  Should be an intersting project if nothing else.  Any thoughts.


How to display Polygons from sql server 2008 on top of google maps

hi every one,This is the situation I am facing...I have a table in sql server 2008 database that contains map of a village in the form of polygons. I want these polygons to be displayed on top of google maps. Can any body suggest how to start of ?? Thanks in advanceRk

Google Maps Tutorial

Because it's best to learn from examples, here is a complete listing of all the functionalities GoogleMaps.Subgurim.NET offers .

Each example is made up of an explanation of the element, a map example, and the code corresponding to that example.
Periodically we will be adding to the list!

adding onload event from code behind for Google Maps

Im working with Google maps start turoail: http://code.google.com/apis/maps/documentation/javascript/tutorial.html#HelloWorldAs you can see there's a line: <body onload="initialize()">Now since, I want to have Google Maps on page A.aspx within a masterpage main.master, I dont have the <body> tag available to me in the A.aspx page.I preferably DONT want to have the body tag as runat="server", since Google Maps is not relevant for all pages and I dont like a server control when its not needed as they slow things down (even a bit).I tried this in A.aspx.vb, but it didnt work:Dim javaScript As New StringBuilder        javaScript.Append("<script type='text/javascript'>")        javaScript.Append("window.document.body.onload = initialize();")        javaScript.Append("</script>")        Me.Page.ClientScript.RegisterClientScriptBlock(Me.GetType(), "BodyLoadUnloadScript", javaScript.ToString())How can I add the onload event from code behind?

XPath expression not working for Google Maps return XML

I have this XMLdocument:<kml><Response><name>3051,netherlands</name><Status><code>200</code><request>geocode</request></Status><Placemark id="p1"><address>3051 Rotterdam, The Netherlands</address><AddressDetails Accuracy="5"><Country><CountryNameCode>NL</CountryNameCode><CountryName>Nederland</CountryName><AdministrativeArea><AdministrativeAreaName>Zuid-Holland</AdministrativeAreaName><Locality><LocalityName>Rotterdam</LocalityName><PostalCode><PostalCodeNumber>3051</PostalCodeNumber></PostalCode></Locality></AdministrativeArea></Country></AddressDetails><ExtendedData><LatLonBox north="51.9497984" south="51.9402954" east="4.4907255" west="4.4656367"/></ExtendedData><Point><coordinates>4.4767883,51.9458650,0</coordinates></Point></Placemark></Response></kml>I used this site: http://www.xmlme.com/XpathTool.aspxwhere I enter the expression: "kml/Response/Placemark/Point/coordinates"I then get the right value. HOWEVER, when I place this code in .NET, the xpath expression returns nothing:req = HttpWebRequest.Create("http://maps.google.com/maps/geo?output=x

google maps


<script type="text/javascript">

     function showLocation() {
         geocoder.getLocations(document.forms[0].address1.value, function (response) {
             if (!response || response.Status.code != 200) {
                 alert("Sorry, we were unable to geocode the first address");
             else {
                 location1 = { lat: response.Placemark[0].Point.coordinates[1], lon: response.Placemark[0].Point.coordinates[0], address: response.Placemark[0].address };
                 geocoder.getLocations(document.forms[0].address2.value, function (response) {
                     if (!response || response.Status.code != 200) {
                         alert("Sorry, we were unable to geocode the second address");
                     else {
                         location2 = { lat: response.Placemark[0].Point.coordinates[1], lon: response.Placemark[0].Point.coordinates[0], address: response.Placemark[0].address };

     function calculateDistance() {
         try {
             var glatlng1 = new GLatLng(location1.lat, location1.lon);
             var glatlng2 = new GLatLng(location2.lat, location2.lon);
             var miledistance = gl

How can I use xml SelectNodes to parse google maps xml ?

I'd like to parse 

I can't find any example on the net which uses

XmlNodeList nodes = doc.SelectNodes("/GeocodeResponse/result/geometry/location/lat/");

Dynamic Google Maps Help


This works fine for me!


"if(GBrowserIsCompatible()) {" & vbLf & vbTab & vbTab & "function ShowMap() {" & vbLf & vbTab & vbTab & vbTab & "var map = new GMap(document.getElementById(""map"")); map.setMapType(G_PHYSICAL_MAP ); " & vbLf & vbLf & vbTab & vbTab & vbTab)


But I'm DYING on adding this line...



Hosting Google Maps in a Microsoft WPF application using XAML

With the Google Maps API for Flash, it is now very easy to add Google Maps technology to your Microsoft Windows Presentation Foundation (WPF) application using XAML.

The Google Maps API for Flash runs as a Flash application inside the Flash player control. The Flash Player control is embedded in the WPF application and code glue allows your Native .NET C# or VB.NET code to interface for the Google Maps control in Flash.

This sample project demonstrates you how to insert Google Maps in your WPF application, how to access the Google Maps API and interface with the Maps control, and how to receive information back from the control in the WPF application.

The final application looks like this:

Google Maps API with Gridview


I am attempting to create an ASP.NET website that incorporates Google Maps to geocode the location of bus stops that the user selects from a gridview that is bound to a SQL database.  Any ideas on how to use a buttonfield to pass the address (text) for a given row to a command that will geocode that address and place a marker on the map?

Reading XML data from Google GeoCode (Maps) Service v3


Google Maps API has upgraded their geocoding service. The old style had each data element in a unique node, so I was reading each node using SelectSingleNode. Now, the node names are all the same, so my VB.net program is not working accurately, except on the lat/long parameters because those are still unique.

Here is the link to an address and how the API responds: http://maps.googleapis.com/maps/api/geocode/xml?address=1210%20cassat%20av,%20jacksonville,%20fl,%20USA&sensor=true


and here is my code:

Dim uriRequest As New Uri(GoogleMapsAPI_URL & _address & _output)
            Dim geoRequest As HttpWebRequest = WebRequest.Create(uriRequest)
            Dim geoResponse As HttpWebResponse = geoRequest.GetResponse()
            Dim sr As New StreamReader(geoResponse.GetResponseStream(), Encoding.UTF8)
            'instantiate new xml document to hold the google geo resulting xml
            Dim geoXml As New XmlDocument()


            'Dim TitleNode As XmlNodeList = geoXml.GetElementsByTagName("address_component")

            'Get County (administrative_area_level_2)

            _GeoCounty = geoXml.Item("/GeocodeResponse/result/address_component/[type=administrative_area_level_2]")

            _GeoCountyData = _GeoCounty.InnerXml.ToString()


Google Maps Marker



As main project this schoolyear I'm making a mobile website, I already imported a Google Map with all the locations in my database.

The problem is when a person visits the LocationDetail.aspx page, he can go to the map but the marker of that location isn't different from the other markers. I want it to be in another color so the visitor can see where the location is.

Somebody an idea?

5 GridView Themes Based on Google's Personalized Homepage (igoogle)

One of the silly features I have found that I like about igoogle is how the pages color palette changes depending upon the time of day. So as the day progresses from morning to afternoon to evening the colors on the page change as well. Like I said, I know this is a silly feature, but I like it. And I have asked around a little bit and seems like other people like it to. To get a better idea of how the colors change, here are the background images from a few of the HTML elements.

Get more then google search from here

Just make it home page and enjoy more then google search you not only get google result and prizes for searching but also free ebooks and link from here like orkut,facebook,twitter,yahoomail etc...


how to make a dropdownlist looks like google search box


dear all...

any idea how to do that ?

Thnx in advance

Automatically redirect to HTTPS and check if SSL is active



I've set in the web.config:

    <!-- User Authentication -->
    <authentication mode="Forms">
      <forms loginUrl="~/Page/View/Content/Login.aspx" timeout="2880" requireSSL="true" />

This works fine. If there is no ssl connection, the login form doesn't continue. But I would like to check if ssl is active (in codebehind) and, if it's possible, to automatically the user to the https page if he's currently on http. (I could do this job by manually redirect with page.response("https://url.../login.aspx"); but this is not really generic. For example if the webapp is moved to another domain it doesn't work anymore... I'm looking for something like: FormsAuthentication.RedirectWithSSL(); or so... :D)


Dynamic .NET: Creating Interactive Bing Maps with Silverlight and IronRuby


Silverlight provides support for dynamic languages such as IronRuby and IronPython. We'll walk you through the creation of a custom Silverlight control using Bing Maps and IronRuby.

Ashish Ghoda

MSDN Magazine February 2010

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend