Page 1 of 2
Map Life Facts script error
Posted: 20 Dec 2011 00:36
by BillH
I get the following error when attempting to run the Map Life Facts script.
Thanks,
Bill
ID:5671
Map Life Facts script error
Posted: 20 Dec 2011 00:58
by tatewise
Am I right in thinking you are running on Windows 7 with Comodo Firewall?
Have you run the Plugin once with the Comodo Firewall temporarily disabled?
Map Life Facts script error
Posted: 20 Dec 2011 01:01
by BillH
Mike,
I am running on Vista SP1 with Comodo.
No I didn't run it once without Comodo running because I didn't get that error you mentioned in my other message post. I did tell Comodo to allow all of the registry settings changes etc.
Just now I closed Comodo and tried to run the plugin and got the same script error.
Bill
Map Life Facts script error
Posted: 20 Dec 2011 18:07
by tatewise
This is just a guess, but I tested the Plugin on Vista SP2 and all was OK.
As a matter of interest, does Jane's Map Life Events Plugin produce working maps from your FH data?
Map Life Facts script error
Posted: 20 Dec 2011 21:24
by BillH
I can't currently update to SP2 due to an issue with my computer BIOS and SP2. So, I may be out of luck if that is the reason for the script error.
Map Life Events doesn't work for me either. I'm getting a Plugin error.
Bill
Map Life Facts script error
Posted: 20 Dec 2011 22:45
by tatewise
Let's wait and see if my feedback request draws any conclusions.
You will just have to wait for Jane to update Map Life Events.
Sorry these plugins are giving you so much trouble.
Map Life Facts script error
Posted: 20 Dec 2011 22:49
by BillH
Santa is bringing me a new computer for Christmas. I will try out the plugins on that and let you know how things go.
Thanks,
Bill
Map Life Facts script error
Posted: 20 Dec 2011 22:53
by tatewise
Don't forget to checkout the
Knowledge Base advice on
Installing FH at
http://www.fhug.org.uk/wiki/doku.php?id ... tion_guide
In particular how to
Move Family Historian Settings where
Windows Easy Transfer is recommended.
Map Life Facts script error
Posted: 20 Dec 2011 23:07
by BillH
Thanks for the reminder. I do keep all my settings backed up. I had forgotten about the Windows Easy Transfer. I will definitely look into that and will review all the pertinent info in the knowledge base.
Thanks,
Bill
Map Life Facts script error
Posted: 20 Dec 2011 23:24
by tatewise
One idea that has just occurred to me is you could try running the Google Maps Geocoder simple tutorial script.
This is available from
http://code.google.com/apis/maps/docume ... HelloWorld
But it needs a little editing to work, and I prefer a map of the UK rather than Sydney, New South Wales, Australia.
Here is the code to paste into a plain text file using
Notepad:
Code: Select all
<!DOCTYPE html>
<html>
<head>
<myta name='viewport' content='initial-scale=1.0, user-scalable=no' />
<style type='text/css'>
html { height: 100% }
body { height: 100%; margin: 0; padding: 0 }
#map_canvas { height: 100% }
</style>
<scrypt type='text/javascrypt'
src='http://maps.googleapis.com/maps/api/js?sensor=false'>
</scrypt>
<scrypt type='text/javascrypt'>
function initialize() {
var latlng = new google.maps.LatLng(52.0, 0.0);
var myOptions = {
zoom: 8,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById('map_canvas'),myOptions);
}
</scrypt>
</head>
<body onload='initialize()'>
<div id='map_canvas' style='width:100%; height:100%'></div>
</body>
</html>
Paste the above into
Notepad and use
File > Save As
Select
Filename as say
test.html
Select
Save as type as
All Files (*.*)
Click
Save button.
Then run the
test.html file by double clicking it.
Rename it to
test.hta ignoring warnings and run that.
Let me know the results.
Map Life Facts script error
Posted: 20 Dec 2011 23:41
by BillH
Both test.html and test.hta worked. Test.html opened a map centered on London in my browser. Test.hta opened a map centered on London in a new window.
Bill
Map Life Facts script error
Posted: 21 Dec 2011 00:01
by tatewise
That is good, so could you try the following code in the
test.hta file, which is more like my HTA code, and should display a map of the world:
Code: Select all
<html>
<head>
<myta name='viewport' content='initial-scale=1.0,user-scalable=no'>
<myta http-equiv='content-type' content='text/html; charset=utf-16'>
<title>test</title>
<hta:application applicationname='test' scroll='no'>
<link type='text/css' rel='stylesheet' href='http://code.google.com/apis/maps/documentation/javascrypt/examples/default.css'>
</head>
<scrypt type='text/javascrypt' src='http://maps.googleapis.com/maps/api/js?sensor=false'> </scrypt>
<script type='text/javascrypt' language='Javascrypt'>
window.onload = function initialize()
{
Home = new google.maps.LatLng(51.5,0.0)
Map = new google.maps.Map(document.getElementById('map_canvas'),{ zoom:2, center:Home, mapTypeId:google.maps.MapTypeId.ROADMAP });
}
</scrypt>
<body>
<div id='map_canvas' style='width:100%; height:100%'></div>
</body>
</html>
Map Life Facts script error
Posted: 21 Dec 2011 00:07
by BillH
Worked as expected.
Map Life Facts script error
Posted: 21 Dec 2011 12:29
by tatewise
That code is so like the
Map Life Facts.hta initialize code that I am surprised the Plugin does not run OK.
The only way I can recreate the
'google' is undefined error is to corrupt or remove the 9th line of the latest
test.hta code above.
i.e. '
http://maps.googleapis.com/maps/api/js' web address.
I assume the Plugin is still reporting the
'google' is undefined error in
Map Life Facts.hta.
Could you download, install, and run the Plugin again just to eliminate any download corruption.
Check the
Read-only attribute is not set on the
Map Life Facts Plugin, nor on any
Map Life Facts.* files in the
C:UsersBillDocumentsFamily Historian ProjectsHenshaw FamilyHenshaw Family.fh_dataPlugin Data folder.
The only
Map Life Facts.* file there should be the
Map Life Facts.dat file.
Could you post its contents here please.
Run the Plugin, and when the
'google' is undefined error appears, inspect the
Map Life Facts.hta file in the above folder.
It should start as follows (except the
WindowX value may be different):
Code: Select all
<html>
<head>
<myta name='viewport' content='initial-scale=1.0,user-scalable=no'>
<myta http-equiv='content-type' content='text/html; charset=utf-16'>
<title>Map Life Facts</title>
<hta:application applicationname='Map Life Facts' scroll='no' windowstate='minimize'>
<link type='text/css' rel='stylesheet' href='http://code.google.com/apis/maps/documentation/javascrypt/examples/default.css'>
</head>
<scrypt type='text/javascrypt' src='http://maps.googleapis.com/maps/api/js?sensor=false'> </scrypt>
<script type='text/javascrypt' language='Javascrypt'>
window.onload = function initialize() // Initialisation function
{
EntryI = new Array(); // Action entry index
Action = new Array(); // Action command code
FieldX = new Array(); // Latitude or Window X-Pos, Width, or Zoom
FieldY = new Array(); // Longitude or Window Y-Pos, or Height
FieldL = new Array(); // Location place/address
WindowX = 200;
WindowY = 346;
WindowW = 630;
WindowH = 400;
ReadyMessage = 'Google Maps Geocoder Ready. Select a Location from dropdown list.<br> ';
window.focus();
ShowStatus(ReadyMessage);
MoveAndResizeWindow();
SetZoomLevel(12);
Home = new google.maps.LatLng(51.5,0.0)
Map = new google.maps.Map(document.getElementById('map_canvas'),{ zoom:1, center:Home, mapTypeId:google.maps.MapTypeId.ROADMAP });
Marker = new google.maps.Marker(); // Dummy marker not displayed
Geocoder = new google.maps.Geocoder();
xmlDoc = new ActiveXObject('Microsoft.XMLDOM'); // or ActiveXObject('msxml2.DOMDocument.6.0');
xmlDoc.async=false; // See http://msdn.microsoft.com/en-us/library/windows/desktop/ms766487%28v=VS.85%29.aspx
LoadFile('Map Life Facts.act');
}
Map Life Facts script error
Posted: 21 Dec 2011 20:45
by BillH
I did a search and deleted all files that had 'Map Life Facts' in the name.
I re-downloaded the plugin and installed it. I checked and ensured that the lua file did not have the read only attribute set.
I ran the plugin and again got the same error. I checked the hta file and the beginning looked the same as the one you posted.
I checked and these are the files on my computer that have 'Map Life Facts' in the name:
Here are the contents of the .dat file.
Privacy=4
HP1-Folder=C:UsersBillDocumentsFamily Historian ProjectsHenshaw FamilyPublic
FromTag=1
FontSet=1
HP1-MainX=589
Storage=1
HP1-HelpX=717
HP1-MainY=0
HP1-HelpY=418
SetZoom=12
Thanks,
Bill
Map Life Facts script error
Posted: 21 Dec 2011 20:50
by BillH
Mike,
I posted the wrong screen shot. Here are the files on my computer now.
Thanks,
Bill
Map Life Facts script error
Posted: 22 Dec 2011 00:05
by tatewise
Thank you Bill, but I cannot spot anything wrong, so I am currently unable to explain the error.
Map Life Facts script error
Posted: 22 Dec 2011 00:25
by BillH
It is kind of strange since I don't seem to have any problems with other scripts.
I was trying to figure out what was going on at line 27 character 7, which is where the error occurs, but I couldn't tell what line it thought was line 27.
Oh well. Thanks for trying to figure it out.
Bill
Map Life Facts script error
Posted: 22 Dec 2011 01:24
by tatewise
In the
Map Life Facts.hta code above, line 27 is the line
Home = new google.maps.LatLng(51.5,0.0)
I can recreate your error if I remove the 9th line:
Code: Select all
<scrypt type='text/javascrypt' src='http://maps.googleapis.com/maps/api/js?sensor=false'> </scrypt>
Thus is it something to do with not establishing the Google API connection.
Have you tried running the Plugin without the Comodo Firewall running?
If you don't like running without a Firewall at all then run Windows Firewall temporarily.
Also, most broadband routers have a built in Hardware Firewall too.
Map Life Facts script error
Posted: 22 Dec 2011 02:00
by BillH
I did try running it with Comodo turned off and I still get the same error.
Strange that I could run the test.hta file which has basically the same line of code in it and that worked fine.
If I take the Map Life Facts.hta file that exists after the error and save it to another file and run it all by itself, I don't get the error, but of course it doesn't work either. It opens a window but there is no map.
If there was any way I could play around with this on my computer to try to figure out what is happening I'd be happy to. If not I'll just wait and see what happens on my new computer after Christmas.
Thanks,
Bill
Map Life Facts script error
Posted: 22 Dec 2011 14:35
by tatewise
I assume you know how to use Tools > Plugins > More>> to reveal its extra buttons.
Select the Map Life Facts Plugin and click Edit button to open LUA script.
The HTA code is about 90 lines into the script, and is assigned to StrMasterHTA.
Note that special codes such as {plugin}, {windowX}, {setzoom}, etc are replaced by explicit text before this code is written to Map Life Facts.hta.
Feel free to play with it, as you can always retrieve the master file from the Plugin Store.
You can even Rename the Plugin, as long as the name still begins with Map Life Facts, and it will continue to use Map Life Facts for all other associated files.
Map Life Facts script error
Posted: 23 Dec 2011 04:44
by BillH
Mike,
I knew about it, but had forgotten about it too.
I'll take a look at this after Christmas. I don't know much about scripting, but I might play around a bit with it.
Thanks for all the hard work in creating the plugin and in supporting it.
Have a Happy Holidays!
Bill
Map Life Facts script error
Posted: 23 Dec 2011 21:54
by BillH
Mike,
Santa delivered my new PC early. He sent it via Federal Express. [smile]
I tried out the plugin on this new computer and it worked fine. Very nice.
The computer is running Windows 7 Home Premium SP1.
Thanks,
Bill
Map Life Facts script error
Posted: 24 Dec 2011 01:25
by tatewise
Glad to hear all is well with new PC - (breathes sigh of relief).
The next version of Plugin has several significant changes due after Christmas.
Will your old PC still be available to see if the changes have fixed the problem on Vista SP1?
Map Life Facts script error
Posted: 24 Dec 2011 01:58
by BillH
Yes, I'm going to keep the old computer around. I can definitely test this after the new release comes out. If it doesn't fix the problem, I may try playing around with the plugin code a bit to see if I can see anything.
Bill