google-maps-markers

How can I create a speech-bubble border for a Google Marker Custom Icon using Picasso?

送分小仙女□ 提交于 2019-11-26 23:17:09
问题 How can I use Picasso and Google Marker Custom Icon to achieve this feature? I know how to use Picasso for the image, but I don't know how to add that "marker icon" on the bottom and the borders. Picasso.with(mContext) .load(url) .resize(250, 250) .centerInside() .into(new Target() { @Override public void onBitmapLoaded(Bitmap bitmap, Picasso.LoadedFrom from) { Marker driver_marker = mMap.addMarker(new MarkerOptions() .position(new LatLng(Double.parseDouble(lat), Double.parseDouble(lng)))

Google maps auto-fit (auto center & autozoom) doesn't work

做~自己de王妃 提交于 2019-11-26 22:58:56
问题 I have a problem with a map on which I've used the fitBounds map methods, which should give the proper zoom and center the map giving it a latlon array. here's the code: <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"> </script> <div id="map_canvas"> <script type="text/javascript"> var map; var bounds = new google.maps.LatLngBounds(null); function initialize() { var mapOptions = { mapTypeId: google.maps.MapTypeId.ROADMAP }; map = new google.maps.Map

Why am i not getting exact Longitude when i click on a marker?

荒凉一梦 提交于 2019-11-26 22:26:47
问题 In my web app i am trying to fetch longitude and latitude of a marker when i click on it. Following is the code which is setting a marker and then try to get the same marker's latitude and longitude when i click on it: var myLatlng = new google.maps.LatLng(55.68322317670628, 13.177157360327598); var marker_obj = new google.maps.Marker({ clickable: true, position: myLatlng, map: dashboard_map, zIndex: i }); marker_obj.setIcon('marker.png'); google.maps.event.addListener(marker_obj, "click",

How to get the formatted address from a dragged marker in Google Version Maps

守給你的承諾、 提交于 2019-11-26 22:23:39
I have made a Google map that lets you input an address into a text field. It then navigates you to the address that you entered into the text field and leaves a draggable marker that when dragged shows you the Lat and Long and The Geolocated Address. I instead of displaying the above address, would like when you drag the marker to display in the bottom corner the Address of the Marker and the not the inputted address from the text field. I have tried a number of methods to no avail. lonlat[0].formatted_address was amongst some of the things i tried. I got my reference from Google My code is

Google Maps V3: Updating Markers Periodically

社会主义新天地 提交于 2019-11-26 21:31:41
问题 I've followed the PHP/MYSQL tutorial on Google Maps found here . I'd like the markers to be updated from the database every 5 seconds or so. It's my understanding I need to use Ajax to periodicity update the markers, but I'm struggling to understand where to add the function and where to use setTimeout() etc All the other examples I've found don't really explain what's going on, some helpful guidance would be terrific! This is my code (Same as Google example with some var changes): function

Google Maps V2 - Android - Get a list of Markers

偶尔善良 提交于 2019-11-26 20:49:33
问题 I'm trying to get a list Markers(using GMaps V2 for Android) similar to the getOverlays() method I used in GMaps V1.1 for Android here: private MapView mapView; mapView.getOverlays().add(overlay); How can I do something similar to what I did above but with Markers? Any help would be appreciated. 回答1: How can I do something similar to what I did above but with Markers? When you call addMarker() , save the resulting Marker object in a collection of your choice (e.g., ArrayList<Marker> ). 回答2:

Confine dragging of Google Maps V3 Marker to Polyline

百般思念 提交于 2019-11-26 20:14:47
问题 I've created a Google Map and have drawn a polyline on it. I've then added a marker to the start of the polyine (same coords as the starting coords of the polyline). What I'd like to be able to do, is grab and drag the marker but have it "stick" to the polyline such that you can only drag it along the polyline and not away or to the side of it. Is it possible to confine a draggable marker to a path in GM V3? If not, can anyone think how this might be done? There's the possibility of snapping

Custom marker in google maps in android with vector asset icon

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-26 19:14:49
问题 How can we achieve a map marker icon with vector asset file, the way google shows it like this, programatically: Update: map.addMarker(new MarkerOptions() .position(latLng) .icon(BitmapDescriptorFactory.fromResource(R.drawable.your_vector_asset)) .title(title); this doesnot work when dealing with vector assets. The main reason to ask the question. The error with the above code: java.lang.IllegalArgumentException: Failed to decode image. The provided image must be a Bitmap. 回答1: I was looking

Using setZoom() after using fitBounds() with Google Maps API V3

大城市里の小女人 提交于 2019-11-26 18:58:16
问题 I'm using fitBounds() to set the zoom level on my map too include all the markers currently displayed. However, when I have only one marker visible, the zoom level is 100% (... which zoom level 20 I think...). However, I don't want it to be that far zoomed in so the user can adjust the position of the marker without having to zoom out. I have the following code: var marker = this.map.createMarker(view.latlng, this.markerNumber); this.map.bounds.extend(view.latlng); this.map.map.setCenter(this

Efficient Map Overlays in Android Google Map

北城以北 提交于 2019-11-26 18:49:50
问题 I want to do the following and am kind of stuck on these for a few days: I was trying to draw polylines (I have encoded polylines, but have managed to decode those) that move when I move the map . The only solution that I found was for Geopoints to be transformed into screen coordinates... which won't move if I move the map. I used HelloItemizedOverlay to add about 150 markers and it gets very very slow . Any idea what to do? I was thinking about threads (handler). I was looking for some sort