google-maps-api-2

Google Maps API v3 - GIcon is not defined

☆樱花仙子☆ 提交于 2019-12-04 02:22:37
I know they are some issues from v2 to v3 what can i do here to fix it? GIcon is not supported by v3? // Google-Map icon object var gMapIcon = new GIcon(G_DEFAULT_ICON); //change to new google.maps.MarkerImage();??? // does icon exist if ( mapElements[lMapElementIndex]['icon'].toString().length > 0) { gMapIcon.image = html_entity_decode(mapElements[lMapElementIndex]['icon']); gMapIcon.shadow = ""; iconHeight = mapElements[lMapElementIndex]['iconheight']; iconWidth = mapElements[lMapElementIndex]['iconwidth']; gMapIcon.iconSize = new GSize(iconWidth,iconHeight); gMapIcon.iconAnchor = new GPoint

Draw five transparent circumcircles on the Google Map v2

你说的曾经没有我的故事 提交于 2019-12-04 01:51:05
问题 I have recently started working with Google Map v2 and figured it out lot of things have been changed. Previously I was using Google Map v1 so I was using the concept of MapView. I am trying to create five transparent circumcircles with the center as my current location . Below is the code, I was using for Google Map v1 to draw the circle and it was working fine for me. Now I am trying to draw the same circle that I have drawn in my below code on the Google Map v2 . I cannot use MapView here

Google Maps API - Resizing generates blank white space

♀尐吖头ヾ 提交于 2019-12-04 01:50:47
问题 I'm working on what it looked to be like a very simple feature which is causing a little bit of a headache. I work with a GIS and we integrate it with Google Maps. One of the clients requested to be able to open a separate pop up window showing only the map. Opening the window wasn't a problem, but as I try to expand the width of the IFrame which contains the map, in order to fit the window size, the actual map image stays with the same size, and a white space fills the remaining space. I

How to cache/download google map v2 tile programmatically?

好久不见. 提交于 2019-12-04 00:09:52
How to cache/download google map v2 tile programmatically?, is it possible? Bcos according to this prntscr.com/3cyiqf its not possible but as I have seen this link TileProvider using local tiles I thought that if Android provides TileProvider class to load/use tile from the asset than it should be something available for caching/downloading a tile programmatically/run time My Actual requirement is : If user is connected with internet at that time he can able to download/cache a tile of specific area or he can download/cache, visible map in the phone screen only and whenever he goes offline at

Google Map API v2 - Get Driving Distance from Current Location to Known Locations

爷,独闯天下 提交于 2019-12-03 21:54:34
I'm trying to figure out how to display the driving distance from the current location to four known locations. I'm not showing a map on the screen, I just need to display how many miles away the user currently is from those locations. I took an example from Here and modified it a little. It is bringing back the correct distance but I can't figure out how to pass in each of the 4 end locations, or differentiate between them. What do I need to do in order to get the distance to each of the 4 locations and display each of those distances in separate TextViews? Update question: How do I calculate

Google Maps API v2 shows blank map

笑着哭i 提交于 2019-12-03 18:13:35
问题 I have set up an Android Application in order to view some things on a Google Map. I used the Google Maps API v2 and followed all the setup which can be found here. I even registered the application using a key that I applied for on Google's website. I have been able to get the Activity running but every time I open it I am greeted with a blank screen. This is my Manifest File <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package=

Can I Change My Location Button in Android Maps

家住魔仙堡 提交于 2019-12-03 17:21:18
问题 We have a my location Icon in google maps like I want to change this icon button with my desired Icon is there any way to replace this icon in the Google Maps. How can i do that in Android. As the Question was unclear so i am adding Additional information. In https://support.google.com/maps/answer/3093609?hl=en you can see in section Get directions based on your location in point number 2 the icon had been shown The Section just below in Fix your location-> Understand Location Symbols also

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

雨燕双飞 提交于 2019-12-03 16:50:08
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 is that the array doesn't need sorting because I record the points as they come. I have tried using a

Google Maps API v2 not working

本小妞迷上赌 提交于 2019-12-03 13:09:33
I am trying to build an application using Google Maps API v2 but the thing is, the application keeps giving me force closes although i followed all the required instructions. Here is the android part import android.support.v4.app.FragmentActivity; import com.google.android.maps.GeoPoint; import com.google.android.maps.MapController; import com.google.android.maps.MapView; public class GPSonMap extends FragmentActivity{ MapView map; MapController controller; LocationManager locationManager; LocationListener listener; PendingIntent pendingIntent ; Criteria criteria; MapOverlay overlay; @Override

Google Maps v2 Set Zoom Level

爱⌒轻易说出口 提交于 2019-12-03 10:14:42
When I launch Google maps in Android, it shows the whole world. What do i need to change so as to set the zoom to the marker? Here are the codes. Thanks googlemap.getUiSettings().setZoomControlsEnabled(true); googlemap.getUiSettings().setMyLocationButtonEnabled(true); LatLng cameraLatLng = sfLatLng; float cameraZoom = 17; if(savedInstanceState != null){ mapType = savedInstanceState.getInt("map_type", GoogleMap.MAP_TYPE_NORMAL); double savedLat = savedInstanceState.getDouble("lat"); double savedLng = savedInstanceState.getDouble("lng"); cameraLatLng = new LatLng(savedLat, savedLng); cameraZoom