google-maps-markers

How to center text on android IconGenerator

▼魔方 西西 提交于 2019-12-19 16:06:19
问题 I'm developing an app using lots of markers placed on the map, and I'm using a custom ClusterRenderer to show them. Problem is that I can't draw the cluster's size in the center of the custom marker icon, please see attached screenshot. I've tried adding contentPadding to the IconGenerator, but still no luck, because of the changing number of digits shown. Could you please help me center the text on the generated icon? Code: IconGenerator clusterIconGenerator = new IconGenerator(context);

How to center text on android IconGenerator

 ̄綄美尐妖づ 提交于 2019-12-19 16:04:14
问题 I'm developing an app using lots of markers placed on the map, and I'm using a custom ClusterRenderer to show them. Problem is that I can't draw the cluster's size in the center of the custom marker icon, please see attached screenshot. I've tried adding contentPadding to the IconGenerator, but still no luck, because of the changing number of digits shown. Could you please help me center the text on the generated icon? Code: IconGenerator clusterIconGenerator = new IconGenerator(context);

GoogleMaps MapView crashes onTap in Android?

二次信任 提交于 2019-12-19 08:06:01
问题 I'm currently writing an app displaying a MapView showing a google map. i used the "hello map view" tutorial from http://developer.android.com/resources/tutorials/views/hello-mapview.html and this works so far: the map is displayed, centered and zoomed correctly, even the OverlayItems i added are displayed correctly. But when i click on one of those overlay items i added, the application crashes with a null pointer exception: 07-23 16:24:48.167: ERROR/AndroidRuntime(2530): java.lang

GoogleMaps MapView crashes onTap in Android?

眉间皱痕 提交于 2019-12-19 08:05:19
问题 I'm currently writing an app displaying a MapView showing a google map. i used the "hello map view" tutorial from http://developer.android.com/resources/tutorials/views/hello-mapview.html and this works so far: the map is displayed, centered and zoomed correctly, even the OverlayItems i added are displayed correctly. But when i click on one of those overlay items i added, the application crashes with a null pointer exception: 07-23 16:24:48.167: ERROR/AndroidRuntime(2530): java.lang

Realtime locating of the android device from another device

人盡茶涼 提交于 2019-12-19 04:01:37
问题 I have an app where i wanted to locate the exact location of the device. Like if you take taxi, i wanted to locate where exactly the taxi. Taxi driver will be using android device. So from that device i wanted to locate the cab location for other users who wants to see where the cab is. I have tried uploading current location of cab driver to server as cab moves for few meters by using requestLocationUpdates(String provider, long minTime, float minDistance, LocationListener listener) and I

How can I make google map marker grow bigger when the mouseover it?

谁说我不能喝 提交于 2019-12-19 03:13:25
问题 In Google Map API v3, as the title, I only saw 2 types of animation in google map api, but I saw in some places the map marker animate like grow big when mouse over it? How to implement this? 回答1: Use marker's mouseover event handler and setIcon() method. You can use dynamic icons from google chart api for this purpose, and change the chld attribute to make the icon grow: http://chart.googleapis.com/chart?chst=d_map_spin&chld=0.5|0|FF8800|15|_| http://chart.googleapis.com/chart?chst=d_map

Toggle hide/show Google map markers

流过昼夜 提交于 2019-12-18 18:08:40
问题 I have a custom Google map with markers of artist locations. I want to make 8 different categories of markers. I read about having to make arrays of markers and assigning a category, but I honestly don't know where to start.. I think this question comes close to what I want: Toggle on/off Google map markers by category. Tried to get that working, but to no avail, I just have too little knowledge. Here's my HTML. I have a map and a few checkboxes ready, the checkboxes aren't used yet. <body

how to draw text in default marker of google map v2

别等时光非礼了梦想. 提交于 2019-12-18 15:51:06
问题 I want to draw text in default marker of Google map v2. I have done this by taking my own image from drawable but how can i change it in default marker. my code is marker.icon(BitmapDescriptorFactory .fromBitmap(drawTextToBitmap(getApplicationContext(), R.drawable.images,"5"))); and drawTextToBitmap methods is. public static Bitmap drawTextToBitmap(Context gContext,int gResId,String gText) { Resources resources = gContext.getResources(); float scale = resources.getDisplayMetrics().density;

how to draw text in default marker of google map v2

一笑奈何 提交于 2019-12-18 15:49:57
问题 I want to draw text in default marker of Google map v2. I have done this by taking my own image from drawable but how can i change it in default marker. my code is marker.icon(BitmapDescriptorFactory .fromBitmap(drawTextToBitmap(getApplicationContext(), R.drawable.images,"5"))); and drawTextToBitmap methods is. public static Bitmap drawTextToBitmap(Context gContext,int gResId,String gText) { Resources resources = gContext.getResources(); float scale = resources.getDisplayMetrics().density;

Google Maps API (static) - custom marker not showing up

混江龙づ霸主 提交于 2019-12-18 14:54:05
问题 URL: http://maps.google.com/maps/api/staticmap?center=40.714728,-73.998672&markers=icon:http://tinyurl.com/2ftvtt6&zoom=12&size=400x400&sensor=false I have no clue what I'm doing wrong here. Developer Guide: API - Custom Icons ...markers=icon: url [stop]&zoom=... 回答1: It seems that you defined marker style, but didn't define marker location. It should be: http://maps.google.com/maps/api/staticmap?center=40.714728,-73.998672&markers=icon:http://tinyurl.com/2ftvtt6|40.714728,-73.998672&zoom=12