Discussion in "Map Me Support" started by    gab    Jan 7, 2008.
Mon Jan 07 2008, 09:17 pm
#1
Hi,

I like your plugin, mapme... but can I configure it to show my country when
new user enter it for the first time?

/g
Mon Jan 07 2008, 09:38 pm
#2
Hi Gab,

do this way.. open file "mapconfig.php"

look for this code..

else{
 	$sql->
mySQLresult = @mysql_query("SELECT * FROM ".MPREFIX."gmarkers WHERE user_id='".USERID."';");
 	$rows = $sql->
db_Rows();
 	if($rows){
		$row = $sql->
db_Fetch();
		$lat = $row['lat'];
		$lng = $row['lng'];
		$zoom = 6;
	} else {
		//This is the default lat long
		$lat = 0; 
		$lng = 0;
		//change to the lat long of your country..
		$zoom = 1;
		//also change the zoom to somewhere around 2 or 3 to get a better view..
	}

make the changes on default lat lng.. that all... get the lat long for your country from any google map...
give feedback..
Mon Jan 07 2008, 10:04 pm
#3



} else {
//This is the default lat long
$lat = 0;
$lng = 0;
//change to the lat long of your country..
$zoom = 1;
//also change the zoom to somewhere around 2 or 3 to get a better view..
}[/code]
make the changes on default lat lng.. that all... get the lat long for your country from any google map...
give feedback..

Ajay


It dosen't work... I checked tables in mysql, it contains 0.000000 when empty.. :-)

/g
Mon Jan 07 2008, 11:53 pm
#4
you are not getting my point..
make these changes
$lat = 59.00;
$lng = 15.00;
$zoom = 4;

after above.. code.. by default marker will be on sweden.. if user has not marked any location on map. User has to change the location once..

But if you want that whenever use register.. the default location is somewhere in Sweden but not specific then..

you need to open plugin.php and edit the tables as..
$eplug_tables = array("
CREATE TABLE ".MPREFIX."gmarkers (
 id INT NOT NULL AUTO_INCREMENT PRIMARY KEY ,
 user_id varchar( 20 ) NOT NULL default '',
 loc varchar ( 50 ) NOT NULL default '',
 lat float( 10, 6 ) NOT NULL default 59.00,
 lng float( 10, 6 ) NOT NULL default 15.00,
) ENGINE = MYISAM ;");


and reinstall the plugin again..

Get Social

Information

Powered by e107 Forum System

Downloads

Comments

gtaletrzua
Fri May 03 2024, 10:55 am
Clydehet
Wed May 01 2024, 06:44 pm
Davidoried
Wed May 01 2024, 06:11 pm
KevinTab
Sun Apr 28 2024, 05:35 am
Tumergix
Sun Apr 28 2024, 12:59 am
StevenDrulk
Sat Apr 27 2024, 08:47 pm
StephenHauct
Sat Apr 27 2024, 09:38 am
Adamsaf
Sat Apr 27 2024, 07:12 am