Thanks.
Have a nice day!
Frederik
On Jul 18, 1:35 pm, mfuller <davout1...@gmail.com> wrote:
> I've been trying out aglaforge's very nice library Google Maps APIhttp://sourceforge.net/projects/gwt/. I was wondering if anyone has
On Jul 19, 3:18 am, "loewenspr...@gmail.com"
1) create a custom tile layer - extend the GAbstractTileLayer class
and implement the methods isPng(), getOpacity(), and getTileUrl()
2) create a GCopyright to pass to the tile layer's constructor (the
API will put your copyright over your tiles)
3) add the tile layer to either a new GMapType or a new
GTileLayerOverlay
4) add the new map type or the new overlay to the map
I just helped Frederick with this:
Feel free to ask more questions if this doesn't make sense - HTH!
-krispy
We are using this very well done library on our project : a huge
collaborative wiki project of world description
You can see it live here : http://tellmewhere.com
Regards,
Romain
http://tellmewhere.com
http://dismoiou.fr
On 18 juil, 13:35, mfuller <davout1...@gmail.com> wrote:
> I've been trying out aglaforge's very nice library Google Maps APIhttp://sourceforge.net/projects/gwt/. I was wondering if anyone has
Here is my GoogleMap.html:
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-
microsoft-com:vml">
<head>
<title>GoogleMaps Application</title>
<meta name='gwt:module'
content='com.wikidot.davout.googleMaps2.GoogleMaps'>
<link rel=stylesheet href="GoogleMaps.css">
<script src="http://maps.google.com/maps?
file=api&v=2&key=ABQIAAAAXvSq2pmB72gJN9HTc6vRGhTwM0brOpm-
All5BF6PoaKBxRWWERSph8E1pMO_32yVZ7DPQYhLBLJ2NA"
type="text/javascript"></script>
<style type="text/css">
v\:* {
behavior:url(#default#VML);
}
</style>
</head>
<body>
<script language="javascript" src="gwt.js"></script>
<iframe id="__gwt_historyFrame" style="width:0;height:0;border:0"></
iframe>
<h1>GoogleMaps Application</h1>
<div id="map">
</div>
</body>
</html>
image.gif is in the public directory with the html page
Here is my entry point class:
public class GoogleMaps implements EntryPoint {
public void onModuleLoad() {
final GMap2Widget mapWidget = new GMap2Widget();
mapWidget.setHeight("400");
mapWidget.setWidth("400");
RootPanel.get("map").add(mapWidget);
GMap2 map = mapWidget.getGmap();
GCopyright copyright = new GCopyright(0, new GLatLngBounds(new
GLatLng(0.0, 0.0), new GLatLng(4.0, 4.0)), 0, "copyright");
GCopyrightCollection copyrightCollection = new
GCopyrightCollection();
copyrightCollection.addCopyright(copyright);
GTileLayer tileLayer = new GTileLayer(copyrightCollection, 0,
5);
GTileLayerOverlay tileLayerOverlay = new
GTileLayerOverlay(tileLayer);
map.addOverlay(tileLayerOverlay);
}
}
And my CustomTileLayer class:
public class CustomTileLayer extends GAbstractTileLayer {
public CustomTileLayer(GCopyrightCollection gCopyrightCollection,
int i, int i1) {
super(gCopyrightCollection, i, i1);
}
public String getTileUrl(GPoint gPoint, int i) {
return "image.gif";
}
public boolean isPng() {
return false;
}
public double getOpacity() {
return 1.0;
}
}
On Jul 19, 10:05 am, krispy <cplum...@integrity-apps.com> wrote:
> mfuller is right, you don't need JSNI:
>
> 1) create a custom tile layer - extend the GAbstractTileLayer class
> and implement the methods isPng(), getOpacity(), and getTileUrl()
> 2) create a GCopyright to pass to the tile layer's constructor (the
> API will put your copyright over your tiles)
> 3) add the tile layer to either a new GMapType or a new
> GTileLayerOverlay
> 4) add the new map type or the new overlay to the map
>
> I just helped Frederick with this:
>
> http://groups.google.com/group/Google-Web-Toolkit/browse_thread/threa...
GTileLayer tileLayer = new GTileLayer(copyrightCollection, 0, 5);
You need to use your custom tile layer! How else is the map supposed
to figure out where your tile images are? You should replace the
above with:
CustomTileLayer tileLayer = new CustomTileLayer(copyrightCollection,
0, 5);
-krispy