google-maps-markers

Implement falling pin animation on google maps android

爱⌒轻易说出口 提交于 2019-11-30 14:03:33
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... 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 Interpolator interpolator = new BounceInterpolator(); handler.post(new Runnable() { @Override public void run(

how to draw text in default marker of google map v2

廉价感情. 提交于 2019-11-30 13:41:21
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; Bitmap bitmap = BitmapFactory.decodeResource(resources, gResId); android.graphics.Bitmap.Config

Refreshing makers (ClusterItems) in Google Maps v2 for Android

我怕爱的太早我们不能终老 提交于 2019-11-30 12:38:18
I'm using Google Maps Android API Utility Library and I'm downloading certain images from internet that I want to use as markers. The way I'm doing it is like in the following snippet: class MarkerItemClusterRenderer extends DefaultClusterRenderer<MarkerItem> { ... @Override protected void onBeforeClusterItemRendered(MarkerItem item, final MarkerOptions markerOptions) { super.onBeforeClusterItemRendered(item, markerOptions); mImageLoader.get(item.getImageUrl(), new ImageListener() { @Override public void onErrorResponse(VolleyError error) { Log.i("XXX", error.toString()); } @Override public

Google Maps API - Marker ToolTip

情到浓时终转凉″ 提交于 2019-11-30 12:26:00
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.LatLng(40, -20), zoom: 3, mapTypeId: google.maps.MapTypeId.ROADMAP, styles: [{"featureType":"landscape",

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

断了今生、忘了曾经 提交于 2019-11-30 11:45:09
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=... 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&size=400x400&sensor=false I had some problems with the markers, too. Maybe these hints help other guys

How to add CSS-Class to a GoogleMaps marker?

旧城冷巷雨未停 提交于 2019-11-30 11:09:50
I want to animate (fadein, fadeout) a marker in my GoogleMaps application (Web). How can i assign any css class to a marker? Or how can i access the specific marker? Do they have selectors like :after or something? If not, whats the easiest way of applying animations to them? The DOMNode that contains the image used for the marker isn't available via the API. Furthermore, by default the markers will not be single DOMNodes, they will be drawn via canvas. But the Marker-Image may be accessible via CSS when you use a unique icon-URL for each Marker. Sample(using jQuery): <style type="text/css">

Getting Lat/Lng from Google marker

筅森魡賤 提交于 2019-11-30 10:10:03
问题 I made a Google Maps map with a draggable marker. When the user drags the marker, I need to know the new latitude and longitude, but I don't understand what is the best approach to doing that. How can I retrieve the new coordinates? 回答1: Here is the JSFiddle Demo. In Google Maps API V3 it's pretty simple to track the lat and lng of a draggable marker. Let's start with the following HTML and CSS as our base. <div id='map_canvas'></div> <div id="current">Nothing yet...</div> #map_canvas{ width:

Google api v3 show nearby markers on customer road

馋奶兔 提交于 2019-11-30 09:07:09
问题 How can I show only the markers (they are predefined, but hidden for the whole map), which are nearby (may by radius of 10mile or 20mile) to the road I choose using Google api v3 for example I use Directions service HTML: <div id="panel"> <b>start: </b> <input type="text" id="start" name="start" maxlength="30" onchange="calcRoute();" /> <b>end: </b> <input type="text" id="end" name="end" maxlength="30" onchange="calcRoute();" /> </div> <div id="map"></div> JavaScript: var directionsDisplay;

Add GIF image to marker of Google Map Api v2

会有一股神秘感。 提交于 2019-11-30 09:02:26
问题 When I add GIF Image to marker of google map V2 the image is shown but it stops its movement. Why? And how can I solve this issue and make the image do its movement? Hope anyone can help me. Thanks in advance. 回答1: Marker Icon in google maps android api v2 is a static image and you cannot change the icon once you have created the marker. So if you are trying to include any animation using GIF images, it will not be supported and only a single image from the GIF will be shown as the icon. An

Loading Markers from XML file to Google Map API

耗尽温柔 提交于 2019-11-30 08:53:55
问题 my goal is to be able to load markers from an sql database and display them on a googlemap. but im having a hard time just trying to read markers from an xml file. Here is my HTML file <!DOCTYPE html> <html> <head> <title>Simple Map</title> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <style> html, body, #map-canvas { height: 100%; margin: 0px; padding: 0px } </style> <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false