# Map tiling - What kind of projection?

Filed under:
|
|
|
|
##### convertion

Hi. I've taken a large image and divided it in to square tiles (256x256). It is made for google maps also, so the whole image is divided into z_x_y.png (Depending on zoom level).

z=0 => 1x1 tile z=1 => 2x2 tilesthe z=2 => 4x4 tiles

My imageMap is "flat" and is not based on a sphere like the worldmap.

I'm gonna use this map on a windows mobile app (which has no google API), and all the "points of interests" is inserted into a database by longitude and latitude. And since i have to make this for the windows mobile, i just have XY coordinate system.

Is it enough to just use this:

``````MAP_WIDTH  = 256*TILES_W;
MAP_HEIGHT = 256*TILES_H;

function convert(int lat, int lon)
{
int y = (int)((-1 * lat) + 90) * (MAP_HEIGHT / 180);
int x = (int)(lon + 180) * (MAP_WIDTH / 360);

ImagePoint p = new ImagePoint(x,y);  // An object which holds the coordinates

return p;
}
``````

Or do i need a projection technique?

© Stack Overflow or respective owner

• #### Image anotation (Highlighting parts of an image, Scrubbing an image) using Javascript

as seen on Stack Overflow - Search for 'Stack Overflow'
Hi, We are working on an application and would like users to annotate an image. By annotation I mean, the ability to highlight parts of an image. Once the image is highlighted, and submit is clicked, the highlighted attributes (color, area highlighted) are submitted to the server to be stored in… >>> More

• #### How I can add JScroll bar to NavigableImagePanel which is an Image panel with an small navigation vi

as seen on Stack Overflow - Search for 'Stack Overflow'
Hi, I have the following NavigableImagePanel, it is under BSD license and I found it in the web. What I want to do with this panel is as follow: I want to add a JScrollPane to it in order to show images in their full size and let the users to re-center the image using the small navigation panel… >>> More

• #### Twitter Bootstrap styling conflicts with plug-ins like jqGrid and other third part libraries

as seen on Geeks with Blogs - Search for 'Geeks with Blogs'
Issues:The concern is that the Twitter Bootstrap framework is that some of their css selectors are simply too generic and have incompatibility issues and conflicts with most third party plug-ins and css libraries, like jQuery-UI and jqGrid.My most pressing concern is only with the generic selector… >>> More

• #### PHP invalid image's and error handling

as seen on Stack Overflow - Search for 'Stack Overflow'
Using PHP's Image and GD functions you can use the following method to finally output the php image imagepng(\$image); Sometimes, for whatever reason the image may not be displayed typically the error is not with the image but with the actual php functions not executing successfully. However this… >>> More

• #### apt-get install was interrupted

I am new to Ubuntu. I got the following lines after an interrupted apt-get install. Running depmod. update-initramfs: deferring update (hook will be called later) Examining /etc/kernel/postinst.d. run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-29-generic /boot/vmlinuz-3.13.0-29-generic run-parts:… >>> More

• #### ASA hairpining: I basicaly want to allow 2 spokes to be able to communicate with each other.

as seen on Server Fault - Search for 'Server Fault'
ASA Spoke to Spoke Communication I have been looking at spke to spoke comms or "hairpining" for months and have posted on numerouse forums but to no avail. I have a Hub and spoke network where the HUB is an ASA Firewall version 8.2 * I basicaly want to allow 2 spokes to be able to communicate with… >>> More

• #### How do I map a java Map including another Map, as element, into hibernate *.hbm.xml

as seen on Stack Overflow - Search for 'Stack Overflow'
is there possibility to map something like: private Map<Website, Map<String, String>> parameterMaps = new HashMap<Website, Map<String, String>>(); Where 'Website' is my class having some strings attributes, and inner map should be some website specific url parts. I'd… >>> More

• #### jQuery shops-map like a typical Flash-map with some dots representing shops

as seen on Stack Overflow - Search for 'Stack Overflow'
Hi all So, I need to do this: http://seeds.dk/find-din-seeds with jQuery. Also, I need to have some callback when clicking a needle. Are there some ready-made plugins for this function? >>> More

• #### How to create multiboot flash drive

as seen on Super User - Search for 'Super User'
I've found a guide here: http://www.pendrivelinux.com/boot-multiple-iso-from-usb-multiboot-usb/ And found this menu.lst in my flash drive, which seems to be the one that I'm seeing when I boot using my flash drive: # This Menu Created by Lance http://www.pendrivelinux.com # Ongoing Suggested Menu… >>> More

• #### SQL Server 2008 R2 Reporting Services - The Word is But a Stage (T-SQL Tuesday #006)

as seen on SQL Blog - Search for 'SQL Blog'
Host Michael Coles (blog|twitter) has selected LOB data as the topic for this month's T-SQL Tuesday, so I'll take this opportunity to post an overview of reporting with spatial data types. As part of my work with SQL Server 2008 R2 Reporting Services, I've been exploring the use of spatial data types… >>> More