markers

Set map marker to a custom color Android

独自空忆成欢 提交于 2019-12-05 03:05:27
I am making an app that adds pins to a map at certain points. I want the color of my pins to match the theme colors of our app. Sorry I'm really a noob int color = Color.rgb(255, 201, 14); mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap(); final LatLng PERTH = new LatLng(40, -80); Marker perth = mMap.addMarker(new MarkerOptions() .position(PERTH) .title("MY PIN") .snippet("MAGGIE EATS SNAKE SKINS") .draggable(true) .icon(BitmapDescriptorFactory.fromResource(R.drawable.pin)) .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.color))); The .icon

looking for marker text option for pyplot.plot()

徘徊边缘 提交于 2019-12-04 19:01:39
I am looking for a way to insert numbers or text into markers. There is nothing in the matplotlib.pyplot.plot(*args, **kwargs) documentation about that. The default zoom level places markers on the edge, hence reducing the available space on which to inscribe text. import matplotlib.pyplot as plt x = [1, 2, 3, 4 ,5] y = [1, 4, 9, 6, 10] plt.plot(x, y, 'ro',markersize=23) plt.show() As jkalden suggested, annotate would solve your problem. The function's xy -argument let you position the text so that you can place it on the marker's position. About your "zoom" problem, matplotlib will by default

Trouble using Leafletjs MarkerClusterGroup and filters with Mapbox

孤人 提交于 2019-12-04 17:36:50
I've tried Mapbox and their API to create an interactive map. The purpose is to fetch points in a geojson file, and display them on the map. They have to be filtered by their marker-icon and grouped depending on the zoom applied. I had no trouble using the MarkerClusterGroup plugin with leaflet and Mapbox, but I can't get the filters to work. This is my code : https://gist.github.com/KuneStudio/5985864 And this is the content of my json with the points : https://gist.github.com/KuneStudio/5985858 The markers are displaying correctly, the cluster part too, but I can't get the filters to work...

Showing sets of markers on different layers of Google map

ぃ、小莉子 提交于 2019-12-04 11:50:05
I need to show a set of markers on a Google map. I know markers can be added directly on a Google map but given that I have 3 sets of markers, one for shops, one for parks and another one for hotels, how can I show them on 3 different layers and so that later on using javascript, I be able to hide one set of markers by doing sort of: myLayer2.setMap(null); I have checked Panoramio layer but it needs the images first to be uploaded to panoramio , but in my case for some particular security reason I cannot upload them to panoramio. I will have images locally and set those at runtime based upon

read markers of .wav file

試著忘記壹切 提交于 2019-12-04 06:00:17
I would like to use markers in .wav files. It seems to be supported by aifc module with getmarkers() : http://docs.python.org/2/library/aifc.html#aifc.aifc.getmarkers (for .aiff files), but not for wave module ( http://docs.python.org/2/library/wave.html?highlight=wave#wave.Wave_read.getmarkers ). How could we read markers of .wav files ? Edit : here is an updated version of scipy.io.wavfile that adds many things (24 bit .wav files support for read/write, cue markers, cue markers labels, and some other metadata like pitch (if defined), etc.): wavfile.py (enhanced) Feel free to share it! I

how to calculate number of markers inside a polygon in google maps

旧时模样 提交于 2019-12-03 20:34:08
问题 Looking for a way to count the number of markers inside a polygon which is drawn dynamically by the user The code below can draw the polygon now i want to show the count of number of markers inside the polygon if there exists <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <title>Simple Polygon</title> <style> html, body { height: 100%; margin: 0; padding: 0; } #map { height: 100%; width: 100%; } </style> </head> <body>

conditional marker colors in highcharts

为君一笑 提交于 2019-12-03 13:31:16
I'm using Highcharts and I want to fill markers in line chart with different colors. For example: when variable "a" is 1 then fill marker with red else fill with green. Is it possible to do that? Here is the code: http://jsfiddle.net/EnyCJ/1/ I was trying to do that with formatter but it doesn't work. Any suggestions? var a=1; plotOptions: { series: { marker: { fillColor: { formatter: function () { if (a == 1) { return 'red' } else { return 'green' } } }, lineWidth: 2, } } }, Try: fillColor: a==1 ? "#ff0000" : "#00ff00" etc. You also use zones: $(function () { $('#container').highcharts({

How to add marker for a map view in google maps sdk for ios in swift

北慕城南 提交于 2019-12-03 07:59:26
Trying to add a marker to Google map,but the app is getting crashed at while addMarker() function call,Exception details are as follows, Terminating app due to uncaught exception ' GMSThreadException ', reason: 'All calls to the Google Maps SDK for iOS must be made from the UI thread' FYI vwGogleMap is global and in a function I'm trying to plot marker. func addMarker() -> Void { var vwGogleMap : GMSMapView? var position = CLLocationCoordinate2DMake(17.411647,78.435637) var marker = GMSMarker(position: position) marker.title = "Hello World" marker.map = vwGogleMap } Any help would be

Leaflet.js center the map on a group of markers

流过昼夜 提交于 2019-12-03 03:30:26
问题 I'm using Leaflet.js and would like some way to centre the map on the markers I have so that all are within the user's view when the page launches. If all the markers are clustered in a small area, I would like the map to zoom down to a level that still displays all of them. I know google maps has an auto-centre function but how would I go about this with Leaflet.js? 回答1: You can use L.LatLngBounds in order to create an area to zoom to. First, create a bounds and pass it an array of L.LatLngs

Leaflet.js center the map on a group of markers

泄露秘密 提交于 2019-12-02 17:00:32
I'm using Leaflet.js and would like some way to centre the map on the markers I have so that all are within the user's view when the page launches. If all the markers are clustered in a small area, I would like the map to zoom down to a level that still displays all of them. I know google maps has an auto-centre function but how would I go about this with Leaflet.js? You can use L.LatLngBounds in order to create an area to zoom to. First, create a bounds and pass it an array of L.LatLngs: var bounds = new L.LatLngBounds(arrayOfLatLngs); This will create a bounds that will encapsulate every