Eric Binnion

  • Eating Italian for lunch with the honors program

    Eating Italian for lunch with the honors program

    Eating Italian for lunch with the honors program

  • Yes 🙂 @wpengine

    Yes :) @wpengine

    Yes 🙂 @wpengine

  • Been passing out @wpengine stickers at MSU

    Been passing out @wpengine stickers at MSU

    Been passing out @wpengine stickers at MSU

  • Spent a good part of yesterday organizing my work area

    Spent a good part of yesterday organizing my work area

    Spent a good part of yesterday organizing my work area

  • Harley and I Easter 2012 at shrine

    Harley and I Easter 2012 at shrine

    Harley and I Easter 2012 at shrine

  • Hero’s hooter girl

    Hero's hooter girl

    Hero’s hooter girl

  • “cheese…”

    "cheese..."

    “cheese…”

  • Green st Patrick’s day beer

    Green st Patrick's day beer

    Green st Patrick’s day beer

  • Funks and hero at bdubs

    Funks and hero at bdubs

    Funks and hero at bdubs

  • How to Add a Google Map to your Website with Geocoding

    Inserting Google Maps into a website is CRAZY easy! Usually what I would advise someone to do is to:

    1. Go to Google Maps
    2. Search for the address that you want to show on your map
    3. Grab the embed code
    4. Insert embed code in your website

    Could it get any easier? Well, that really depends on what your development needs are. I recently completed a project for a client that owned a mobile BBQ restaurant. This client wanted a map on his website that he could easily update with the location of his mobile smoking pit. I didn’t think it made much sense to make the client do the 4 steps above just to update his map… So I decided to look into Geocoding a google map. This way, all my client had to do to update his map was to login and change the address.

    For those that do not know, geocoding is essentially the process of taking an address and turning that into latitude and longitude coordinates. Google maps has geocoding baked in – FOR FREE!

    Without further ado, below is some code on using geocoding with Google Maps.

    This code goes in the head.

    [code]
    <script src="http://maps.google.com/maps/api/js?sensor=false&quot; type="text/javascript"></script>
    [/code]

    This code can go anywhere in the body.

    [code]
    <div id="map" style="width: 413px; height: 300px;"></div>

    <script type="text/javascript">// <![CDATA[

    var mapOptions = {
    zoom: 16,
    center: new google.maps.LatLng(54.00, -3.00),
    mapTypeId: google.maps.MapTypeId.ROADMAP
    };

    var geocoder = new google.maps.Geocoder();

    var address = ‘3410 Taft Blvd Wichita Falls, TX 76308’;

    geocoder.geocode( { ‘address’: address}, function(results, status) {
    if (status == google.maps.GeocoderStatus.OK) {
    map.setCenter(results[0].geometry.location);
    var marker = new google.maps.Marker({
    map: map,
    position: results[0].geometry.location
    });
    } else {
    alert("Geocode was not successful for the following reason: " + status);
    }
    });

    var map = new google.maps.Map(document.getElementById("map"), mapOptions);
    // ]]></script>
    [/code]

    You can update the size of the map by changing the width and height values of the #map div. To change the starting zoom level, change zoom. You can change the type of map by changing mapTypeId. And most importantly, you can change the address by changing the value in var address.

    You should be able to plug this code in to your website and be good to go. This code will take the address in var address, Geocode it using Google, and then center the map with a marker at the address specified.

    This is a fairly simple example of Geocoding, but you could take this code and make a map that will dynamically update with user input. In a future post, I will discuss how to integrate Geocoding into WordPress so that you can easily create and edit maps without having to get latitude and longitude coordinates.

  • Youtube UIWebView with Storyboards

    While working on the iMustangs project, we decided that it would be a good idea to include the school fight song. I’m sure we could have found a way to play a .mp3 file, but we decided that it would be best to create a video so that we could display our university logo. What follows is the result of our work in using UIWebView on iOS.

    First Attempt

    Our first attempt was very light on code and pretty simple. I’d like to show this to you by running through a test project. In Xcode, go ahead and start a new single-view application.

    Navigate to the Storyboard in your project. Once you are here, add a web view on top of the current view. Go ahead and stretch the web view to fill the view below. Now, let’s go ahead and connect the web view.

    I like to use the assistant editor when I connect UIWebViews and other objects to outlets and actions. Click the assistant editor button near the top right of Xcode (I am currently using 4.3.1). The assistant editor will show the storyboard beside your class, so that you can easily connect an object to a specific line of code in your .h file.

    Once you’re in assistant editor mode, click the UIWebView and drag it to just below @interface. Let go.

    At this point another dialog should’ve popped that is asking you to name your UIWebView. Go ahead and name it webView (be sure to use correct case).

    uiWebViewScreenShot

    Now, navigate to your ViewController.m file and paste the following code within the viewDidLoad function. You may replace the url with one of your own.

    [webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"<a href="http://www.youtube.com/embed/XeIKnBDN4To">http://www.youtube.com/embed/XeIKnBDN4To</a>"]]];
    

    At this point, you should be able to run this project in a simulator and see an MSU youtube video, or whatever URL you substituted. This worked fine for us, until we put it on an actual iPhone… (more…)

  • Hero got a daddy haircut. I don’t know if I’ll be doing that again. Much respect for hairstylists!

    Hero got a daddy haircut. I don't know if I'll be doing that again. Much respect for hairstylists!

    Hero got a daddy haircut. I don’t know if I’ll be doing that again. Much respect for hairstylists!

  • Hero got some gunkle love

    Hero got some gunkle love

    Hero got some gunkle love

  • Chris Gardener book signing at MSU

    Chris Gardener book signing at MSU

    Chris Gardener book signing at MSU

  • Got to meet, and shake hands with, Chris Gardener tonight. On a side note, I need to hit the gym…

    Got to meet, and shake hands with, Chris Gardener tonight. On a side note, I need to hit the gym...

    Got to meet, and shake hands with, Chris Gardener tonight. On a side note, I need to hit the gym…

  • Dr Passos demonstrated an ancient laptop

    Dr Passos demonstrated an ancient laptop

    Dr Passos demonstrated an ancient laptop