Comments (4)
One way to handle this is to declare field marked 'final' to make a copy of the
address string, then you can reference it from inside your LocationCallback
implementation. In the example below, I did this twice, to reference an
InfoWindow
object as well:
private void displayWithGeocoder(InfoWindow w, String address) {
final String addressCopy = address;
final InfoWindow wCopy = w;
Geocoder g = new Geocoder();
g.getLocations(address, new LocationCallback() {
public void onFailure(int statusCode) {
GWT.log("Error: "+statusCode+" Failed to retrieve address: "+addressCopy,
null);
}
public void onSuccess(Placemark[] locations) {
GWT.log("Got "+locations.length+" locations returned. Address is " +
addressCopy,
null);
if (locations.length > 0) {
wCopy.open(locations[0].getPoint(),
new InfoWindowContent("Found :" + locations[0].getAddress()));
}
}
});
}
Original comment by [email protected]
on 14 Jan 2008 at 3:58
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from gwt-google-apis.
Now I am thinking we should change this callback model to use the handler/event
pattern that we're putting in to support GEvent.
Original comment by [email protected]
on 5 Apr 2008 at 3:53
- Added labels: API-Maps
from gwt-google-apis.
If we do this, we will need to look at the following types which use a callback
pattern:
DirectionsCallback, LatLngCallback, LocationCallback, GeoXMLLoadCallback
Original comment by [email protected]
on 23 Jul 2008 at 2:40
from gwt-google-apis.
The Maps v2 API is now deprecated.
Original comment by [email protected]
on 28 May 2010 at 6:15
- Changed state: NotPlanned
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.