Archive for July, 2011

Google Maps V3 GeoCoding Example

July 24, 2011

Today I was working on a real estate search wrapper idea and trying to integrate Google Maps. I wanted to use there Javascript API for mapping but needing to translate the addresses to longitude and latitude aka GeoCoding. Turns out Google of course has an API for this but I didn’t find a straight forward example right away so I figured I would post one. Minor disclaimer on this, its the SIMPLEST possible example to just take one address and turn it into a longitude and latitude (visit here if you need more info on the API). Hopefully this is helpful to folks.

Script Include

Before using the below code you’ll want to add a script include within the head element of your HTML page first.

<script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>

The Code

 

1:  var geocoder = new google.maps.Geocoder();  
2:  var results = geocoder.geocode(  
3:    {  
4:      address: "Duke University Durham, NC 27708"  
5:    },   
6:    function callback(results){  
7:      alert(results[0].geometry.location);  
8:    }  
9:  );  

A Simple and Free UML Tool

July 17, 2011

Now that I have lost my MagicDraw license, I have been looking for a free alternative to do some UML. In looking around I found a great alternative called Violet UML.

I’m a big fan of it mainly because of how simple it is to use. The usability directly attributable to how stripped down it is or at least appears to be. Honestly it looks to have all the functionality that I need, supporting the following diagrams with necessary objects.

  • use-case diagram
  • class diagram
  • activity diagram
  • sequence diagram
  • state diagram
  • object diagram

It doesn’t have a ton of functionality to generate code, create unusual diagrams or objects, or a million menu options to sort through. I completely appreciate those engineers who leverage that extra functionality, there are situations where you sometimes can’t do without it, so if that’s the case then this tool isn’t for you. Extremely good though for just creating a diagram.