?
Solved

Google map insert in a contact page

Posted on 2010-11-16
6
Medium Priority
?
577 Views
Last Modified: 2012-05-10
I have seen contact pages where a Google map is a simple picture that is static and irresponsive to the mouse. Is it possible to insert a live Google map in a rectangular box on which user can drag, move and resize the map?
Please instruct how and provide sample code.
Thanks a lot.
0
Comment
Question by:ksfok
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 15

Accepted Solution

by:
jorge_toriz earned 668 total points
ID: 34152336
Go to maps.google.com, click on "Link" hyperlink, copy the "Paste HTML to embed in website" code on your HTML source... that's all
0
 
LVL 21

Expert Comment

by:Alpesh Patel
ID: 34153618
yes, we can do it. Please see radhesoftech.com/contactus.aspx

Just register on google and use that Javascript on page to get the dynamic googlemap on your page.
0
 
LVL 3

Assisted Solution

by:manlimnag
manlimnag earned 664 total points
ID: 34154496
The javascript API for google maps are their also you can find some commercial controls who wrapped this functionality in simplified way if you wish But in most cases Google API is more than enough.
0
 [eBook] Windows Nano Server

Download this FREE eBook and learn all you need to get started with Windows Nano Server, including deployment options, remote management
and troubleshooting tips and tricks

 

Author Comment

by:ksfok
ID: 34157255
Is Google API something we have to pay for?
0
 

Author Comment

by:ksfok
ID: 34298713
PatelAlpesh,
See error generated by radhesoftech.com/contactus.aspx beow:

Server Error in '/' Application.
--------------------------------------------------------------------------------

The remote name could not be resolved: 'mail.radheinfotech.com'
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.WebException: The remote name could not be resolved: 'mail.radheinfotech.com'

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:


[WebException: The remote name could not be resolved: 'mail.radheinfotech.com']
   System.Net.ServicePoint.GetConnection(PooledStream PooledStream, Object owner, Boolean async, IPAddress& address, Socket& abortSocket, Socket& abortSocket6, Int32 timeout) +5483819
   System.Net.PooledStream.Activate(Object owningObject, Boolean async, Int32 timeout, GeneralAsyncDelegate asyncCallback) +202
   System.Net.PooledStream.Activate(Object owningObject, GeneralAsyncDelegate asyncCallback) +21
   System.Net.ConnectionPool.GetConnection(Object owningObject, GeneralAsyncDelegate asyncCallback, Int32 creationTimeout) +332
   System.Net.Mail.SmtpConnection.GetConnection(String host, Int32 port) +160
   System.Net.Mail.SmtpTransport.GetConnection(String host, Int32 port) +159
   System.Net.Mail.SmtpClient.GetConnection() +35
   System.Net.Mail.SmtpClient.Send(MailMessage message) +1213

[SmtpException: Failure sending mail.]
   System.Net.Mail.SmtpClient.Send(MailMessage message) +1531
   UserRegistration.createUserWizard_CreatedUser(Object sender, EventArgs e) +490
   System.Web.UI.WebControls.CreateUserWizard.OnCreatedUser(EventArgs e) +111
   System.Web.UI.WebControls.CreateUserWizard.AttemptCreateUser() +354
   System.Web.UI.WebControls.CreateUserWizard.OnNextButtonClick(WizardNavigationEventArgs e) +102
   System.Web.UI.WebControls.Wizard.OnBubbleEvent(Object source, EventArgs e) +418
   System.Web.UI.WebControls.CreateUserWizard.OnBubbleEvent(Object source, EventArgs e) +161
   System.Web.UI.WebControls.WizardChildTable.OnBubbleEvent(Object source, EventArgs args) +19
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
   System.Web.UI.WebControls.Button.OnCommand(CommandEventArgs e) +118
   System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +166
   System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
   System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

 


--------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:2.0.50727.3615; ASP.NET Version:2.0.50727.3614
0
 
LVL 1

Assisted Solution

by:saranoerr
saranoerr earned 668 total points
ID: 34348161
First you must include the following Javascript file.  You may have to supply a different "key" parameter for your website.  You can get a key here: http://code.google.com/apis/maps/signup.html
 
You can place the div with id "map_canvas" anywhere on your web page.  You can also make the map more interactive and default to a specific location by supplying different lat/lon on initialization. To zoom to a specific level the map you can call map.setZoom([insert num between 2-21])

See below:

<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Google Maps JavaScript API Example</title>
    <script src="http://maps.google.com/maps?file=api&v=2&key=abcdefg&sensor=true_or_false"
            type="text/javascript"></script>
    <script type="text/javascript">

    function initialize() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
        map.setCenter(new GLatLng(37.4419, -122.1419), 13);
        map.setUIToDefault();
      }
    }

    </script>
  </head>
  <body onload="initialize()" onunload="GUnload()">
    <div id="map_canvas" style="width: 500px; height: 300px"></div>
  </body>
</html>
0

Featured Post

Ransomware Attacks Keeping You Up at Night?

Will your organization be ransomware's next victim?  The good news is that these attacks are predicable and therefore preventable. Learn more about how you can  stop a ransomware attacks before encryption takes place with our Ransomware Prevention Kit!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question