So I actually ended up fixing this problem by getting a reference to all of my markers on the Google map and then adding the ratings to a string set which correlated with the marker.getTitle(), and I average the results in the getInfoWindow.

GoogleMap allows you to add event listeners to multiple markers. However, your code above won't work due to the fact that you are reusing the marker variable for all different markers. What you should be doing is, assign a marker variable for each of your objects. Don't reuse object_marker for...

Here example to get value of quey from URL jquery get querystring from URL Use this to inserted your code and use map.setCenter(new gooogle.map.latlng(0,0)); for set center map to location of marker...

You don't need to wait for the idle event. The map bounds are available the first time the 'bounds_changed' event fires. Wait for the bounds_changed event; whenever the bounds changes (including the first time), then update your markers on the map. working fiddle code snippet: var map; var bounds; function...

setting the visible-property will not have an effect when a marker is inside a cluster, you must also remove/add the marker from/to the markerclusterer. Possible solution: observe the visible_changed -event of the markers: google.maps.event.addListener(storedmarker,'visible_changed',function(){ markerCluster[(this.getVisible())?'addMarker':'removeMarker'](this) }); http://jsfiddle.net/doktormolle/g77np63c/4/ another(possibly better) approach(especially whene there are a lot of markers, because the solution...

You can get the bounds of the map with: bounds = map.getBounds(); The result is a LatLngBounds object. Then for a marker marker, you can test if it is in the map with: if ( bounds.contains(marker.getPosition()) ) { } ...

Your map does not seem to have been initialized. In order to have your map initialized, you need to call yourFragment.getMapAsync() in your onCreate() method and then you'll get a callback like this: @Override public void onMapReady(GoogleMap map) { map.addMarker(new MarkerOptions() .position(new LatLng(10, 10)) .title("Hello world")); } If your markers...

Another way. When you add the marker to the map grab the id that is assigned to it. marker = mMap.add(markerOptions); now save the marker id x.markerId = marker.getId(); You can't extend markeroptions because it is final so make a class that has a markerOptions and id. Class X {...

The problem is that by default the anchor point for the marker is centered at the bottom of the image. If you looked closely at the locations of your custom markers, you would notice that they are not centered on the lat/long you set them to, but are just above...

This is a solution for the current case, but won't set the center to get the desired view when zoom changes. If you want more elegant solution, you can reset the center after each zoom_changed event with a formula including zoom value. ... var myMarker = new google.maps.Marker({ position: latlng,...

The current version of Google Maps only supports 1 open info window. That is why the second marker is without title. As for the second part of your question: The default I use is that when the user clicks an marker there is an info window shown. When the user...

The code looks like a sample for the MarkerWithLabel-library. You must include the library and create a new MarkerWithLabel instead of a new google.maps.Marker var myLatLng = new google.maps.LatLng(0, 0); var stylesMap = [{ featureType: "poi", elementType: "labels", stylers: [{ visibility: "off" }] }]; var myOptions = { zoom: 15,...

If you want to remove a specific marker from the map, you can just call the remove(). method. Sample code to remove a marker from MapView and HashMap: for (Marker marker : hm.keySet()) { if (hm.get(marker).equals(deadline)) { marker.remove(); hm.remove(marker); } } You dont need to clear the entire MapView, if...

For custom marker: You can create a custom image and draw an index number in top of that image Check this example for custom marker For Marker Window: You can create a custom xml file that contains ImageView and TextViews: Something like customMapView.xml: <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:background="@color/white_full" android:layout_width="match_parent" android:padding="@dimen/padding_micro" android:layout_height="match_parent"> <ImageView...

30K points * 5 years = 150K markers. That might be too much. You should be looking for a way to show only one year of history at a time and/or use marker clustering. Regarding the color markers, you could use SVG markers for that. You can easily change the...

Replace "URL goes here?" by: locations[i][4] ...and it should work. Note: This part of your code is wrong and forces a syntax-error: new google.maps.LatLng(locations[i][1], locations[i][2], url: place[4]) it has to be: new google.maps.LatLng(locations[i][1], locations[i][2]) ...

What duncan said: What you want to do is add all your markers to an array. In your click event handler, loop over that array, updating each marker's icon. Then finally set the icon for just the marker that's been clicked. google.maps.event.addListener(marker, 'click', (function (marker, i) { return function ()...

You are most probably using the old int values for latitude/longitude as they where expected for the GeoPoint of the previous GoogleMaps API. These are 1 million times too big for the new LatLng object, which expects double values rather than integers.

Specify popupPane as pane in bindLable options: layer.bindLabel( feature.properties["name"], { className: 'map-label', pane:'popupPane' } ); In Leaflet popupPane is higher than markerPane so your labels will appear on top of markers. There is a small doc for Leaflet.label with options description https://github.com/Leaflet/Leaflet.label Also check this jsfiddle: http://jsfiddle.net/L6kqu54a/...

Looks like it can't be done by CSV file directly, but I've found some workaround: Change column's with links name to exactly gx_media_links and save as CSV file. Import the CSV into a new layer. Download the layer as a KMZ file (via the main menu button) Import the KMZ...

Ok I found the solution. I suspected it was a jquery backward compatibility issue and it was. I added these 2 lines directly after the jquery script in the header: <script src="http://code.jquery.com/jquery-1.9.0.js"></script> <script src="http://code.jquery.com/jquery-migrate-1.2.1.js"></script> I found the answer here: jquery migration page If anyone else has this issue with the...

Only one can be shown at a time, because That would break compatibility would require many bitmaps to be sent via RPC. So use custom marker icon and Canvas to draw the marker title which could look like info window. Also you can use the official utils here. For more...

Your map variable is local to the initialize function. It is not available in the placeMarker function, unless you pass it in or remove the var keyword before it in the initialize function. function initialize() { var mapProp = { center:myCenter, zoom:2, mapTypeId:google.maps.MapTypeId.ROADMAP }; map=new google.maps.Map(document.getElementById("map-canvas"),mapProp); jsfiddle code snippet: var...

First off all, since Location is a java object you can't have an attribute called long. Also, <div id="item"> insede the forEach will generate objects with duplicated ids on DOM. For the test, I created a Location object like this: public class Location { private double lat; private double lng;...

Regexen aren't the tool of choice for your job. While you might get along with a powerful regex engine (eg. the one in perl or php) you will most likely fail on edge cases and the solution is guaranteed to be a nightmare to maintain. Better employ the command line...

The post to which you link does contain the solution: "function closure". You just need to extend it to include the infowindow for each marker since you have a unique infowindow for each marker instead of a global infowindow shared among all the markers. for (i = 0; i <...

I finally managed to do it like that: Yes but the problem IS the phone parsing ;) I managed to do it like that this.map.setOnInfoWindowClickListener(new OnInfoWindowClickListener() { @Override public void onInfoWindowClick(Marker marker) { final String description = marker.getSnippet(); if (!TextUtils.isEmpty(description)) { final Spannable span = Spannable.Factory.getInstance().newSpannable(description); if (Linkify.addLinks(span, Linkify.PHONE_NUMBERS)) {...

Here is a simplified and slightly modified solution based on this answer. Note that the linked answer implements an InfoWindow for both Markers and Clusters. This solution only implements InfoWindows for Markers. It's similar to how you would implement a custom InfoWindowAdapter for normal Markers with no Clustering, but with...

the last marker (Marker aMarker;) and circle (Circle aCircle;) created are those with the values assigned ... But i do not know how to fix it. In order to check the distance against all the points of interests you create you need to hold them in some sort of...

Using the listener in the answer you posted, see when street view is active and do setAllMap(null); to hide the markers. When it leaves street view, do setAllMap(map); to show the markers again. Edit (from the Google Maps documentation): function setAllMap(map) { for (var i = 0; i < markers.length;...

Finally I figured out the issue. Earlier markerwithlabel javascript library, if we want to hide the marker and only want to show the label, we just pass an empty braces to icon parameter like below var marker = new MarkerWithLabel({ position: latlng, draggable: false, raiseOnDrag: false, map: map, labelContent: "$"...

Try this code, I am taking a list of Data class which contains latitude and longitude information which i am setting in Marker options to display on the map. If you want to animate camera you can pass the builder instance to animateCamera and the maps will animate you to...

First download this markers set Second create this variable holding the images inside the for or forEach you have to create dynamyc markers. for (var i = 0; i < markersArray.length; i++) { //where marker array its an array of markers var lettersMarker = new google.maps.MarkerImage('marker' + i + '.png');...

The google.maps.Icon is not valid with a url of ''. var image = { url: beach[4], size: new google.maps.Size(20, 32), origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(0, 32) }; There is a javascript error generated in that case: Uncaught TypeError: Cannot read property 'dx' of undefined Change the code to...

Apparently, the problem has to with the map itself and not the marker. First of all, check which version of google play services you are using as library. If you have something before 6.5 version (released in December 2014) then check out the following code (credits at the google play...

This is the default marker clickable area. There was a bug but afrer the release of GoogleMap API v2 it was fixed. There used to be a workaround around that issue described here, (Overriding hitTest), but this technique applied to the previous version of GoogleMap. IMHO, setting larger marker size...

You must switch the arguments for the marker-position. In geoJSON the first item of a Point-geometry is the longitude and the 2nd the latitude, but a google.maps.LatLng expects the order 1. latitude 2. longitude. Currently your code will only draw a marker(but not at the desired location) when p.geometry.coordinates[1] is...

You should call mMap.clear(); in this method, so when you call this it will clear the map and then reassigned the markers. private void setUpMapIfNeeded() { if (mMap == null) { mMap = ((SupportMapFragment) getSupportFragmentManager() .findFragmentById(R.id.map)).getMap(); mMap.clear(); mMap.setOnMapClickListener(MyLocationActivity.this); if (mMap != null) { mMap.setOnMapClickListener(MyLocationActivity.this); mMap.setMyLocationEnabled(true); mMap.setBuildingsEnabled(true); mMap.setIndoorEnabled(true); mMap.setMapType(mMap.MAP_TYPE_NORMAL);...

When you create a variable using var keyword in javascript that is a local variable. If you want to reach that variable from another javascript file, you need to pass this reference around or use a global variable. With global variable approach, easiest to understand but in the long run...

This is not a solution, and a bit half-assed. A year old nodejs-project I dug up. Maybe it can give you a few ideas. Yeah, I realize you want a browser solution. (Sorry!) Browser javascript doesn't work with files very well. But you absolutely can use data URI to make...

You are not seeing marker B, because it is in same point as marker C. You should have little bit different address (e.g house numbers). Though route gets calculated correctly. UPDATE You have to use custom markers if you want to format markers. On start of JS document, add this:...

This is a common problem defining references to markers in loops. One way to solve it is with function closure (a function that keeps closure on its arguments: function buildListView() { controlList.innerHTML = ''; for (var i = 0; i < gyms.length; i++) { if (gyms[i]) { clickableLink(i); } }...

You can change the start position of your marker icon with the property groundAnchor. Google Maps SDK for iOS documentation: The ground anchor specifies the point in the icon image that is anchored to the marker's position on the Earth's surface. This point is specified within the continuous space [0.0,...

As is often the case I found the solution on my own. I have to keep a reference to my MapFragment I use to replace: mapFragment = new MapFragment(); getSupportFragmentManager().beginTransaction().replace(R.id.fragment_container, mapFragment).commit(); In onFragmentComplete() I have to invoke getChildFragmentManager() on this reference to obtain the "correct" GoogleMap. googleMap = ((SupportMapFragment)mapFragment.getChildFragmentManager().findFragmentById(R.id.fragment_googlemap)).getExtendedMap(); This...

Your question is similar to the one posted here: Defining a CameraUpdate with LatLngBounds with different padding values The solution is to set the top padding of the actual GoogleMap to the height of your marker icon. Something like this will do: Drawable drawable = <YOUR DRAWABLE HERE>; final int...

A workaround was provided to perform a refresh by changing the zoom level to another value then back again. // Force an update by changing the zoom level in the background int currentZoom = map.getZoom(); map.setZoom( currentZoom - 1 ); map.setZoom( currentZoom ); ...

As there's no root, according to docs, root is returned from inflate so I set size to the root manually with: View markerView; markerView = layoutInflater.inflate(R.layout.marker1, null); markerView.setLayoutParams(new ViewGroup.LayoutParams(80, 80));; ...

Doing: RunOnUiThread(() => { while(true){ //UPDATE MARKERS HERE Thread.Sleep(5000); } } Forces everything inside of the anonymous method to run on the UI thread. So the while loop inclusive of the Thread.Sleep is blocking the UI. Instead you want to do your long operation asynchronously, for instance using TPL (async/await)...

I'm a bit rusty on my Google Maps API knowledge, but if I remember correctly, the API does indeed give a way to attach a listener to your marker. However, it does not work for keypress events, as you have noticed. For completeness, the basic syntax is this: google.maps.event.addListener(marker, 'click',...

Please note as per the stacking order of the CSS -first the context is printed -then the element with position and negative z-index are printed -then element without position are printed -after that the element with 0 or auto z-index are printed -the all element with postive z-index and position...

Google Maps iOA SDK requires that all drawing events be done on the main thread. So, for your second method, you have to do put all your maker setup code inside the dispatch_get_main_queue() closure. So your method 2 will be: func Method2() { dispatch_async(dispatch_get_global_queue(Int(QOS_CLASS_USER_INITIATED.value), 0)) { for location in locationsArrayFromSomeWhere...

1000ft are 304.8 meters, draw a google.maps.Circle with this radius and use the given position as center. To open the infowindow set the position & map-properties (instead of calling the open-method) function createMarker(place) { var circle = new google.maps.Circle({ map: map, center: place.geometry.location, radius:304.8 }); google.maps.event.addListener(circle, 'click', function() { service.getDetails(place,...

setInterval is not the right method, you must use setTimeout, otherwise the functions will run endless(until the browser will crash) you must increment the delay for setTimeout, otherwise you will not see an animation(all functions will be executed with a delay, but at the same time...after 1 second) don't...

You could just use the LatLng object returned from calling getPosition() on the Marker to uniquely identify each Marker, and find the match in your places array. map.setOnInfoWindowClickListener(new OnInfoWindowClickListener() { @Override public void onInfoWindowClick(Marker marker) { LatLng latLon = marker.getPosition(); //Cycle through places array for(Place place : places){ if (latLon.equals(place.latlng)){...

According to the documentation, minimumClusterSize does that: minimumClusterSize number The minimum number of markers needed in a cluster before the markers are hidden and a cluster marker appears. The default value is 2. ...

Angular scope don't run its digest cycle while it dealing with event/ manipulating scope through events, At that time you need to run digest cycle manually. After scope variable updation is done you need to run digest cycle manually. SO that it would update the binding on the View. $scope.setInfoWindow...