UX for letting user drag a Google map marker and enter form fields - forms

I want to allow the user to specify the location of something by dragging a marker onto the map. And I also want to let them enter some information about that spot.
The problem is that this makes a very complex form. Can this be done in one step? Or do I have to make them choose location first, and then in a second form take the form-field input?
How would you guys go about doing this? Are there any good tutorials for this sort of thing out there?
Thanks,
Alex

What do you mean in one step?I implemented this by adding a floating form in the side of a map and adding two hidden(or not?) fields that populated with the coords of the draggable marker.I really don't see any other way except maybe if you embed the form in the info window of the draggable marker
Cheers

Related

Create a menu on avatar click

I've been searching for quite a while now, and I don't know if I'm not searching the correct term, but I want to make a menu that displays over the current screen when you click on your avatar.
Like this one from Google:
Or this one from Facebook:
I tried using showMenu(), but this one requires that I use PopUpMenuItem() which is, but it does not allow customizing the whole menu. For what I understand, I have to draw a Material() widget or Stack() over the current screen, but I have no knowledge on that.
What you need is an OverlayEntry. They're tricky, and there are packages that help you manage overlays more easily. Please check these:
https://pub.dev/packages/modals
https://pub.dev/packages/flutter_portal

Map in a form submits when zooming

I have a map as part of a form (users move the map to submit a location).
When you build a form in our CMS, it wraps everything in the form tag, including the map - pretty common, really.
When a user clicks one of the map controls to zoom in or out, it submits the form. Not optimal!
Example here: https://output.jsbin.com/mejidew/
Yes, I probably can work out a way of getting the map div outside the form tag, but it means refactoring my form quite significantly. I'd like to avoid this if possible - after all, it seems like a bug to me that the zoom function allows the click action to pass through to the form.
Thanks for the bug report! Fix coming in https://github.com/mapbox/mapbox-gl-js/pull/2935!

Opening a popup on layer option click in leafletjs

I will be trying to show a set of options using the layerGroup functionality to filter out the markers. I need to show a popup when an option is selected from a layer which will prompt the user to enter a number based on which i will be showing the markers. Is there a possible way?
In the above sketch, there' s a sample filter at the top right which i intend to show using the layers but the thing is on selecting the 'Location' option i have to show a popup that will prompt the user to enter a location number and on that basis the markers should be placed on the map.
I guess there would be multiple ways of achieving this, depending on what behaviour exactly you want to get.
E.g. you could use a "dummy" layer (with name "Location" probably?), that you can add in the Layers Control (I guess that is the "sample filter at the top"?). Then listen for this dummy layer for being added to the map, and launch your modal ("popup") at this time. Then when the user enters the necessary information, you can programmatically add the corresponding markers to the map.
If you need further help, please add more details on what behaviour you try to get, or start your implementation and post new questions, so that you already have a start of what you are trying to achieve and people can elaborate on it.

Access Forms prevent mouse from selecting values from dropdown, force keyb input

I have a data entry form. Its properly tab indexed etc. and there are three dropdown menus which automatically unfurl with the on enter event.
No matter how much advice i give to users about using the tab key and keboard and checking what they just input.
they still insist on using the mouse to select values from the dropdown menus
the problem is that in their haste they often make mistakes as a result of using the mouse.
I would like to be able to force users to input into these fields using the keyboard.
the drop down is neccessary for users see the appropriate values for the field because the values will vary based on previous selections.
I have already tried experimenting with onclick events but to no avail.
Is there a way I can do this?
i am using access 2007 many of the users have access 2003.
Based on your comments, I would take one of two different approaches.
If your users are really comfortable with the codes AND know which ones they should use based on their previous selections, then just use text boxes instead of combo boxes. You can still put some validation code in either the Form_BeforeUpdate event or the individual control's _BeforeUpdate event.
If the users are not that comfortable, then I would suggest you have the first field in the combo boxes be the description of the code, not the code itself. So instead of choosing from 101, 102, 103 they are instead choosing from "Small", "Medium", "Large" or whatever those codes actually apply to. If you still wanted to display the codes themselves, you could do that with a separate disabled text box.
Now to answer your actual question. For the record, I highly recommend against using this approach. The simplest way I can thing of to prevent your users from using the mouse to select the combo box, would be to add a Transparent button covering the combo box.
To do this, draw a regular command button over the combo. Set Transparent = Yes, Visible = Yes, Enabled = Yes, Tab Stop = No.
When users click on the combo now, they will actually be clicking on the Transparent button and nothing will happen. The ONLY way they will be able to get into the control is by tabbing from a neighboring control or using a hotkey (via '&' in attached label).
Once they enter the control via Tab and your code forces a dropdown, they will still be able to choose an option using the mouse. But by forcing them to use the keyboard initially, it will make it much more likely that they just stick with the keyboard.
Again--I can't stress this enough--I think this is a terrible, horrible, no-good idea. Please don't use this approach. But you asked a technical question and this site is all about giving technical answers, so there you go...

Arrange GUI elements in WPF in a similar way to the applications on the iPhone

I would like to arrange UIControls in WPF in a similar way to the applications on the iPhone. They should be positioned on a grid, but a user should be able to drag them somewhere else, after releasing the mouse button (or the finger in case of an iPhone) the selected UIControl should snap back to the next position in the grid. The other UIElements should be rearranged automatically.
Further the user should also be connect two elements with a line or something.
I'm not experienced with WPF. The first question is if there is a container which is suitable for something (System.Windows.Controls.Grid ?) or if I have to extend canvas or somethig else for this.
I would like to know which elements from the WPF framework can be used and which elements I have to write myself.
For people who do not own an iPhone: http://www.youtube.com/watch?v=3omhu2AUWC8
Update
I've looked at AnimatedTilePanel in the BangOTricks examples (see below), this one explains how to create your own Panel and how to let it arrange things there.. However I still need an idea how to implement drag and drop correctly in this example..
Unfortunately, you'll have to write a lot of things yourself, as WPF doesn't automatically do what you're looking for.
For positioning the controls, you can use either UniformGrid or Grid. Assuming it's much like the iPhone video you showed, you can just use the UniformGrid with 4 columns and however many rows you need.
For the dragging animation, layout-wise, you could start by manipulating the RenderTransform property on whatever is being dragged, but you'll have to set a handler to check once you've met whatever threshold necessary to move into the another "cell" -- and at that point, you'll have to changed the order of the items in the tree.
Take a look at AnimatedTilePanel from Kevin's Bag-o-Tricks at:
http://j832.com/bagotricks/
It doesn't do everything you want but it will show you how to write a panel that animates its children when changing size or order.
New input to this old post in 09. Earlier this year (2012) someone has wrote a FluidWrapPanel and open sourced it. I tried it and it works like a charm - just like that on the iPhone menu.
You can also apply to other UI Elements or UserControl.