XML Questions

Topics that are not maps. Discuss general map making concepts, techniques, contests, etc, here.

Moderator: Cartographers

Forum rules
Please read the Community Guidelines before posting.
Post Reply
User avatar
e_i_pi
Posts: 1775
Joined: Tue Feb 12, 2008 2:19 pm
Location: Corruption Capital of the world
Contact:

XML Questions

Post 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?
User avatar
MrBenn
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Re: XML Questions

Post 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
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
yeti_c
Posts: 9624
Joined: Thu Jan 04, 2007 9:02 am
Gender: Male

Re: XML Questions

Post 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.
Image
Highest score : 2297
User avatar
TaCktiX
Posts: 2392
Joined: Mon Dec 17, 2007 8:24 pm
Gender: Male
Location: Rapid City, SD

Re: XML Questions

Post 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).
User avatar
e_i_pi
Posts: 1775
Joined: Tue Feb 12, 2008 2:19 pm
Location: Corruption Capital of the world
Contact:

Re: XML Questions

Post 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
User avatar
MrBenn
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Re: XML Questions

Post 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.
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
chipv
Head Tech
Head Tech
Posts: 3233
Joined: Mon Apr 28, 2008 5:30 pm

Re: XML Questions

Post 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:

http://www.conquerclub.com/forum/viewto ... lit=offset
User avatar
e_i_pi
Posts: 1775
Joined: Tue Feb 12, 2008 2:19 pm
Location: Corruption Capital of the world
Contact:

Re: XML Questions

Post 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> 
User avatar
MrBenn
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Re: XML Questions

Post 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?
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
e_i_pi
Posts: 1775
Joined: Tue Feb 12, 2008 2:19 pm
Location: Corruption Capital of the world
Contact:

Re: XML Questions

Post 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:
User avatar
MrBenn
Posts: 6880
Joined: Wed Nov 21, 2007 9:32 am
Location: Off Duty

Re: XML Questions

Post by MrBenn »

Wait until you're home and download Jota's Map Assistant and my 88 cursor - It'll save plenty of time ;-)
Image
PB: 2661 | He's blue... If he were green he would die | No mod would be stupid enough to do that
User avatar
e_i_pi
Posts: 1775
Joined: Tue Feb 12, 2008 2:19 pm
Location: Corruption Capital of the world
Contact:

Re: XML Questions

Post 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
User avatar
chipv
Head Tech
Head Tech
Posts: 3233
Joined: Mon Apr 28, 2008 5:30 pm

Re: XML Questions

Post 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:
http://www.conquerclub.com/forum/viewto ... 5#p1789760

Your code is Firefox-specific, but not really a big deal, it's all good!
User avatar
oaktown
Posts: 4451
Joined: Sun Dec 03, 2006 9:24 pm
Location: majorcommand

Re: XML Questions

Post 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. ;)
Image
User avatar
e_i_pi
Posts: 1775
Joined: Tue Feb 12, 2008 2:19 pm
Location: Corruption Capital of the world
Contact:

Re: XML Questions

Post 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:
http://www.conquerclub.com/forum/viewto ... 5#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
User avatar
chipv
Head Tech
Head Tech
Posts: 3233
Joined: Mon Apr 28, 2008 5:30 pm

Re: XML Questions

Post 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.
Post Reply

Return to “Foundry Discussions”