Page 1 of 1

XML Questions

PostPosted: Tue May 26, 2009 6:04 am
by e_i_pi
Do the continents have to be in alphabetical order?

Do the territories have to be in alphabetical order?

Where are the co-ordinates measured from? Top left, or centre centre?

Re: XML Questions

PostPosted: Tue May 26, 2009 6:23 am
by MrBenn
Q. Do the continents have to be in alphabetical order?
A. No

Q. Do the territories have to be in alphabetical order?
A. No

Q. Where are the co-ordinates measured from? Top left, or centre centre?
A. The top-left is 0,0 - although I seem to recall that there is a bit of a miscellaneous offset. I'm not entirely sure which part of the '88' the coordinate refers to either :-k

Re: XML Questions

PostPosted: Tue May 26, 2009 6:51 am
by yeti_c
BTW :

Any continent that uses a sub continent can only be defined AFTER (i.e. below) it's child element.

RE: Ordering of territories I like alphabetical - however - I tend to order based on top left first - running right then down... and group by continent.

C.

Re: XML Questions

PostPosted: Tue May 26, 2009 6:55 am
by TaCktiX
The coordinate refers to the exact center location of the 88. So if you've got a set of 88's handy and pick out the center, that's where the coordinate should go. At least, that's what I figured when I did The Citadel's XML using Jota's Map Assistant (the map already had 88's on it).

Re: XML Questions

PostPosted: Tue May 26, 2009 7:09 am
by e_i_pi
Cheers guys. I'll endeavour to get the XML done over the next week, but unfortunately I don't have PS at work, and afaik, I can't easily find coordinate values using MS Paint or Photo/Fax Viewer


EDIT: I'll just write some JavaScript that calls clientX and clientY, problem solved :P

Re: XML Questions

PostPosted: Tue May 26, 2009 7:16 am
by MrBenn
e_i_pi wrote:Cheers guys. I'll endeavour to get the XML done over the next week, but unfortunately I don't have PS at work, and afaik, I can't easily find coordinate values using MS Paint or Photo/Fax Viewer


EDIT: I'll just write some JavaScript that calls clientX and clientY, problem solved :P

Jota's map assistant is great for sorting the coordinates, and if you're using a PC, then you can use my 88 cursor for perfect centring first time ;-)

Links for both should be in the MapMaking tools topic.

Re: XML Questions

PostPosted: Tue May 26, 2009 7:16 am
by chipv
e_i_pi wrote:Cheers guys. I'll endeavour to get the XML done over the next week, but unfortunately I don't have PS at work, and afaik, I can't easily find coordinate values using MS Paint or Photo/Fax Viewer


EDIT: I'll just write some JavaScript that calls clientX and clientY, problem solved :P


Just to help avoid a headache, you will still need to apply an offset:

viewtopic.php?f=127&t=74525&start=0&hilit=offset

Re: XML Questions

PostPosted: Tue May 26, 2009 7:35 am
by e_i_pi
Code required for the webpage to do co-ords, in case anyone is in a situation like mine where you can't install software at work, but you have access to your own site... yes, I lead a complicated life...

Code: Select all
<html>
<head>
<script type="text/javascript">
var xoffset=0;
var yoffset=0;

function show_coords(event)
{
  x=event.clientX - xoffset;
  y=event.clientY - yoffset;
  document.getElementById("xc").innerHTML = 'X: ';
  document.getElementById("xc").innerHTML += x;
  document.getElementById("yc").innerHTML = 'Y: ';
  document.getElementById("yc").innerHTML += y;
}

function setzero(event)
{
  xoffset=event.clientX;
  yoffset=event.clientY;
}
</script>
</head>

<body onmousemove="show_coords(event)" onmousedown="setzero(event);">

<img src="http://www.mysite.com/myimage.jpg" /><br />

<span id="xc">X</span><br />
<span id="yc">Y</span><br />
<p>Click on the top left pixel of the image in order to centre your (0,0) co-ordinate there</p>

</body>
</html>

Re: XML Questions

PostPosted: Tue May 26, 2009 7:46 am
by MrBenn
Nice job. You'll probably still have to tweak the army coordinates a little (1-2px shuffles are fairly common). Did you definitely take the offset into consideration?

Re: XML Questions

PostPosted: Tue May 26, 2009 7:49 am
by e_i_pi
MrBenn wrote:Nice job. You'll probably still have to tweak the army coordinates a little (1-2px shuffles are fairly common). Did you definitely take the offset into consideration?

Nope, I definitely didn't take it into consideration, I coudln't find it in that thread... it was long and I have like 10 minutes before I finish work :lol:

Re: XML Questions

PostPosted: Tue May 26, 2009 7:50 am
by MrBenn
Wait until you're home and download Jota's Map Assistant and my 88 cursor - It'll save plenty of time ;-)

Re: XML Questions

PostPosted: Tue May 26, 2009 7:52 am
by e_i_pi
MrBenn wrote:Wait until you're home and download Jota's Map Assistant and my 88 cursor - It'll save plenty of time ;-)

Kind of defeats the purpose - I can do it at home anyway with PS, I need something to do it at work with :P

Re: XML Questions

PostPosted: Tue May 26, 2009 7:54 am
by chipv
e_i_pi wrote:
MrBenn wrote:Nice job. You'll probably still have to tweak the army coordinates a little (1-2px shuffles are fairly common). Did you definitely take the offset into consideration?

Nope, I definitely didn't take it into consideration, I coudln't find it in that thread... it was long and I have like 10 minutes before I finish work :lol:


viewtopic.php?f=127&t=74525&hilit=offset&start=15#p1789760

Your code is Firefox-specific, but not really a big deal, it's all good!

Re: XML Questions

PostPosted: Tue May 26, 2009 8:23 am
by oaktown
e_i_pi wrote:
MrBenn wrote:Wait until you're home and download Jota's Map Assistant and my 88 cursor - It'll save plenty of time ;-)

Kind of defeats the purpose - I can do it at home anyway with PS, I need something to do it at work with :P

If you're doing the coordinates in photoshop, the shift is +22 pixels for Y coordinates and -4 for X. And don't ask why - nobody has ever figured that out. ;)

Re: XML Questions

PostPosted: Tue May 26, 2009 8:29 am
by e_i_pi
chipv wrote:
e_i_pi wrote:
MrBenn wrote:Nice job. You'll probably still have to tweak the army coordinates a little (1-2px shuffles are fairly common). Did you definitely take the offset into consideration?

Nope, I definitely didn't take it into consideration, I coudln't find it in that thread... it was long and I have like 10 minutes before I finish work :lol:


viewtopic.php?f=127&t=74525&hilit=offset&start=15#p1789760

Your code is Firefox-specific, but not really a big deal, it's all good!

I was checking it in IE, that's all we have at work. Government employers don't trust the wily Firefox it seems hehe

Re: XML Questions

PostPosted: Tue May 26, 2009 8:49 am
by chipv
e_i_pi wrote:I was checking it in IE, that's all we have at work. Government employers don't trust the wily Firefox it seems hehe


Hehe same everywhere I think, I launch Firefox when no-one else is looking... except other Firefox subversives... which is just about everyone. So anyway when you get offsets use those numbers to compensate.