google-maps-markers

Android - setInfoWindowAdapter with WebView in google Marker (api v2)

故事扮演 提交于 2019-12-24 11:08:36
问题 I have a problem with marker on google maps api v2. I would like to customize infoWindows with a WebView: Here my code of InfoWindowAdapter mMap.setInfoWindowAdapter(new InfoWindowAdapter() { @Override public View getInfoWindow(Marker arg0) { return null; } @Override public View getInfoContents(Marker arg0) { View v = getLayoutInflater().inflate(R.layout.info_window_layout, null); TextView title = (TextView) v.findViewById(R.id.title_marker); WebView snippet = (WebView) v.findViewById(R.id

Change marker position by Realtime lat & lang in Firebase database without added new one marker

霸气de小男生 提交于 2019-12-24 10:56:23
问题 My realtime Firebase database I try to change position for many lat langs at some time like cars in uber, but when I change lat or lang or both this don't change the position of marker but its make anew marker. I want when lat for example is changed in realtime database the markers also changed based on the value of that lat I try make condition `if (marker != null) setPosition else "marker == null"` add new marker but the problem is I have >1 markers so that this solution is display me on

How to use meters value in zoom level in google maps android?

浪子不回头ぞ 提交于 2019-12-24 10:30:03
问题 Previously I used zoom level in google maps by hardcoding. But now it comes from response. So how to convert the meters by passing into zoom level? In my code, I am displaying a big circle icon and also points. So for both, I use hardcoded zoom level. But now it comes from response. LatLng retailerPosition = new LatLng(Double.parseDouble(retailerLatitude), Double.parseDouble(retalerLongitude)); mMap.addMarker(new MarkerOptions().position(retailerPosition).title("").icon

How to add image into InfoWindow of marker in google maps API V2 Android?

╄→гoц情女王★ 提交于 2019-12-24 09:48:38
问题 i have this mapa.addMarker(new MarkerOptions() .position(latlng) .title("HI") .snippet("HI;HI") .icon(BitmapDescriptorFactory.fromResource(R.drawable.same))); but no find information of how add into infowindow a icon someone can help me? 回答1: You will need to create your own InfoWindowAdapter and use getInfoContents() or getInfoWindow() to return the info window contents containing the image you seek. 来源: https://stackoverflow.com/questions/16572971/how-to-add-image-into-infowindow-of-marker

KML markers missing on Google Maps API v3: What's wrong?

不想你离开。 提交于 2019-12-24 09:40:06
问题 I'm new to the Google Maps API v3 and have been closely reading the documentation. My map loads fine, but it's not displaying the Placemarks I've set up in my KML file (http://hepac.ca/wp-content/mapping/wellnessnetworks.kml). The KML validates fine at FeedValidator and displays without issue in Google Earth, so I'm assuming it's a problem with my code below. The placemarks were appearing at one point, but I must have accidentally deleted some crucial code. Thanks in advance for helping!

different markers on google maps v3

主宰稳场 提交于 2019-12-24 09:07:32
问题 How can I add different markers to google map v3? Here is example for my marker: var latlng = new google.maps.LatLng(lat,lng); var image = "../img/hotel_icon.png"; var locationDescription = this.locationDescription; var marker = new google.maps.Marker({ map: map, position: latlng, title:'pk:'+name, icon: image }); bounds.extend(latlng); setMarkes(map, marker, name, locationDescription); });//close each map.fitBounds(bounds); });//close getjson }//close initialize function setMarkes(map,

Search Android Map Marker Titles and Snippets

百般思念 提交于 2019-12-24 07:13:17
问题 I have a map with several markers and I would like to be able to search them by marker title or snippet. I am new to Android so I'm not entirely sure on how to go about it. Any help pointing me in the right direction would be great. Here is my code: import android.app.Activity; import android.content.Intent; import android.os.Bundle; import com.google.android.gms.maps.CameraUpdateFactory; import com.google.android.gms.maps.GoogleMap; import com.google.android.gms.maps.GoogleMap

Google maps Info Window Overlay content just like that in maps.goole.com

大憨熊 提交于 2019-12-24 07:04:14
问题 I want have the info window content for a marker just a s below My code so far is loadEmbeddedMap : function() { var script = document.createElement("script"); script.type = "text/javascript"; script.src = "http://maps.google.com/maps/api/js?sensor=false&callback=initEmbeddedMap"; document.body.appendChild(script) }, initEmbeddedMap : function() { var myLatlng = new google.maps.LatLng(40, -80); var myOptions = { zoom: 8, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP } map = new

How Can I populate dynamic markers on Map using SQLite Database Databae?

淺唱寂寞╮ 提交于 2019-12-24 06:17:52
问题 I stored Latitude and Longitude into my Database And I want to populate these saved locations's marker on map. I get data into array list but I have no idea how I populate on map ? ArrayList<Double> get_location(){ ArrayList<Double> location = new ArrayList<>(); SQLiteDatabase db = this.getReadableDatabase(); Cursor cursor = db.rawQuery("select latitude,longitude from "+Table_Name_Location,null); if(cursor.getCount() > 0){ while (cursor.moveToNext()) { Double latitude = cursor.getDouble

How to add multiple marker and overlay in v2 google map?

99封情书 提交于 2019-12-24 02:42:46
问题 I am using google map v2 api. In that i need to show multiple markers and multiple overlays. I don't have any idea about this. If anybody knows answer kindly share your thoughts. Thank you. For single marker and overlay i use this code hamburg = map.addMarker(new MarkerOptions().position(HAMBURG) .title("Hamburg") .snippet("Kiel is cool") .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE))); 回答1: Use like this LatLng one = new LatLng(2.40744, 77.014702);//Latitude