How to add text label to a MapMarker? MapViewPins have poor perfomance apparently - flutter

I'd like to add custom markers with text labels on my map. I can use MapViewPins for this, but they "tremble" when map is being moved. Even one MapViewPin behaves like this in official Here example, so it is probably not an optimization issue.
When i load PNG image and use it as a MapMarker, it works perfectly. But i don't know how to add text to a marker.
I am using Here SDK for Flutter (Navigate Edition) 4.12.4.0 with Flutter 3.3.2
GIF below is an example. Cyan circles are MapMarkers, markers with icons and label are MapViewPins. Is there any solution to this problem?

Unfortunately, the MapViewPins, being widgets embedded in the MapView surface, need to be relocated to the fixed coordinates every time the map is interacted with by gestures, which is why you notice this "strange" behavior.
However, what you mention about using MapMarkers would be the best solution but in this case instead of using PNG files, you could use SVG files in which you enter the text you want to display.
There is currently no other way available to do what you mention using the HERE SDK (Navigate Edition).
Here is a link to our most up-to-date HERE SDK (Navigate Edition) documentation: https://developer.here.com/documentation/flutter-sdk-navigate/dev_guide/index.html

Related

Very small labels and components in Mapbox

I am trying to create a navigation application using Mapbox GL JS. But the text labels are too small along with the searchbox. Where in the Mapbox GL JS API can we set the tilesize and ppi to fix it?
The best way to adjust the size of the text labels is to create a custom map style using Mapbox Studio, rather than programmatically manipulating the size of the map labels using the GL JS API (unless for some reason you need the text label size to be responsive on the client side).
You can navigate to studio.mapbox.com, select the New style button, choose a template to customize, and then click the Customize button. This will open the map editor interface, where you can navigate to the Layers panel on the lefthand side of the interface and select a layer whose properties you would like to edit.
For example, in the screenshots below I selected the state-label layer and changed the Text size property from 18px to 30px. More details about styling layer properties can be found in the documentation here.
To persist these changes to the map, you can publish your style, as described in the detailed documentation here. The way in which you can then add the custom map style to your application is dependent on the application you are developing for. The linked documentation specifies the appropriate steps for web, Android, iOS, Unity, and several other third party options.

How to add text outline in unity

How can i add text outline in unity over a text UI object?
I want to do it in the designer/editor view. i cant see to find any useful topic and i also cant see how to add it from the designer view.
My project is 2d and i'm using the latest unity version 5.3. I want to achieve similar effect.
Or. Alternatively to Joe's answer. To simply add a outline effect to a normal .ttf font :
Click on the text object from the Hierarchy
Click the Add Component button in the inspector
Type "outline" in the search bar.
Add the outline component.
Note! This explains how to make custom type ("sprite sheet type") in Unity.
Before reading it, check Uri's & Programmer's answer which explains using the handy new "outline" feature in .UI ! It may well be enough!
Unity does not have any fancy type handling at all.
You can drop in "normal" .ttf fonts,
or, you can drop in "image fonts", called custom fonts by Unity, where you literally make each letter on a sprite sheet.
A font sprite sheet looks something like this:
Here's exactly how to do it ...
(1) you have to use GlyphDesigner (or any similar product) to actually make your custom font sheet. Find the product you like for your Mac or PC to do this.
(2) There is a critical trick.
Unity completely forgot to include a type matcher for custom fonts. (They may fix this in Unity 6.) It's one of the stupidest things in Unity. So, fortunately there is a free and perfect script
BitmapFontImporter.cs
https://github.com/BenoitFreslon/BitmapFontImporter
There's a full and long tutorial link at that page.
You have to include that to make custom fonts work. It's just one of those weird things about Unity.
So in short, firstly you have to literally "draw" such custom fonts, letter by letter. In fact you need to use something like GlyphDesigner to do that.
Secondly in Unity you have to use the extremely handy script mentioned above or it won't work. Enjoy!
http://answers.unity3d.com/answers/1105527/view.html
TextMesh Pro from the Asset Store does the job and it can be imported for free.
This gives plenty of possibilities fort texts, including how thick the outline should be.

Is it possible to install circular avatar in place of axis text labels

I've got a requirement to install people's faces on the Y-Axis of a bar chart. Is it possible to install a custom image in place of the axis label? Ideally the solution would enable border-radius, border-style, and image URL properties.
Bonus points if you can point me towards documentation for enabling image-axis-label click & mouseover events!
There is an example of using images as labels here:
https://www.rgraph.net/demos/bar-images-as-labels.html
But keep in mind that they're not DOM objects - ie you can't style them with CSS on add mouseover events to them (at least not in the standard way). You could add a mouseover using RGraph though.

Is it possible to use Google Fusion Tables with a custom overlay?

here is what I would like to achieve:
I need to use an custom overlay like this https://developers.google.com/maps/documentation/javascript/examples/overlay-simple
as background for a set of points loaded from a Google Fusion Table like this
https://developers.google.com/maps/documentation/javascript/examples/layer-fusiontables-simple
Also if you could confirm this: I read that you can configure a custom icon for each point you display by adding a link to an icon in your Fusion table. Has anybody tired this?
I have searched examples for the above but I could not find an all in one example
thanks a lot
You can not display custom icons on FusionTablesLayer (it only displays a defined set of markers), you can use the data in the FusionTable to create native Google Maps API v3 custom icons, but you lose the performance benefit of FusionTablesLayer tiled rendering (which will be an issue if you have lots of markers).
example from the documentation
combination of the 2 Google examples

Android UI home screen design

I am up to create a section on my Android Home screen similar to this one,
but cannot really figuring out where to start. I mean is this a ListView I should go with? or are these simple images that are placed as different objects surrounded by straight lines? In either case, how to put these things together, is a question that I am wondering..
You can either use:
a GridLayout (for API < 14, there is a support library available somewhere on GitHub)
a vertical LinearLayout containing two horizontal LinearLayouts
a single RelativeLayout
For the buttons, use TextView or Button with a top drawable.
Please note that the dashboard pattern is now discouraged (link 1, link 2) (you should present useful information to the user on first screen such as there latest trips, friend's news, ...).
Instead of that, you could put your buttons in a sliding menu (jfeinstein has a nice implementation on github which can be integrated within an hour)