How do I select a feature in OSM droid?
I already have polygons draw on the map.
When the user presses the screen, I need to find the feature (polygon) that's closest to the user pressing the screen and do something for it.
How do I achieve finding that feature?
OverpassAPIProvider from OSMBonusPack may help.
Related
I need to implement a sort of "select box" on this vertical menu:
In short I like to add the possibility to navigate the vertical menu via arrow keys.
I have already hook the game, but this part I need to do manually.
I thing the best way is use directdraw API but I don't have experience about it.
Theoretically I can follow 2 ways:
Change and resume the backgroud color of the selected item by position and color.
Add and remove a rounded box outside the selected item by position (this is not best but seem more easy to do).
I ask what are the directdraw (or other) API that do it.
Any tips are much appreciated.
Best Regards
I'm Having classes on computational design at university through AutoCad and we are asked to model some drawings. I'd like to know if there's any way to make the image I'm modelling appear on top of the screen while I hold some key, and go back to the model as soon as I release it.
There is no such built-in feature in AutoCAD. You can however insert the image in the background. Or you can write your own plugin to do that.
1) You can use the Attach command to attach your image in AutoCAD
2) Once the image is attached, then you can create your model on top of the image by using the "DR" alias for Draworder and select the image to place on top or behind your model.
3) Select the middle mouse button to Pan around and when you do this, your image file will disappear temporarily until you release your mouse button.
Hope that helps!
I'm working on an application, and part of it is making the user create a shapes such as squares or rectangles. I'm wondering if there is a function in wxwidgets that enable the user to do that. What i want to do is the user will click this button then he/she can draw a square or rectangle in his/her desired size. It is like in paint where you can make your own size in your desired size. Is that possible in wxwidgets and codeblocks? maybe some related links or tutorials or anything that will help. thanks !!
You should use this contrib library:
Object Graphics Library
OGL defines an API for applications that need to display objects connected by lines. The objects can be moved around and interacted with. You can find this in contrib/src/ogl, contrib/include/wx/ogl, and contrib/samples/ogl.
This is the link:
http://docs.wxwidgets.org/2.8/wx_utilities.html
Max
Titles sais context here is "drawing", ok.
But in case you are talking about user-created rectangles as means of selecting stuff (or users end up here while searching for that context), jargon for that is rectangles as selection is "marquee selection", and you would look into Wx::Overlay to accomplish that.
I've been using label to display images. I'd like to be able to click and create a bounding box then be able to drag the cursor to move around in the image. What would I need to do this? Thanks.
I'm not 100% sure I understand what you are trying to do, but I think the QGraphicsScene is what you are looking for. You can (among many other things):
Render images (QGraphicsPixmapItem, for example)
Change the zoom level when rendering the scene on a QGraphicsView.
Select things using a "rubber band"
Move items around with the mouse (see QGraphicsItem::ItemIsMovable)
etc.
You may need to get familiar with Qt's graphics view framework.
I write software for the disabled. One of the problems is difficulty tracking the mouse pointer. I want to have the mouse cursor glow (or similar effect. Maybe water like ripples around it) when the user needs to locate it. How is this done? I know it's possible because it's used in a variety of software.
You can create custom animated cursors "on the fly" by using CreateIconFromResource and painstakingly creating the cursor data structures yourself. I recently added some tests to the Wine project for creating cursors in this way, you can take a look at the structure of the cursor data by looking at this example for a three-frame cursor:
http://source.winehq.org/source/dlls/user32/tests/cursoricon.c?v=wine-1.3.16#L222
Have a look at Realworld Cursor Editor found here.
Edit: As the OP pointed out, the OP was looking for a way of creating an animated cursor programmatically, using Win32API. AFAIK it cannot be done or is long-winded way of doing it, the 'LoadCursor' function can load the cursor from an embedded resource or a file on disk with an extension .ani, hence my answer in support for the usage of Realworld Cursor Editor which can create an .ani file containing animated cursors, the other way of doing it is to use the 'Control Panel' > 'Mouse', click on 'Pointers' tab-page on the dialog itself to set it as system-wide settings. Here is a sample of how an animated cursor gets loaded here.
Hope this helps,
Best regards,
Tom.
An alternative approach is to leave the cursor as-is, and instead add some effects around it, using, for example, a temporary topmost layered window that you draw some animation on. (eg. alpha-blended circles to get a glow effect around the cursor position.)
This has the advantage of leaving the cursor unchanged, so if it's conveying information (eg. hourglass or size handle), you're not interfering with that.
If all you need to do is make ripples appear around the cursor, there is a setting you can change in the mouse section of control panel such that ripples appear around the cursor when the CTRL key is pressed.