For my university I have to create an application that for the User Interfaces paper that I'm doing. I want to create an application that focuses on Africa and allows the user to plot on the map some points of interest.
First thing first though, i need to be able to get the Google maps API working in a form. Does anyone have any idea how I would do this?
Google maps is based on JavaScript. You will need to embed the maps objects into the page and use it that way.
A good starting point would be http://code.google.com/apis/maps/index.html and the most basic of tutorials is available at http://code.google.com/apis/maps/documentation/javascript/tutorial.html#HelloWorld.
I would definatley recommend then links above and then move onto something like http://googlemap.codeplex.com/. It's better to know what's going on underneath before abstracting it away.
Alternatively, you may wish to check out GMap.net (the website is not GMap.net: http://greatmaps.codeplex.com/)
GMap.NET is great and Powerful, Free, cross platform, open source .NET
control. Enable use routing, geocoding and maps from Coogle, Yahoo!,
Bing, OpenStreetMap, ArcGIS, Pergo, SigPac, Yandex, Mapy.cz, Maps.lt,
iKarte.lv, NearMap, OviMap, CloudMade in Windows Forms & Presentation,
supports caching and runs on windows mobile!
I've used this before with WinForms and found it pretty handy. I suggest this because parts of Africa may be better served by different map vendors.
Related
I would like to know if there is any recognition system for Xamarin Forms that can recognise a point (for example a green filled circle) with the camera, in order to extract info from that point (like coordinates).
I know that EmguCV maybe can do that, but the samples are not working and if you want to use it on Xamarin Forms, you have to pay a commercial license, what does not make sense to me if I can't test it before.
Any info about this would be greatly appreciated.
I see 3 ways for you:
use EmguCV:
I use EmguCV for Xamarin Forms, and it's working pretty well.
But it's pretty complicated to configure it... Try this tutorial: Using Emgu with Xamarin Forms. I think you can test it without buying a licence but only on a simulator...
I also found an Azure service called "Custom Vision". You can train a neural network? to recognize objects on your pictures... Take a look at here (there is a free plan): Custom vision Azure service
Finally, If you have enough skill in image processing you can do it by yourself (there are many tutorial on the web).
==> For me the first solution is the best (Emgu is really powerfull). So if you plan to use it for several projects, I suggest you to buy a licence...
"Custom Vision" Azure service look really convenient but I don't know if it fit your needs... You have to test it, and the free plan is limited too...
Good luck
I have an application with Google maps in it. Currently the maps are rendered in a WebBrowser via the Maps Javascript API.
I have a requirement to make the map interact with the application. Specifically, I have placed markers on the map. The winform needs to register when one of them is clicked, double clicked, etc. and know which one it was. If the user right-clicks on a blank area on the map, I need some way of registering both where to draw the context menu and the lat/long that pixel represents geospatially.
I don't care whether the map remains in a webbrowser control or is replaced with something else. If needed, I can tear the whole thing out and put a new map in there - but it should be Google (because we have the expensive enterprise API) and it absolutely has to remain inside the winform.
How can I accomplish this interactivity?
Almost missed the part where you said you're willing to replace the web version with something else.
Have a look at Great Maps - for Windows Forms and WPF. It is a custom WinForms control you can drop on a form.
It supports a lot of map providers, Google Maps included. They have a demo with which you can play and see how it works and how it can be integrated.
From experience, I can say that it is possible (quite easily) to bind to map events (marker clicked, double clicked as well).
Something worth noting is that using Google Maps with it might violate Google's terms of use (you also get a warning in the demo app). You can always explore some of the free providers, like OpenStreetMap.
I would not use Great Maps for windows forms and wpf (GMap.Net) because it violates Google Map Usage Terms by accessing Google Map Tiles directly.
You can host one by yourself if you follow this link:
https://github.com/mchall/GoogleMapsApi.
Or you can use one free WPF control at:
https://archive.codeplex.com/?p=wpfgooglemap.
We use GDS Google Map. It is not free, but affordable. It does what we need.
I imagine this question will not bear anything, but this is a last ditch attempt before I have to tell my PM I simply can't do it.
My colleague (usefully before leaving the project) was a yes man to everything our PM asked for, regardless of what it was, and I seem to have been volunteered to create some functionality that will generate an Organogram / Organisational Chart and present it in the view.
I have dug around and asked around, no one really seems to know how I would go about doing this. Can anyone offer any advice on anything that can help? Even if it's the most basic tutorial or obscure API ever, it will be helpful.
To put a point on it, my question is: Is it possible to generate a chart in an ASP.NET MVC C# Application, and display it on a View? (Even a yes or no would help)
Yes, everything is possible. It's just a matter of how much time you can spend on it. Not everything has a good return on investment though, but that's for your PM to decide. As long as your team can make an estimation of the complexity.
But for ASP.NET, Microsoft has a Charting library that allows you to build charts. There are also commercial libraries (the first google hit) out there that are more feature rich.
And if they don't work, you can Always build images manually using the System.Drawing namespace of .NET (that will of course take considerably more time than plotting a chart using one of the available libraries). Generated images can be sent through an ashx handler, or you can embed the image in the same page using base64 encoding.
It's not bad to say yes to your PM, but I rather say: "Yes, we will stick this feature on the feature list / back log, and make a estimate of the complexity. Once we know the complexity you can choose to select it for a future iteration." But perhaps I'm talking too Agile now ;-)
You can hand off the chart drawing to an external library, for example, Google Visualization: Organizational Chart
Have a look at this question for other suggested librairies:
What's the best library to draw organization chart using JavaScript?
This sounds like it's in a commercial scenario, so it's really worth looking at the commercially available solutions. Steven already mentioned one, but as far as I can see that one is for Windows Forms and the other one is for charts as in bar charts and provides no organigram features.
A Javascript diagramming library with the capabilities of displaying organizational charts is yFiles for HTML. It has a nice online example of an organization chart that might be exactly what you are looking for:
There is also a Video that shows the demo in action.
The library is a pure Javascript implementation that does not depend on server libraries or servers at all. Integrating it in an ASP.net environment should be easy though, as long as you know Javascript. Being a library it offers full customization capabilities. You can determine the look and the feel of all aspects of the chart. Under the hood the library is a generic graph drawing and editing tool and the organizational chart is just one possible use-case.
Full disclosure: I work for the company that created the library, but on SO I do not represent my employer. My comments, thoughts, etc. are my own.
I'm developing Surface application, but I came across a problem. I need to develop a control with next abilities:
World map on background (should display only continents).
I need a way to find out on which continent user touched(interactive background map).
Any controls can be added on the top of the map control (for an example video-player control for different regions of the map).
Map control should works in offline mode only (without any
connection to internet).
I can't find any frameworks that would meet my goals.
So, anyone know something projects/code samples that can help me to achieve my goals
Offline mapping could be done in many ways, one of them would be download / get shapefile for continents. (You can search for that). Later you can use SharpMap to display that shapefile in WPF application. SharpMap is a .Net framework based open source application which enables reading multiple geospatial formats.
Another option to read geo-spatial data is DotSpatial.
I'm currently developping a commercial Windows application (closed-source, free demo with limited functionality available) in .Net 4.0 using C# and WPF. I'm now looking for a map library with the following features:
World-wide online map and/or satellite data (Like Bing or Google Maps. Due to lack of coverage however, OpenStreetMap does not qualify)
Display of custom colored placemarks
Optionally: Possibility to easily add a simplified offline map, on a lower zoom level
Which mapping solution satisfy those requirements without violating any licenses of the map provider?
If you'd choose Bing, it is fairly simple. As I said, I haven't done it myself, but I've seen it on a demo. It should be something like:
<maps:Map Name="bingmap" Mode="AerialWithLabels" CredentialsProvider="enteryourkeyhere"/>
Where maps is the namespace: clr-namespace:Microsoft.Maps.MapControl;assembly=Microsoft.Maps.MapControl
Then, in code-behind:
GeoCoordinate co = new GeoCoordinate((double)myLatitude, (double)myLongitude);
bingmap.SetView(co, 18);
Courtesy goes to Kevin Derudder who did a great presentation (which is where I saw it). It was about Silverlight, but should be almost the same for WPF. Check out his blog post, with code sample.
Have you looked at NASA World Wind? They have a lot of developer information hosted on their website. It is JAVA based, but there are ways around that.
http://worldwind.arc.nasa.gov/java/
And being a Government Agency, I would image that their imagery is Free-Use.
ESRI website Developer Tools Product Page
You may have to go commercial. If so, also look at Thinkgeo Mapsuite.
This is excellent, I guess it will have more than you need:
Great Maps for Windows Forms & Presentation
Just download code and check out the demo!