google-maps-markers

Google Maps API v2 Android add shape drawable as marker

Deadly 提交于 2019-11-27 13:31:46
问题 I've been trying to add a shape drawable as the marker icon for a marker I want to add on the map. shape looks like this (res/drawable/blue_circle.xml): <?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval" > <size android:width="15dp" android:height="15dp" /> <solid android:color="@color/Blue" /> </shape> and I try to add the marker like this: markerOptions.icon(BitmapDescriptorFactory.fromResource(R.drawable.blue_circle

Google android maps api v2 Show Marker Title Always

耗尽温柔 提交于 2019-11-27 13:27:58
问题 I have a google maps v2 in my android application and some markers on it. When user click one of these markers, a title popup comes. How can I show these titles always without user click? 回答1: Just call Marker.showInfoWindow(); . See https://developers.google.com/maps/documentation/android/marker#info_windows and https://developers.google.com/maps/documentation/android/reference/com/google/android/gms/maps/model/Marker#showInfoWindow() 回答2: Something like that: googleMap.addMarker(new

Google Maps Multiple markers with the exact same location Not working

[亡魂溺海] 提交于 2019-11-27 12:57:41
I want to check to see if any of the existing markers match the latlng of the new marker and if so then merge the info window/tooltip text. This is what I tried to do: <!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title></title> <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script> <script type="text/javascript" src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclustererplus/src/markerclusterer.js"></script> <script type="text/javascript"> var map; var mc;//marker clusterer var mcOptions = {gridSize: 10, maxZoom: 8}; var

Map Markers with text in Google Maps Android API v2

孤街浪徒 提交于 2019-11-27 12:54:44
I have came up with this post but it is for the deprecated Google Maps API http://tech.truliablog.com/2012/02/23/custom-map-markers-for-android-google-maps/ In the new API, I could not find an easy way to do this. In fact, I could not do it at all. Basicly I want to have TextViews as a Marker on the map with 9Patch drawable as a background of the text. Trulia is still doing it with the new API v2 in their current app. You can check it here How can I do this? MaciejGórski Chris Broadfoot created a utility library that does exactly that. The library is available here: https://github.com

Showing many markers in Google Maps

夙愿已清 提交于 2019-11-27 11:40:42
问题 I have this map and want to display a whole bunch of markers. But I need to find a way of showing this in an orderly fashion, and well... something cool would be nice. Good thing is that Google Maps has many cool features. But I am new to its use and most likely not aware of cool options to organize markers and content. I just stumbled upon one neat way, which I will post below. But in order to learn about solutions that others have found / created, my question is: what are cool ways of

How do I remove default markers?

北慕城南 提交于 2019-11-27 11:32:33
I'm using Google Map API V3 and I noticed there are a lot of markers which are here even though I don't need them. For examples, some schools or other places with InfoWindows appearing when clicking on them. Is there any way I can remove them or is it just not possible? The only markers that should show up on the map are those you add yourself. Care to share your code or a page where we can see this happening? Update: ok, these aren't really 'markers' in the normal sense of the word, they're just points of interest, which happen to behave like markers in that you can click on them and see

How to move a marker in Google Maps API

99封情书 提交于 2019-11-27 11:29:49
问题 I'm using the Google Maps API V3 and I'm trying to make a marker move across the screen. Here's what I have: <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no" /> <style type="text/css"> html { height: 100% } body { height: 100%; margin: 0; padding: 0 } #map_canvas { height: 100% } </style> <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"> </script> <script type="text/javascript"> function initialize() {

Android maps utils cluster icon color

牧云@^-^@ 提交于 2019-11-27 11:18:06
问题 Is there any method to change the background color of the cluster item? (the one that displays the count of the markers, like 100+, 200+ ...). I tried to look into the source code of the ClusterManager but could not find any option to change the color, but maybe someone here knows how to do that. I basically want to "materialify" those colors a bit. 回答1: I was able to get a rough implementation working by using this demo from the library samples as a guide. I used the lens icon from the

How can i show label/title for marker permanently in Google Maps V3

て烟熏妆下的殇ゞ 提交于 2019-11-27 10:54:59
问题 I want to display Markers on Google map with title displayed under them as shown in picture Now this i read was possible in v2 using ELabel but is deprecated in v3. Is there any possible way to show some text under icons of markers in Google Maps V3? 回答1: Since at least October 2016, the official API provides a way to add permanently visible labels that are longer than one letter. See this reply by a Google project member. var m = new google.maps.Marker({ position: new google.maps.LatLng(lat,

How to get all visible markers on current zoom level

倾然丶 夕夏残阳落幕 提交于 2019-11-27 10:32:16
Here are some points: I have some markers on the map and records associated with it on the right panel besides the map. They are connected via numeric id, which is stored as a property of marker. All the markers are stored in an array. When the user zooms in the map, records, associated to only visible markers should be shown on the right panel. So, how to get the list of all visible markers on the current zoom level? I've searched over the internet and didn't find something useful. Some kind of what I'm trying to achieve could be found here Use GMap2.getBounds() to find the bounding box. The