DevExpress ChartControl How To Disable User Selection Zoom - charts

How can I disable the user selection zoom, when the user click shift and move the mouse to select area and zoom, I am using DevExpress Chart Control
thanks

Not sure which technology you're using (WinForms, Web, WPF, ... ?), but in general setting both EnableAxisXNavigation and EnableAxisYNavigation (the diagram pane's properties) to false should disable the zoom.

Related

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

Stop click propagation on a custom div within a leaflet map

I have a custom div (with settings) within a map. I would like click event not to propagate to map when a user clicks on the div. How could one achieve such behavior?
Leaflet version 1.0.
See the documentation for L.DomEvent.stopPropagation().
For anyone else coming here from a search engine, if you are trying to prevent clicks from a circle or other interactive layer from being handled by the underlying object (other circle or the map itself) you could also create the layer passing the option bubblingMouseEvents: false
Documentation: http://leafletjs.com/reference-1.2.0.html#interactive-layer

How to turn off the draggable behavior in Bing Maps API 7.0

I am building a map application using the Bing Maps API 7.0 javascript control. I am trying to figure out how to toggle the default "draggable" behavior of the map. I want my users to be able select a rectangular region by clicking in one corner, and then dragging the mouse to the other corner. Is this possible?
I'm not asking for any help with the selection behavior, just the ability to toggle the draggable behavior. Thanks!
The easiest way to do this is to set the map options to disable panning/zooming:
map.setOptions({disableZooming: true, disablePanning: true});
When you want to be able to move the map again then set these values to false.

How to disable Bird's eye angled view in Bing Maps control version 7

For business use Microsoft charge extra for use of the Bing Maps birds eye angled view, so my client has ask that I disable this option. In verion 6.3 of the control this was easy, there is a map option that can be used to do this: enter link description here
However, I can't find how to do this using the API with version 7 of the control. The current menu has Birds eye as an option with check boxes show labels and show angled view. Ideally I'd like to disable the option from the menu so that users are only able to view road and aerial views. So it looks like I have two options available:-
1) Hide the show angled view check box somehow with css. The issue here is that I can't get to the HTML content using the IE developer toolbar of firebug as it only displays when selected.
2) Attach to the map maptypechanged event and if birds eye map selected set it back to the map type it used to be.
Both of the above are far from ideal. Does anyone have a suggestion for the best way of doing this?
Sample code:
map = new Microsoft.Maps.Map(document.getElementById('myMap'),
{
credentials: 'Your Bing Maps Key',
disableBirdseye:true
});
here are some working examples from the iSDK:
http://www.bingmapsportal.com/isdk/ajaxv7#CreateMapWithMapOptions14
API Reference:
And here is the MSDN:
http://msdn.microsoft.com/en-us/library/gg427603.aspx
disableBirdseye
boolean
A boolean indicating whether to disable the bird’s eye map type. The default value is false. If this property is set to true, bird’s eye will be removed from the map navigation control and the birdseyeMapTypeId is disabled. Additionally, the auto map type will only display road or aerial.
This property can only be set when using the Map constructor.
You're correct in stating that there is no way currently using the v7 API to disable individual map styles. A possible Option #3 which is less hackish, but requires a bit more work, is to set the showMapTypeSelector property of the MapOptions to false, which would have the effect of hiding the entire map style selection dropdown. Then create your own custom navigation menu that only includes links to those styles you want to allow the user to choose.

yui-autocomplete

Two questions regarding yui autocomplete:
Is there a way to make yui autocomplete mouse selection and keyboard up/down selection create only one selection at any time ?
Also is there any way to update the text in the autocomplete textbox with the selection done with keyboard up/down arrow only ie force the selection to appear in the textbox above if user selects in with up/down arrow keys ?
Note that in the following link I see deep blue for keyboard up/down arrow and light blue for mouse selection. (Remove the underscore before http in your browser url)
Case #1: _http://developer.yahoo.com/yui/examples/autocomplete/ac_basic_array.html
However in the following link(case #2) this is not the case. I see only one selection (dark blue) at one point of time.
Case #2: http://developer.yahoo.com/yui/examples/autocomplete/ac_basic_xhr.html
If I use the mouse and/or key up/down, there is still only one selection dark blue always.
My application is behaving as in case #1 but I would like it to behave as in case 2 above, with only one selection at any time and in addition update the text when user moves with the keyboard up/down arrow keys.
How can I make this happen? Both the above examples are using YUI autocomplete, but I can't see the difference between the two to make my app follow example 2.
In summary I want this to behave as google suggest does in www.google.com
Thanks,
Viji
var myConfigs = {typeAhead:true, autoHighlight:false, prehighlightClassName:""},
myAutoComp = new YAHOO.widget.AutoComplete("myInput","myContainer", myDataSource, myConfigs);
By the way, prehighlightClassName is disabled by default so you really shouldn't need to specify it in the configs.