.net - Converting long/lat to pixel x/y, given a zoom-level -


I am trying to develop a page in ASP.NET which as a tile server for Google Maps

This will pull a collection of latitude / latitude points from the database, then by looking at the zoom-level (default: 15), they must be presented as a small red dot on the transparent background.

This will return the result as a GIF-type image.

Any algorithms or libraries have been developed which allow me to take this set of latitude / area and convert them to a set of 2D pixels coordinates, given the zoom level?

(This is all being server-side, so I can not use the Google Maps API.)


Update: A code- whatever the sample in Pearl The problem is:

The problem is, I do not know Pearl, and actually there is no time to open a book and to know it. / P>

Can someone help me understand what is happening in this function?

  Sub Google_Coord_to_Pix {my $ value = shift; My $ lat = shift; My $ lng = shift; My @d = (); My $ E = 0; $ D [1] = sprintf ("% 0.0f", $$ value {'BMO'} + $ lng * $$ value {'pixLngDeg'}); $ E = sin ($ axis * $$ value {'or'}); If ($ e> 0.99999) {$ e = 0.99999; } If ($ e & lt; -0.999 99) {$ e = -0.99999; } $ D [0] = Sprint ("% 0.0f", $$ value {'BMO'} + 0.5 * logs ((1 + $ E) / (1 - $ E)) * (-1) * $$ Value {'pixLngRad'}); Return (@ D); }  

"If this is a mercantile projection, then you have to worry about it It is not necessary since the curvature of the earth since all the letters / line lines are at the same distance. "

Maybe you are thinking of launching geographical (aka plate carries)? Mercator projection has lines of parallel lines, but not does the latitude equal to latitude (lat = atan (sinh (y)), therefore 90 degree is infinite.

< P> BTW is a mathematics for a Mercator projection on a hemisphere, but if Google Maps is using WGS84 AlpiSide and you need to make it accurate, then it becomes more complicated. In that case, I see, but I want to be careful: It is not for the unconsciousness of the heart.


Comments

Popular posts from this blog

MySql variables and php -

c# - How can I find out if there are windows above a control? -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -