Bing Maps v8 - infobox anchoring behavior has changed - bing-maps

In Bing Maps v8, I'm seeing different behavior between the release and frozen branches with regard to the anchoring of infoboxes.
I have icons on the map, which I click on to open an infobox at the location I clicked.
hhInfobox = new Microsoft.Maps.Infobox(new Microsoft.Maps.Location(0, 0), { visible: false, showPointer: false });
....
Microsoft.Maps.Events.addHandler(pushpin, 'click', showHouseholdInfobox);
...
function showHouseholdInfobox(e) {
....
hhInfobox.setOptions({
visible: true, title: e.target.hhTitle, description: targetHtml
});
hhInfobox.setLocation(e.target.getLocation());
}
When I click on this icon (i.stack.imgur.com/nam9Q.png),
the infobox appears here in the frozen branch (i.stack.imgur.com/1fSDi.png) (a bit south of the top left of infobox is anchored to click location)
but here in the release branch (i.stack.imgur.com/mLQ3k.png) (bottom left of infobox is anchored to click location).
The release branch behavior is a problem because the infobox might be 2100 pixels high, and when I set a max-height of 600, the top stays fixed while the bottom moves up 1500 pixels, and the user has to scroll up a few pages to find the infobox.
So my questions are (1) is this new behavior a bug or a feature? And (2) if it's a feature, what is the best way to anchor the top left of the infobox to the click location?
Using setHtmlContent might be the answer. (msdn.microsoft.com/en-us/library/mt712643.aspx) says "when custom HTML is used to represent the infobox, the infobox is anchored at the bottom-left corner," but I found that it anchors at the top left corner (i.stack.imgur.com/bvc7l.png), which is what I want, though I'd have to play with the HTML.
If this is a bug that will be fixed soon then I'll do nothing. Otherwise I'll probably use setHtmlContent unless someone has a better idea.

The release and frozen branches are very different at this point. The release branch is updated monthly and the frozen branch is updated once a year. Most companies should and do use the main release branch. The frozen branch is primarily for mission critical apps such as 911 call centers or emergency services scenarios who want a slower release cycle, as releases are when outages are most likely to occur, knowing that new features and bug fixes won't be fixed in that version for a long time. The frozen branch was last updated when V8 was released in June. A lot of new features and bug fixes have been released since then which are not in the frozen branch.
For completeness, the experimental branch is updated several times a day. More documentation on the branching system in Bing Maps V8 can be found here: https://msdn.microsoft.com/en-us/library/mt712554.aspx
As for positioning the infobox, you can control the anchor using the anchor property of the infobox class. By default, when the pointer is hidden and no anchor is provided, the infobox anchors its bottom left corner to the location. I've tried various content and maxHeight values and it always rendered correctly.

Related

How to achieve the current bing map NavigationBarMode on Bing V8?

We are currently using bing maps V8 and am trying to achieve the current bing maps navigation bar mode which looks something like this bing maps navigation bar mode on https://www.bing.com/maps.
These are the properties that I have added to my code
navigationBarMode: navigationBarMode.compact,
navigationBarOrientation: Microsoft.Maps.NavigationBarOrientation.vertical,
showLocateMeButton: true
The first line helped me to get the Map Type drop down and second line is to align the zoom in and out vertically because by default compact mode is setting up the zoom in and out button horizontally and the third line displays the locate me icon.
The problem with this approach is the Birds Eye view is not working as expected once I click the Bird's Eye view the "X" on the top right corner doesn't show up.
Is there any alternate way to achieve the current bing maps navigation bar mode?
Thanks in advance.
This appears to be fixed in the experimental branch of Bing Maps V8. Try adding &branch=experimental to the map script URL in your app and see if the issue is resolved. All fixes in the experimental branch will be pushed into the main release branch near the end of this month.

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

mapbox with markers and checkboxes - disable all from showing on initial load?

I have a page I built to display wind direction/velocity in various locations along a bike trail:
http://microflush.org/cgi-bin/pathInfo.cgi
I have several markers in a legend, with check boxes to enable/disable them from showing up on the map.
My goal is to have NONE of the checkable markers show up on the initial load. However, when the page is loaded for the first time, ALL show up-- even though they're not checked. If I select 1, they all go away except for the one I selected, which will then disappear if I un-check that box.
Is there a way to make them all be invisible at first, and only show up if they're selected?
(You can view the source of the link above to see the code. I wasn't sure if I should post that all, since it's kinda long with all the points I've added.)
Thanks!
Resolved. The 'var map' needed to be defined earlier in the code. Working properly now.

Delphi XE7 IDE moves/resizes controls slightly when form is opened

On opening a standard VCL form from our application, several controls are moved or resized slightly. e.g. a few pixels shorter or a few pixels to the left. Saving the form obviously commits these changes. Anyone know what causes this and how I can stop it?
Our application was developed in Delphi 7 and I think this issue has started since we recently moved it to XE7. Having made various code changes to various forms we've started noticing that controls had moved/sized a bit and thought they were mistakes. But today I've noticed that it happens when the form is opened. The form was previously saved in XE7 (it's not just the first open of a D7 form).
The controls seem to be mostly losing a couple of pixels off the Height, Width or Left property. I've not seen any of these values increasing, only decreasing. Not all controls on the form, just a few. The problem isn't limited to a single form. The Form.Scaled property is false.
Is something getting rounded/recalculated? There are 2 developers working on the application - could a problem be caused by developing on different resolutions or something?
Thanks a lot for any ideas =)
EDIT! Viewing a diff of the changes that were applied, I think poss all of the controls adjusted have non-default anchor settings. e.g. a button moved 2 pixels left is anchored [akTop, akRight]. It's on a panel that is anchored [akLeft, akTop]. Another control that lost 2 pixels from Width and Height is anchored [akLeft, akTop, akRight, akBottom]. I have just reverted the changes, changed the anchoring by editing the dfm and opened the form again: The control that moved previously didn't move. I'm certain it is related to anchoring.
EDIT2! Easy to repeat! It is related to the anchor of the control and the BorderStyle of it's parent control (TPanel). Add a form with a TPanel and add a TLabel within the panel. Set the TLabel to anchor [akTop, akRight]. Set the TPanel to have no bevel, CTRL3d=False, BorderStyle=bsSingle and BorderWidth=1. Note the Left property of the TLabel. Save the form. Open it again. Look at the TLabel's Left property. It has moved 2 pixels left. Keep on opening, saving and closing the form and watch the label move from right to left. Here's a pic of my example form

ie8 bookmark # click moves page

I have a few basic controls that are anchors with no urls, such as
<a id="UP" href="#">UP</a>
there's jQuery stuff attaching it to the click event (it's a jcarousel control with overflow hidden)
I understand that onclick needs a return false on it to stop scrolling to "#" on the page to that anchor. The issue is that on fresh load, no scrolling and the UP click all in view, the page still moves. Worse, it appears # has 3 or 4 different places! As I click UP repeatedly, the page moves up and down a few pixels as i click and click. This is always different than the absolute top where the page originally rendered.
Is it the overflow of the list that is no longer visibile due to the clipping causing this? Would adjusting heights of the elements so that the list items clip out evenly provide a stop to this? or is there some other ie8 flaw i'm not aware of?
Thanks!
After a bit of trail and error, I figured out that I needed to 'return false' the click handler so that it stopped the chain of events from continuing (ie, following the hash).
Further, I adjusted heights on the wrappers and clippers so that they were even, as that was the kicker on the 3 or 4 differnt height moves