Solved

google maps from codebehind

Posted on 2011-02-22
2
387 Views
Last Modified: 2013-12-17
Hi guys.

I have a iframe at my .aspx page:
<iframe runat="server" id="gMapss" width="400" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0"></iframe>

From my .aspx.cs page I try :
gMapss.Attributes["src"] = "http://maps.google.dk/maps?f=q&source=s_q&hl=da&geocode=&q=Jernbanegade+27,+Kolding&aq=&sll=55.491924,9.482296&ie=UTF8&hq=&hnear=Jernbanegade+27,+6000+Kolding&ll=55.495534,9.482489&spn=0.017017,0.036478&z=14&iwloc=A&output=embed";
           
But it dosen´t work, It works if I parse the map code in the src="" at the .aspx page. Any suggessions?
0
Comment
Question by:bongii
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 34956605
I think it is because of all the escaped ampersands in there. Change it to:

gMapss.Attributes["src"] = "http://maps.google.dk/maps?f=q&source=s_q&hl=da&geocode=&q=Jernbanegade+27,+Kolding&amp;aq=&sll=55.491924,9.482296&ie=UTF8&hq=&hnear=Jernbanegade+27,+6000+Kolding&ll=55.495534,9.482489&spn=0.017017,0.036478&z=14&iwloc=A&output=embed";

Open in new window

0
 

Author Comment

by:bongii
ID: 34958620
Thank you :)
Do you know how to show the map only by Latiture and longitude? I don´t have the adress..
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Video Player 11 23
Install Problem 13 32
Help with converting xml file to excel using VB.NET 3 20
C# Gridview 1 33
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

823 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