Jump to content

Member Map


Recommended Posts


Does it also work like a normal Google map in being able to add locations of different places (e.g. event locations)?



And if that is possible, can different markers be created to differentiate between forum member locations and event locations?



Yes, only administrators can add those, have a look at the custom markers section in the ACP.
Link to comment
  • 2 weeks later...

Hey, thanks for a great addon! I just have one problem that I can't figure out how to fix.

No matter how I enter the location - typing it or entering the exact coordinates, it gets written to database rounded. So 'Moscow, Russia' becomes 55.000000,37.000000. Even if I go to phpMyAdmin and manually change it to 55.452083,37.370348, after refreshing the map in the browser, the values in the database go back to rounded ones.

Found the fixed map.php on page 8 of the topic, but it's for 1.0.0 beta 2. Should I use it on the latest version?

Link to comment

Hey, thanks for a great addon! I just have one problem that I can't figure out how to fix.



No matter how I enter the location - typing it or entering the exact coordinates, it gets written to database rounded. So 'Moscow, Russia' becomes 55.000000,37.000000. Even if I go to phpMyAdmin and manually change it to 55.452083,37.370348, after refreshing the map in the browser, the values in the database go back to rounded ones.



Found the fixed map.php on page 8 of the topic, but it's for 1.0.0 beta 2. Should I use it on the latest version?



It does sound like an odd issue, if you do update via phpmyadmin, instead of refreshing the page, click the page link again, this will prevent the post data from the previous request re-putting data in the database
Link to comment

Oh, yes, seems the refreshing part was related to POST data indeed. Thanks!



What about numbers being rounded when entering the location normal way, how do I fix that in 1.0.1?



I would need to debug it a little, I'll get some code together for you to run that should give me more information (It's probably due to the locale setup on your server)
Link to comment

OK, I figured it out. You're relying on $LocaleInfo["mon_thousands_sep"] and $LocaleInfo["mon_decimal_point"] to fix the value for MySQL. localeconv() on my server returns following array (currency/monetary values aren't set, no idea why):

Array

(

    [decimal_point] => .

    [thousands_sep] => 

    [int_curr_symbol] => 

    [currency_symbol] => 

    [mon_decimal_point] => 

    [mon_thousands_sep] => 

    [positive_sign] => 

    [negative_sign] => 

    [int_frac_digits] => 127

    [frac_digits] => 127

    [p_cs_precedes] => 127

    [p_sep_by_space] => 127

    [n_cs_precedes] => 127

    [n_sep_by_space] => 127

    [p_sign_posn] => 127

    [n_sign_posn] => 127

    [grouping] => Array

        (

        )


    [mon_grouping] => Array

        (

        )


)



So I changed:

$floatString = str_replace($LocaleInfo["mon_decimal_point"] , ".", $floatString);

            $floatString = str_replace($LocaleInfo["mon_thousands_sep"] , "", $floatString);



To:

$floatString = str_replace($LocaleInfo["decimal_point"] , ".", $floatString);

            $floatString = str_replace($LocaleInfo["thousands_sep"] , "", $floatString);



Now it seems to work fine.

Link to comment

OK, I figured it out. You're relying on $LocaleInfo["mon_thousands_sep"] and $LocaleInfo["mon_decimal_point"] to fix the value for MySQL. localeconv() on my server returns following array (currency/monetary values aren't set, no idea why):



Array

(

    [decimal_point] => .

    [thousands_sep] => 

    [int_curr_symbol] => 

    [currency_symbol] => 

    [mon_decimal_point] => 

    [mon_thousands_sep] => 

    [positive_sign] => 

    [negative_sign] => 

    [int_frac_digits] => 127

    [frac_digits] => 127

    [p_cs_precedes] => 127

    [p_sep_by_space] => 127

    [n_cs_precedes] => 127

    [n_sep_by_space] => 127

    [p_sign_posn] => 127

    [n_sign_posn] => 127

    [grouping] => Array

        (

        )


    [mon_grouping] => Array

        (

        )


)



So I changed:

$floatString = str_replace($LocaleInfo["mon_decimal_point"] , ".", $floatString);

            $floatString = str_replace($LocaleInfo["mon_thousands_sep"] , "", $floatString);



To:

$floatString = str_replace($LocaleInfo["decimal_point"] , ".", $floatString);

            $floatString = str_replace($LocaleInfo["thousands_sep"] , "", $floatString);



Now it seems to work fine.


Great!, I'm not sure why you don't have those variables set though, Something for me to look into for the next version (as far as I know, you're the only user that's encountered this).


And thanks a lot for prompt answers btw, awesome support! ;)



No problem :thumbsup:
Link to comment

Great!, I'm not sure why you don't have those variables set though, Something for me to look into for the next version (as far as I know, you're the only user that's encountered this).



If you need any additional info on my server/settings, or need to run some scripts to test - feel free to PM me. ;)
Link to comment

If you need any additional info on my server/settings, or need to run some scripts to test - feel free to PM me. ;)



You actually provided exactly what I was going to ask for (w00t).

Just need to decide whether to use the other variables, or fall back to them if the others are empty.
Link to comment

If they are in the exact same position the last one will appear on top. if they are nearby as you zoom in they will seperate.



I do want to merge these in future so they merge into one marker.




Having a similar problem. If more than one person enters the same city/state, not a specific address, the latest one replaces the previous marker. Even when zoomed in, only the most recent one appears. How can this be fixed so that all markers can be seen, even if they're in the same spot?
Link to comment

Having a similar problem. If more than one person enters the same city/state, not a specific address, the latest one replaces the previous marker. Even when zoomed in, only the most recent one appears. How can this be fixed so that all markers can be seen, even if they're in the same spot?



It's going to be addressed in a future update, I'm not sure when that will be though.


Maybe suggested, maybe not, but wysiwyg editor for Marker Description field in ACP would be great. Would be good when in Description were images, links etc.



descriptions are not parsed, so a wysiwyg would be pointless.
Link to comment
Guest
This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...