how can i add a custom maptype to my map?

a friend of mine is writing his map by hand (all js)

i'm coding it in gwt and therefore i do not want to inject custom js
code.
i can look up his code and came to a point where my ide tells me that
a type cant be instantiated.

so what i am doing is...
create a Copyright, then a CopyrightCollection.
all fine till i reach TileLayer which cant be instantiated.

the following code is java (outcommented code is javascript)
I#m trying to reproduce this from javascript as i did not find a
sample for java. (yes, i used the search function)
[java]
                String license = "<a 
href='http://creativecommons.org/licenses/by-sa/
2.0/' target='_blank' onfocus='this.blur()'>CC-BY-SA</a>";
                Copyright copyright = new Copyright(1, LatLngBounds.newInstance
(LatLng
                                .newInstance(-90.0, -180.0), 
LatLng.newInstance(90.0, 180.0)),
                                0, license);
                CopyrightCollection copyrightCollection = new 
CopyrightCollection(
                                "Kartendaten &copy; 2009 <a 
href='http://wiki.openstreetmap.org/
wiki/Hauptseite' target='_blank' onfocus='this.blur()'> OpenStreetMap</
a>");
                copyrightCollection.addCopyright(copyright);
// var tilelayers_OSM = new Array();
                // tilelayers_OSM[0] = new GTileLayer(copyrightCollection, 0, 
18);
                // tilelayers_OSM[0].getTileUrl = GetTileUrl_OSM;
                // tilelayers_OSM[0].isPng = function () { return true };
                // tilelayers_OSM[0].getOpacity = function () { return 1.0 };
                // OSM_map = new
                // 
GMapType(tilelayers_OSM,G_SATELLITE_MAP.getProjection(),"OSM",{
                // urlArg:'OSM', linkColor:'#000000' });
                // map.addMapType(OSM_map);
                // function GetTileUrl_OSM(a,z) {return "http://
tile.openstreetmap.org/"
                // + z + "/" + a.x + "/" + a.y + ".png";}
[/java]

do you have a sample how this works in java?

thanks 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 Google-Web-Toolkit@googlegroups.com
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to