google-maps-markers

Info window isn't center position Android Google Map v2

柔情痞子 提交于 2019-12-07 05:32:01
问题 I have problem with info window on Google Map v2. Info window is from left on marker. This is problem reproduced only Samsung Galaxy S4. I installed Google Api Demo and it is reproduced. Is it bug? How can fix it? 回答1: I've submitted this issue on maps v2 tracker. http://code.google.com/p/gmaps-api-issues/issues/detail?id=5439 Edit: Now resolved in the GPServices library. 回答2: Are you setting the anchor point in your code? The position looks similar to when I do this: marker.setAnchor(0.0F, 0

Android Firebase remove Google Maps markers

邮差的信 提交于 2019-12-07 05:08:27
Trying to make a small Android app that shows the locations of people as Google Maps markers. when the user presses a button to appear on the map, the app retrieves the users data from the Firebase JSON and shows the users on the map in real time. If a user moves, the marker moves with him (removed and recreated when his location changes). Everything works great, except that when the user presses to leave the map, his marker remains in all the other phones even though it's deleted from the Firebase JSON. Can anyone explain how to fix this problem? My code for retrieving the users and create

Google Maps marker cut in half internet explorer

故事扮演 提交于 2019-12-07 03:50:19
问题 I'm having a weird problem with my google maps marker icons in internet explorer. All my markers are showing up cut in half doubled and shifted over 50 %. that is using the demo code from google. So it must be something weird i'm doing elsewhere with styles or jquery, but i don't know what. Has anyone had this problem before? 回答1: I had a similar issue. The problem being that each marker icon inherited a margin>0, I solved the issue by setting the margin to zero for all img in the map div.

How to add a random point inside a polygon in Google Maps?

一个人想着一个人 提交于 2019-12-07 02:16:40
I have a bounds to a place and created a polygon of that place. How can I generate a random point inside the bounds of that polygon? One way of doing it. This will calculate the bounds of the polygon, then guess a random point inside that bounds, if the point is contained by the polygon, it will put a marker there. // calculate the bounds of the polygon var bounds = new google.maps.LatLngBounds(); for (var i=0; i < polygon.getPath().getLength(); i++) { bounds.extend(polygon.getPath().getAt(i)); } var sw = bounds.getSouthWest(); var ne = bounds.getNorthEast(); // Guess 100 random points inside

Google Map route dragging becomes unstable when suppressMarkers is set to true

邮差的信 提交于 2019-12-07 02:02:27
问题 I have a Google Map where I can add multiple points/stops(waypoints) between source and destination route. After the route is created (google.maps.DirectionsService) and put on the map (google.maps.DirectionsRenderer), you can drag the route middle-points to adjust the route as you wish -- draggable=true is set in the constructor of DirectionsRenderer. directionsDisplay = new google.maps.DirectionsRenderer({ suppressMarkers: true, draggable:true }); The problem is when I change the route

Released unknown bitmap reference

岁酱吖の 提交于 2019-12-06 23:57:57
问题 I'm trying to set icon of a Marker in Google Maps v2. I'm downloading some images over network and change their background in code. After that I'm setting them as icons to markers. At first creation of the map it works fine but after rotation there is an exception. Android version I run this on: 4.3 My code is as follows: UrlImageViewHelper.loadUrlDrawable(TuvaletlerMapActivity.this, iconUrl, new UrlImageViewCallback() { @Override public void onLoaded(ImageView iv, Bitmap bm, String arg2,

Along with title and snippet how to add extra data to marker?

微笑、不失礼 提交于 2019-12-06 22:32:19
问题 Problem : My remote server returns 10 multiple value for a request.i parsed my response and using for loop i added markers(here i added info to title and snippet) on a map.(here i want to add extra data to marker so that i can access it in on info window click event) in infoWindowClickListener i want to access that extra data. How to add extra data to marker/ how to access ph data for a particular marker click(other wise i will get last value of ph in all markers). i tried like this. private

Google Map .InfoWindow Set Height and Width

若如初见. 提交于 2019-12-06 21:38:38
问题 How do you set the size and width of a google map InfoWindow ? I looked on the api page and only found a maxWidth method. Edit: I have tried a few things. So far none of these work: var markerInfoWindow = new google.maps.InfoWindow({ content: markerHTMLString, maxHeight: 400, //Doesn't work maxWidth: 400, //Doesn't work width: 300, //Doesn't work height: 300 //Doesn't work }); Also say markerHTMLString is equal to this: <div class = "MarkerPopUp"><div class = "MarkerContext">Text</div></div>

Google Maps Spiderfying Markers & Adding Listeners

末鹿安然 提交于 2019-12-06 21:31:32
I'm trying to Spiderfy my markers and adding listeners to them. The Spidefying works fine that means I get the overlapping markers spiderfied but the problem is that I can't seem to figure how to add listeners to these markers. In other words I have tried the following: Putting the oms.addListener() in a loop. This way, upon clicking on a marker would open all infoWindow s on the same marker which isn't delightful. Putting the oms.addListener() outside the loop like the example on the OMS Git repo. https://github.com/jawj/OverlappingMarkerSpiderfier/blob/gh-pages/demo.html . This way all the

Google maps API: Marker image positioning

我与影子孤独终老i 提交于 2019-12-06 19:54:47
问题 I have changed the image that I use for a marker on Google maps. The new image is much wider than the old one and I have noticed that the marker is aligned with the lat and lng so that the marker rests with it's horizontal midpoint over the lat and lng . This is not what I want, I want to have the lat and lng aligned with the markers left hand side - I want to offset the marker from the default position by about 80px to the right. 回答1: Try this on for size. var markerImage = new google.maps