I wanted to make a mapping script where you have 4x4 regions with 124x124 squares in every region, with their own unique coordinates.

Here's a reference image of what I mean.
http://reapers.netii.net/map.jpg

That's where my problems start, I've not really got much of a clue on to where or how to start doing this.

I wanted it to be dynamical because, when members and users input their coordinates, it'd get saved in mysql and when you access the different map regions they would get loaded and put in their correct place on the map. Empty spaces being blank.

Any help at all would be massively appreciated.

Cheers,
- Mentally.

Phil Jackson

08-27-2009, 10:07 PM

this is quite a big project for this HELP forum my friend. Even I must turn you down.

Phil Jackson

08-27-2009, 10:19 PM

ARGH i ant help it...
right you will have to create 16 scripts to generate 124 X 124 cell tables (before anyone says anything i know). After you have created them you will have to use CSS to align them correctly. After more thought you will find you can now your script down to just one script and send it through a loop.... i might start you on your way... if your nice.

Mentally

08-27-2009, 10:21 PM

Hehe, well, I actually thought it would be a lot easier than it sounds.

But the real problem I think really is just how to make the 124x124 grid when you click on a region.

That's really awesome, Phil. It's exactly what I'm looking for and a really huge leap in the right direction for me.

Now all I'm looking at is to get some kind of visual representation for all the 16 "fields" and grabbing any coordinate points added from the database and display them accordingly when viewing a region for example. (Could possibly just leave the rest of the fields blank inheriting the background color with a border around or something.)

Though I don't understand how to get those cross-lined from 0,0 to 124,124 or if it's possible.

Loading field and coordinate information from a database and administering it on the visual map. Could possibly have a huge grid with the records showing up in a color within the square, maybe increasing the size from 1x1 pixels to 2x2 or something to see better.

Phil Jackson

08-27-2009, 11:59 PM

i will talk more in the morning (time for bed the missus says) but i was thinking more along the lines of hovering over a co-ord and displaying the infor at the side or something you need to keep the grtad as small as you can for loading times. I will work more on it in the mornig. If you could send me a mysql_dump for the structure of the table used for this is would be much easyer. Cya soon

It's not conflicting from what I can see on my part. For some reason it's jut not showing up anything when I load the page. Hmm.

Edit:
I've been taking some time off of IRL stuff to look through some of you code. Most focus has been on the output of the data. I understand very well how the XY-axis works but I'm wondering how you're calculating or making out the equivilent of what the XY-axis does.

Like this.
http://reapers.netii.net/grid.jpg

Since coordinates go from upper left corner, and so on. As shown in the first image. (Yeah it's a ****load of number combinations, 124x124 squares with xxx,yyy combinations - Going from the cordinates given in the X axis, then down towards the coordinate on the Y axis. For example: 483, 441)

Would it be easy to name every cell thats echoed out with the XY-axis combination they're representing, or is that actually done in here? If so I'd guess it would be
name=\"".($y+1)."-".$x."-".$z."\" that does it.

I consider myself somewhat good at PHP but when it comes to loops I'm just nulled. Heh.

Phil Jackson

08-29-2009, 07:03 AM

man, i have hell of a hangover i'll talk and explain when my heads straight.

Phil Jackson

08-29-2009, 12:43 PM

I did try to split it up for you. The following code is for when the submit button is pressed. It just checks whether the space is taken or not:

//BELOW CHECKS TO SEE IF COORDS CAN BE ASIGNED ALL COULD BE WRAPPED UP IN SEPERETE FILE AND THE INCLUDED
$con = mysql_connect("79.1####2", "we###ts", "AC###0##3");
$db = mysql_select_db("we##-acc##ounts", $con);