Place custom control between pan and zoom controls - google-maps-api-3

Any ideas how to place custom control between pan and zoom controls in google maps API v3?
I know how to do this when the custom control is on the top of native google's controls stack (for exmaple http://jsbin.com/ahetag). But it is not a solution...

You need to use the LEFT_TOP control position for the "middle" element and then set it as a control option for the zoomControl. So that the panControl is positioned as TOP_LEFT (by default) and then the other elements float downwards.
http://code.google.com/apis/maps/documentation/javascript/reference.html#ControlPosition

Related

Is there a way to change the zIndex on specific items in heremaps?

Currently on a page I am building I have heremaps as the background page, designs call for two elements on the left and on the right that I'm placing over the map element. Right now, when I'm selecting the options button on here maps to select the map view type and other options, those views get hidden as my right element covers it. I've noticed the here map logo has a z-index of 1. Is there a way to change the zIndex of the options button on the buttom right corner?
This code should work for you:
// assuming ui is instance of H.ui.UI
ui.getElement().style.zIndex = 999;
For more information see https://developer.here.com/documentation/maps/topics_api/h-ui-ui.html#h-ui-ui__getelement

How to set a LocationRectangle on Universal Windows Platform map control?

I am developing an app in which I have a Map control! On this map, I am adding custom pushpins via map.Children property. How can I set a LocationRectangle and then zoom on it? Because I want my pushpins not to be out of the screen size. I want the map to zoom on a level in which all of the pins will be on the screen!
You can use the MapControl's TrySetViewBoundsAsync method. This method allows you to specify a bounding box of the area you want to display (which you can calculate by finding the the farthest pushpins in all directions, which will give you the north-west and south-east corner of the area), a potential margin and a map animation to use while the view is being changed.
You can find more details about the method in the documentation.

How to stop google maps clearing the contents of DIV it is assigned to

I would like to add some controls to a div containing the google maps, but when the map is assigned to the div it clears its contents. Is there a way to prevent this?
My reason for this is a don't want to use the controls api + I want my controls to be positioned absolutely inside this div.
set the mapOption noClear to true

Show InfoWindow above another Dom Elements on Google Maps

I just started working with Google Maps API v3 and I'm using the map div alongside some other DOM elements showing above it by seting position aboslute and working with z-index.
My problem is I have to show the infoWindow of google maps that is generated inside de Map div above the others DOM elements.
I'm not getting there. I also tried to put the DOM elements inside the Map div but it seems de API erases them.
Does anyone know what it could be done in order to infoWindow show above everything else?
Use custom overlay's to place the elements on the map. The elements need to have position set to fixed.
You can try to use custom controls instead of DOM elements to place on the map. The custom controls are placed above the map and when you open an InfoWindow, Google maps detects the position of the controls and automatically moves and opens the InfoWindow below the controls, so the both don't overlap. In this case it is better to use it instead of the custom overlay, because the overlay moves when you drag or zoom the map and the control always stays at the same position.

How to resize DevExpress controls

I have a DevExpress LayoutControl set inside a WinForms Form. I would like the LayoutControl to resize horizontally when the form is resized, or at least make the LayoutControl resizable by the user.
I have seen on DevExpress's page suggestions to change the SizeConstraintsType property to "default". I have also tried to anchor the control to the right and left of its parent. I have worked on increasing the MaxSize, also. Does anyone know how to do this?
I just basically want to do the equivalent to (in HTML) <table width=100%>. Does anyone know how to do this?
Thanks in advance!
The Developer's Express LayoutControl is a very nice tool, but has a couple gotchas.
The LayoutControl itself should resize just fine docked inside any container control like a form, a user control or a panel control. In many cases the layout control is one of the first things you put on your form/control because everything else goes inside it to be "layedout". So you should set the "Dock" property of the layout control to "Fill" or to the desired edge of the form/control you want it to dock to.
The "gotcha" here is that layout control's internal logic may limit its external dimensions or any internal item if it is capable of doing so and the layout items want to be a particular size. This is actually simpler than it sounds.
For example lets say you have a label control inside your layout control. A label control by default will size itself to fit the width of its text. In turn the layout control will try to accommodate the label's desired size by shrinking/growing the size of the layout item. So this one label control could be messing with your layout controls resizing. I chose label as the example because it is the most common control to mess up your layout design.
The way I fix this is to change the label's "AutoSizeMode" property to "vertical" (if you want text wrapping) or "none" (if you want to force it be the size the layout control wants it to be). This free up the layout control to make the width decisions.
Also if you are allowing the layout control to be resized by the end user (say with DevExpress' SplitterControl) the layout will again try to become its optimal size and not allow the SplitterControl to move away from this optimal size if the other controls are more easily resized (like a grid, tree, list, etc...). In this case adding an "EmptySpaceItem" to the layout control will allow it to fill any empty space when being resized. To add an EmptySpaceItem to your layout, right click the layout control in the Visual Studio designer and select "Customize Layout". The customize dialog will have a list of items you can drag onto the layout control including the EmptySpaceItem.

Resources