Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Coordinates

Reply
Thread Tools

Coordinates

 
 
Thibault
Guest
Posts: n/a
 
      05-09-2004

Hello,

I want to display an image in a specific place, using coordinates (i.e. x,
y). How is this possible ? Is there anything else than javascript ?
Thank you !

Thibault
--
http://perso.wanadoo.fr/titan_keikomi/


 
Reply With Quote
 
 
 
 
DU
Guest
Posts: n/a
 
      05-09-2004
Thibault wrote:
> Hello,
>
> I want to display an image in a specific place, using coordinates (i.e. x,
> y). How is this possible ? Is there anything else than javascript ?
> Thank you !
>
> Thibault
> --
> http://perso.wanadoo.fr/titan_keikomi/
>
>


x and y would be relative to which object? document? browser viewport?
root element? DHTML layer? offsetParent node? immediate parent node?
mouse position? user screen? user available (workarea) screen? This is
important to know as there are many coordinates references to begin with.

DU
 
Reply With Quote
 
 
 
 
Thibault
Guest
Posts: n/a
 
      05-09-2004

"DU" a écrit dans le message news:
> x and y would be relative to which object? document? browser viewport?
> root element? DHTML layer? offsetParent node? immediate parent node?
> mouse position? user screen? user available (workarea) screen? This is
> important to know as there are many coordinates references to begin with.


Relative to the browser window. My goal is to localize points on a map which
is displayed in the background of the window.


 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      05-09-2004
Thibault wrote:

> Relative to the browser window. My goal is to localize points on a map
> which is displayed in the background of the window.


So that would be relative to the map, not the window.

It also sounds like the map is content, rather then presentation, so it
should be an <img> rather then a background.

Then you can absolutely position the map and the "points" within a container
that has position: relative;

http://dorward.me.uk/www/css/#tutorials

However, this is still depending on a presentation layer to mark up content.
So perhaps you would be better off with a <map> instead.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
 
Reply With Quote
 
Thibault
Guest
Posts: n/a
 
      05-09-2004

"David Dorward" a écrit dans le message news:
> So that would be relative to the map, not the window.


Except that if I use the map as a background image, the window and the image
have the same coordinates.


> It also sounds like the map is content, rather then presentation, so it
> should be an <img> rather then a background.


Yes, but I can't put anything on an image, except areas, but they have no
color so one can't see them. What I want to do is to display several points,
using the same picture each time (a red, 4 by 4 px image), on the map. But I
can't super-impose two images (I could if I used layers, but in that case it
won't work with all browsers).


> Then you can absolutely position the map and the "points" within a

container
> that has position: relative;
>
> http://dorward.me.uk/www/css/#tutorials


The point is that my coordinates are in a MySql database and I use PHP to
get them. So I can't use a CSS.


> However, this is still depending on a presentation layer to mark up

content.
> So perhaps you would be better off with a <map> instead.


What do you mean ? I have looked for a piece of information about the <map>
tag in Google, but I found nothing. What is this map tag ?


 
Reply With Quote
 
Whitecrest
Guest
Posts: n/a
 
      05-09-2004
In article <c7l8ja$fac$(E-Mail Removed)>, http://www.velocityreviews.com/forums/(E-Mail Removed)
says...
> Hello,
> I want to display an image in a specific place, using coordinates (i.e. x,
> y). How is this possible ? Is there anything else than javascript ?
> Thank you !


Depending on what you are talking about, you can use
style="position:absolute;top:Y;left" or the class/id equivalent

--
Whitecrest Entertainment
www.whitecrestent.com
 
Reply With Quote
 
Whitecrest
Guest
Posts: n/a
 
      05-09-2004
In article <c7ldv5$bmh$1$(E-Mail Removed)>, (E-Mail Removed)
says...
> > Relative to the browser window. My goal is to localize points on a map
> > which is displayed in the background of the window.

> So that would be relative to the map, not the window.


Well if the map is the background and it is at 0,0 then both are the
same. (which is probably what he is talking about anyway)

> However, this is still depending on a presentation layer to mark up content.
> So perhaps you would be better off with a <map> instead.


Probably so.

--
Whitecrest Entertainment
www.whitecrestent.com
 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      05-09-2004
Thibault wrote:

>> It also sounds like the map is content, rather then presentation, so it
>> should be an <img> rather then a background.

>
> Yes, but I can't put anything on an image, except areas, but they have no
> color so one can't see them.


So change the image so the target areas are visible.

> But I can't super-impose two images (I could if I used layers, but in
> that case it won't work with all browsers).


"layers" ... http://dorward.me.uk/www/layers/

> The point is that my coordinates are in a MySql database and I use PHP to
> get them. So I can't use a CSS.


Why not?

>> However, this is still depending on a presentation layer to mark up

> content.
>> So perhaps you would be better off with a <map> instead.

>
> What do you mean ? I have looked for a piece of information about the
> <map> tag in Google, but I found nothing. What is this map tag ?


It is the element that contains <area> elements.

http://www.w3.org/TR/html4/index/elements.html

It sounds like the best bet would be to use PHP To dynamically generate your
image and then use an image map on top of it. Another option might be to
use a form and have the image be an image input, which would allow you to
read coordinates from it on the server (but break entirely for users
without pointing devices).

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
 
Reply With Quote
 
Dave Patton
Guest
Posts: n/a
 
      05-09-2004
"Thibault" <(E-Mail Removed)> wrote in
news:c7lf7u$96g$(E-Mail Removed):

>> It also sounds like the map is content, rather then presentation, so
>> it should be an <img> rather then a background.

>
> Yes, but I can't put anything on an image, except areas, but they have
> no color so one can't see them. What I want to do is to display
> several points, using the same picture each time (a red, 4 by 4 px
> image), on the map. But I can't super-impose two images (I could if I
> used layers, but in that case it won't work with all browsers).


> The point is that my coordinates are in a MySql database and I use PHP
> to get them. So I can't use a CSS.


Sounds just like the maps we have at confluence.org:
http://www.confluence.org/country.php?id=5
With the coordinates(in whatever system you want to use)
of both the map and the points stored in MySQL, you
use PHP and GD to take "the map image", build a new
map image with the points, and send that image to the browser.

--
Dave Patton
Canadian Coordinator, Degree Confluence Project
http://www.confluence.org/
My website: http://members.shaw.ca/davepatton/
 
Reply With Quote
 
Thibault
Guest
Posts: n/a
 
      05-10-2004

"David Dorward" a écrit dans le message news:
> > The point is that my coordinates are in a MySql database and I use PHP

to
> > get them. So I can't use a CSS.

>
> Why not?


Yes, you're right, I'm trying this right now and it seems to work ! Thank
you.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
coordinates of a DIV Stimp ASP .Net 4 09-22-2004 10:06 PM
Read coordinates Berk Birand Perl 2 03-07-2004 09:25 AM
Convert coordinates XY into LAT-LONG steeve.nadeau@mobilair.qc.ca Perl 1 11-04-2003 08:20 PM
Converting canvas coordinates to window coordinates in tkinter......... Suresh Kumar Python 0 07-04-2003 10:14 AM
Converting canvas coordinates to window coordinates....... Suresh Kumar Python 0 07-03-2003 04:53 AM



Advertisments