News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Google Member Map

Started by TLM, December 18, 2005, 08:43:52 PM

Previous topic - Next topic

countludwig

#140
well I've been at it for hours and run out of things to check.
I went over each of the mods by hand and they are right.
the fields in the table are there, when a user sets the pin, it saves the
long. and lat. properly as far as I can tell.
The issue definately appears to be in the  MapsXML() function
but I just can't tell why it's not running the way it should.

thanks for any comments/suggestions etc.



/* edit */

good lawd I finally got it.
Thanks TLM for an awesome mod !   much appreciated.


PhatTyres

Quotegood lawd I finally got it.

What did it take...I gave up and decided to wait for .51 for 1.0.5

I chased down the patch as much as I could!!!
OTB and Runnin Down The Hill

SMF 1.0.5  MKp1.0                                Clip'd In Cycling Community

damacguy

Well, 1.1RC2 is officially out.

I just tried to reinstall .50 and the only problem I'm seeing is the Map button isn't showing up. The code I have in index.template.php is...

// Google Maps Mod
if (($modSettings['googleMapsEnable']) && (allowedTo('googleMap_view')))
echo ($current_action == 'membermap' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'membermap' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=membermap">' , $txt['googleMap'] , '</a>
</td>' , $current_action == 'membermap' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


There's not a 'blank' or 'missing graphic' button. It's just like it's not in the index.template.

Suggestions?

TLM

* TLM coughs, permissions

TLM

Ok seeing how 1.1 RC2 went pub, I just finshed testing, hopefully 0.51 is better than its previous for people.  Includes a few small fixes.  I removed alternate languages for now, but expect those to come back sometime.

damacguy


Sledgemoto

Same problem here just installed .51 on 1.1 RC2.

When logged in as admin The map works fine, log in as a member and there is no tab and nothing in the profile.

What file needs the permissions changed?

Membermap.template.php is 644 is this correct?

Sledgemoto


PhatTyres

Cool
Thanks....51 works with 1.0.5 perfectly.

Now...Any ideas on setting zoom on specific region of the map?
OTB and Runnin Down The Hill

SMF 1.0.5  MKp1.0                                Clip'd In Cycling Community

TLM

#149
Quote from: PhatTyres on December 31, 2005, 08:23:11 PM
Cool
Thanks....51 works with 1.0.5 perfectly.

Now...Any ideas on setting zoom on specific region of the map?
Yes I am trying right now to work on two diffrent requests, the default viewpoint and the input the coordinates by hand.

The coordinates by hand will probally come about first if I can overcome one last hurdle which is validating that they did not enter letters instead of numbers.

The default viewpoint, I am not sure how to go about having that option in admin panel, due to I don't think I can easily put the map in there to where you could just go to the area and save....  Probally going to have to have a manual input but not sure on how to go about inputing that either.

PhatTyres

Great...
and Thanks Again...
and
Happy New Year
OTB and Runnin Down The Hill

SMF 1.0.5  MKp1.0                                Clip'd In Cycling Community

TLM

Quote from: PhatTyres on December 31, 2005, 08:23:11 PM
Cool
Thanks....51 works with 1.0.5 perfectly.

Now...Any ideas on setting zoom on specific region of the map?

I am open to anyideas on how you might think I should implement this.

PhatTyres

In admin view of the Map
Have a button or text link that shows/says set current zoom level.
The button/link should be visible only to admin/permisions

my$0.02
OTB and Runnin Down The Hill

SMF 1.0.5  MKp1.0                                Clip'd In Cycling Community

JayBachatero

Now that RC2 is out it would look better if you sue tabs for the map and adding the pin instead of having it in the profile.

-JayBachatero
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

TLM

Quote from: JayBachatero on January 01, 2006, 12:42:45 AM
Now that RC2 is out it would look better if you sue tabs for the map and adding the pin instead of having it in the profile.

-JayBachatero

That might get further overlooked, I know people that barly fill there profile, much less do anything on sites.

JayBachatero

Yea most members do not edit their profile.  Maybe a secondary option?

-JayBachatero
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Redeye

The only other change I would prefer is that the map defaults to MAP and not SATELLITE or HYBRID when in the profile page.

carbonize

is it possible for members to relocate their pin after the initial placement?
C a r b o n i z e

TLM

Quote from: Redeye on January 01, 2006, 06:26:09 AM
The only other change I would prefer is that the map defaults to MAP and not SATELLITE or HYBRID when in the profile page.
Soon will be an option...

Quote from: carbonize on January 01, 2006, 10:35:05 AM
is it possible for members to relocate their pin after the initial placement?
Click to remove, or re-click somewhere on the map to replace.

tranzndance

Thank you for this wonderful Mod. I liked it so much I bridged my Coppermine Gallery to SMF so I can have this functionality.

I tweaked the function in MemberMap.template.php to show different text/link based on if the user is logged in.

For example:
logged in users see:
QuoteClick here to place your pin if you have not already. You can also view this in Google Earth with the kml file.
anonymous users see:
QuoteTo add your pin, please log in or register.
function template_map() {
global $context, $modSettings, $scripturl;

    if ($modSettings['googleMapsEnable']) {
        echo '
    <table width="100%"><tr>
        <td class="windowbg2" colspan="2" valign="middle" align="center">
            <div id="map" style="width: 700px; height: 500px"></div>';
if ($context['user']['is_logged']) {
            echo '<div id="message"><a href="', $scripturl, '?action=profile;sa=forumProfile">Click here to place your pin if you have not already.</a> You can also view this in <a href="http://earth.google.com/">Google Earth</a> with the <a href="index.php?action=.kml">kml file</a>.</div>';
} else {
            echo '<div id="message">To add your pin, please <a href="', $scripturl, '?action=login">log in</a> or <a href="', $scripturl, '?action=register">register</a></div>';

}
echo '
            <script src="http://maps.google.com/maps?file=api&v=1&key=' . $modSettings['googleMapsKey'] . '" type="text/javascript"></script>
            <script type="text/javascript" language="JavaScript" src="', $scripturl, '?action=membermap;sa=.js"></script>
        </td>
    </tr></table>';
    }
}

Advertisement: