Try the search, it's linked to some great forums

Sunday, January 27, 2013

Creating maps with GPSVisualizer

Steps for creating a map from a spreadsheet using the very useful GPSVisualizer website brought to us by Adam Schneider

Geocoding your data (getting latitude / longitude from addresses)
  • Open spreadsheet, and make sure file has appropriate data filled out.  In particular make sure that the are address, city, state columns or latitude longitude fields complete and correct.
  • Save the spreadsheet as a CSV file (Comma Separated Variable)
  • Goto GPSVisualizer and open up their Geocode an Address page
  • Goto 3,Geocode simple tabular data, and select the text/GPX conversion utility
  • Paste your CSV file into the file field and set Plain text delimiter:comma    Plain text output  units: US and press Convert to allow the utility to add latitude & longitude to your file
  • Save the resulting .csv file to the appropriate directory
  • Review the file to note bad addresses and suchoogle Drive and set appropriate sharing.
Creating the KML file (these files have waypoints & track data)
  • Download the distribution spreadsheet as a .CSV file for uploading into the GPSVisualizer
  • Goto GPSVisualizer and open up their Make a Google Earth map page
  • Upload the CSV file to the applet and modify settings in particular advanced waypoint options, as required
  • Press CREATE KML file button
  • Download the resulting .kml file to your drive and uploading to Google Maps
Creating the Google map from within Google Maps
  • Goto to your Google Maps and press My Places button
  • Press Create Map button and enter import routine
  • Browse for and Upload the .KML file and the map should build.
  • Check data and correct data a necessary
Done!

Modifying the spreadsheet & Geocoding additional addresses
  • Add the new addresses per the spreadsheets format
  • Copy the range of new places (name,address,city,state,country)
  • Goto GPSVisualizer and open up their Geocode an Address page
  • Paste the copied range into the Data box 
  •  
Adding Custom or colored icons to the KML file
The GPSVisualizer routine will NOT encode colored (or Customized) icons into the resulting Google Maps version (it works fine for Google Earth implementations).  This procedure shows how to customize the colors (or look) of the placemarks.
  • Goto the downloaded KML file and open in TextEdit
  • Paste the iconStyle you want to use into the top of the file.  The template below is style23 a green icon.
  <Style id="style23">
    <IconStyle>
      <Icon>
        <href>http://maps.gstatic.com/mapfiles/ms2/micons/green.png</href>
      </Icon>
      <scale>1.000000</scale>
    </IconStyle>
    <LabelStyle>
      <color>FF008000</color>
    </LabelStyle>
  </Style>
  • Paste the string style23 into each's addresses styleURL field like below that should be green
<styleUrl>#style23</styleUrl>






Friday, January 11, 2013

Memory leaks

Even with ARC (Automatic Reference Counting) an app can have memory leaks which can totally foul up an app.  Typical signs of leaks include;
  • slowing of the apps animation, view transitions, etc
  • locking up the app and or device (see Turning off your locked up iPad)
This post is a quickstart guide for using Xcode's Instruments specifically  to find those leaks.
From within Xcode;
  • Select Xcode-Open Developer's Tools-Instrument
  • Then select your instrument from the popup - Leaks in our case
  • Size the Allocation & Leaks strip charts appropriately and
  • from the List box in the upper left select Choose Target-appName on the device
  • Press Record n Stop button to start & stop the app
Allocations should reach some level & then stop.  If you have leaks they show as red bars, and the allocations count will keep rising.  You can isolate where the leaks are by looking into the stack when the leaks occur.  Fix and rerun the app.

Apple's Instruments User Guide is the place to start learning about these tools. Also see the Xcode 4 User Guide to use with Xcode.

Within Xcode the call stack can be investigated from the Debugger toolbar as in this snapshot


 Stepping back thru the vertical call stack can give an indication where the code failed.