Is it possible to show a cardinal direction button in the navigation bar of Bing Maps v8? - bing

The navigation bar of v7 offers among others a cardinal direction button (see screenshot below). Does this option exist in v8?

V8 does not provide such buttons, however you can easily create this for your app if you want. Here is a code sample: http://bingmapsv8samples.azurewebsites.net/#CustomOverlay_BasicOverlay
This sample uses a custom overlay for the buttons, but you could easily use HTML in a div and just float it above the map. That would take less code since you would create the buttons using HTML rather than JavaScript.

Related

Is there a way to add input field in nav element using React FluentUI (#fluentui/react)?

The examples on website show many examples of navbars with links.
Image of navbar demo as shown on website.
I want to implement a search bar inside the nav element like this. Is there a way to do it?
I would try with OnRenderLink or linkAs methods.
onRenderLink:
Used to customize how content inside the link tag is rendered
linkAs: Render a custom link in place of
the normal one. This replaces the entire button rather than simply
button content
Source: INavProps interface https://developer.microsoft.com/en-us/fluentui#/controls/web/nav

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.

Enable Mapbox Draw control programmatically

Using Mapbox-gl-draw (https://github.com/mapbox/mapbox-gl-draw)
I am able to get the basic example up and running, and this package does everything I need. However, I am having trouble figuring out how to activate the draw functionality programatically. For example, my application has some panel overlays, and as part of a form I'd like to activate the draw ability by clicking a custom button, not the control button that shows on the map. Ideally I'd like to keep the map control button hidden (which I can do).
I've scoured the documentation with no luck. Anyone have any insight?
Demo of the functionality I am referring to here: https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-draw/
It's documented in the API reference
changeMode(mode: string, options?: Object): draw
Changes Draw to another mode. Returns the draw instance for chaining.

Application Menu on top of Leaflet map

In a map application based on Leaflet, I would like to have a large application menu, kind of a settings menu. I managed to put a nice button into the top right corner as a L.Control and it gets fired on a click.
The menu should position either to the left of the menu button or simply in the middle of the screen.
I am wondering whether it is best practice to use
a Popup,
a Layer,
another Control or
just position a at the right place on the page.
Trying the latter, I found that I have to set z-index to a very high value to see it, and it feels a bit odd not to use the Leafleat features.
What would be the "right" solution to use with Leaflet?
If you want a full screen map, you can use https://github.com/Turbo87/leaflet-sidebar
I use it here: http://franceimage.github.io/map
You can create a nice customized icons based toolbar using Leaflet easybutton plugin.
You will have all the leaflet based controls (Click, hover, position etc.) to set that up as per your requirements.
Here are the implementation examples:
http://danielmontague.com/projects/easyButton.js/v1/examples/
and github repo: https://github.com/CliffCloud/Leaflet.EasyButton

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)