how to create a mapping app in C# - c#

I want to create an app in C# that can display a map of a city (Belfast, Northern Ireland in this case) and overlay on top of the map the routes of the local bus service, Translink. This would work by the user entering into a search box a departure and destination location, clicking an "execute button, resulting in the route appearing on the map. I would likely use of either Google Maps or the OpenStreetMaps system to display said maps. If possible I would also like to track the actual busses themselves in real-time, either through GPS or estimation based on the timetable and average bus speed. All of this I would like to do in C#.
I would like to ask if it is possible to make this in C#. It is the programming language I am most familiar with. I would greatly appreciate it if I could be directed to any guides or examples of such systems, especially home-grown ones. The last objective may be too specific so I wouldn't mind being pointed to examples without that feature, but I would be thankful if I could. Also, if there are examples, but they are not C# based, I wouldn't mind it too. It would just be preferable if if it could be based in C# or at least within Visual Studio or Java Eclipse.
Thank you.

Related

How to make column download or not dynamically

I have a store website that we want to make available to mobile users. Completely redesigning this site is not an option. The store has a left and right sidebar that is purely informational and is not necessary to purchase items. I have been given the task of "hiding" the sidebars for mobile users. I can easily use CSS to say #rightSidebar {display:none;} but it is graphic heavy and still will download to a user's cell phone extremely slowly.
The store is in ASP.NET C# and the sidebars are ConLibs and I know I can put logic in there to say "if mobile don't do this" but my boss doesn't want that extensive amount of change to the store. (I know. :( ) Is there anything else that I'm overlooking that would let me "hide" the content without it downloading first? I'm no pro in .NET so thought I should ask you folks if there's something I am missing or haven't learned yet to do this. I feel the best method is to modify the ConLib but unfortunately that's not an option for me at this time.
Thanks!

GPS features for Mono for Android

I am wanting to know a couple of pieces of info before I dive in to do some Android programming.
I am wanting to make an app that will get the GPS locations of other users of an Android phone. Is this easy to do?
Also, is it easy to make an equivalent of a Tom Tom GPS application to guide you to places via a map?
And last question... Can I obtain my current location as a GPS coordinate and find the location of any shops, banks, service stations etc close to me via a map?
That's actually a whole set of questions on the subject of combining GPS with other services.
Most of this stuff actually goes beyond using the Android OS and extends into databases and online services.
Can I get the GPS coordinates of nearby phones?
To answer your first question: Yes, you can track GPS locations of phones. The big thing with this is that you need the phones to push their GPS coordinates to a server. The next step is then to ask the server, using your own GPS coordinates as the point of interest, what other GPS coordinates have been recorded in, let's say 200m. However, I must point out that this only works when you build an app for it and ask people to install it and run it. Also, there's a bit of a privacy issue with it as it's not really a mainstream thing to ask people for their GPS locations for no good reason let alone store that information on a server.
Can I create a personal navigation app like Tom Tom?
Yes, of course you can create a personal navigation app. There's open street maps that feature a lot of the worlds mapping data for free. Check out their website for more info: http://www.openstreetmap.org/
Can I retrieve the location of nearby shops, banks and other venues?
Yes that's possible, you can retrieve your current location in Android and combine that with a search engine that supports GPS. The first step in the process is getting the user location. There's a pretty good API guide on how to determine the user's location over on Google. Sadly, noone has yet written a blogpost (at least not that I've found) about it specifically for Mono for Android. It doesn't really matter though, as the java code is easy to convert into C#. Check the API guide here: http://developer.android.com/guide/topics/location/strategies.html
You can combine this piece of tech with services like the google maps API and query for adresses near a specific location. There's a few options here ( Given GPS coordinates, how do I find nearby landmarks or points-of-interest? ), I personally really like asking four square for venues near a location, because that one is actively maintained by a huge croud. Makes for a much more up to date experience.

Suggestions for a video montage application (extracting and playing randomized short clips from a playlist)?

I'm an electronics engineer used to coding in embedded C and assembly, but I decided to start learning higher-level stuff like C#, .NET, etc., so I can start making software as a hobby. I have a great idea for one of my first projects, but after searching several forums for days on end, I'm left not really knowing what would be the easiest path forward.
The functionality that I'm looking to create is pretty similar to the idea of a photo slideshow, but applied to videos instead. The program would open a playlist or a folder full of videos and then play the videos in a random order, starting from a random starting position, and with a fixed duration (let's say 10 seconds as an example). You would end up being able to watch a sort of "video montage" that consisted of small clips from random parts of the videos in the playlist, shown in a random order, ad infinitum until the program is closed.
There are a number of ways I could tackle the problem:
Develop a standalone video player with the fixed functionality of showing "video slideshows." DirectX has the Microsoft.DirectX.AudioVideoPlayback API that
could be a good starting point. I found an example here: http://www.dreamincode.net/forums/topic/111181-adding-video-to-an-application/
Modify an open source project to add the desired functionality. I've seen a few cool projects that could get me started, like this simple C# Movie Player: http://www.codeproject.com/Articles/18552/C-Movie-Player
Use a scripting interface to implement this functionality on an existing media player, like VLC or Winamp. You could also control VLC via C#, like the example here: Controlling VLC via c#
I realize that the obvious answer for most people would be to "use whatever you're most comfortable with," but since I'm a pure beginner, I don't really have any allegiances to a particular language or development environment. So, I was just curious if anybody had an idea of what might be the least painful option for a beginner.
I also apologize that this is not a very specific programming question. I'm sort of just testing the waters to get my footing. Hopefully, once I get started on the project, I'll be able to come back and post more intelligent and relevant questions!
While your background would lend you toward C#, I recommend investigating something like this and using WPF for the media player. You can then control the media player using a background worker in order to stop the video or queue up the next one. Some other .NET concepts that will be of use to you are FileInfo and DirectoryInfo objects, to provide you with the necessary information about the files. I'm not sure if you've had experience with generic data structures in .NET, but the System.Collections.Generic namespace would be a good place to start to get a feel for data structure you want to keep your playlist in. WPF will also be able to help you with transitions between video clips.
Admittedly WPF is easier with an understanding of the MVVM or MVC design patterns, but I think you'll be able to get something working without having to delve too far into that right up front.

A lan pet Project

Its an idea i have had for many years and i want to finally start doing it.I am still a newbie , but i have enough experience to understand new things.The basic idea is this.There will be an animal.A spider for example, which can run across systems connected in lan.It comes and sits in one computer, and if the user nudges it it crawls away to visit a nearby or random computer, where it stays until nudged again.That's it.
Now i want to know the following things
1)Which languages are best for this one?I have some knowledge of C# and java.I can do flash animations also
2)What all should i search for to get started?
Its a nonsense project and has no use to anybody.But i will get immense pleasure if i see it work.I will be posting more questions as i progress.
This wouldn't be too difficult in C#. You could create a program (or service) that runs on the systems across the lan, and use WCF Discovery to find other copies of the program running on other systems.
When you want to make the spider move, just see which other systems are available, and send a message to that system that you want it to go there. You'd then make your spider crawl away, and on that system, crawl into place.

Using data from Google Maps in a C# Program for Windows Mobile

I'm making a charity Windows Mobile 6 app in C# to help those affected by Alzheimer's.
The aim is for this app to let the carer set a boundary by tapping in Google maps to set points. The carer would then put the windows mobile device in the patient's hand bag or coat, so that when the patient walks out on their own, thinking that they are "going home", the carer receives an SMS text with their position, heading and speed.
However, I don't know how to...
Switch from app to google maps for mobile
tap to select points
import the coordinates of that point to my C# program
use the coordinates to Calculate the boundary
Send the text with the position information
Switch back to my C# program
HTC's HD2 comes with a compass that uses this "tap to select a point then return to app" functionality, so surely it's possible for us too?
If anyone would be able to give me a hand my out I would be EXTREMELY grateful as this will help all those affected by Alzheimer's and other similar conditions. My Gran, for example, recently started trying to walk back to the property she lived in 20 years ago...
Thanks everyone! This means sooo much! I'll even come and buy you a drink to say thanks!
James
Whatever technical issues you're considering, I think you should realize that this type of usage is, AFAICS, contrary to the terms of service of google maps. See:
http://code.google.com/apis/maps/terms.html
That is, you may only use the google maps content if its accessible for everybody, not just whomever you hand out your program to:
Your Maps API Implementation must be generally accessible to users without charge.
If you're building it as a web app, it must be accessible through the internet, not intranet:
[your Maps API Implementation must not:] operate only behind a firewall or only on an internal network (except during the development and testing phase).
Some of the terms in header 10 also seem applicable:
[you must not (nor may you permit anyone else to):]
10.8 use the Static Maps API other than in an implementation in a web browser;
10.9 use the Service or Content with any products, systems, or applications for or in connection with:
(a) real time navigation or route guidance, including but not limited to turn-by-turn route guidance that is synchronized to the position of a user's sensor-enabled device;
Why would you want to kludge something together like that? Trying to have your app interface with another application for which you don't have source, whether it's Google Maps fopr Mobile or anything else, is difficult and should only be used as a last resort.
If this app is going to be free and not require users to log in, you can use the Bing Maps Web Service API directly from your application without cost. You could then use built-in GPS through the GPSID APIs as well, and you'd have control over what data goes where, what maps to draw, etc.
This seems like a much easier path to achieve what you're after.
As a side note, I gave a link above for the GPSID sample from Microsoft. I'd recommend looking at it and the native GPSID APIs but the managed wrapper Microsoft provided is, IMO, pure garbage, so you might consider wrapping the lower APIs yourself.
To restate the problem I believe you're trying to solve:
You've a use case when a carer will sent up a "virtual boundary" on a device. If that device leaves the bounded area, you'd like an alert sent via SMS sent to a predefined recipient, saying where that device is.
My suggestion would be to use something like OpenStreetMap maps (as they're free) for when you're setting up the virtual boundary. For their tiles (each 256px square), there is a relatively trivial method for converting between lat/long and pixel co-ordinates.
You might also be able to do what you want by cannibalising one of their existing Windows Mobile applications intended for surveying, such as OSMtracker, which already includes the map controls, downloads and the like, just leaving point 5 and part of point 4 on your list to tackle.

Categories

Resources