google-maps-markers

Android : how to reload custom markers once the image is downloaded via Picasso?

人走茶凉 提交于 2019-11-29 07:56:56
I'm trying to load dynamically users avatars as custom markers. I based my code on the google maps utils demo, but somehow it doesn't work, it loads only one image and all the others are empty: Here is my code: public class MapsActivity extends FragmentActivity implements ClusterManager.OnClusterItemClickListener<ModelUser>, ClusterManager.OnClusterItemInfoWindowClickListener<ModelUser> { private ClusterManager<ModelUser> mClusterManager; private GoogleMap mMap; // Might be null if Google Play services APK is not available. private QueryAPI query = new QueryAPI(); private List<ModelUser> users

How to animate google map v2 marker on the polyline path?

时光总嘲笑我的痴心妄想 提交于 2019-11-29 07:20:54
I already build an app using google maps V2 and put 2 markers on the map. First marker is to get user current location, and the second marker is user destination location. And then I add decodePoly method to draw line between those markers. I also add method to give user information about durations,start address and destination address using alert dialog. So, when I click the second marker, i want to animate that marker to "move" to first marker. But my problem is, the second marker is not moving on the polyline path. you can see at image below: This is MapActivity.java: @Override public

Empty InfoWindow when Marker is clicked

别来无恙 提交于 2019-11-29 06:42:26
This is my code to add new Markers to my GoogleMap: MarkerOptions m = new MarkerOptions(); m.title(title); m.snippet(snippet); m.position(location); mMap.addMarker(m); mMap.setOnInfoWindowClickListener(new OnInfoWindowClickListener() { @Override public void onInfoWindowClick(Marker marker) { Toast.makeText(DemoActivity.this, "WindowClicked: "+ marker.getTitle() + ":" + marker.getSnippet(), Toast.LENGTH_SHORT).show(); } }); Now This works just fine when my title and snippet are in English. The infoWindow and the Toast works as expected. However, as in my case, title and snippet are in Arabic,

Google Maps API: markerwithlabel.js - Uncaught ReferenceError: google is not defined

匆匆过客 提交于 2019-11-29 06:26:32
I have read the docs and examples, but I it seems I cannot solve the initialization error ("Uncaught ReferenceError: google is not defined" + Uncaught ReferenceError: homeLatLng is not defined) when trying to include markerwithlabel.js file and it's reminds me to the "you cannot load something before the map is done" prob. What can I do? What was tried: <head> <script async defer src="https://maps.googleapis.com/maps/api/js?key=mykey&callback=initMap"></script> <script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerwithlabel/src/markerwithlabel

Android Google Maps v2 - Add object to marker

大城市里の小女人 提交于 2019-11-29 05:34:00
问题 How can we add an object to a marker in the new Google Maps Android API v2 ? So if we click on the InfoWindow , we can do something with the object? public void addSpotOnMap(Spot spot) { getMap().addMarker(new MarkerOptions() .position(new LatLng(spot.getParseGeoPoint().getLatitude(), spot.getParseGeoPoint().getLongitude())) .title(spot.getName()) .snippet(spot.getCategory()) .draggable(false)); } This sets the location, title and snippet for the object. But I want to be able to go to another

Android: Drag map while keeping marker at the center

China☆狼群 提交于 2019-11-29 04:08:56
I am currently getting Current Location of device (lat,lng) in MapActivity. Now , I want to let the user move the map, while keeping the marker at the center. This means that whenever the map is moved, current location will be updated. (Right?) I followed this How to move a map under a marker? and How to attach a flexible marker on map something like Uber and Lyft? but couldn't get my concept clear. Activity_map.xml (Here I have added ImageView) <RelativeLayout android:layout_width="match_parent" android:layout_height="match_parent" xmlns:android="http://schemas.android.com/apk/res/android">

GIF type animation for marker in google map api ANDROID

你说的曾经没有我的故事 提交于 2019-11-29 03:59:42
I want to achieve a marker animation such as GIF animation. I got two images which should be blinking simultaneously. I found nothing which can acheive this in android. I am trying to do is , creating a handler which run every 1 second , and I am trying to set icon for marker. But it doesnt work. Please guide me in right direction. my code as of now is as follows. Handler handler = new Handler(); Boolean marker_color_bool = true; //adding marker and sending the marker instance to marker_animation() method where handler is called. MarkerOptions marker = new MarkerOptions() .title(delivery

Animate the rotation of the Marker in google map v2

。_饼干妹妹 提交于 2019-11-29 02:37:56
i am using google maps v2. i have a marker on map, this marker changes rotation every while. I want to animate the rotation of my maker to rotate smoothly. Can anyone help please That's mine implementation of smooth marker movement with maker image rotation (when it's set to FLAT [important]). The marker is moved to the requested location smoothly plus it's rotated to the requested degree with a proper direction. For example, when moving from 5deg to 355deg it moves anticlockwise, when 355deg to 5deg it moves clockwise. public void animateMarker(final Location location) { if (myMarkerLOC !=

Google Maps API v3 - Markers All Share The Same InfoWindow

雨燕双飞 提交于 2019-11-29 01:57:02
I've been digging around everywhere and I can't seem to figure this out. It's driving me crazy! I'm a newbie to javascript in general, so I can't quite put a finger on the translation that would fix my issue. I noticed that a lot of people have this problem, but they all seem to use more advanced(or just confusing) code than I. Anyway, here goes! I've been having the problem where all of my markers share the same content. function initialize() { var myOptions = { center: new google.maps.LatLng(34.151271, -118.449537), zoom: 9, mapTypeId: google.maps.MapTypeId.ROADMAP, mapTypeControl: false,

Google Maps Api v3 - how to remove cluster icons?

我们两清 提交于 2019-11-29 01:16:48
how can i remove all cluster icons (cluster markers) from map? tryed with advices like: Google Maps API v3: How to remove all markers? ... but it did not worked. can you help me how to achieve that? thank you in advance! UPDATE (2010-11-23) markers are stored in array with var markersClust = Array(); ... and are added with (combination with php): markersClust.push(marker_<?php echo $team["Team"]["id"]; ?>); var markerClusterer = new MarkerClusterer(MyMap.map, markersClust, clusterOptions); and it works fine. but, i can not remove them from a map, and it drives me... tryed to remove markers