marker

Android Maps v2 custom marker has incorrect position on zoom

…衆ロ難τιáo~ 提交于 2019-12-22 06:56:53
问题 I know this has been discussed before, but I actually can't find a solution. I am adding a custom icon for my marker: markerUserLocation = mMap.addMarker(new MarkerOptions().position(new LatLng(point.latitude, point.longitude)) .anchor(0.5f, 1.0f) .icon(BitmapDescriptorFactory.fromResource(R.drawable.ic_marker_my_location))); The problem is when zooming in/out the marker gets positioned in a bad place. I have tried to play with the anchor values, but no success. Isn't the default anchor mid

Android : If markers are overlapping each other on the map, then the click event is fired for the last hidden one

╄→гoц情女王★ 提交于 2019-12-22 04:42:39
问题 In our application, a lot of markers are drawn in different locations and in certain cases at a certain zoom level, markers overlap each other. So when I click on the marker, I expect the top marker's onMarkerClick to be fired but instead it is fired for the last hidden marker i-e the last marker, with no markers behind it. What do you suggest I do? Also, I have no info windows , therefore I return true from onMarkerClick method. 回答1: I found the solution here: https://github.com/googlemaps

Updating a map marker in android

女生的网名这么多〃 提交于 2019-12-22 04:17:10
问题 Using Google Maps Android API v2, I can update my marker's position by getting the Marker from a hashMap and then calling: Marker marker = hashMap.get(someId); marker.setTitle("Title"); marker.setSnippet("Snippet"); marker.setPosition(new LatLng(newLatitude, newLongitude)); However, if the marker is selected when this is called, the title and snippet will only update if I click off the marker and reselect it. Is there anyway to tell the map to refresh the data in the marker bubble? 回答1: Call

Is is possible to use Font Awesome icons in Mapbox Markers?

混江龙づ霸主 提交于 2019-12-21 21:13:12
问题 I'm using the Maki set of icons, but they are very limited and would like to be able to use Font Awesome icons. Is this possible? Here's the code I'm using to set up the marker icons. marker.setIcon(L.mapbox.marker.icon({ 'title': jobid, 'marker-color': '#e32f2f', 'marker-symbol': 'square' })); 回答1: If you've included the font awesome CSS on your page, you can use the L.DivIcon constructor to create custom icon. <style> /* * Unlike other icons, you can style `L.divIcon` instances with CSS. *

WPF DynamicDataDisplay - Slow plotting with Markers

雨燕双飞 提交于 2019-12-21 20:59:02
问题 I am having a really hard time waiting for the ChartPlotter in D3 to show itself, when using markers. Of course I am trying to plot a Gazillion records (well, 700,000 records). When using just a line, all is well (20 seconds or so). When using markers, we're talking 5 minutes. That's not acceptable. Any ideas? Here's what I have done, with explanations under it. public static string MakeSimplePlot(double[][] xData, double[][] yData, string[] legend, string xAxisTitle, string yAxisTitle, bool[

Aligning the text in Google Maps Marker snippet

我们两清 提交于 2019-12-21 20:19:32
问题 I want the string in my snippet to be aligned to the center. Also, line breakers (\n) in the snippet are converted to spaces, is there a way to insert line breakers? My relevant code: GoogleMap map = ... map.addMarker(new MarkerOptions().position(pos) .title("title") .snippet("body \n and mind"); Thanks 回答1: Using some examples, as well as answers from: custom info window adapter with custom data in map v2, I've come across the following solution: marker.xml <?xml version="1.0" encoding="utf

How to animate a marker through an ArrayList of LatLng points?

放肆的年华 提交于 2019-12-21 05:24:22
问题 I am using Google Maps API V2 to get the location of the current user and am recording his route by using the onLocationChanged listener. While the user records their route I save all the LatLngs detected at each location change in an arraylist. When the user stops recording their route I place a marker at the first point in the arraylist. My problem now is that I wish to animate the marker through all the points in the arraylist. Can someone please tell me how can I do this? Things to note

How to rotate arrow head in googlemap v2 when we rotate the phone

好久不见. 提交于 2019-12-20 15:31:07
问题 Can anybody help me with how to rotate the arrow head in google map v2? You have seen that in nevigation the arrow head is rotating to the direction we face. I want to implement that to my app. I red about markerOption.rotation(rotation) this seems a static one. I want to rotate the arrow dynamically when I rotate the phone. 回答1: I was able to do that. Its so easy. below is how. This is to read the sensor and get the orientation of the phone. /** * Initialize the sensor manager. */ private

Rotate marker in Leaflet

点点圈 提交于 2019-12-20 10:36:55
问题 How can I rotate a marker in leaflet? I will have a lot of markers, all with a rotation angle. I've tried this solution from runanet/coomsie at Leaflet on GitHub, but nothing happens with my marker: L.Marker.RotatedMarker= L.Marker.extend({ _reset: function() { var pos = this._map.latLngToLayerPoint(this._latlng).round(); L.DomUtil.setPosition(this._icon, pos); if (this._shadow) { L.DomUtil.setPosition(this._shadow, pos); } if (this.options.iconAngle) { this._icon.style.WebkitTransform = this

Sun marker position render outside main view at any zoom level

99封情书 提交于 2019-12-20 07:00:50
问题 i have a Sun maker with a 30min update thanks to Leaflet.Realtime, but here the Sun render outside the main view, (you have to scroll right to see the Sun). i did try worldCopyJump: true, and things like: var lat = data.solar_lat; var lng = (data.solar_lon - 360); but i am stuck on this silly thing, full example with the leaflet playground bellow: https://playground-leaflet.rhcloud.com/haco/edit?html,js,output any help to make the Sun shine on earth "main view" ? 回答1: I guess it all depends