Comments (10)
Possibly related to issue 39.
Original comment by [email protected]
on 4 Feb 2008 at 7:46
from gwt-google-apis.
Google-web-toolkit group reference:
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/80729d407
91eca39/b8a6432e8a23ab38?lnk=gst&q=Feedback+requested%3A+Google+API+Library+supp
ort+for+Google+Maps+and+AJAX+Search#b8a6432e8a23ab38
Here's some sample code from user COCGIS that causes the problem:
I tried a simpler example, a customized tile layer, started from the
js sample at
http://www.google.com/apis/maps/documentation/overlays.html#Tile_Laye....
but I ran into problem with MapType
public void onModuleLoad() {
final MapWidget map= new MapWidget(new LatLng(35.249208,
-80.843099), 10);
map.setSize("500px", "500px");
CopyrightCollection myCopyright=new CopyrightCollection("");
myCopyright.addCopyright(new Copyright(1,new LatLngBounds(new
LatLng(34,-81),new LatLng(36,-79)),10,""));
TileLayer tileLayer = new TileLayer(myCopyright,10,18){
public boolean isPng(){return true;}
public double getOpacity(){return 1.0;}
public String getTileURL(Point tile, int zoomLevel){
return "http://www.google.com/apis/maps/documentation/
examples/include/tile_crosshairs.png";
}
};
//TileLayerOverlay layerOverlay=new TileLayerOverlay(tileLayer);
//map.addOverlay(layerOverlay);
MapType mapType=new MapType(new TileLayer[]{tileLayer},new
MercatorProjection(20),"MyMap");
map.addMapType(mapType);
map.addControl(new MapTypeControl());
RootPanel.get().add(map);//
}
The tile layer works fine as a tile overlay on top of normal maps,
however,
when I click the "MyMap" type, I got the following error:
com.google.gwt.dev.shell.HostedModeException: Calling method
'createPeer': JS object of type number, expected
com.google.gwt.core.client.JavaScriptObject
at com.google.gwt.dev.shell.JsValueGlue.get(JsValueGlue.java:114)
at
com.google.gwt.dev.shell.ie.SwtOleGlue.convertVariantsToObjects(SwtOleGlue.java:
57)
at
com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod(IDispatchImpl.java:
119)
at
com.google.gwt.dev.shell.ie.IDispatchProxy.invoke(IDispatchProxy.java:
150)
--
1. The Projection.tileCheckRange method's signature changed from the
js API, and I don't think it is because of naming convention as in the
case of getTileURL. The last parameter tilesize is
com.google.gwt.maps.client.geom.Size instead of int. However, in the
runtime, what's been passed in by the js API is actually a number
(256), causing the errors. (Calling method 'createPeer': JS object of
type number, expected com.google.gwt.core.client.JavaScriptObject).
2. In the js API, a typical use of GProjection class is call method
fromLatLngToPixel etc in overlay or control class to position stuff on
top the map, but com.google.gwt.maps.client.geom.MercatorProjection
has those two method as protected, so you can not really have some
code like:
Projection prj=new MercatorProjection(20);
Point p=prj.fromLatLngToPixel(new LatLng(40, -80));
which is supposed to be a "correct" use. Any special reason why those
methods are protected? They are meant to be called.
Original comment by [email protected]
on 14 Feb 2008 at 4:53
from gwt-google-apis.
Added patches that fix the original reported issue and issues #1 & #2 later in
the
groups thread.
Original comment by [email protected]
on 15 Feb 2008 at 4:03
- Changed state: ReviewPending
Attachments:
from gwt-google-apis.
The projection patch also addresses issue #58
Original comment by [email protected]
on 16 Feb 2008 at 10:24
- Added labels: API-Maps, Milestone-1_1_RC
from gwt-google-apis.
galgwt-Projection-fixups-issue29-r120.patch committed as r124.
Original comment by [email protected]
on 20 Feb 2008 at 3:35
from gwt-google-apis.
galgwt-custom-MapType-issue29-r120.patch committed as r125.
Original comment by [email protected]
on 20 Feb 2008 at 3:38
- Changed state: FixedNotReleased
from gwt-google-apis.
Original comment by [email protected]
on 9 Jun 2008 at 11:30
from gwt-google-apis.
Original comment by [email protected]
on 13 Oct 2008 at 8:54
- Added labels: Milestone-1_0_RC
from gwt-google-apis.
Original comment by [email protected]
on 11 Dec 2008 at 3:08
- Changed state: Fixed
from gwt-google-apis.
Original comment by [email protected]
on 21 Dec 2009 at 1:57
from gwt-google-apis.
Related Issues (20)
- Sample on the "Getting Started" page uses deprecated APIs
- gwt-google-apis - ISSUE DETECTED
- Misplaced hover pop up on gwt-visualization 1.1.2 Line chart
- Patch for /trunk/apis/samples/urlshortener/com/google/api/gwt/samples/urlshortener/client/UrlshortenerEntryPoint.java HOT 1
- Where is com.google.api.gwt.client.GoogleApiRequestTransport HOT 1
- GWT Google+ API retrieve email address
- google api v2 to v3 code upgrade issue
- Bubble and Stepped Area Charts are unsupported
- Patch for /trunk/apis/samples/calendar/com/google/api/gwt/samples/calendar/client/CalendarEntryPoint.java
- Trying to access google calendar using the calendar api- the script is stopped by the browser with an error message x-frame options :https://www.googleapis.com/....../ does not permit cross domain framing HOT 2
- Patch for /trunk/apis/src/com/google/api/gwt/client/GoogleApiRequestTransport.java HOT 2
- Removing PieChart from parent widget leaves elements in detached DOM tree HOT 1
- Google+ API Sample Demo shows no messages after clicking a button in the pop-up dialog HOT 2
- Can't remove previous directions polygon from Google map HOT 1
- Patch for /trunk/apis/samples/plus/com/google/api/gwt/samples/plus/PlusSample.gwt.xml
- Not able to show x axis values in column chart.
- Annotated chart is absent in the gwt-visualization-1.1.2.zip
- 2 different colors for nodes in org charts
- Point picture/google line chart
- Which API is best suitable for google maps development.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gwt-google-apis.