1 (edited by keyes 2005-08-23 17:36)

Topic: Users Map available

Users Map is punBB mod who use Google Maps to provide members localisation.

Users Map have 3 main functionalities:
- UM provide a general map with markers where users live.
- A little map with a marker where the user live is diplayed in the profile.
- All registred users can select their coordinates in their profiles.

An admin interface and a XML file (i.e: to use with AJAX) are also provided.

View a demo of the general map
View a demo of the per user map
If you signup you can also test the coordinates selector in Profile -> Personal.

Feedback and comments are welcome on my weblog.

Note: A French translation is provided with the mod

Get Users Map

2 (edited by Tobi 2005-08-18 13:07)

Re: Users Map available

My god!!!!!

This is soooo cool!
smile

It should be noted that you have to get your own google API key and enter it in the admin->options interface of your board (it is mentioned there but you have to know smile )

If you apply for an api key make sure you give the path to your board, noot only your server root
(http://www/myserver.com/punBB/) , the key is valid only for this directory, not subdirectories.
Tok me a while to figure out.

So, now I'll go and play with it smile

The German PunBB Site:
PunBB-forum.de

Re: Users Map available

Tobi wrote:

This is soooo cool!

Indeed!

4

Re: Users Map available

i think this is only for big cities ... wink

it's just me...

5 (edited by Tobi 2005-08-18 13:59)

Re: Users Map available

No, it is not.
You don't get a roadmap everywhere, that's right.
But I live on a tiny little rock in the ocean and I can still zoom up to a level where I can place the cursor exactly where my house is.
smile

The German PunBB Site:
PunBB-forum.de

6

Re: Users Map available

my city is un-located big_smile there is no satelite to find Maglaj city big_smile

it's just me...

7

Re: Users Map available

This is sooo koooooool

I start thinking from where you stop thinking!!!

8

Re: Users Map available

faax wrote:

my city is un-located big_smile there is no satelite to find Maglaj city big_smile

No,
I think it's just that Google didn't enter it in their catalogue.
Have a look at their world map, it's basically the US and the UK.
All the rest has no cities entered.

The German PunBB Site:
PunBB-forum.de

9

Re: Users Map available

Yes you must get a Google API key and respect Google Maps API terms of use (i.e: no commercial sites).

If the map run in Satelite mode you can see evrywhere, i can view my home who is located in a litte city in France.
Road map are only for US, UK and Japan. Perhaps that Google will extend its service to others country.

10

Re: Users Map available

keyes wrote:

Yes you must get a Google API key and respect Google Maps API terms of use (i.e: no commercial sites).

If the map run in Satelite mode you can see evrywhere, i can view my home who is located in a litte city in France.
Road map are only for US, UK and Japan. Perhaps that Google will extend its service to others country.

Sorry, what I meant was what you see on http://www.google.com/maps

You can search for cities there but cities are marked only in fery few regions of this planet.
Of course you can see all towns and villages on the satellite pics but not on the maps.

The German PunBB Site:
PunBB-forum.de

Re: Users Map available

This is a cool script good work man

12 (edited by Mart 2005-08-21 14:34)

Re: Users Map available

I get a javascript error in IE (it works great in Firefox btw:

Line: 97
Char: 2
Error: 'windows' is undefined
Code: 0
URL: http://myurl.com/profile.php?section=personal&id=5

Any suggestions? "Don't use IE" isn't good enough because my members are (generally speaking) a non-technical bunch using whatever they feel comfortable with.

Re: Users Map available

Confirming the IE JavaScript problems, but I also have another issue.  The green arrow for showing location appears in the single user profile, but no arrows appear on the user map page.

14 (edited by Mart 2005-08-21 16:52)

Re: Users Map available

OK, fixed it myself. The problem is in the instructions there's a couple of typos. A line of code (at Step 18) is currently:

<?php if (eregi('msie', $_SERVER['HTTP_USER_AGENT'])) echo '    windows.onlaod = function() {'."\n"; ?>

and another at Step 20 is:

<?php if (eregi('msie', $_SERVER['HTTP_USER_AGENT'])) echo '    windows.onload = function() {'."\n"; ?>

They should both be:

<?php if (eregi('msie', $_SERVER['HTTP_USER_AGENT'])) echo '    window.onload = function() {'."\n"; ?>

Fixed it for me anyway. smile

Re: Users Map available

Thanks Mart, that fixed the problem with the profile pages.  The JS error I get in IE for the User Map page is

Line: 123
Char: 3
Error: 'documentElement' is null or not an object
Code:0

16 (edited by keyes 2005-08-23 17:36)

Re: Users Map available

Incendiary, what page ? (I try UserMaps in IE with Wine now).

__Edit__: new version: http://placelibre.ath.cx/keyes/index.ph … rs-map-101

Re: Users Map available

This page. Doesn't display the location arrows in IE or FF, and throws up that error in IE.

18

Re: Users Map available

Something is bad with XML: http://www.clanimmortals.com/forums/markers.php

  <marker id="2" username=">I<Eclipse" title="Web Monkey" realname="" url="" location="Durham" lat="54.779207124143404" lng="-1.5549087524414062" useavatar="1" avatar="img/avatars/2.jpg"/>

The > & < are not escaped. I make an update.

19

Re: Users Map available

Users Map 1.0.2 fix this bug: http://placelibre.ath.cx/keyes/download … -1.0.2.zip try it.

20 (edited by Incendiary 2005-08-22 13:22)

Re: Users Map available

Nearly there! The arrows show up, but it looks like the text that appears in the bubble also needs htmlspecialchars applied to it. Currently usernames with < in them are cut off.

Re: Users Map available

hi guys,
when a User update his City in profil, i dont see this in IE... Only in Netscape!

A bug in the prog, IE or my system?

Greetings
Michaela

22

Re: Users Map available

Probably in the mod (and in IE ^^) ...

23 (edited by keyes 2005-08-22 17:35)

Re: Users Map available

Incendiary wrote:

Nearly there! The arrows show up, but it looks like the text that appears in the bubble also needs htmlspecialchars applied to it. Currently usernames with < in them are cut off.

Tested with Firefox and works (no test with IE):

        username = username.replace("<", "<");
        username = username.replace(">", ">");
        username = username.replace("&", "&");
        
        realname = realname.replace("<", "<");
        realname = realname.replace(">", ">");
        realname = realname.replace("&", "&");
    
        location = location.replace("<", "<");
        location = location.replace(">", ">");
        location = location.replace("&", "&");

in map.php

Please send me errors (and patches if possible).

Re: Users Map available

Assuming that I put those lines in the correct place - line 64 after

var marker = new GMarker(point);

it doesn't work quite right. This is the result I get:

http://img393.exs.cx/img393/2258/image16kx.jpg

25

Re: Users Map available

Hum, the problem is that i cannot use php function like htmlspecialchars in JS.

After full tests i've the same problem, changing line 64 by

        username = username.replace("<", "<");
        username = username.replace(">", ">");
        
        realname = realname.replace("<", "<");
        realname = realname.replace(">", ">");
    
        location = location.replace("<", "<");
        location = location.replace(">", ">");

And it works! But why ? hmm