<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD>
<BODY>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=332552020-23042010>Hi,</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=332552020-23042010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=332552020-23042010>i cann't help you with your problem, but perhaps the
below gives you some idea how to resolve it.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=332552020-23042010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=332552020-23042010>In OL a map has always a projection. If you not declare
a projection, then OL choose by default EPSG:4326 with maxExtent [-180, -90,
180, 90].</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=332552020-23042010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=332552020-23042010>In your case you want only a mathematical xy
plane. I use in this case EPSG:900913 as projection for the map.
So I have a large xy plane to work on.</SPAN></FONT></DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><SPAN
class=332552020-23042010></SPAN></FONT> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2>
map = new OpenLayers.Map('map',<BR> {
maxExtent: new
OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),<BR>
numZoomLevels: 22,<BR>
//maxResolution:
156543.0399,<BR>
maxResolution:
200000.0,<BR> units:
'm',<BR> projection: new
OpenLayers.Projection("EPSG:900913"),<BR>
theme :
"theme/default/style.css",<BR>
controls:[]<BR> });<BR></FONT></DIV>
<DIV dir=ltr align=left><SPAN class=332552020-23042010><FONT face=Arial
color=#0000ff size=2>The above map options are from <A
href="http://gis.ibbeck.de/ginfo/apps/pentominoes/pentominoes.html">http://gis.ibbeck.de/ginfo/apps/pentominoes/pentominoes.html</A>.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=332552020-23042010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=332552020-23042010><FONT face=Arial
color=#0000ff size=2>As you can see, this has nothing to do with projection.
Nevertheless you have one to choose, when you use OL for your
project.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=332552020-23042010><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=332552020-23042010><FONT face=Arial
color=#0000ff size=2>Arnd</FONT></SPAN></DIV><BR>
<DIV class=OutlookMessageHeader lang=de dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>Von:</B> users-bounces@openlayers.org
[mailto:users-bounces@openlayers.org] <B>Im Auftrag von </B>Jimmy
Aumard<BR><B>Gesendet:</B> Freitag, 23. April 2010 15:29<BR><B>An:</B>
users<BR><B>Betreff:</B> [OpenLayers-Users] Place Point at x% y% to an no
geographicLayer.TileCache possible?<BR></FONT><BR></DIV>
<DIV></DIV>Hello,<BR><BR>I have no geographic tiles show with
OpenLayers.Layer.TileCache and I would like to put a Point(feature) at 50% x and
50% y for example <BR><BR>I have test this :<BR><BR>var zoom =
map.getZoom();<BR>var size = zoomDim[zoom]; // Size of my big image by
zoom<BR> var x = 50 * size[1] / 100; // give me the x
pixel from my image<BR> var y = 50 * size[0] / 100; //give me
the y pixel from my image<BR> var pixel =
map.getViewPortPxFromLayerPx(new OpenLayers.Pixel(x,y)); // I have try this to
get a correct pixel<BR> var coord =
map.getLonLatFromPixel(pixel); <BR>
<BR>
vector.removeFeatures(vector.features);<BR> var point = new
OpenLayers.Geometry.Point(coord.lon, coord.lat);<BR>
vector.addFeatures( [ new OpenLayers.Feature.Vector(point.clone())
]);<BR> <BR>It's not work my Point is not on the image.
I don't know how can I find a lonlat corresponding to my pixel or more simply
how can use openlayers with no projection with just pixel because my data is not
geographic<BR clear=all> <BR>Thanks<BR><BR>Cheers<BR><BR>-- <BR>Aumard
Jimmy<BR>Développeur <BR><BR>KINAXIA<BR>c/o CICA / PacaEst<BR>2229 Route des
Crêtes<BR>F-06560 Sophia Antipolis<BR><BR>Tél.: +33 (0)4 8973 0242<BR>Mob.: +33
(0)6 6017 2827<BR>Fax : +33 (0)4 8307 6583<BR><BR><A
href="http://www.kinaxia.fr">http://www.kinaxia.fr</A><BR></BODY></HTML>