Question: C# Develop a web form that uses the existing Google Static Map application programming interface (API). The API is basically consumed as a web service.

C# Develop a web form that uses the existing Google Static Map application programming interface (API). The API is basically consumed as a web service. Application Requirements: o Allow for entry of an Address (text box). o Retrieve a map from Google by calling the API with its correct URL and include the parameters for the map. If all of the parameters are correct, a static map image is returned. I did that but i cant get the image to display, just shows a missing image link? here is the code that i wrote:

public partial class MapGenerator : System.Web.UI.Page

{

protected void Page_Load(object sender, EventArgs e)

{

}

protected void btnGetMap_Click(object sender, EventArgs e)

{

imgMap.ImageUrl =

"http://maps.googleapis.com/maps/api/staticmap?center= " +

txtAddress.Text +

"&zoom=14&size=540x320&maptype=roadmap&markers=color:blue%7Clabel:A%7C" +

txtAddress.Text + "&sensor=false";

//display URL in label

lblURL.Text = imgMap.ImageUrl;

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!