google-maps-api-2

How to animate a marker through an ArrayList of LatLng points?

放肆的年华 提交于 2019-12-21 05:24:22
问题 I am using Google Maps API V2 to get the location of the current user and am recording his route by using the onLocationChanged listener. While the user records their route I save all the LatLngs detected at each location change in an arraylist. When the user stops recording their route I place a marker at the first point in the arraylist. My problem now is that I wish to animate the marker through all the points in the arraylist. Can someone please tell me how can I do this? Things to note

Find route with Androids Google Maps API

寵の児 提交于 2019-12-21 04:26:09
问题 I want to be able to display the route between two user-defined geographical points using the Google Maps API for Android. I also want to be able to let the user choose what type of route to display, whether it be walking, cycling, car etc. Additionally, I want to be able to calculate the time and distance it would take to use this route. I've tried searching the web and looking at other stackoverflow questions, but to no avail. How would I go about this? How would I be able to code this. //-

Blurred custom tiles on Android Maps V2

时光怂恿深爱的人放手 提交于 2019-12-21 02:41:20
问题 I want to show a CustomOverlay on a Google Maps V2. The loading of the tiles works as expected, the only thing is, that the shown tiles are not appearing to be sharp at all, kind of blurry. Google did not get me to an usable answer. I took the approach of adding classical 256px x 256px tiles for the TileProvider. I managed to get a tile source where the images were @2x (retina), which made the whole visual experience much sharper, but I would rather not use this source, as the data transfer

Fixed Legend in Google Maps Mashup

孤人 提交于 2019-12-20 14:21:16
问题 I have a page with a Google Maps mashup that has pushpins that are color-coded by day (Monday, Tuesday, etc.) The IFrame containing the map is dynamically sized, so it gets resized when the browser window is resized. I'd like to put a legend in the corner of the map window that tells the user what each color means. The Google Maps API includes a GScreenOverlay class that has the behavior that I want, but it only lets you specify an image to use as an overlay, and I'd prefer to use a DIV with

Best way to geocode UK postcode with Google Maps API?

自闭症网瘾萝莉.ら 提交于 2019-12-20 10:47:05
问题 What is the most effective and accurate way to geocode a UK postcode? Using the built in geocode object results in massively blurred results (lots of postcodes returning just a general area). Are there any free UK postcode geocoding services I can plug into via JavaScript? 回答1: Edit: To be clearer this uses the local search in google search api, not the google maps api to do the geocoding which is much more accurate. The best way is to use Google Search Api. If you get an api key and get it

Can you load Google Maps API v3 via Google AJAX API loader

烈酒焚心 提交于 2019-12-20 10:11:17
问题 Some time ago I used the regular method of loading Google Maps API like this: <script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2&key=abcdefg&sensor=true"> Later I switched to Google AJAX APIs to load Google Maps API. This was because a couple of "widgets" on my website needed the Google Ajax API loader so I chose to be consistent and used the AJAX APIs to load Google Maps as well: <script type="text/javascript" src="http://www.google.com/jsapi?key=abcdef"></script>

Android - Deletes R.java file when importing google-play-services-lib

我与影子孤独终老i 提交于 2019-12-20 07:31:31
问题 I am working on a project in which I want to show a Map, for that I want to add google-play-service-lib but when I add it my R.java files gets deleted and not getting regenerated. I tried adding google-play-service-lib into build path. After adding everything goes ok. But, when I run the project it gives an error says, java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable And when I add it into the project, R.java gets deleted. I tried number of permutations and combinations

Open and Close InfoWindow onclick

主宰稳场 提交于 2019-12-20 07:07:03
问题 Can anyone help me code inside my eventListener so that an infowindow will do the following: open if it's currently closed, and close if it's currently open. I've tried the following to no success... google.maps.event.addListener(marker, 'click', function() { if(infowindow.closed == true){ infowindow.open(map, marker) } else{ infowindow.close(map, marker) } }) 回答1: You can use something like this: infoWindowClosed = true; google.maps.event.addListener(marker, 'click', function() { if

Upgrading to v3 from v2 of google maps API, suggestions

给你一囗甜甜゛ 提交于 2019-12-18 17:57:32
问题 I have full fledged integration of google maps version 2 in my web application, with features like get directions, cluster markers, tabbed info window, context menu(right click). The implementation has very poor design which is causing some problem, So now I need to revamp the core implementation to better design. I was thinking of upgrading to version 3 of google maps API. Please suggest, if that's a good thing to do and my all features will be running fine(or I will get replacement for all

Upgrading to v3 from v2 of google maps API, suggestions

冷暖自知 提交于 2019-12-18 17:57:05
问题 I have full fledged integration of google maps version 2 in my web application, with features like get directions, cluster markers, tabbed info window, context menu(right click). The implementation has very poor design which is causing some problem, So now I need to revamp the core implementation to better design. I was thinking of upgrading to version 3 of google maps API. Please suggest, if that's a good thing to do and my all features will be running fine(or I will get replacement for all