google-maps-markers

Google Maps API v3: Passing an Image for symbolPath rather than a inbuilt symbol

房东的猫 提交于 2019-12-11 01:11:18
问题 I just got to know about the Symbol Animation offered by Google API. Every thing is working fine in my code but I just want to know if I can pass a Image instead of a symbol in the below code. var lineSymbol = { path: google.maps.SymbolPath.CIRCLE, scale: 8, strokeColor: '#393' }; If yes, How can I do that? I've tried passing Image paths and Image objects. NOthing worked.. Please help me out. 回答1: This is a fairly old post but I ran into it while trying to solve this problem, hopefully the

Custom ImageViews not populating when using Picasso for Custom Marker InfoWindows in Maps

馋奶兔 提交于 2019-12-11 01:04:27
问题 I'm trying to use Picasso now for my Custom Marker's Images. I was previously using a Bitmap and setting individual Marker's InfoWindow Images with those Bitmaps with the help of a HashMap. But I like how Picasso will cache the Images for me and helps scale them etc. public class HomeActivity extends FragmentActivity implements OnMapReadyCallback, LocationListener, GoogleMap.OnMapLongClickListener, DetailsDialog.DialogListener, PictureDialog.FinishedMemorySaving { private GoogleMap mMap;

Android Google Maps V2 Title or Snippets Strings From HTML

人盡茶涼 提交于 2019-12-10 22:17:53
问题 Hi i'm working on a google maps v2 project on Android and i need to write a bit HTML code (like a page) and implement it to google marker's title or snippet. I know there are ways like : http://wptrafficanalyzer.in/blog/customizing-infowindow-contents-in-google-map-android-api-v2-using-infowindowadapter/ here but i need to write HTML codes because after this work i will use these codes again in another mobile project. Any help would be appreciated, thanks 回答1: According to this page, you are

Changing a Marker's text in Android GoogleMaps

假装没事ソ 提交于 2019-12-10 20:36:26
问题 Is it possible to change the text inside a GoogleMap Marker after it's already been set? I'm using MarkerOptions to set the title and snippet originally like this: SupportMapFragment theMapFragment = (SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.map); GoogleMap theMap = theMapFragment.getMap(); MarkerOptions theMarker = new MarkerOptions(); theMarker.position(theLatLng); theMarker.title("My title"); theMarker.snippet("This is my snippet"); theMarker.visible(true);

How to display a Google Maps Android Marker on top of the others?

筅森魡賤 提交于 2019-12-10 20:20:59
问题 I have multiple markers in my application, sometimes some of them are at the same position. I want some of those markers to be always displayed in front of the others. How should I proceed ? Thank you in advance. 回答1: I think this is the wrong approach. Even if you put one marker in front of the other there is still a possibility that the user will click the marker that is behind. I would instead of doing that, on adding a new Marker to the map, check if there is already a Marker at the newly

How to show all Info window in iOS Google maps without tapping on Marker?

馋奶兔 提交于 2019-12-10 19:05:11
问题 I'm trying to create markers without tapping. But i cant display all infoWindows. It only show one infowindow on last marker. Here is my code: - (void)viewDidLoad { [super viewDidLoad]; NSMutableArray *markersArray = [[NSMutableArray alloc] init]; for(int i=0; i<10; i++){ GMSMarker *marker = [[GMSMarker alloc] init]; marker.position = CLLocationCoordinate2DMake(latitude, longitude); marker.appearAnimation=YES; marker.opacity = 0.0; mapView.selectedMarker = marker; marker.map = mapView;

Check for existing markers before adding another

∥☆過路亽.° 提交于 2019-12-10 18:01:11
问题 Google Maps API v2 Whilst I was waiting for another app to be finalised I was creating another out of interest that would only enable 1 marker to be added to a map at a time (I love maps I do). I currently have this code which will clear the map if a marker already exists and then add another one. But what I wanted was for it to show a message telling to user to clear the map before it will allow another marker to be added. @Override public void onMapClick(LatLng position){ if (position !=

Marker Clusterer Plus change icon on hover

可紊 提交于 2019-12-10 17:14:34
问题 How can I dynamically change the Icon used for a specific Cluster in Marker Clusterer Plus for Google Maps V3? The markers do not seem to expose any methods at all to modify them. I need to do something like this (or equivalent). google.maps.event.addListener(markerCluster, "mouseover", function (cluster) { cluster.setIcon(hoverIcon); }); google.maps.event.addListener(markerCluster, "mouseout", function (cluster) { cluster.setIcon(normalIcon); }); 回答1: There is a reference to the div-element

API V3 Update marker position dynamically

旧城冷巷雨未停 提交于 2019-12-10 16:49:06
问题 I have this code that reads data from an xml file and puts the marker on the map. What i want to do is to read the xml file automatically every 5 seconds, and so update the position of the marker. I tried adding setInterval to the function, but the problem is that the previous marker is not deleted. Just add another marker to the map and so on. (I dont want the entire map updated, just the marker) <script type="text/javascript"> var map = null; function createMarker(latlng, html) { var

Is it possible in Android Google maps to change default location from South Africa to Australia?

北城以北 提交于 2019-12-10 14:40:39
问题 I want to confirm one thing in Google maps that is why Google maps always showing South Africa as default location ... Can't we change Australia as Default one . If GPRS enabled I can trace the current location if not i want to show Sidney in Australia . Is it possible ??? 回答1: Google Maps will show the user's current location if you ask for it. You can also manually set the "default" location by moving the map to give a particular location. CameraUpdate point = CameraUpdateFactory.newLatLng