Jump to content
TNG Community

Google Maps Add-on Package - UPDATED


theKiwi

Recommended Posts

Hi, thanks to all of you who worked on this! I finally took the time to install and I have one small error I hope someone can help me with. When I click on one of my cemeteries (for example, see http://www.roots2buds.net/showmap.php?ceme...mp;tree=nestor), I get the following:

Parse error: syntax error, unexpected '<' in /home/gnestor/public_html/showmap.php on line 121

I have checked the line in my file and it reads:

<span class="subhead"><b><?php echo "<a href=\"http://maps.google.com/maps?f=q$text[glang]&q=$lat,$long($codedcemname, $codedcemcity, $codedcemcounty, $codedcemstate, $codedcemcountry)&z=12&om=1&iwloc=addr\" target=\"_blank\"><img src=\"images/marker1.png\" border=\"0\"></a>"; echo $text[headstone]; ?></b></span><br /><br />

This seems to be what the instructions call for as I copied and pasted directly. All the tags appear to have an equal number of openings and closings.

If anyone can tell me where I might start looking for my error, I would be most appreciative!

Check that you made ALL the changes - in my files line 121 is

        echo "<span class=\"subhead\"><b>$text[cemphotos]</b></span><br /><br />";

The line you pasted above is line 147 - you seem to be off by 26 lines?

Roger

Sorry if this ends up appended to Hans' post - I've tried about 8 times to get it to post separately but something about this board is messed up and it seems to always put this new reply on the end of my previous reply to a different message.

GRRRRRRRR

Link to comment
Share on other sites

  • Replies 140
  • Created
  • Last Reply

Top Posters In This Topic

  • theKiwi

    49

  • dbodor

    11

  • Bobrr

    11

  • Ken Roy

    9

Top Posters In This Topic

Hi Gail,

As Roger indicated in his reply, your line numbers don't match. Try renaming your existing showmap.php and then copy the 604_showmap.php file and rename to showmap.php and see if that fixes your problem.

Hi Ken and Roger,

I started out by taking the 604_showmap.php that was in the mod download. Line 121 of that original file reads:

echo "<span class=\"subhead\"><b>$text[cemphotos]</b></span><br /><br />";

The directions for #6: showmap.php say:

"** REPLACE line 121

<span class="subhead"><b><?php echo $text[headstone]; ?></b></span><br /><br />

with

<span class="subhead"><b><?php echo "<a href=\"http://maps.google.com/maps?f=q$text[glang]&amp;q=$lat,$long($codedcemname, $codedcemcity, $codedcemcounty, $codedcemstate, $codedcemcountry)&amp;z=12&amp;om=1&amp;iwloc=addr\" target=\"_blank\"><img src=\"images/marker1.png\" border=\"0\"></a>"; echo $text[headstone]; ?></b></span><br /><br />"

Notice that the originally downloaded file shows that line 121 should say "[cemphotos]" instead of [headstone]"? Should I be modifying the showmap.php from Darrin's 6.0.4 download or the one provided in the mod download? That may be where I'm getting confused.

Then the directions for #6 say: "**Add the following 26 lines at line 90 (a blank line)" That is why my line numbers are off from the original 121.

I hope I have explained well enough. Others are getting it to work, so I know I must be just over (or under) thinking through the directions.

Thanks for any advice to set me straight! :-D

Link to comment
Share on other sites

Hi Ken and Roger,

I started out by taking the 604_showmap.php that was in the mod download. Line 121 of that original file reads:

Thanks for any advice to set me straight! :-D

Hi Gail,

If you are using the 604_showmap.php you should not have any modifications to make. It should be a matter of renaming the original showmap.php to something like showmap_TNG.php and then renaming 604_showmap.php to showmap.php

The instructions were provided on how to make the modifications for people who had other mods to the files.

Link to comment
Share on other sites

Hi Gail,

If you are using the 604_showmap.php you should not have any modifications to make. It should be a matter of renaming the original showmap.php to something like showmap_TNG.php and then renaming 604_showmap.php to showmap.php

The instructions were provided on how to make the modifications for people who had other mods to the files.

Hi Ken, thanks for this - I finally got it straight, but I appreciate your confirmation of this.

I still have one more error I must have made. If I go to one of my cemeteries, such as http://www.roots2buds.net/showmap.php?ceme...amp;tree=nestor and scroll down, the map is not on the page. Only the marker is. I can click the marker to open google and it goes right to the correct map. However, I must have done something wrong for the map not to display directly on the page.

I will keep looking at my steps, but if you have any thoughts on where to look, that would help me focus my energies.

Thanks again for all your help!

Gail

Link to comment
Share on other sites

Hi Ken, thanks for this - I finally got it straight, but I appreciate your confirmation of this.

I still have one more error I must have made. If I go to one of my cemeteries, such as http://www.roots2buds.net/showmap.php?ceme...amp;tree=nestor and scroll down, the map is not on the page. Only the marker is. I can click the marker to open google and it goes right to the correct map. However, I must have done something wrong for the map not to display directly on the page.

I will keep looking at my steps, but if you have any thoughts on where to look, that would help me focus my energies.

Thanks again for all your help!

Gail

Check CAREFULLY that you've made all the changes to showmap.php.

On the source of your page, the space is set for the map, but there's no Javascript that would draw the map at the bottom of the page, and your Google map key isn't included at the top in the HEAD section where it should be.

If you haven't otherwise modified your showmap.php file, then just rename your one to save it, and then upload the file 604_showmap.php from the download I provided and rename it to showmap.php.

Roger

Link to comment
Share on other sites

I figured this out I think

In your Setup ------> Admin ------> General ------> Miscellaneous.

Change "Individuals Start with: " to "All Information" and save the changes.

Then you'll be able to uncomment the lines you commented out and the map will display.

Roger

Roger,

I currently have mine set to "Personal information". The problem that I have is that every now and then when I go to an individual with the map installed it says 'windows cannot create the map at (whatever person page is showing) and then goes to a page not found, but if I hit the back button then the page loads. This doesn't happen everytime but is intermittent. Could this setting be the reason?

Russ

Link to comment
Share on other sites

Check CAREFULLY that you've made all the changes to showmap.php.

On the source of your page, the space is set for the map, but there's no Javascript that would draw the map at the bottom of the page, and your Google map key isn't included at the top in the HEAD section where it should be.

If you haven't otherwise modified your showmap.php file, then just rename your one to save it, and then upload the file 604_showmap.php from the download I provided and rename it to showmap.php.

Roger

Hi Roger, I just wanted to follow up and tell you that everything is working great now! I must have not uploaded one of the files because when I re-uploaded all the files in the public part, everything magically worked.

Thanks for your help and for offering this mod to those of us who need this visual aid on our web sites!

Gail

www.roots2buds.net :-D

Link to comment
Share on other sites

Anyone got any idea what happen to my maps? I don't remember making any changes.....

Ballew Genealogy

There is no Google Map key in the source of that page, so at the very least, something has been changed that prevents that being called from customconfig.php.

That is probably the reason that the Javascript to create the map contents is missing too.

Roger

Link to comment
Share on other sites

Thanks, two of the files were suppose to have 755 permissions had changed. Got that corrected. The Google Map Key is in the customconfig.php. Anyone got an idea what else could affect the 'call' that would not let this work?

Eddy

There is no Google Map key in the source of that page, so at the very least, something has been changed that prevents that being called from customconfig.php.

That is probably the reason that the Javascript to create the map contents is missing too.

Roger

Link to comment
Share on other sites

Thanks, two of the files were suppose to have 755 permissions had changed. Got that corrected. The Google Map Key is in the customconfig.php. Anyone got an idea what else could affect the 'call' that would not let this work?

There is still no Google map key in the source code of the page.

Check your genlib.php page against the file 604_genlib.php that was in the download and make sure that you have ALL the additions there. If you haven't otherwise modified your genlib.php file, just upload the 604_genlib.php file and then rename it to remove the 604_.

The problems seem to be because you've not got that sorted out.

Roger

Link to comment
Share on other sites

Google keys are directory specific... did you possibly change the directories where you stored any of these things?

This is not the cause of this problem - if the key was wrong, it would still show in the source of the page, and generate an invalid key error message when the page was loaded.

The key is not being loaded to the source of the page due to some other error or oversight.

Roger

Link to comment
Share on other sites

Thanks, two of the files were suppose to have 755 permissions had changed. Got that corrected. The Google Map Key is in the customconfig.php. Anyone got an idea what else could affect the 'call' that would not let this work?

Eddy

Ok, the last thing I remember doing before this didn't work was messing with some privacy settings in the admin section. And as you can see on the link, the documents won't even show up even though I am logged in as the admin and have 'Always' show living selected in Admin.

This ones tough, because it all works in admin and edit.

Eddy

UPDATE: Replaced the genlib with the original 604 and it fixed it. EVEN the documents show up now! Don't know what that had to do with it.

thanks to all who tried and put up with me......

EB

Link to comment
Share on other sites

Ok, the last thing I remember doing before this didn't work was messing with some privacy settings in the admin section. And as you can see on the link, the documents won't even show up even though I am logged in as the admin and have 'Always' show living selected in Admin.

This ones tough, because it all works in admin and edit.

Eddy

UPDATE: Replaced the genlib with the original 604 and it fixed it. EVEN the documents show up now! Don't know what that had to do with it.

thanks to all who tried and put up with me......

The pages in Admin for new or edit media or places or cemeteries don't rely on genlib.php. So the Admin side of it can run when genlib.php is not correct but the public pages - places, cemeteries, headstones and getperson won't work if genlib.php isn't correct.

Roger

Link to comment
Share on other sites

I was wondering about how best to find latitude and longitude for UK locations. Since they don't pull up with the geocoder you have to do the Full Google Map Search it seems. Once you find the location in that new window, then what? Is there an easy way to get the lat and long off that map? Or do you have to use that to go back to the clickable map and work your way down to the same spot? With so many tiny towns in the English countryside, that's often not easy to do. Any tips?

Dan

Link to comment
Share on other sites

I was wondering about how best to find latitude and longitude for UK locations. Since they don't pull up with the geocoder you have to do the Full Google Map Search it seems. Once you find the location in that new window, then what? Is there an easy way to get the lat and long off that map? Or do you have to use that to go back to the clickable map and work your way down to the same spot? With so many tiny towns in the English countryside, that's often not easy to do. Any tips?

If you've found the place on the large "external" Google map, you can

1 - double click the location to get the map reset to that place at its center

2 - right click on the "Link to this Page" link and choose "Copy Link"

3 - You get something like this

http://maps.google.com/maps?f=q&hl=en&q=380+Williams+St,+Kaiapoi+North,+Canterbury+8250,+New+Zealand&sll=37.0625,-95.677068&sspn=97.29311,100.722656&ie=UTF8&z=17&ll=-43.379912,172.649996&spn=0.005856,0.009667&om=1]http://maps.google.com/maps?f=q&hl=en&...009667&om=1

4 - the latitude and longitude are the two numbers after "&ll=" in that URL

5 - So you can paste that whole URL into the Notes field of the TNG page you're working with and extract out the lat and long and paste them where they need to be, and then delete the rest of it.

Works for me :-))

Cheers

Roger

Link to comment
Share on other sites

I'm not sure why, but my link doesn't have lat and long info. E.g. Searching for and then copying the link for Auckland, New Zealand only gives me: http://maps.google.com/maps?f=q&hl=en&...&iwloc=addr. Am I missing some setting?

Dan

I'm not sure why, but my link doesn't have lat and long info. E.g. Searching for and then copying the link for Auckland, New Zealand only gives me: http://maps.google.com/maps?f=q&hl=en&...&iwloc=addr. Am I missing some setting?

Dan

Found it. Sorry, I hadn't first double clicked on the icon, since it already looked centered. Evidently this makes the difference whether lat and long are placed in the link.

Thanks.

Dan

Link to comment
Share on other sites

Actually, not double clicking the location, but a click on the plus for the zoom does it nicely.

By the way, here's a shortcut so the map comes up with the address. In googlemapdrawthemap.php, substituting this for line 11,

<p><a href="java script:newwindow=window.open('http://maps.google.com/maps?f=q<?php echo $text[glang]."&q=".$row[place]; ?>', 'newwindow'); newwindow.focus();"> <?php echo $admtext[difficultmap]; ?></a> | <a href="java script:newwindow=window.open('../<?php echo $maphelplang; ?>/places_googlemap_help.html', 'newwindow', 'height=500,width=600,resizable=yes,scrollbars=yes'); newwindow.focus();">

This seems to work well for me.

Dan

Link to comment
Share on other sites

Actually, not double clicking the location, but a click on the plus for the zoom does it nicely.

If the place you want is not at the center of the map, you need to first double click that point on the map to get the map centered on that point. Until then the lat and long stored in the Link to this page link are not exactly correct for the point you want.

Roger

Link to comment
Share on other sites

I've tried to add a change in the core icons and mess my maps up. Since this uses the genlib with the google addon, it there a different way I need to do this?

Eddy

Hi Eddy,

The Google Maps addon uses genlib.php but is not related to the tng_coreicons functions. Sounds like you have an error in your coding change.

Link to comment
Share on other sites

I was wondering about how best to find latitude and longitude for UK locations. Since they don't pull up with the geocoder you have to do the Full Google Map Search it seems. Once you find the location in that new window, then what? Is there an easy way to get the lat and long off that map? Or do you have to use that to go back to the clickable map and work your way down to the same spot? With so many tiny towns in the English countryside, that's often not easy to do. Any tips?

Dan

One of the easiest ways to do this for UK locations is to look up the place on http://www.streetmap.co.uk/. Once you look up the place name an arrow will appear on the map, and you will be able to see the coordinates of the head of the arrow down at the bottom of the page in degrees, minutes and seconds. If the arrow is not precisely in the right location you want, click on the map, and the map will be re-generated with the arrow in the location you clicked on. To get the coordinates in the decimal format TNG uses, click on the little blue word "here" in the phrase "Click here to convert/measure coordinates" This opens a page with the coordinates of the place in many different systems, including in decimal degrees.

Link to comment
Share on other sites

Michael Jones

First off, I'd like to thank everyone who worked on putting this maps add-on together. It's really cool. However, I must have done something wrong in my install as when I try to access the "Map Search Help" feature, I get this message:

The requested URL /admin/java script:newwindow=window.open('../English/places_googlemap_help.html', 'newwindow', 'height=500,width=600,resizable=yes,scrollbars=yes'); newwindow.focus(); was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/1.3.37 Server at www.jonesgenealogy.net Port 80

I find this somewhat puzzling since I can pull up the page manually at:

http://www.jonesgenealogy.net/English/plac...lemap_help.html

Any ideas on why I get the error?

Mike

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...