I agree that I can (too) get pixel coordinates by scaling the pixel coordinates by 2**zoom. However, that isn't what the documentation tells you to do. The example does that. I admit, but I also think that the example is wrong for other reasons.
>From the example at >http://code.google.com/apis/maps/documentation/v3/examples/map-coordinates.html MercatorProjection.prototype.fromPointToLatLng = function(point) { //stuff not referencing 'point' but referencing 'pixel'. This is a pure typo I think } The definition of a MapCanvasProjection object does not include this method, but assuming that it really is (another typo for) 'fromDivPixelToLatLng', lets see what the documentation says about this method: "Computes the geographical coordinates from pixel coordinates in the div that holds the draggable map." (http:// code.google.com/apis/maps/documentation/v3/ reference.html#MapCanvasProjection ) Now -- what are the 'pixel coordinates'? I assumed (and this may be a bad assumption) that the units are in pixels. Now, I will admit that the documentation does not define 'pixel coordinates', but I think that most people would assume that this was 'the coordinates in pixels'. If we could find an instance of a MapCanvasProjection object from one of the google defined map types, then we could solve this issue pretty easily (by looking at the methods and parameters of those methods). Philip On Feb 19, 10:46 am, Marcelo <[email protected]> wrote: > On Feb 19, 4:27 am, Philip <[email protected]> wrote: > > > Calculating pixel coordinates without > > knowing the zoom is tough. > > Not really. > I already pointed you to documentation that demonstrates how to do it, > but I believe that you chose to ignore my advice when you said "I > understand how projections work". > Just to be on the safe side, I tried what I suggested in the other > thread, and I can get pixel coordinates in 3 lines of code. > You need to un-learn what you know from V2 here. > > BTW, I might have clicked "reply to author" by mistake in a previous > attempt to post this message, and if I did I'm sorry about that. > > -- > Marcelo -http://maps.forum.nu > -- > > > > > Sorry > > > Philip > > > On Feb 13, 6:50 pm, jbogdani <[email protected]> wrote: > > > > My answer is: Is there any way to work in UTM coordinates in gmaps v3? > > > I need to display some GIS data (shapefiles transformed in MySQL > > > spatial tables) in GMaps, and make them available in read/edit mode, > > > without loosing the possibility to view/edit in GIS environment (I'm > > > using QGIS). > > > All data are in projected mode (UTM) and I was wandering if is there > > > (o will be in future) a direct way to create markers (etc.) with > > > projected coordinates. > > -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
