Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Blank MAP using googlemapapi.class_2_5.php

Posted on 2011-02-17
4
Medium Priority
?
132 Views
Last Modified: 2013-11-30
The code bellow work just fine when used alone (called directed in the URL) but inside the rest of the code nothing appears on screen!
<head>
        <style type="text/css">v\:* {behavior:url(#default#VML);}</style>
</head>

<body onload="onLoad()"> 
       
        <?php 
        require($_SERVER['DOCUMENT_ROOT'] . '/mod/mapa/googlemapapi.class_2_5.php');
        $map = new GoogleMapAPI('map');
        $map->setAPIKey('ABQIAAAAH1Dik6l98ZwI-9bNv2jkhRRycExbv9_dgh8OHqcKgbMA7oaqhRTY5gjAiydpSiPhRxNLlNvsWX_hDw');
        $map->addMarkerByAddress('621 N 48th St # 6 Lincoln NE 68502','PJ Pizza','<b>PJ Pizza</b>');
        $map->addMarkerByAddress('826 P St Lincoln NE 68502','Old Chicago','<b>Old Chicago</b>');
        $map->printHeaderJS();
        $map->printMapJS(); 
        $map->printMap();
        ?>

Open in new window

div-map.jpg
map-ok.jpg
0
Comment
Question by:rapchan
[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
4 Comments
 
LVL 16

Accepted Solution

by:
sjklein42 earned 1000 total points
ID: 34922756
Sounds like there is a javascript error at runtime that is short-circuiting some of your javscript code.  Any javascript error aborts execution of the script, with few indications.  Have you turned on Javascript error reporting in your browser preferences?

To debug this, you could place some temporary alert() statements in your code to see if it is even getting to your map code.  If not, move the alert() statements earlier and earlier in the javascript to narrow in on the problem.
0
 
LVL 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 1000 total points
ID: 34925283
You might want to consider using the Google Static maps.  Have a look at this article - you can copy the code and try it.
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/A_3350-Using-the-Google-Maps-API-in-PHP.html

An example of the class in action is available here:
http://www.landonbaseball.com/site_visitors.php
0
 
LVL 16

Expert Comment

by:CWS (haripriya)
ID: 39686705
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

636 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