Solved

Google Map Not Showing

Posted on 2014-01-02
6
234 Views
Last Modified: 2014-01-02
Hello,

I have a page that I believe should be displaying a Google map but isn't.  I believe the XML data is in place, but I've obviously done something wrong...!

Please take a look at www.villasdirect.com/top-destinations.asp

Thanks in advance!
0
Comment
Question by:Nico2011
[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
  • 3
  • 3
6 Comments
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 39751160
Well, according to my javascript console, your XML file is invalid. Having a closer look at the XML, it appears to be all of the " " values in there that are causing the issue.

How are you generating the XML?
0
 

Author Comment

by:Nico2011
ID: 39751204
Hi Carl,

Thanks for your help - not quite there yet though.

I have cleaned up the XML - the  's were there as the town attribute was empty, so I did that intentionally, but now I have removed anything not necessary (including town), but it still doesn't quite click...

Best wishes/Nico
0
 
LVL 52

Expert Comment

by:Carl Tawn
ID: 39751222
It appears you also have an encoding issue. You don't have an XML declaration in your document so it is using the default UTF-8 character set - and some of you data must be using something not included in the set.

Try adding this to the start of you XML:

<?xml version="1.0" encoding="iso-8859-1"?>

Open in new window

0
Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

 

Author Comment

by:Nico2011
ID: 39751348
nope - didn't do it either...

I have now tried to minimise all the other data on the page so we can get to the root of the issue.  

This simplified page can be seen here: http://www.villasdirect.com/deps/country-map.asp?country=greece

I'm sure I've done something stupid though...
0
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 500 total points
ID: 39751380
OK. Couple more points (i've got this working with your code so it should be good):

1) You are using JQuery syntax in a couple of places, but don't have a reference to the API. So, you need to add the following into the head section of the page:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>

Open in new window

That's the CDN version, you can download it and reference it locally if you prefer.

2) There are a couple of lines that are causing a javascript error. Namely:
document.getElementById("autolng").value = autolng;
document.getElementById("autolat").value = autolat;

Open in new window

Elements called "autolng" and "autolat" don't appear to exist (or not in your cutdown version at least).

Finally, you have a reference to the Maps API in your page twice - this won't break anything, but you should remove one of them.
0
 

Author Closing Comment

by:Nico2011
ID: 39751407
Thanks so much Carl - it was the autolng/autolat causing a javascript error that stopped it working...!
0

Featured Post

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
StoredProcedure to JSON query faulty syntax 2 45
ASP Error Handler 5 35
JQuery & Classic ASP 10 41
XML loaded in a form with dropdown 6 57
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Many times as a report developer I've been asked to display normalized data such as three rows with values Jack, Joe, and Bob as a single comma-separated string such as 'Jack, Joe, Bob', and vice versa.  Here's how to do it. 
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

759 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