google-maps-markers

Google Maps marker grouping

寵の児 提交于 2019-12-29 04:45:09
问题 I'm trying to achieve the following thing: Have different types of markers on my map for example, schools, libraries, bus stops and I want to be able to show/hide each group of markers. I have been searching google for a while but nothing came up :/ Any ideas how this can be achieved ? 回答1: There are various ways to tackle this, but let me show you one approach. First, let's start with an array of locations (borrowed from the Google Maps API Tutorials): var beaches = [ ['Bondi Beach', -33

How to get image in infoWindow on Google Maps with picasso - Android

一世执手 提交于 2019-12-29 01:35:08
问题 I have created an app that implements a MapsView. And when i click the marker, it will show me the info window where the data is retrieved from the database by using picasso. It works fine, but the problem is that the image in the info window not shows me the image that i needed, it still shows me the placeholder image. But when i click the map and click again to the marker, it will shows me the image that i needed. But if i'm not clicking on the map (still clicking the marker), it still

How to Search in Google Map Api V2 Android?

只谈情不闲聊 提交于 2019-12-28 13:35:12
问题 I'm developing an Android application and using GoogleMaps API v2. This application works so far but I want search in the map with a path: Screenshot : my codes: Position_mark = new LatLng(35.7008, 51.437); map.moveCamera(CameraUpdateFactory.newLatLngZoom(Position_mark, 15)); map.animateCamera(CameraUpdateFactory.zoomTo(10), 2000, null); map.setOnMapClickListener(this); map.setOnMapLongClickListener(this); map.setOnMarkerDragListener(this); ... @Override public boolean onCreateOptionsMenu

Animating Multiple Markers

时间秒杀一切 提交于 2019-12-28 06:26:28
问题 I have several markers on a map with polylines drawn. I would like to move each marker along the path of the polyline to simulate simultaneous movement of each marker. I am having problems doing this I am getting only the last marker to move and the rest doesn't. Being new to the use of this programming technology I think something is wrong with my code especially the way I attempt to animate each marker. I need some guidance on this. Here's my work thus far: Jsbin DEMO var startLoc = new

Google Maps API - Closest marker function change to closest n markers

眉间皱痕 提交于 2019-12-28 02:18:07
问题 I am using the formula found in this question to find the closest marker on the map to the current position. I would like to modify this formula so that it finds the closet n number of locations(closest 5 locations, closest 10 locations, etc.) and I am not sure how to accomplish this. Here is the modified formula I am using: function rad(x) {return x*Math.PI/180;} function find_closest_marker(center, map) { var lat = center.lat(); var lng = center.lng(); var R = 6371; // radius of earth in km

JS Maps v3: custom marker with user profile picture

放肆的年华 提交于 2019-12-28 02:03:34
问题 I am struggling since 2 days with something I was thinking easy, on a map, I have to display a marker for each user with the user FB profile picture inside. I am wondering how I can have a result similar to this one? What I tried was really hackish. I put the FB picture as the marker icon I put a CSS class on the label of the marker I find the sibling to add this border and this arrow to decorate the user picture but it doesn't work when there is more than one marker on the map. .marker

Change Google map marker orientation according path direction

丶灬走出姿态 提交于 2019-12-27 19:09:32
问题 I'd like to know if it possible to change the marker orientation according the path drawn on the map. Here is a example: As you can see the marker is a car (with front bumper and tail lights). I'd like to orientate the car in the direction the path is going (in this exemple orientate the car around 45 degrees to the right). I'm using DirectionsService to draw the path and I have a random number of point. Sometime only one, sometime 10 points. I'm adding the markers before drawing the paths.

Jquery Accessing Array Index

旧时模样 提交于 2019-12-26 08:43:30
问题 Trying to access index values of an array in a function. The array has 4 records however only index 1 - 3 values is being accessed the last value in the array is not being accessed, only 3 markers are being created. Jquery throws TypeError: a.eb is undefined and TypeError: b is undefined . Array variable is global_citizens. Error is occurring at MakeRouteCallBack function at marker[rNum] = createMarker(legs[i].start_location,"start",legs[i].start_address,ctype); Console Print Results sdfsd

how to change the marker image in google maps [duplicate]

删除回忆录丶 提交于 2019-12-25 20:02:54
问题 This question already has an answer here : how to change marker image in a google map (1 answer) Closed 2 years ago . i have 20 markers from which i want to show 10 markers with similar marker and with similar label ("A") , and other 10 i want to show with different marker image and different label ("B") . im getting all the marker with same image and same label js fiddle https://jsfiddle.net/9yq8y1p2/4/ var initMap = function () { var labels = '0123456789'; var labelIndex = 0; var myLatLng =

Every infowindow is displaying the same data maps api v3

删除回忆录丶 提交于 2019-12-25 19:42:56
问题 I am really stuck on something. Every map marker's infowindow is displaying the same info. It seems to be the content at the end of an array that i use to store content nodes every time. I am pretty sure it is because the infowindow is not being attached to the proper marker var markers = []; var contentArray = []; var titleArray = []; var latlngArray = []; var map; //var infowindow; var concert; function defaultMap() { //Latitude: 38 //Longitude: -97 //window.alert("inside function"); var