google-maps-markers

Android: Drag map while keeping marker at the center

笑着哭i 提交于 2019-12-18 04:09:17
问题 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

GIF type animation for marker in google map api ANDROID

主宰稳场 提交于 2019-12-18 04:08:08
问题 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

GIF type animation for marker in google map api ANDROID

筅森魡賤 提交于 2019-12-18 04:08:01
问题 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

How to display custom places in Google Maps API search results?

这一生的挚爱 提交于 2019-12-18 02:49:13
问题 So there is this basic example of a google map with a searchbox: https://developers.google.com/maps/documentation/javascript/examples/places-searchbox I want to accomplish something very simple. I'd like to just hardcode some locations (may be some simple array/object with their latitudes and longitudes) and then when you search for place, for example, "Washington", then those locations are displayed (with marker) if some of them are indeed inside Washington. If I search for "Africa" and some

Picasso image loading issue in GoogleMap.InfoWindowAdapter

末鹿安然 提交于 2019-12-18 02:48:44
问题 I am using Google Maps Api and want to show an image inside InfoWindow when clicking of a Marker. I implemented it but there is a problem about Picasso. When I click a marker, infoWindow is shown up and imageView shows placeholder image. If I click same marker one more time, Picasso loads the image succesfully. I have to click twice, it is so weird. Screenshots for better understanding: First click on the marker: When I click again: There is my codes below: InfoWindowAdapter (Picasso loading

ios google maps plotting multiple markers issues(info window and marker repeating)

╄→尐↘猪︶ㄣ 提交于 2019-12-17 21:09:27
问题 First i create a Map with user location -(void)initGogleMapView{ GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:currentLocation.coordinate.latitude longitude:currentLocation.coordinate.longitude zoom:1]; mapView = [GMSMapView mapWithFrame:CGRectMake(0, 64, self.view.frame.size.width, self.view.frame.size.height-64) camera:camera]; [self.view addSubview:mapView]; GMSMarker *marker = [[GMSMarker alloc] init]; marker.position = camera.target; marker.appearAnimation =

ios google maps plotting multiple markers issues(info window and marker repeating)

此生再无相见时 提交于 2019-12-17 20:57:27
问题 First i create a Map with user location -(void)initGogleMapView{ GMSCameraPosition *camera = [GMSCameraPosition cameraWithLatitude:currentLocation.coordinate.latitude longitude:currentLocation.coordinate.longitude zoom:1]; mapView = [GMSMapView mapWithFrame:CGRectMake(0, 64, self.view.frame.size.width, self.view.frame.size.height-64) camera:camera]; [self.view addSubview:mapView]; GMSMarker *marker = [[GMSMarker alloc] init]; marker.position = camera.target; marker.appearAnimation =

howto: dynamically update markers from JSON on google maps

情到浓时终转凉″ 提交于 2019-12-17 19:56:19
问题 I am trying to update the location of a marker with out refreshing the whole page. I have tried to use setTimeout(function() however I am having no luck.. here is my code I have so far.. thanks in advance function initialize() { var mapOptions = { center: new google.maps.LatLng(35.66, -80.50), zoom: 8, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions); var json = (function () { var json = null; $.ajax({ 'async': false,

Change Google Maps marker icon when clicking on other

笑着哭i 提交于 2019-12-17 19:49:20
问题 I have created a Google Maps Multiple locations page, using Advanced Custom Fields Google Map field. I have managed to make the marker icon change when clicked on, but I want it to be changed back when clicking on other icons. here is an example of the code: for (i = 0; i < locations.length; i++) { marker = new google.maps.Marker({ position: new google.maps.LatLng(locations[i][1], locations[i][2]), map: map, icon: iconBase + 'Stock%20Index%20Up.png' }); google.maps.event.addListener(marker,