close ad
WARNING PC USERS: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Will my Pro Maps work when I launch the site?

Thread began 1/24/2011 3:10 pm by kdanielppe417302 | Last modified 1/28/2011 10:25 am by Jason Byrnes | 1289 views | 4 replies |

kdanielppe417302

Will my Pro Maps work when I launch the site?

I didn't set up the localhost thing to be able to view my maps when testing. I didn't know how.

I went ahead and retrieved an API key for my actual website. Right now I just get a gray box. When i load the dreamweaver site to the actual domain will the maps pop up?

Sign in to reply to this post

Jason ByrnesWebAssist

if your getting a grey box, there is probably a problem.

please send a link where i can see what is going wrong.

Sign in to reply to this post

kdanielppe417302

Below is my source code

  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Preferred Pump</title>
<link href="PreferredPumpStyleSheet.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
-->
</style>
<style type="text/css">
<!--
-->
</style>
<script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script>
<script src="scripts/jquery.js" type="text/javascript"></script>
<script src="scripts/lightbox.js" type="text/javascript"></script>
<link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" />
<link href="css/lightbox.css" rel="stylesheet" type="text/css" />
<link href="css/sample_lightbox_layout.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
h1 {
color: #F38C1E;
font-size: 30px;
}
h2 {
color: #1FF87E;
font-size: 20px;
}
body,td,th {
font-family: Arial, Helvetica, sans-serif;
}
body {
background-image: url(images/wave-bluebg.jpg);
}
a:link {
text-decoration: none;
color: #F88A11;
}
a:visited {
text-decoration: none;
color: #F88A11;
}
a:hover {
text-decoration: none;
color: #F8ED32;
}
a:active {
text-decoration: none;
color: #1FF87E;
}
h4 {
color: #0FF975;
}
-->
</style><script type="text/javascript" src="google_javascript/wagmp_map_24.js">/*wagmp*/</script>
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA6ruPtUwnL-c9Ea1seceQExQxt3cBa0ppdMyX-2ujS-pI8hRR5hQFWED_V4vwcR39HVzZv4wHsAzKmg">/*wagmp*/</script>

</head>

<body>
<div id = "wholepage">
<div id="header"><img src="images/header_website.png" alt="header" name="header" width="1023" height="142" align="middle" id="header2" /></div>
<div id="body">
<div id = "buttons">
<ul id="MenuBar1" class="MenuBarVertical">
<li><a href="index.html">Home</a> </li>
<li><a href="company.html">Company</a></li>
<li><a href="products.html">Products</a> </li>
<li><a href="locations.html">Locations</a></li>
<li><a href="http://www.preferredpump.com/marketplace1.html">Used Rig Marketplace</a></li>
<li><a href="suppliers.html">Suppliers</a></li>
<li><a href="awardprogram.html" class="MenuBarItemSubmenu">Award Program</a>
<ul>
<li><a href="lasvegasdap.html">Las Vegas</a></li>
<li><a href="bigpromotiondap.html">Big Promotion</a></li>
<li><a href="catalogdap.html">Cagtalog</a></li>
</ul>
</li>
<li><a href="links.html">Links</a></li>
<li><a href="contactus.html">Contact Us</a></li>
<li><a href="http://www.pulstarmfg.com/">Pulstar</a></li>
</ul>
</div>
<div id = "contentright"> place any image here</div>
<div id = "content">
<div id="contentpicture"><div id="employeepic"><img src="images/branch photos web/17-springfieldmo/17group_photo.jpg" width="250" height="196" alt="14small" /></div></div>
<div id="contenttext">
<h1>Springfield, MO</h1>
<h4>Preferred Pump & Equipment </h4>
<h4>2250 N. Burton</h4>
<h4>Springfield, MO 65803 </h4>
<p>800-259-3701 (Toll Free)<br />
417-862-3700<br />
417-862-3767 (Fax)<br />
<br />
Branch Manager: <a href="mailto:ksmoot@preferredpump.com"><strong>Karla Smoot</strong></a><br />
E-Mail: <a href="mailto:ksmoot@preferredpump.com"><strong>ksmoot@preferredpump.com</strong></a><br />
<br />
Group Manager: <a href="mailto:mfloyd@preferredpump.com"><strong>Mike Floyd</strong></a><br />
E-Mail: <a href="mailto:mfloyd@preferredpump.com"><strong>mfloyd@preferredpump.com</strong></a><br />
</p>
<p><a href="locations.html">Back to Locations</a></p>
</div><div id="googlemap"><div id="wagmp_map_24" style="width: 505px; height: 300px;"></div></div>
<div id="contentimages">
<div id="gallery1" class="lbGallery">
<ul>
<li> <a href="images/branch photos web/17-springfieldmo/17group_photo.jpg" title=""> <img src="images/branch photos web/17-springfieldmo/17group_photo.jpg" width="72" height="72" alt="" /> </a> </li>
<li> <a href="images/branch photos web/17-springfieldmo/17-1.jpg" title=""> <img src="images/branch photos web/17-springfieldmo/17-1.jpg" width="72" height="72" alt="" /> </a> </li>
<li> <a href="images/branch photos web/17-springfieldmo/17-2.jpg" title=""> <img src="images/branch photos web/17-springfieldmo/17-2.jpg" width="72" height="72" alt="" /> </a> </li>
<li> <a href="images/branch photos web/17-springfieldmo/17-3.jpg" title=""> <img src="images/branch photos web/17-springfieldmo/17-3.jpg" width="72" height="72" alt="" /> </a> </li>
<li> <a href="images/branch photos web/17-springfieldmo/17-4.jpg" title=""> <img src="images/branch photos web/17-springfieldmo/17-4.jpg" width="72" height="72" alt="" /> </a> </li>
</ul>
</div>
<script type="text/javascript">
// BeginWebWidget lightbox_gallery

$(function() {
$('#gallery1 a').lightBox();
});


// EndWebWidget lightbox_gallery
</script>
</div>
</div>
</div>
<div id="footer"><img src="images/footer_website.png" alt="footer" name="footer" width="1024" height="135" border="0" align="middle" usemap="#footerMap" id="footer" />
<map name="footerMap" id="footerMap">
<area shape="rect" coords="259,90,333,115" href="contactus.html" alt="contacus" />
<area shape="rect" coords="341,91,397,114" href="news.html" alt="news" />
<area shape="rect" coords="405,88,461,115" href="faqs.html" alt="faqs" />
<area shape="rect" coords="466,91,592,114" href="privacypolicy.html" alt="privacypolicy" />
<area shape="rect" coords="601,90,654,114" href="legal.html" alt="legal" />
<area shape="rect" coords="663,90,763,114" href="downloads.html" alt="downloads" />
</map>
</div>
</div>
<script type="text/javascript">
<!--
var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgRight:"SpryAssets/SpryMenuBarRightHover.gif"});
//-->
</script>
<script type="text/javascript" src="google_javascript/wagmp_maps.js">/*wagmp*/</script>
</body>
</html>  
Sign in to reply to this post

kdanielppe417302

Here is the script for the pro map

  function WAMapRef(mapObj) {
this.obj = mapObj;
this.directions = false;
this.icons = [];
this.markers = [];
this.addresses = [];
this.points = [];
this.getPointByAddress = getPointByAddressFunc;
this.addressFailed = true;
return this;
}

function WAMapPoint(theMarker, theAddress, theIcon) {
this.icon = theIcon;
this.marker = theMarker;
this.address = theAddress;
return this;
}

function getPointByAddressFunc(value,attname) {
if (!attname) attname = "street";
for (var x=0; x < this.addresses.length; x++) {
if (eval("this.addresses[x]."+attname) == value) {
return WAMapPoint(this.markers[x],this.addresses[x],this.icons[x]);
}
}
return false;
}

function getHTTPObject(){
if (window.ActiveXObject)
return new ActiveXObject("Microsoft.XMLHTTP");
else if (window.XMLHttpRequest)
return new XMLHttpRequest();
else {
return null;
}
}

function searchCache(searchStr, zip) {
var xmlDoc = null;
if (window.ActiveXObject) {//IE
xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
} else if(navigator.userAgent && navigator.userAgent.toLowerCase().indexOf('webkit') >= 0) { //webkit (Safari, Chrome)
var coordinates = '';
xmlDoc = getHTTPObject();
if(xmlDoc) {
xmlDoc.onreadystatechange = function() {
if(xmlDoc.readyState == 4) {
var x = xmlDoc.responseXML.getElementsByTagName("geocode_entry");
var geocode, id;
searchStr = searchStr.replace(/,/g, ''); //remove commas
for (i=0; i < x.length; i++) {
id = x[i].getAttribute("ID");
if (id == searchStr) {
coordinates = x[i].getElementsByTagName("geocode")[0].childNodes[0].nodeValue;
return coordinates;
}
}
}
};
xmlDoc.open("GET", "_promaps_cache/_promaps_geocache.xml", false);
xmlDoc.send(null);
}

return coordinates;
} else if (document.implementation.createDocument) {//gecko (Mozilla, Firefox, Opera)
xmlDoc=document.implementation.createDocument("","",null);
} else {
return '';
}
if (xmlDoc != null) {
xmlDoc.async=false;
try {
if(xmlDoc.load("_promaps_cache/_promaps_geocache.xml")) {
var x=xmlDoc.getElementsByTagName("geocode_entry");
var geocode, id;
searchStr = searchStr.replace(/,/g, ''); //remove commas
for (i=0; i < x.length; i++) {
id = x[i].getAttribute("ID");
if (id == searchStr) {
return x[i].getElementsByTagName("geocode")[0].childNodes[0].nodeValue;
}
}
}
}
catch(err) {
return '';
}
}
return '';
}

function addToCache(fullAddress,zip, geocode){
httpObject = getHTTPObject();
if (httpObject != null) {
httpObject.open("POST", "google_javascript/promaps_geocache_.js", true);
httpObject.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
var entryId = fullAddress.replace(/,/g, '');
if (zip != '') {
fullAddress = fullAddress.replace(zip+',', '');
}
entryId = escape(entryId);
fullAddress = escape(fullAddress);
geocode = escape(geocode);
httpObject.send("sender=promapsforgoogle&action=add&entryId="+entryId+"&address="
+fullAddress+"&geocode="+geocode);
}
}


function wagmp_map_24() {
if(GBrowserIsCompatible()) {
if(!document.getElementById('wagmp_map_24')) return false;
var map = new GMap2(document.getElementById('wagmp_map_24'));
wagmp_map_24_obj = new WAMapRef(map);
map.enableContinuousZoom();
map.enableDoubleClickZoom();
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
var geocoder = new GClientGeocoder();

var fromAddress = {
enabled: false,
street: '',
city: '',
state: '',
zip: '',
country: '',
full: ''
};

var icon_0 = new GIcon();
icon_0.image = 'plugins/google_javascript/images/traditionalflat_pacifica.png';
icon_0.shadow = 'google_javascript/images/traditionalflat_shadow.png';
icon_0.iconSize = new GSize(34,35);
icon_0.shadowSize = new GSize(34,35);
icon_0.iconAnchor = new GPoint(9,33);
icon_0.infoWindowAnchor = new GPoint(19,0);
icon_0.printImage = 'plugins/google_javascript/images/traditionalflat_pacifica.gif';
icon_0.mozPrintImage = 'plugins/google_javascript/images/traditionalflat_pacifica_mozprint.png';
icon_0.printShadow = 'google_javascript/images/traditionalflat_shadow.gif';
icon_0.transparent = 'google_javascript/images/traditionalflat_pacifica_transparent.png';

var address_0 = {
street: '2250 N. Burton',
city: 'Springfield',
state: 'MO',
zip: '65803',
country: '',
infowindow: 'default',
infowindowtext: '<span style="font: 12px Verdana, Arial, Helvetica, sans-serif; color: black;"><strong>Address:</strong><br />2250 N. Burton<br />Springfield, MO 65803</span>',
full: '2250 N. Burton, Springfield, MO, 65803',
isdefault: true,
addressType: 'address',
loop: '',
latitude: '',
longitude: '',
markerStyle: 'Google Traditional (flat)',
markerColor: 'Pacifica'
};

if (address_0.addressType == "coordinates") {
var cacheReturn = '';
} else {
var cacheReturn = searchCache(address_0.full, address_0.zip);
}
if (cacheReturn != "" || (address_0.addressType == "coordinates")) {
if(address_0.addressType == "coordinates") {
var latitude = address_0.latitude;
var longitude = address_0.longitude;
} else {
var latitude = cacheReturn.substring(1,cacheReturn.indexOf(",")-1);
var longitude = cacheReturn.substring(cacheReturn.indexOf(",")+1,(cacheReturn.length)-1);
}
var point = new GLatLng(latitude, longitude);
if (point && !isNaN(latitude)) {
wagmp_map_24_obj.addressFailed = false;
var marker_0 = new GMarker(point, icon_0);
GEvent.addListener(marker_0, 'click', function() {
marker_0.openInfoWindowHtml(address_0.infowindowtext);
});
if(!fromAddress.enabled || 'address_0' != 'address_0') {
if('address_0' == 'address_0')
map.setCenter(point, 13);
map.addOverlay(marker_0);
if('address_0' == 'address_0')
marker_0.openInfoWindowHtml(address_0.infowindowtext);
}
wagmp_map_24_obj.markers.push(marker_0);
wagmp_map_24_obj.addresses.push(address_0);
wagmp_map_24_obj.icons.push(icon_0);
wagmp_map_24_obj.points.push(point);
} else {
if (wagmp_map_24_obj.addressFailed) {
map.setCenter(new GLatLng(30, -98), 3);
}
wagmp_map_24_obj.addressFailed = true;
}
} else if (address_0.addressType == "address") {
geocoder.getLatLng (
address_0.full,
function(point) {
if(point) {
this.addressFailed = false;
addToCache(address_0.full, '', point);
var marker_0 = new GMarker(point, icon_0);
GEvent.addListener(marker_0, 'click', function() {
marker_0.openInfoWindowHtml(address_0.infowindowtext);
});
if(!fromAddress.enabled || 'address_0' != 'address_0') {
if('address_0' == 'address_0')
map.setCenter(point, 13);
map.addOverlay(marker_0);
if('address_0' == 'address_0')
marker_0.openInfoWindowHtml(address_0.infowindowtext);
}
wagmp_map_24_obj.markers.push(marker_0);
wagmp_map_24_obj.addresses.push(address_0);
wagmp_map_24_obj.icons.push(icon_0);
wagmp_map_24_obj.points.push(point);

} else {
var noZipAddress = address_0.full.replace((address_0.zip+','), '');
geocoder.getLatLng (noZipAddress,
function(point) {
if(point) {
wagmp_map_24_obj.addressFailed = false;
addToCache(address_0.full, address_0.zip, point);
var marker_0 = new GMarker(point, icon_0);
GEvent.addListener(marker_0, 'click', function() {
marker_0.openInfoWindowHtml(address_0.infowindowtext);
});
if (!fromAddress.enabled || 'address_0' != 'address_0') {
if('address_0' == 'address_0')
map.setCenter(point, 13);
map.addOverlay(marker_0);
if('address_0' == 'address_0')
marker_0.openInfoWindowHtml(address_0.infowindowtext);
}
wagmp_map_24_obj.markers.push(marker_0);
wagmp_map_24_obj.addresses.push(address_0);
wagmp_map_24_obj.icons.push(icon_0);
wagmp_map_24_obj.points.push(point);

} else {
if (wagmp_map_24_obj.addressFailed) {
map.setCenter(new GLatLng(30, -98), 3);
}
wagmp_map_24_obj.addressFailed = true;
}
}
);
}
}
);
}


}
}  
Sign in to reply to this post

Jason ByrnesWebAssist

I need a link to your site where i can see the problem not the source code.

In the future, please dont paste the page code into your message, compress the pages into a zip archive and attach the archive to your message instead.

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...