google-maps-android-api-2

Create a custom info window in google maps V2

寵の児 提交于 2019-12-12 07:44:32
问题 I'm trying to make a custom window that look like that (for map objects). But instead of the project following and follower I wanna place an image, but I can't figure out how to make one, any refferes? thanks in advance. 回答1: its just an xml layout like other layouts would be. check here for a small tutorial. Just remember that buttons in the layout will not work 回答2: Read this post to understand how to create custom infowindows. You can add the required imageviews inside the xml layout file

SupportMapFragment Instead of MapFragment

岁酱吖の 提交于 2019-12-12 07:22:10
问题 I want to make an android application that uses Google Maps for Android v2. I can show a map. I can even navigate and zoom. But, when I want to search for more operations to make, I can't find any. I want this application to work on API level 8 and above. So, I used SupportMapFragment . I heard that, if I want to make my application to work on API level 8 and above, I have to use SupporMapFragment . I found examples about MapFragment s, but unfortunately, not about SupportMapFragment . I want

Google Maps Place marker not displaying

假装没事ソ 提交于 2019-12-12 06:47:49
问题 I am trying to display locations of places I got using the google maps places api. But the markers of my search results are not showing up on the map. And I can't seem to find the problem. Below is a copy of my source code with my logcat log. Any help will be really appreciated. Thank you in advance :) . My MainActivity public class MainActivity extends FragmentActivity implements LocationListener, GoogleMap.OnMapClickListener { GoogleMap mGoogleMap; Spinner mSprPlaceType; String[] mPlaceType

Tile Projection Google Maps: Convert Distance to Screen Dimensions

谁说胖子不能爱 提交于 2019-12-12 05:49:40
问题 I am using the CanvasTileProvider in Google Maps Android v2. I can convert lat long points to screen pixels. However I would like to create a method to convert a distance to screen pixels. This will allow me to draw a circle of x radius. Can anyone help with this? The code below I have butchered and modified from somewhere else so credit to the original author. /** * Converts between LatLng coordinates and the pixels inside a tile. */ public class TileProjection { public int x; public int y;

How to make a search on google maps for finding hospitals etc

二次信任 提交于 2019-12-12 05:29:40
问题 I want to make google map where we can search a hospitals , police station etc on the base of current location. But as per the google search i knew that past all Google places api's are deprecated. so i used https://developers.google.com/places/android-api/signup Using this link for crating google places api key,But its not working for me its not getting any data ... I am referring this link i used to change only api key here http://wptrafficanalyzer.in/blog/showing-nearby-places-and-place

Android GMaps v2 - Get location of the center of the map & map height and width

心不动则不痛 提交于 2019-12-12 05:22:24
问题 I'm trying to get the latitude and longitude of the center of the map in the Google Maps V2 API & get the width and length of the map. Here is my old code(from GMaps v1 that I started to modify): import com.google.android.gms.maps.GoogleMap; private GoogleMap mGoogleMapView; public LatLng getMapCenter() { if( mGoogleMapView != null ) { return mGoogleMapView.getMapCenter(); } /*if( mOpenStreetMapView != null ) { return convertOSMGeoPoint( mOpenStreetMapView.getMapCenter() ); }*/ return null; }

google maps api v2

狂风中的少年 提交于 2019-12-12 05:15:20
问题 I am trying to run a basic example of Google maps API v2 from http://www.vogella.com/articles/AndroidGoogleMaps/article.html but it keeps crashing with an error: 02-10 14:51:38.292: E/AndroidRuntime(898): FATAL EXCEPTION: main 02-10 14:51:38.292: E/AndroidRuntime(898): java.lang.NoClassDefFoundError: com.google.android.gms.R$styleable 02-10 14:51:38.292: E/AndroidRuntime(898): at com.google.android.gms.maps.GoogleMapOptions.createFromAttributes(Unknown Source) 02-10 14:51:38.292: E

Android GeoFire onKeyEntered not trigged

拈花ヽ惹草 提交于 2019-12-12 05:13:46
问题 The android geofire onKeyEntered is never executed for matching queryLocation. But onGeoQueryReady method is executed. so when I click on the menu bottombar, the addGeoQueryEventListener is executed and the onGeoQueryReady method is executed. But the onKeyEntered method is never executed. as you can see in the attachment, I have the location in the same node as the top level node. I have also include child path "xxx_location" in the DB reference. below are my API version. Geofire 2.1.1'

App crash when using getMapAsync() in MapsView

╄→尐↘猪︶ㄣ 提交于 2019-12-12 05:06:56
问题 I have a mapsview and it works fine when using getMap() although it shows me a depricated warning. But when i change getMap() to getMapAsync() the app will crash. Here's my code public class MapsActivity extends AppCompatActivity implements OnMapReadyCallback { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_maps); ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)) .getMapAsync(this)

Android google map Find distance between

笑着哭i 提交于 2019-12-12 05:06:27
问题 i successfully created google map .i can check mylocation and i wrote code witch can add point in google map (touch listener) and draw line between start location and point . and now i want to check distance . i do not know how i can this i googled one example but this code does not working right?i always has one distance this is a my code if anyone knows solution please help me thanks public class GPS extends Activity implements OnMyLocationChangeListener, OnMapClickListener { final int RQS