marker

Update marker shape of a scatter plot

ε祈祈猫儿з 提交于 2021-02-10 14:06:16
问题 A scatter plot object has a method called .set_color to update the colors of the markers and .set_offsets to update their position but how can I update the marker shapes? 回答1: A scatter plot returns a path collection, it contains the paths of the markers. In order to change the marker shape you need to set the path to the new marker path. For built-in markers, these paths can be obtained from the MarkerStyle class. For custom markers see my SO answer here. Example - scatter plot with dot

custom marker icon with react-leaflet

我们两清 提交于 2021-02-04 12:59:06
问题 I tried everything I found on the web, Stackoverflow and Github, and I still can't make it. I want to make a custom marker with a custom icon, but with my code below I always got an error : 'TypeError: options.icon.createIcon is not a function' Here is my code (no error on the paths to folders, everything is in src/js or src/img) Icon.js import L from 'leaflet'; const iconPerson = L.Icon.extend({ options: { iconUrl: require('../img/marker-pin-person.svg'), iconRetinaUrl: require('../img

How to update marker positions with data from Firebase Google Maps API Android

爷,独闯天下 提交于 2021-02-04 08:20:11
问题 I'm creating an app that makes a real time tracking of users using Firebase Database. Every user is displayed in the map using markers. When there is a new location update, the marker has to be updated. The problem is that with Firebase method onDataChange() or similars every time a new location update is retrieved, I can't access to the old marker to remove it and create a new one or just update the old marker, because the marker doesn't exist. I tried it saving markers in SharedPreferences

How to change the marker symbol of errorbar limits in matplotlib?

≡放荡痞女 提交于 2021-01-28 05:13:59
问题 just a quick question, where I couldn't find anything helpful in the plt.errorbar documentation I want to plot values with error bars: import matplotlib.pyplot as plt plt.errorbar(1, 0.25, yerr=0.1, uplims=True, lolims=True, fmt='o') plt.show() But I would like to have error bars with a simple horizontal line instead of arrows at the ends. But there is no "capmarker" or similar option in the plt.errorbar() function 回答1: Remove the uplims=True and lolims=True ; both limits are plotted by

MapBox can't add react component on markers popup

末鹿安然 提交于 2020-12-13 04:43:56
问题 I have been working on a Real Estate project and I've got stuck on adding a reactcomponent inside a markers popup. The image below shows the example of how the popup should look like: Popup example This is the code where I am trying to add the popup on the marker: var card = <Card /> var popup = new mapboxgl.Popup({ offset: 25 }) .setDOMContent(ReactDOM.render(card, document.getElementById('map'))) var marker = new mapboxgl.Marker(el) .setLngLat(coordinates) .setPopup(popup) .addTo(map);

MapBox can't add react component on markers popup

与世无争的帅哥 提交于 2020-12-13 04:43:50
问题 I have been working on a Real Estate project and I've got stuck on adding a reactcomponent inside a markers popup. The image below shows the example of how the popup should look like: Popup example This is the code where I am trying to add the popup on the marker: var card = <Card /> var popup = new mapboxgl.Popup({ offset: 25 }) .setDOMContent(ReactDOM.render(card, document.getElementById('map'))) var marker = new mapboxgl.Marker(el) .setLngLat(coordinates) .setPopup(popup) .addTo(map);

Value cannot be cast from ReadableNativeMap to double

柔情痞子 提交于 2020-07-20 08:30:43
问题 I have a custom marker image and want to use a variable for the opacity of the image. I doing the following and gettin this error "Value for opacity cannot be cast from ReadableNativeMap to double" var status=1; <MapView.Marker key={marker.latitude} coordinate={{ latitude: marker.latitude, longitude: marker.longitude }} onPress={() => this.props.Quiz2(marker.latitude, marker.longitude)} > <View><Image source={require('../assets/icons/quiz.png')} style={{ width: 40, height: 40,opacity:status}}

Custom markers with different shapes and colors in leaflet R

走远了吗. 提交于 2020-07-18 08:22:20
问题 There are some examples to create custom markers in leaflet, but most of them are only for one variable. However, there are lots of data with several factors, which is better to visualize with different shapes and colors. Here is the dummy data, how to polt markers with different shapes and colors? lat1= 36+runif(n=5,min=-1,max=1) lon1 =-115+runif(n=5,min=-1,max=1) lat2= 35+runif(n=5,min=-0.5,max=0.5) lon2 =-110+runif(n=5,min=-0.5,max=0.5) lat3= 34+runif(n=5,min=-0.5,max=0.5) lon3 =-112+runif

Custom markers with different shapes and colors in leaflet R

馋奶兔 提交于 2020-07-18 08:21:56
问题 There are some examples to create custom markers in leaflet, but most of them are only for one variable. However, there are lots of data with several factors, which is better to visualize with different shapes and colors. Here is the dummy data, how to polt markers with different shapes and colors? lat1= 36+runif(n=5,min=-1,max=1) lon1 =-115+runif(n=5,min=-1,max=1) lat2= 35+runif(n=5,min=-0.5,max=0.5) lon2 =-110+runif(n=5,min=-0.5,max=0.5) lat3= 34+runif(n=5,min=-0.5,max=0.5) lon3 =-112+runif

Xamarin Forms - Image To/From IRandomAccessStreamReference

纵然是瞬间 提交于 2020-07-09 09:23:45
问题 For personal needs, for the Xamarin.Forms.Map control, I need to create a CustomPin extension. UWP part (PCL project) I create a MapIcon like it: nativeMap.MapElements.Add(new MapIcon() { Title = pin.Name, Image = RandomAccessStreamReference.CreateFromUri(new Uri("ms-appx:///Assets/Pin/customicon.png")), Location = new Geopoint(new BasicGeoposition() { Latitude = pin.Position.Latitude, Longitude = pin.Position.Longitude }), NormalizedAnchorPoint = new Windows.Foundation.Point(0.5, 1.0) });