google-maps-markers

Android google maps marker disable navigation option

六眼飞鱼酱① 提交于 2019-11-29 20:33:07
Im creating an app where users need to walk to a point on a map. But they need to find a route to the point by them selves. Ive created a map with markers but by default if a user clicks on the marker a "start navigation" and "view in google maps" option is shown. Is it possible to disable these options ? The options that are shown on marker click This thing is called Map Toolbar . You can disable it by calling UiSettings.setMapToolbarEnabled(false) : GoogleMap map; ....... //init map map.getUiSettings().setMapToolbarEnabled(false); You can also define setMapToolbarEnabled() from the XML using

Google maps v3 draggable marker

夙愿已清 提交于 2019-11-29 19:51:20
I'm new in google maps, and I'm trying to learn it. marker = new google.maps.Marker( { map:map, draggable:true, animation: google.maps.Animation.DROP, position: results[0].geometry.location }); This is my marker position, when I'm initialising the marker position than I know the place name (for example: XY street, New York,), but because of the draggable option it is changing, and my question is how can I get the new place name, what event handler do I need. OHLÁLÁ Finally I found the answer: marker = new google.maps.Marker( { map:map, draggable:true, animation: google.maps.Animation.DROP,

Google Map API V3: How to add Custom data to markers

女生的网名这么多〃 提交于 2019-11-29 19:24:48
Is there a way I can add some custom information to my markers for later use. There are ways to have an info-window and a title, but what If I want to associate the marker with other information. I have other stuff being displayed on the page that depends on the markers so when a marker is click the content on the page has to change depending upon which marker was clicked.I would like store and retrieve the custom data once a marker is lets say clicked etc. Thanks Tina CG Hoehr As a Google Marker is a JavaScript object, you may add custom information in the form key: value , where key is a

Implement falling pin animation on google maps android

笑着哭i 提交于 2019-11-29 19:24:20
问题 I am implementing google maps in my android app. In this process I would like to add falling pin animation. I have searched every were but could not find the exact method to do this. Can any one help me out how to do will be a great help... 回答1: Add marker to desired position in map then call this function with that marker private void dropPinEffect(final Marker marker) { final Handler handler = new Handler(); final long start = SystemClock.uptimeMillis(); final long duration = 1500; final

Lat, Lng doesn't update when I drag marker

房东的猫 提交于 2019-11-29 17:57:36
Actually, I have a map with a dragable marker. That works fine, but I can't update lat and lng of the dragged marker. I've tried it with a few different Event listeners, but non of them work. Now I'd like to know if somebody can help me? My Code (I removed the scripts that you don't get confused): <script> function initMap() { var map = new google.maps.Map(document.getElementById('map'), { zoom: 7, center: { lat: 47.532446, lng: 14.623283 } }); var geocoder = new google.maps.Geocoder(); document.getElementById('geolocate').addEventListener('click', function () { geocodeAddress(geocoder, map);

Google Maps API - Marker ToolTip

拥有回忆 提交于 2019-11-29 17:57:06
问题 I've got a little bit of a problem right now with my google maps marker titles not showing. This is my first map, I'm not too sure what I'm doing wrong. Everything is working fine, and the marker shows up, except when you click/hover over the marker, the tooltip or title doesn't show up, when it should. Any help is great! <script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script> <script> function initialize() { // set mapOptions var mapOptions = { center: new google.maps

How to select and deselect a marker in google maps in android?

♀尐吖头ヾ 提交于 2019-11-29 17:04:23
I have a list of places which are marked in google maps using Markers . I want to select a Marker so that it will highlight with a different color. I have set it using marker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_BLUE)) . When I click on the same marker or any other marker I want remove the selection made in the first marker and set it back to the default color. map.setOnMarkerClickListener(new OnMarkerClickListener() { @Override public boolean onMarkerClick(Marker marker) { aa= marker.getPosition().latitude; bb=marker.getPosition().longitude; marker.setIcon

infoWindow's image not showing on first click, but it works on second click

旧巷老猫 提交于 2019-11-29 16:50:14
My android using the Google map android API,InfoWindow's image not showing on first click, but it works on second click I customize the infoWindow using void setMapInfoWindow(){ mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() { @Override public View getInfoWindow(Marker arg0) { return null; } @Override public View getInfoContents(Marker arg0) { View v = getLayoutInflater().inflate(R.layout.windowlayout, null); final ImageView img = (ImageView)v.findViewById(R.id.imageView3); //image Picasso.with(context).load("http://imgurl").resize(140, } }); } Here is my marker set up process

How do I fade out a circle in a Google Map, x seconds after I've added it to the map?

∥☆過路亽.° 提交于 2019-11-29 16:26:50
What I basically had in mind is what Google did in this example Every second I want to add circles at certain coordinates and then slowly fade them out. I already managed to add circles to the map: var citymap = {}; citymap['chicago'] = { center: new google.maps.LatLng(41.878113, -87.629798), population: 100 }; citymap['amsterdam'] = { center: new google.maps.LatLng(52.878113, 5.629798), population: 40 }; citymap['paris'] = { center: new google.maps.LatLng(48.9021449, 2.4699208), population: 100 }; citymap['moscow'] = { center: new google.maps.LatLng(56.021369, 37.9650909), population: 100 };

Making a marker carry custom info to be used when clicked (Android, Google Maps v2)

感情迁移 提交于 2019-11-29 16:25:04
I have the following code: public class AlertViewOnMap extends Activity { //declarations ArrayList<String> dateCreatedAtList = new ArrayList<String>(); TextView busNumberTextView; TextView descriptionTextView; TextView alertTimeTextView; DateFormat dateFormat = new SimpleDateFormat("HH:mm"); protected void onCreate(Bundle savedInstanceState) { // TODO Auto-generated method stub super.onCreate(savedInstanceState); this.setContentView(com.fourbox.bocterapp.R.layout.details_design); busNumberTextView = (TextView) findViewById(R.id.textViewAlertBusNumber); descriptionTextView = (TextView)