Is there a way to configure the initial Popover2 position when using auto placement? - blueprintjs

Currently the only supported auto option is auto and optionally suffixed with -start and -end. Is it possible to have something like auto-bottom? I imagine -left and -right would be nice as well. Maybe Blueprint is limited by the Popper.js library?

This is a limitation of the Popper.js library.
I think the closest you can get is to set your desired position instead of using auto and then rely on modifiers to flip or reposition the popover if your desired position is not possible.

Related

Is it possible to move SymbolLayer icon as per the updated location points?

I wants to move SymbolLayer icon on the map layer as per the position change, move like as a marker. In the latest Mapbox update, MarkerView and MarkerViewOptions is deprecated. So I want to move the SymbolLayer icon.
Please help me to make it work.
Thanks
There are several ways you can do this and it's kinda' dependent on what type of source + layer you're going to use. First read https://docs.mapbox.com/android/java/overview/geojson/#geojson-updates
https://docs.mapbox.com/android/maps/examples/animate-marker-position/
If you're using a GeoJsonSource, you'll set new geojson on the source when you know the new coordinate(s) that you want the SymbolLayer icon to move to https://github.com/mapbox/mapbox-android-demo/search?q=setGeoJson. Make sure you're updating the GeoJsonSource that the SymbolLayer is using.
There's the annotation plugin, which handles lots of the layer/source boilerplate code you'd have to ordinarily write: https://docs.mapbox.com/android/plugins/overview/annotation/. symbol.setLatLng(); and symbolManager.update(); will be helpful. See https://github.com/mapbox/mapbox-plugins-android/blob/master/app/src/main/java/com/mapbox/mapboxsdk/plugins/testapp/activity/annotation/SymbolActivity.java and https://docs.mapbox.com/android/plugins/examples/symbol-listener/

Highlight buildings in a map

I have a requirement where I need to highlight the buildings around my current location on a map. I am using Xamarin and was wondering if anyone can point me to a correct library or control that can fulfill my requirement.
I am currently using Mapsui for Xamarin but I don't think it has the feature I am looking for.
If you have access to the geometries of the buildings there are many ways you could implement highlighting.
One way that comes to mind. Create a layer on top of your background layer with the same geometries as data source. Use a ThemeStyle to show only the selected geometry. The ThemeStyle class is created with a callback method which determines the style. In that method you should return no style unless the feature id is the same as selected feature id.
You can take a look at the ThemeStyle sample for a more general use of themes (no highlighting).
Also you could look at Mapsui.Sample.Wpf.Editing. Here is a screenshot of that sample:

Mapbox GL JS - remove cluster effect on mbtiles

I am currently working with a large file of points that I want to filter according to properties and bounding box.
When I add this layer to my map using a geojson file, I can manage the cluster effect using property as mentioned in documentation but the file is quite large to load in the browser.
So I think it is better to go through a mbtiles file. I use tippecanoe for the conversion goejson to mbtiles
But, when I add this mbtiles file as a source there is a cluster-effect that I want to remove.
I am just asking how to remove the cluster-effect using mbtiles? Is it possible?
I cannot find this in the API documentation, but it's possible I missed it somehow.
Section
Dropping a fixed fraction of features by zoom level
says that default drop rate is 2.5, set it to 1 before generating mbtiles.
--drop-rate=1

Changing ti.barcode view size

I'm fiddling around with ti.barcode scanner module, but it seems it's always fullscreen.
Is there a way to make it use a part of the screen?
For iOS you can use SquareCamera: https://github.com/mikefogg/SquareCamera which allows you to have the camera inside a view and scan qr codes too.
But if you want to have it cross platform I would go with the overlay variant
Not sure if you can embed the ti.barcode to a smaller view, since you don't add it to a controller.
Have you tried to set the size of the module in the capture method?
The possible workaround is to create a view with your stuff and place it in the overlay property of the capture method

How can I dynamically change keyframe values from code in Unity 5?

I have gameObject with animator attached to it, it has animation curves, I need to dynamically change keyframe values from code. How do I access them?
Already asked this in the Live Session. The Answer is you can't since the anim file is the core for running the Animation Controller.
The alternate way that they gave me is to use the legacy SpriteRenderer instead.
Animation Controller doesn't support Dynamic changing of the values. Instead they provided Animator for you to make Dynamic changes of path from anim files, so consider making different anim files and path to your Animator if you don't like to work with SpriteRenderer.
If "dynamically" still means editor-time, then you could use UnityEditor.AnimationUtility, which provides methods to get and set curves and key frames and more.
One can retrieve the bindings with AnimationUtility.GetCurveBindings() or AnimationUtility.GetObjectReferenceCurveBindings(). And with AnimationUtility.GetObjectReferenceCurve() one can get the key frames, make modifications and apply it with AnimationUtility.SetObjectReferenceCurve()
At runtime - probably only with workarounds.
For example via some animated relay value within a certain custom script that then applies the wanted value to the actual property on Update() - a kind of custom constraint if you will. And within that you could apply then again custom modifications via code on runtime. But on editor time and when animating, the preview would be broken because you would not directly animate the property, but only that relay value. Maybe one could use [ExecuteInEditMode] in that custom constraint behaviour and AnimationMode.InAnimationMode() to simulate a preview. But all of this would be experimental.

Resources