I implemented a map using apple's native f/w and I have implemented the functionality to add some polygons over the map. Now, I want to have a "close" button at the edge of the each polygon and when I click on that button, i need to delete the polygon (one polygon at a time). I have tried creating a button over the polygon edge, but I was unable to make an action on clicking the button. I have tried with annotations as well. In this case, I am unable create a close button over all the polygons; I could able to have the close button (annotation) only on the last polygon which was created but when I click on the button, the polygon which was created first only was getting deleted.
Kindly suggest me a solution to have a close button on each polygon, and to delete a polygon(one by one) on clicking the button.
Related
I'm trying to create a button that works exactly like when I click on rectangle Tool on Tools bar. Meaning I don't want it to create a rectangle by just pressing the button, I'm not gonna use Objectcreate() function. Instead, I want it to wait for the user to push the mouse button on chart and drag it to create a rectangle. Just like when you choose the rectangle tool and the cursor-shape changes.
I've looked the WndObj.mqh, Wnd.mqh and Rect.mqh and couldn't figure it out how does this work.
I appreciate if anyone can tell me how to do it
enter image description here
enter image description here
Watching a tutorial and it looks like the guy is holding down a button to show the distance between his selected view and what's around it.
I've tried command, option, control, and every other button I can think might work. What button needs to be held to get these lines?
By pressing option key only on your keyboard.
Select an element, and move the mouse while pressing the option key, it will show the red lines with the distances.
Hovering over another element will show you the distance between the selected element and that element.
I'm looking for a way to draw a rectangle in a single drag movement, so the user click and hold the mouse pressed then move the mouse and the rectangle is painting as he go and the drawing is finished when he stop pressing the mouse.
Currently it's done using mouse click -> drag -> mouse click again to finish, not that intuitive.
I'm using the latest OpenLayers 3.
Thanks!
The functionality asked for is already present in latest openlayers version (v3.19). Use ol.interaction.Draw.createBox() to create a rectangle with 2 clicks one for start and another for end. See the below example for more details
http://openlayers.org/en/latest/examples/draw-shapes.html?q=draw
You can create your style for the rectangle by creating style object and declaring it in ol.interaction.Draw().
Instead of using the built-in interaction use an instance of https://github.com/openlayers/ol3/blob/master/src/ol/interaction/dragzoom.js but pass in an option/condition to not use the shift key. Here are the conditions https://github.com/openlayers/ol3/blob/master/src/ol/events/condition.js
Have you looked into the DragBox interaction? This will give the user an outline of the box as they are drawing it with click, drag, and release being the interaction.
I am implementing a simple "Gear Menu" animation in a project.
When the user presses the Gear Button, it animates and shows two options ( location and rating ). My problem is that I am able to click on the Gear Button, but cannot click on the Location Button or the Rating Button.
When I click on the Gear Button, the animation starts and the animation should reverse when user clicks on Location or Rating Buttons.
Note: The animation code is generated by a tool called “CoreAnimator”. It is a very famous tool.
I have tried the following things:
Set the clipsToBounds property for the superview ( scaling ) to “True” to make sure that the Location Button and Rating Button are not going out of bounds.
Send the GearView to back in the subviews array of ( scaling ).
Still I am not able to click on the Location Button and Rating Button
Image of the Screen showing Gear Menu
Please find my project on dropbox:
https://www.dropbox.com/s/m6nshfzj8h7rux5/AnimTry.zip?dl=0
I have an app that automatically gets the user's location via GPS if enabled, but I'd like to provide an option to allow the user to manually input the location. I'm not sure how this can work form a UX or technical perspective. Below is my screenshot from my table.
If the user disables Automatic, I'm not sure what the best way for the table to react or what controls to use. Should I open a modal view and display drop downs for the user to select their: country > Province > City? Or maybe to allow them to place a pin on a map? Could it be very simple to implement a text box that allows the user to enter an address then I can geocode it instead? I eventually want to end up with coordinates in my app code.
What kind of data or services do I need to accomplish this? It's a small feature, but I'm finding it to have many factors involved. Any help or advice would be greatly appreciate!
I would suggest implementing a UIMapView with 1. a UISearchBar above it 2. a UIButton that pings the user to their current location, to the right of the searchBar and above the mapView 3. an 'Add Location' button at the bottom left of the mapView and 4. a 'Cancel' button at the bottom right of the mapView. The 'Add Location' button would use the center coordinate of the map.
When a user switches from 'Automatic' to 'Manual' put a button to the right of the label that says 'Add Location' or 'Update Location'. Pressing this button would animate the previously discussed view to sweep in, or however you want to animate it.
Good luck with your design!