GWT + Google Maps API v3 - google-maps

I need Google Maps API v3 calls in my GWT Project, more specifically an Autocomplete-Feature for Places like in Google-Maps and the DirectionServices.
We already tried 2 approaches to get v3 access, but none was satisfying:
Using the GWT SuggestionBox Widget + Geocoder suggestions. This solution is very slow and even worser, the constraints you can put on the suggested Places is just country codes (e.g. "uk") and, even worse, it seems to be not working.
Google Maps API v3 Wrapper for GWT done by branflake2267. There seems to be a conflict between the wrapper and the already existing (older) GWT Google Maps API lib. When one tries to remove the Google GWT-maps-api from the project, severe changes would have to be made, since the structure of the API seems different (some Classes are not within the Wrapper).
Does somebody maybe had a similar problem and a solution for this? How can I get the Google Maps V3 API working in my GWT project?
Thank you very much guys for any help on this!

There is an official port of Maps v3 supported by Google which can be found here, but it is still in pre-release.
For more info, look at the comments of this bug.

Be very careful with Maps v3 it has some serious issues when used with the latest GWTversions. It does not appear to use Overlays and uses ArrayHelper all of which cause problems on GWT 2.1 and up..

I've had good luck with the branflake API on GWT 2.8. However, it hasn't been updated in years and still uses API version 3.10. Unfortunately I'm going to have to either for it and take on maintaining my own version of it or find an alternative at some point.
For now, tho, it's still very much a usable solution.
https://mvnrepository.com/artifact/com.github.branflake2267/gwt-maps-api

Related

Pure AS3 AIR map for mobile app

The iOS/Android app I am building requires a map component and just wondering what experts here would recommend using?
The app is being developed using pure AS3 and come across MapQuest. I only really need to be able to drop multiple markers and click markers for information. No directions, search etc.
Thanks
You might consider using a StageWebView instance with the HTML version of Google Maps.
You should be able to find helpful articles on the web. Sample: http://www.igorcosta.org/?p=350
Anyway, this might get tricky. :-/
I think Google Maps is still a good idea, but I’m not sure if it will work on mobile:
http://www.gotoandlearn.com/play.php?id=104
Beware that Google Maps API for Flash is deprecated.
Note (form Google Maps API page):
The Google Maps API for Flash has been officially deprecated as of September 2, 2011. The API will continue to work until September 2, 2014. We encourage you to migrate your code to version 3 of the Maps JavaScript API.
If not, you'll probably have to create a native extension.

Google changed something in their maps?

Im creating project with Google Maps API V3. Everything worked good but today, witchout changing code, maps crashed and wont run. Google changed something in their maps? I dont see anything. Console says nothing.
Make sure that you specify a version in your URL for loading the google maps v3 script. If you do not, you will always be given the latest version (v3.9 now), and any code you have written against a previous version could break (but they're usually pretty good about backwards compatibility).
See this page for more about using particular versions with Google Maps v3.

Google Maps API V3 Store Locator

I'm trying to create a store locator for my work. I've seen this done before using Google Maps API V2, but have not seen a good example using V3.
Here's a mockup of what I'm aiming to get working: http://imgur.com/eKMwo
I think it's a pretty simple concept, but what I'm having trouble getting to work is the parts pertaining to the stores themselves.
Does anyone know of any examples, tutorials or demos of something similar to the image linked above?
Edit: This related question may help you debug when making a store locator: Google Maps API - geocode() doesn't return lat and long
The V3 API for a store locator is horrible!
I used this and many functions weren't defined.
Everything was going fine for me until I got to the XML parsing, then Google's API started breaking on me. Absolutely deplorable, IMHO.
Actually, there is a V3 version of this article.
http://code.google.com/apis/maps/articles/phpsqlsearch_v3.html
I followed this documentation for creating a store locator: http://storelocator.googlecode.com/git/index.html
I used the Google Code one (maybe that's the one you already saw)..
http://code.google.com/intl/sv-SE/apis/maps/articles/phpsqlsearch.html
Granted it's for API V2 but its actually very easy updating it to API V3.. Just have look at he API V3 reference when in doubt..
http://code.google.com/intl/sv-SE/apis/maps/documentation/javascript/reference.html
I use this this API as it makes it real simple, can do a store locator in couple of hours
http://www.ehoundplatform.com/developers/documentation-developers/store-locator-using-freehound-and-google-maps-v-3

Do I really need the Google Maps API key?

I am planning to release a commercial website (I have ads there and a shop) which is freely available for everybody. I want to add a google map to show some points of interest. The question is: Do I need the google api key for that or can I just use the iframe code that google gives me? Theoretically that would work, too.
I searched google, but could not find a clear answer...
Thanks :-)
v2 of the Google Maps API is deprecated, so you should ideally use v3.
v3 does not need an API key as mentioned in the documentation.
Since v3 is the official version now, I assume the links given in google maps are for the version. You can always just try and see if embedding the iframe works for you. Though as noted, you can't really customize the map, so you should use the API. It's very simple to set up a basic map (read the tutorial).
You don't need the Google Maps API key as long as you don't plan to include any special or customized maps in your website.
Using the iframe version is fine for basic Maps integration.
The API Key is free anyway, so there is no problem in obtaining one. You should also be free to use the iframe as well, as long as your site is publicly available to everyone without a payed login or anything like that.
As long as you meet Google Maps TOS, you can use both. If you don't meet those TOS, don't use any of it.
A Google Maps API key is required for v2 of the API, not for v3 as far as I know,
and neither for requests to Static Maps API v2.

Is there a way to keep my google map V2 instead of V3 compliant?

I just discovered that the google map on my site is no longer working correctly because all the functions which refer to the deprecated V2 don't work. My source for the google maps api javascript is
"http://maps.google.com/maps?file=api&v=2&sensor=false&key=....."
which, because it says v=2, I assumed would reference V2. Apparently it doesn't, because the V2 functions are throwing errors. Is there any way to keep my javascript working without updating it all to be V3 compliant?
You can specify a version number if you need to stay on that version (i.e. v=2.242) per the documentation. Their "official changelog" (mentioned at http://code.google.com/apis/maps/documentation/javascript/v2/basics.html#API_Updates) doesn't appear to be up-to-date, so I'm not sure of the best way to get the version number that you want, other than trial and error.