Tuesday, April 16, 2013

VS 2012 - launch multiple browsers


Pretty cool feature in Visual Studio 2012 to launch in multiple browsers at a time. This will help save time, we don't have to launch each browser once. If we make it a practice we will find less browser specific problems I guess...

Along with this feature, you would be able to test web page at many screen resolutions. This will emulate resolution on browser. If you have a high-end monitor, don't have to bother coming to lower resolution for testing the webpage.


Review below video on how-to,



Saturday, April 6, 2013

Google Maps

Here is my recent experience using Google Map API.

Using maps API, for any given longitude - latitude map could be loaded.

// include script along with API Key

// create LatLng object
var latlng = new google.maps.LatLng( 17.4155646, 78.47505330000001).val())


// Set Map Type and zoom level
var mapOptions = {
          center: latlng,
          zoom: 15,
          mapTypeId: google.maps.MapTypeId.ROADMAP 
        };

// create map object using a placeholder div tag for loading the map.
map = new google.maps.Map(document.getElementById("map-canvas"),
            mapOptions);

// create a tag position on exact location of longitude and latitude
var tagPosition = new google.maps.Marker({
map:map,
position: latlng
});

As simple as that ! But it's just background work - how is this useful?

1) You may use GeoCoder service to translate a location address to Longitude and Latitude. Typical way maps are used. Provide a text box to enter location. GeoCoder Service provides required information to load the map for that address.

2) Or something cool - use longitude and latitude information on an image to point out where the picture was taken. Consider following screenshot,

You could showoff images on a map in a pretty cool manner!