Assigning Latitude to Pixels

14 views
Skip to first unread message

Saeed Zareian

unread,
Aug 8, 2011, 6:41:52 AM8/8/11
to Tile5
Hi everyone,
I am trying to make a custom map with tile5. Actually I don't know how
to assign the "lat" and "lon" to the pixels.
Can anyone help me?

Damon Oehlman

unread,
Aug 8, 2011, 9:16:23 AM8/8/11
to ti...@googlegroups.com
Hi Saeed,

Is this for the purpose of using a draw layer to place images manually to create a map (which would work quite well)?  If so, I might try and put something up on the wiki which deals with that specific use case if it's helpful.

Sorry I've been quiet of late - snowed under with work :/

Cheers,
Damon.

-- 
Damon Oehlman
t: DamonOehlman


Rick Stringer

unread,
Aug 8, 2011, 9:26:55 AM8/8/11
to ti...@googlegroups.com
I too would find that useful Damon.

Thanks.
Rick

Saeed Zareian

unread,
Aug 8, 2011, 1:00:01 PM8/8/11
to Tile5
Dear Damon,
I read the code, and found this functions that helped me tu gave the
markers "lat" and "lon" for rendering!
So, I help other people here, to appreciate them to help me.. (sharing
is caring :D )
The "xy" below, can be assigned for positioning:

var xy = T5.XY.init();
xy = T5.GeoXY.init(T5.Geo.P.parse("50 0"),
T5.Geo.radsPerPixel(view.getZoomLevel() ));

I think it has a bug! the first parameter(50) must be "lon", but it's
"lat" !

But, Your answer:
Yes!
My scenario is to make local maps with layers and markers and It must
have zooming slider.
But, I can't put the images by pixel, because the "tapMarker" trigger
doesn't work properly, specially when we pan and zoom the map.

Another problem is that I didn't found the function to give my map the
initial "lat" and "lon" of city.

Thanks, Saeed

On Aug 8, 5:16 pm, Damon Oehlman <damon.oehl...@gmail.com> wrote:
>  Hi Saeed,
>
> Is this for the purpose of using a draw layer to place images manually to create a map (which would work quite well)? If so, I might try and put something up on the wiki which deals with that specific use case if it's helpful.
>
> Sorry I've been quiet of late - snowed under with work :/
>
> Cheers,
> Damon.
>
> --
> Damon Oehlman
> t: DamonOehlman
>
> http://distractable.net/http://www.sidelab.com/
Reply all
Reply to author
Forward
0 new messages