Building a Geographic Mapping Application

Discussion in 'Mac Programming' started by jotade11, Aug 14, 2010.

  1. jotade11 macrumors regular

    Joined:
    Feb 2, 2009
    #1
    Hello all!

    I have a fairly complicated question, as I'm totally new to iPhone programming and have just the most basic foundation in Cocoa. What I'm considering working on is creating an application that will allow users (probably candidates and campaigners) to search a database of registered voters called "Voter Vault" and create walklists. Voter-Vault provides the address, name, telephone, etc. which simplifies things a little bit. Also, it allows very specific searches (ie. search all Republicans, Democrats and Independents or all males and a long list of other checkboxes).

    My question is how do I go about tying in say, a Google Maps API, to get the shortest distance between a (searched) database of houses to create directions for walklists. Also, how might I create an app that runs off of this website, Voter Vault, and allows users to implement its powerful search engine? My vision (which might be too unachievable) is that users would login to Voter Vault inside the app, specify their search terms, the app would spit out a list of directions, a list of the houses and a map with pins dropped to indicate the selected households. Perhaps, although this is unrelated, it might also include a notepad for each house, with room for notes and a list of checkboxes (ie. Wants a yard sign, Needs a call from candiate, etc.) that would be able to be collected and emailed, for easier viewing on a computer, but this is definitely a secondary feature.

    I really have no clue where to start, so if anyone would be willing to offer me a little bit of direction it would be greatly appreciated! Also, if I've been to confusing, please let me know so I can clarify

    Thanks!
     
  2. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    The first and most important point is do they have an API to access the data you are talking about?

    If they do then it should be documented clearly on their website, if not then you have to resort to screen scraping. Perhaps if you provide a link to the website it would be easier to help you.
     
  3. jotade11 thread starter macrumors regular

    Joined:
    Feb 2, 2009
    #3
    I do not see an API listed anywhere on the site, nor in the 'Help Topics'. :(
    The site is www.votervault3.com/ but due to the content of the site, you have to be a registered user.

    If you tell me this is too complicated, especially because you can't really get a good look at the site, that's fine.

    Thank you!
     
  4. larkost macrumors 6502a

    Joined:
    Oct 13, 2007
    #4
    The second problem that you are probably going to run into is that Google's terms of service on their free service prohibit this sort of thing. I believe that they have a paid service (and if not then I know that MapQuest has a whole division on this). There is a lot of money in proper routing software, and the people who pay for putting together the map software make their money on this sort of thing.
     
  5. jotade11 thread starter macrumors regular

    Joined:
    Feb 2, 2009
    #5
    Uhuh, I just went through the whole MapQuest site... there must be a lot of money, haha! But so without an API for FileVault, is there any way for me to create my own API for the site (this may sound ridiculous and not be possible without having admin access on the server, I'm just not familiar with this at all)? But thinking about it, perhaps screen scraping might work a bit better, seeing as there is a very advanced search engine on the site. Or am I thinking of a frame?

    The problem I see now is how I can transfer data from the scrape into the maps engine...

    Again, any direction is greatly appreciated... I'm just not sure where to start xD
     
  6. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #6
    No you can't write your own API per se without admin access, screen scraping seems like your best bet.

    The problem with that is that every time the website is changed it will likely break your screen scraping program. Plus it will look very obvious to the webmaster what you are doing and may just ban your IP address (I would if it was my website, the fact they have no public API is a pretty good indication that the data is private).

    The other problem is legal issues. If the content is copyrighted you open yourself up to DMCAs.
     
  7. jotade11 thread starter macrumors regular

    Joined:
    Feb 2, 2009
    #7
    Well, if this came together eventually, it would be for registered users of this site; so it shouldn't violate any of the ToS. I'm really just looking to streamline the process and tie in maps to the data (which they already have access to, through their web browser) inside of a program. I started looking into an AppleScript that might function similarly, and I'm considering a web program, which can be accessed through a website.. just because I have more experience with HTML.

    Thanks for the help you two! :)
     
  8. ranguvar macrumors 6502

    Joined:
    Sep 18, 2009
    #8
    I'm not sure I understand you correctly, but if I do, you're dealing with the Travelling salesman problem. If you really want to compute an optimal walklist you're going to have a hard time, especially on a platform as limited as the iPhone!
     
  9. jotade11 thread starter macrumors regular

    Joined:
    Feb 2, 2009
    #9
    Yeah, I realized that I definitely do not have the skills for an iPhone app, but I might be able to do something similar for either the Mac or as a web app (which of course, could be viewed from any phone, which is probably a much better idea, since many of potential users probably don't own an iPhone xD).

    But yes, I thought I wouldn't even have to go into the Traveling Salesman problem, since I could just use the Google Maps/Mapquest API to optimize the results. I don't know if the API's actually allow me to do it, but it would be like the pins you can drop between Point A and Point B to add another stop to your route, except it would be automated based on the search results. I think the hardest part right now for me, is working out how to transfer the information between the web-based-database and the Maps, ignoring the problem of optimization for now... I'll do a google on this transfer and see if I come up with anything useful.
     

Share This Page