Blog Archives

Rotating Street View Panorama using Google Maps

We can use Google maps street view to build a simple virtual tour, namely automatically rotating street view panorama. For the setup, we need a specific “div” element holding the panorama. The solution for automatic rotating is using JavaScript “window.setInterval”

Tagged with: , , , ,
Posted in JavaScript, Web

JavaScript Encapsulation: Privacy and Data Hiding

JavaScript does not have syntax-level encapsulation. All properties of an object are visible. However, there do exist various patterns to ensure data encapsulation. Singletons and the Module Pattern The following code creates one singleton object using an object literal. JavaScript

Tagged with: , , ,
Posted in JavaScript, Web

JavaScript Inheritance: Pseudoclassical vs. Prototypal

JavaScript is a prototypal object-oriented language, which means objects can inherit directly other objects. This is in contrast with the classical languages such as Java, where a subclass inherits from a superclass, and objects are instances of classes. However, the

Tagged with: , , ,
Posted in JavaScript, Web

AJAX: Asynchronous JavaScript and XML

AJAX stands for Asynchronous JavaScript and XML. AJAX is a way to exchange data with a server using JavaScript; this allows updating parts of a web page instead of reloading a whole new page. Example applications using AJAX includes Google

Tagged with: , , , , ,
Posted in JavaScript, Web