markers

Get center of geojson Continent/Country/State with leaflet

故事扮演 提交于 2019-12-02 07:27:26
问题 Is there a way of finding a center for countries/continents which consist of more than one polygon object(ex. USA, Canada, which have an islands besides main land part)? I was trying to use leaflet's Layer.getCenter() or even Layer.getBounds().getCenter() , but those methods certainly don't work for this type of countries and return a "no-go" results. Example can be seen by the following link (leaflet playground). Just scroll and click on US or Canada and see where circleMarker will appear.

Any change in zoom level causes all my markers to re-appear on my Google map

痞子三分冷 提交于 2019-12-02 07:24:26
问题 Any change in zoom level causes all markers to appear on the map that have been on the map at any time since the last page load. This is true whether the zoom level change is due to a setZoom() call in my code or because I operate the zoom slider. I have a map control widget with buttons to add markers that correspond to different categories. So you click the button for Groups and the map populates with markers that represent Groups. Then you click on the Individuals button and the Groups

Is it possible to change markers in Matlab plot function? [duplicate]

懵懂的女人 提交于 2019-12-01 14:44:59
This question already has an answer here: Custom Markers for Matlab plot 1 answer I am trying to use matlab plot function to create a plot. However, the markers available are limited. For example: plot(x,y,'-o') will plot with circle markers. However, if I want a marker with the arrow symbol or a letter, this is not possible. Does anyone know of any way to do this? Thanks! Abhinav Short answer : If you want custom markers, its convenient to make the plot in some other plotting software, like tikz . Long answer : If you want a simple text marker, e.g. the letter 'A', then its possible as

Is it possible to change markers in Matlab plot function? [duplicate]

北战南征 提交于 2019-12-01 13:18:18
问题 This question already has an answer here : Custom Markers for Matlab plot (1 answer) Closed 2 years ago . I am trying to use matlab plot function to create a plot. However, the markers available are limited. For example: plot(x,y,'-o') will plot with circle markers. However, if I want a marker with the arrow symbol or a letter, this is not possible. Does anyone know of any way to do this? Thanks! 回答1: Short answer : If you want custom markers, its convenient to make the plot in some other

py.test : Can multiple markers be applied at the test function level?

梦想的初衷 提交于 2019-12-01 00:32:10
问题 I have seen from the pytest docs that we can apply multiple markers at once on the Class or module level. I didn't find documentation for doing it at the test function level. Has anybody done this before with success? I would like to ideally do this as a list of markers as being done in the above doc for Classes, for example (quoting from the docs): class TestClass: pytestmark = [pytest.mark.webtest, pytest.mark.slowtest] So, the pytest documentation talks about using pytestmark to specify

How to replicate marker position on map loop Leaflet JS

心已入冬 提交于 2019-11-30 21:53:21
I'm using Leaflet JS to build a custom map (with custom tiles), it loops East to West. I've added a couple layers of markers and polygons (to indicate a route in the map) and each marker has pop up date within it. I want to duplicate the marker/polygon layers in the seemingly same position on the cloned map loops left and right of the original layer. var mapMinZoom = 2; var mapMaxZoom = 6; var tiles = L.tileLayer('../bigger_map/{z}/{x}/{y}.png', { unloadInvisibleTiles : false, reuseTiles : true, updateWhenIdle : false, continousWorld : true, noWrap: false }); var marker = L.marker([-110.25,

pyodbc the sql contains 0 parameter markers but 1 parameters were supplied' 'hy000'

倖福魔咒の 提交于 2019-11-30 07:14:33
问题 I am using Python 3.6, pyodbc, and connect to SQL Server. I am trying make connection to a database, then creating a query with parameters. Here is the code: import sys import pyodbc # connection parameters nHost = 'host' nBase = 'base' nUser = 'user' nPasw = 'pass' # make connection start def sqlconnect(nHost,nBase,nUser,nPasw): try: return pyodbc.connect('DRIVER={SQL Server};SERVER='+nHost+';DATABASE='+nBase+';UID='+nUser+';PWD='+nPasw) print("connection successfull") except: print (

Matplotlib : making a colored markers legend from scratch

回眸只為那壹抹淺笑 提交于 2019-11-29 12:45:02
问题 In Matplotlib, i'm trying to make a legend with colored "markers" like this one : this one has been made using the scatter function, but is not adapted to my plot. I'd like to produce a legend "from scratch", without associated data. The color is important, and therefore should be an attribute of each marker. I've tried import matplotlib.markers as mmark list_mak = [mmark.MarkerStyle('.'),mmark.MarkerStyle(','),mmark.MarkerStyle('o')] list_lab = ['Marker 1','Marker 2','Marker 3'] plt.legend

pyodbc the sql contains 0 parameter markers but 1 parameters were supplied' 'hy000'

元气小坏坏 提交于 2019-11-29 02:26:50
I am using Python 3.6, pyodbc, and connect to SQL Server. I am trying make connection to a database, then creating a query with parameters. Here is the code: import sys import pyodbc # connection parameters nHost = 'host' nBase = 'base' nUser = 'user' nPasw = 'pass' # make connection start def sqlconnect(nHost,nBase,nUser,nPasw): try: return pyodbc.connect('DRIVER={SQL Server};SERVER='+nHost+';DATABASE='+nBase+';UID='+nUser+';PWD='+nPasw) print("connection successfull") except: print ("connection failed check authorization parameters") con = sqlconnect(nHost,nBase,nUser,nPasw) cursor = con

matplotlib: make plus sign thicker

蓝咒 提交于 2019-11-28 19:05:04
In Matplotlib, I would like to draw a thick plus sign (or a cross), but the one provided in the marker set is too thin . Even as I increase its size, it doesn't get any thicker. For example : The lines of code drawing the red plus sign are: # Draw median marker. if plot_opts.get('bean_show_median', True): ax.plot(pos, np.median(pos_data), marker=plot_opts.get('bean_median_marker', '+'), color=plot_opts.get('bean_median_color', 'r')) If I add an extra parameter markersize=20 , the marker will only stretch. It will be as thin as before. Can I make it thick? You can use markeredgewidth (or mew ).