Maybe I've to create a new Projection?

On 20 Gen, 11:18, Alberto <[email protected]> wrote:
> Hi, I'm using Google Maps API to represent some paintings.
> I've just used MapType object to create a new Map with custom tiles,
> but Mercator Projection plot my picture continuously in longitude
> space, due to Mercator Projection.
> I need a way that let me see my picture only once, like in this
> example:http://www.thekremercollection.com/art/artists/Gerrit-Dou/Self-portra...
> Can you help me please?
>
> I post here what I've done:
>
> public class MyMap {
>
>           private MapWidget map;
>
>           public MapWidget create(final String pictureName) {
>
>             map = new MapWidget(LatLng.newInstance(0, 0), 0);
>             map.setSize("1px", "450px");
>
>             TileLayer tileLayer = new TileLayer(null, 0, 3) {
>               @Override
>               public double getOpacity() {
>                 return 1.0;
>               }
>
>               @Override
>               public String getTileURL(Point tile, int zoomLevel) {
>                   String ret=null;
>                           ret= 
> "immagini/"+nomeImmagine+"_"+tile.getX()+"_"+tile.getY()
> +"_"+zoomLevel+".png";
>                   System.out.println(tile.getX()+","+tile.getY()+"
> zoom:"+zoomLevel);
>                 return ret;
>               }
>
>               @Override
>               public boolean isPng() {
>                 return true;
>               }
>             };
>
>             MapType mapType = new MapType(new TileLayer[] {tileLayer},new
> MercatorProjection(8) , "MyMap");
>             map.addMapType(mapType);
>             map.addControl(new MapTypeControl());
>             map.setContinuousZoom(true);
>             map.setCurrentMapType(mapType);
>             map.setScrollWheelZoomEnabled(true);
>             map.addControl(new LargeMapControl3D());
>             List<MapType> listaDefault=(MapType.getDefaultMapTypes());
>
>             return map;
>
>           }
>
> }
>
> Thank You in advance!

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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-web-toolkit?hl=en.

Reply via email to