tags:

views:

288

answers:

0

Hello everybody,

I have a google map with my own map type:

var currentProjection = new GMercatorProjection(maxLevels + 1);
var mapBounds = new GLatLngBounds(new GLatLng(-9, -15), new GLatLng(9, 15));
var custommap = new GMapType(tilelayers, currentProjection, "Some project");
map.addMapType(custommap);
map.setCenter(mapBounds.getCenter(), minLevels, custommap);

When user clicks on map then context menu appears (singlerightclick event), from context menu user can add markers and I need a GLatLng value to add marker to the map but singlerightclick event contains only GPoint value.

I try to use next statement:

map.getCurrentMapType().getProjection().fromPixelToLatLng(pointValueFromEvent, map.getZoom());

but it wasn't helpfull (GLatLng value is outside of my map). I think it's because I use my own map type, how can I get GLatLng value to add the marker?

Best regards, Alex.