close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Static location disappears with recordset in same map

Thread began 12/09/2009 12:32 am by tom395097 | Last modified 2/18/2010 2:49 pm by tom395097 | 6551 views | 10 replies |

tom395097

Static location disappears with recordset in same map

Hey Guys,

Static locations and recordsets work well by themselves, but when both are in the same map, the static location(s) disappear. Sometimes they will load ok, but when I hit refresh or come back the the page, they are no where to be found.

And since one of the static locations is set to default, it will show the whole USA when all locations are in a certain part of Florida.

map.php

Is anything conflicting or did i miss something? Thanks in advance-

Tom

Sign in to reply to this post

Jason ByrnesWebAssist

I am not able to reproduce the problem when visiting your page. all of the locations including the defulat location display ion the map for me.


One issue I see when looking at the source code, is you have some CSS Before the doctype tag:

<style type="text/css">
<!--
body,td,th {
font-family: Palatino Linotype, Book Antiqua, Palatino, serif;
font-size: 12px;
color: #466493;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.header {
font-size: 12px;
font-weight: bold;
vertical-align: bottom;
text-align: left;
letter-spacing: 3pt;
}
.footer {
font-size: 8pt;
color: #FFF;
}
.sectionheader {
font-size: 20px;
font-weight: bolder;
}
.mainhousing {
text-align: center;
}
a:link {
color: #A29060;
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #B1A37E;
}
a:hover {
text-decoration: none;
color: #466493;
}
a:active {
text-decoration: none;
color: #72A0E6;
}
.itallic {
font-style: italic;
}
.footer .footer a {
color: #FFF;
}
-->
</style>

<!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">




the doctype tag must be the first tag on the page, there should be no html on the page before the doctype tag.

Sign in to reply to this post

tom395097

Keep trying....

Jason, Thanks for the html. I fixed it.

Like I said in my last post, the default location will load about half the time.

I have no idea what would be causing it. It seems to be a server or google issue. I reason this because the default static location disappears and reappears at the same time when my friend and I load the map from different locations on different browsers simultaneously.

So please hit refresh a couple of times and see what happens. The results are frustrating.

Thanks,

Tom

Sign in to reply to this post

Jimmy Wu

I have tested this as well and was unable to reproduce the issue. What browser are you testing this on?

Sign in to reply to this post

tom395097

Browsers

IE, Firefox, Safari

Sign in to reply to this post

Jimmy Wu

Are the addresses being written to the google_javascript/promaps_geocache_php.php file?

Sign in to reply to this post

tom395097

Here's what promaps_geocache_php.php says:

<?php
if($_POST['action'] == "add"){
if($_POST['sender'] == 'promapsforgoogle'){
if($_POST['entryId'] != ''){
$addressID = $_POST['entryId'];
$address = trim($_POST['address']);
$geocode = trim($_POST['geocode']);
writeXML($addressID, $address, $geocode);
}
}
}
echo '';
exit();
?>
<?php
//add the address to the xml cache if it is not there already
function writeXML($addressID, $address, $geocode){
$xmlFile = "../_promaps_cache/_promaps_geocache.xml";
if(file_exists($xmlFile)){
$dom = new DOMDocument();
$dom->load($xmlFile);
$root = $dom->getElementsByTagName('geocode_data')->item(0);
}
else
{
$dom = new DOMDocument('1.0', 'UTF-8');
$root = $dom->createElement('geocode_data');
$root = $dom->appendChild($root);
$rootAttr = $dom->createAttribute('version');
$rootAttr = $root->appendChild($rootAttr);
$rootValue = $dom->createTextNode('1.0');
$rootValue = $rootAttr->appendChild($rootValue);
}
//create a new geocode entry, and set the id attribute
$geocodeEntry = $dom->createElement("geocode_entry");
$geocodeEntry = $root->appendChild($geocodeEntry);
$geocodeEntry->setAttribute('ID',$addressID);
//create the address entry
$addressNode = $dom->createElement("address");
$addressNode = $geocodeEntry->appendChild($addressNode);
$addressData = $dom->createCDATASection($address);
$addressData = $addressNode->appendChild($addressData);
//create the geocode entry
$geocodeNode = $dom->createElement('geocode');
$geocodeNode = $geocodeEntry->appendChild($geocodeNode);
$geocodeData = $dom->createCDATASection($geocode);
$geocodeNode = $geocodeNode->appendChild($geocodeData);
echo $dom->save($xmlFile);
}
?>

Sign in to reply to this post

Jimmy Wu

Sorry, I asked about the wrong file. That one is the file that has the code to write to a cache file.

The actual cache file should be written to the _promaps_cache directory. Is there a _promaps_geocache.xml file in that directory? If so are the addresses listed in that file? If there is no file, try setting the read/write properties on the directory to allow read/write for all users.

Sign in to reply to this post

tom395097

Not able to change permissions with "_" in front of folder name

Thanks for the reply, sorry it took so long to get back to your response. The certain host my client is using is unable to change permissions of any folders with a "_" (underscore) as the first character.

Where do I change the code to pull from a different folder name? I'll then change the directory name in both in ProMaps and the directory name on the server. Thanks in advance!

-Tom

Sign in to reply to this post

Jimmy Wu

You can do a search and replace on the entire site directory using Dreamweaver. Just search for all references to _promaps_cache and replace it with a different directory.

Sign in to reply to this post
loading

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...