One more quick thing! The current version of the add-on doesn't display the select location map in Safari on Windows. It's a quick fix, just edit the css for the GoogleMap class as follows:
i just downloaded this but when i go to Manage Map Location no map pops up; i must put in the longitude and latitude in order to set my location. i thought a map was supposed to load?
Hi, I didn't want to make my users figure out their lat/long so I added a quick hack for address lookup, maybe it'll be useful to someone else. Thanks for the nice add-on.
and moved this form down from line 202 below the above form. <form id="frmAccountMyBlogs" method="post" action="'.GetUrl($this->Context->Configuration, 'account.php','', '', '', '', '').'"> <input type="hidden" name="PostBackAction" value="ProcessManageLocation" /> <input type="hidden" name="u" value="'.$u.'" />
jpack, your little address lookup sounds perfect. Any chance you could post a link to your full code though? I haven't been able to implement your code changes successfully, the line numbers don't seem to be matching up for me. Thanks!
Hmm, it's possible other changes I've made shifted the line numbers around. Here's a diff against the clean downloaded of the MemberGoogleMap-2007-08-25 version. You should be able to just run patch with this. If that doesn't work whisper me your email and I'll just email you my live version of the file.
*** MemberGoogleMap/MemberGoogleMap/default.php Tue Sep 18 09:16:34 2007 --- default.php Fri Sep 7 14:50:55 2007 *************** *** 199,212 **** echo '</div>'; } echo ' ! <form id="frmAccountMyBlogs" method="post" action="'.GetUrl($this->Context->Configuration, 'account.php','', '', '', '', '').'"> <legend>'.$this->Context->GetDefinition("ManageMapLocation").'</legend> <fieldset> - <input type="hidden" name="PostBackAction" value="ProcessManageLocation" /> - <input type="hidden" name="u" value="'.$u.'" /> <h2>'.$this->Context->GetDefinition("ManageMapTitle").'</h2> <p class="Description">Please use the decimal format.</p> <div id="GoogleMap"> </div> <p>If you don\'t want to display your location insert a zero in both fields</p> <ul> <li> --- 200,241 ---- echo '</div>'; } echo ' ! <script type="text/javascript"> ! //<![CDATA[ ! ! var geocoder = null; ! geocoder = new GClientGeocoder(); ! ! function showAddress(address) { ! if (geocoder) { ! geocoder.getLatLng(address, ! function(point) { ! if (!point) { ! alert("Sorry, " + address + " not found"); ! } else { ! document.getElementById("txtlatitude").value = point.lat(); ! document.getElementById("txtlongitude").value = point.lng(); ! } ! } ! ); ! } ! } ! //]]> ! </script> ! <legend>'.$this->Context->GetDefinition("ManageMapLocation").'</legend> <fieldset> <h2>'.$this->Context->GetDefinition("ManageMapTitle").'</h2> <p class="Description">Please use the decimal format.</p> <div id="GoogleMap"> </div> + + <form action="#" onsubmit="showAddress(this.address.value); return false"> + <ul><li>Lookup your Address <input type="text" name="address" maxlength="255" class="SmallInput" /> + <input type="submit" value="Get Coordinates"> + </form></ul> + <form id="frmAccountMyBlogs" method="post" action="'.GetUrl($this->Context->Configuration, 'account.php','', '', '', '', '').'"> + <input type="hidden" name="PostBackAction" value="ProcessManageLocation" /> + <input type="hidden" name="u" value="'.$u.'" /> <p>If you don\'t want to display your location insert a zero in both fields</p> <ul> <li>
Hi. First I like to thank you all for the nice software, and for a very nice and polite community!
The graphic "Define your coordinates" map does'nt show up? I hav'nt bee able to find any solution, and have'nt got a clue how this works?... Any sugestions?
@jpack. Could i please try your solution? emai: orresas at gmail
a shame, this whole thing including the additional code works great except for the "Define your coordinate" clickable part, and i cannot find the reason ... does it work anywhere else? can i see it online somewhere for comparison?
GOT IT ... a view to the javascript console made it.
disable
//console.log(\'geocode\');
in MemberGoogleMap/default.php
and maybe
//lat = point.lat();
//lng = point.lng()
I want this so bad, but when I install it, it makes my account page completely disappear. This is a brand-new install of Vanilla and this happens with no other addons running.
This is a forum for a local community, so it would be very, very useful. Any ideas?
I could never get this to work. Then I got it to work when we changed servers. Now, I've enabled eAccelerator and I'm getting the original error messages. Account pages won't load; manage.location error or similar. Do you have eAccelerator enabled?
In my system, I had to change this:
document.getElementById( 'txtlatitude' ).value = point.lat();
document.getElementById( 'txtlongitude' ).value = point.lng();
to this (just double-quotes):
document.getElementById( "txtlatitude" ).value = point.lat();
document.getElementById( "txtlongitude" ).value = point.lng();
and it worked perfectly
thanks for the pointer!
I tried the solution of removing the console.log line and changing the lat and lng lines to the document.getElementyById and I still get JavaScript errors when I try to click on the Map.
OK here is our forum:
http://gatheringofthevibes.com/2008/Vanilla-1.1.4
You must register @ www.gatheringofthevibes.com
so I installed the Google maps extension as is and I had the bug with the map not showing.... so I went in and deleted the console.log line....
now the map shows but when the users select there location then go back to View All Members none are shown... I tried this fix:
document.getElementById( 'txtlatitude' ).value = point.lat();
document.getElementById( 'txtlongitude' ).value = point.lng();
and this one chashes the who board, we just get a white screen..... so I did this one:
document.getElementById( "txtlatitude" ).value = point.lat();
document.getElementById( "txtlongitude" ).value = point.lng();
and no crash but it doesnt save any of my users locations....
can anyone help?
Comments
#GoogleMap {margin-top:4px;
margin-bottom:4px;
text-align:center;
border:1px solid #666;
padding-top:5px;
padding-bottom:5px;
width:400px;
height:300px;
}
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •@line 202:
<script type="text/javascript">
//<![CDATA[
var geocoder = null;
geocoder = new GClientGeocoder();
function showAddress(address) {
if (geocoder) {
geocoder.getLatLng(address,
function(point) {
if (!point) {
alert("Sorry, " + address + " not found");
} else {
document.getElementById("txtlatitude").value = point.lat();
document.getElementById("txtlongitude").value = point.lng();
}
}
);
}
}
//]]>
</script>
@line 210
<form action="#" onsubmit="showAddress(this.address.value); return false">
<ul><li>Lookup your Address <input type="text" name="address" maxlength="255" class="SmallInput" />
<input type="submit" value="Get Coordinates">
</form></ul>
and moved this form down from line 202 below the above form.
<form id="frmAccountMyBlogs" method="post" action="'.GetUrl($this->Context->Configuration, 'account.php','', '', '', '', '').'">
<input type="hidden" name="PostBackAction" value="ProcessManageLocation" />
<input type="hidden" name="u" value="'.$u.'" />
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •If that doesn't work whisper me your email and I'll just email you my live version of the file.
*** MemberGoogleMap/MemberGoogleMap/default.php Tue Sep 18 09:16:34 2007
--- default.php Fri Sep 7 14:50:55 2007
***************
*** 199,212 ****
echo '</div>';
}
echo '
! <form id="frmAccountMyBlogs" method="post" action="'.GetUrl($this->Context->Configuration, 'account.php','', '', '', '', '').'">
<legend>'.$this->Context->GetDefinition("ManageMapLocation").'</legend>
<fieldset>
- <input type="hidden" name="PostBackAction" value="ProcessManageLocation" />
- <input type="hidden" name="u" value="'.$u.'" />
<h2>'.$this->Context->GetDefinition("ManageMapTitle").'</h2>
<p class="Description">Please use the decimal format.</p>
<div id="GoogleMap"> </div>
<p>If you don\'t want to display your location insert a zero in both fields</p>
<ul>
<li>
--- 200,241 ----
echo '</div>';
}
echo '
! <script type="text/javascript">
! //<![CDATA[
!
! var geocoder = null;
! geocoder = new GClientGeocoder();
!
! function showAddress(address) {
! if (geocoder) {
! geocoder.getLatLng(address,
! function(point) {
! if (!point) {
! alert("Sorry, " + address + " not found");
! } else {
! document.getElementById("txtlatitude").value = point.lat();
! document.getElementById("txtlongitude").value = point.lng();
! }
! }
! );
! }
! }
! //]]>
! </script>
!
<legend>'.$this->Context->GetDefinition("ManageMapLocation").'</legend>
<fieldset>
<h2>'.$this->Context->GetDefinition("ManageMapTitle").'</h2>
<p class="Description">Please use the decimal format.</p>
<div id="GoogleMap"> </div>
+
+ <form action="#" onsubmit="showAddress(this.address.value); return false">
+ <ul><li>Lookup your Address <input type="text" name="address" maxlength="255" class="SmallInput" />
+ <input type="submit" value="Get Coordinates">
+ </form></ul>
+ <form id="frmAccountMyBlogs" method="post" action="'.GetUrl($this->Context->Configuration, 'account.php','', '', '', '', '').'">
+ <input type="hidden" name="PostBackAction" value="ProcessManageLocation" />
+ <input type="hidden" name="u" value="'.$u.'" />
<p>If you don\'t want to display your location insert a zero in both fields</p>
<ul>
<li>
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •First I like to thank you all for the nice software, and for a very nice and polite community!
The graphic "Define your coordinates" map does'nt show up?
I hav'nt bee able to find any solution, and have'nt got a clue how this works?... Any sugestions?
@jpack. Could i please try your solution?
emai: orresas at gmail
Thank's a lot! :)
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Any sugestions please?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Disabled the "console.log ..." line and it works like a charm! :-)
Thank's a lot mate!!
and *** HAPPY NEW YEAR!!! ***
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •This is a forum for a local community, so it would be very, very useful. Any ideas?
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Doesn't work today.
After installation on a brand new Vanilla and entering the mapkey,
theres only an empty maps-frame.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Symptoms:
- The map doesn't appear (when you have already saved a location and you are trying to change it).
- Clicking on the map doesn't set your longitude or latitude.
Solution:console.log('geocode');$('txtlatitude').value = point.lat();$('txtlongitude').value= point.lng();
to:
document.getElementById( 'txtlatitude' ).value = point.lat();document.getElementById( 'txtlongitude' ).value = point.lng();
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •1. Problem with incorrect script URL into head area:
<script type="text/javascript" src="/forum/http://maps.google.com/maps?file=api&v=1&key=QIAARHpD7WXGNjwe0G2M_guncTIu5c9xRe2s5M4E9DZ7KxbxCooVnGOaVRXQ"></script></head>
2. Problem with database - longitude and latitude didn't exist in User table.
Solution
ad.1. Change line 39
$Head->AddScript('http://maps.google.com/maps?file=api&v=1&key='.$Context->Configuration['GOOGLEMAP_KEY']);to
$Head->AddScript('http://maps.google.com/maps?file=api&v=1&key='.$Context->Configuration['GOOGLEMAP_KEY'], '');ad.2. Add columns manually.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •Notice: Undefined variable: Context in /home/xxxxxx/public_html/vf/extensions/MemberGoogleMap/default.php on line 60
Notice: Trying to get property of non-object in /home/xxxxxx/public_html/vf/extensions/MemberGoogleMap/default.php on line 60
Can anyone tell me how to handle this?
Thankyou!
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •global $Context;-- Jason
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •