www.ecodisposableplates.in

Advertisements

Create multiple info window in Google map API

Info windows -  Google Maps JavaScript API v3
Info windows – Google Maps JavaScript API v3

<div id=”googleMap” style=”width:100%;height:100%;”></div>
<script src=”http://maps.google.com/maps/api/js?sensor=false&#8221; type=”text/javascript”></script>
<script type=”text/javascript” src=”js/jquery-1.8.3.min.js”></script>
<script src=”http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer.js&#8221; type=”text/javascript”></script>
<script>
var json = [
{
“title”: “Stockholm”,
“lat”: 59.3,
“lng”: 18.1,
“description”: “Stockholm is the capital and the largest city of Sweden and constitutes the most populated urban area in Scandinavia with a population of 2.1 million in the metropolitan area (2010)”
},
{
“title”: “Oslo”,
“lat”: 59.9,
“lng”: 10.8,
“description”: “Oslo is a municipality, and the capital and most populous city of Norway with a metropolitan population of 1,442,318 (as of 2010).”
},
{
“title”: “Copenhagen”,
“lat”: 55.7,
“lng”: 12.6,
“description”: “Copenhagen is the capital of Denmark and its most populous city, with a metropolitan population of 1,931,467 (as of 1 January 2012).”
}
]
var myCenter=new google.maps.LatLng(51.508742,-0.120850);
function initialize()
{
var mapProp = {
center:myCenter,
zoom:5,
mapTypeId:google.maps.MapTypeId.ROADMAP
};
var map=new google.maps.Map(document.getElementById(“googleMap”),mapProp);

var infowindow =  new google.maps.InfoWindow({
content: “”
});

for (var i = 0, length = json.length; i < length; i++) {
var data=json[i];
var latLng = new google.maps.LatLng(data.lat, data.lng);
// Creating a marker and putting it on the map
var marker = new google.maps.Marker({
position: latLng,
map: map,
title: data.title
});

bindInfoWindow(marker, map, infowindow, data.description);
}
}

function bindInfoWindow(marker, map, infowindow, strDescription) {
google.maps.event.addListener(marker, ‘click’, function() {
infowindow.setContent(strDescription);
infowindow.open(map, marker);
});
}
google.maps.event.addDomListener(window, ‘load’, initialize);
</script>

JavaScript vs jQuery

What is JavaScript?

  1. JavaScript is a scripting language that was designed for use within a web browser.
  2. JavaScript is used for interface interactions. Slideshows and other interactive components are typically done using JavaScript
  3. Also been used for server-side programming, game development, and even creating desktop applications.
JQuery vs. JavaScript: What’s the Difference Anyway?
JQuery vs. JavaScript: What’s the Difference Anyway?

JQuery is a fast and concise JavaScript Library that simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

Performance

jQuery in terms of speed is quite fast for modern browsers on modern computers. So is pure JavaScript. Both run drastically slower on older browsers and machines. Pure Javascript to access the DOM can be faster as you can cut the overhead that jQuery has on this. However it doesn’t always have to be faster as you could write some major mistakes that slow things down again. jQuery on the other hand has been battle tested over the past few years and is proven to be fast and consistent.

Performance
Performance

Product image switcher Magento

Step:1

go to file media.phtml
‘app/design/frontend/default/default/template/catalog/product/view/media.phtml’

step:2
Find the code below
<a href=”#” onclick=”popWin(‘getGalleryUrl($_image) ?>’, ‘gallery’, ‘width=300,height=300,left=50,top=50,location=no,status=yes,scrollbars=yes,resizable=yes’); return false;”>

Replace it with
<a href=”helper(‘catalog/image’)->init($this->getProduct(), ‘image’, $_image->getFile()); ?>” title=”getName();?>” onclick=”$(‘image’).src = this.href; return false;”>

Unihomefoundation.com

unihomefoundation.com
unihomefoundation.com

Unihome Foundation was established in the year 2008.The Portfolio consist of building artistic homes, apartments and commercial complexes. The company tries to deliver the best quality construction and services to attain maximum expectation of the customers ,our philosophy is to deliver projects with high quality, on time, at Affordable budget with impeccable safety record. The integrated work culture in our Company is built on hard work, honesty .Also, our thinking is to provide excellent after sale Service to the customers as and when required.

Uniorganicpro.com

http://uniorganicpro.com/
http://uniorganicpro.com/

Uniorganicpro manufactures and supplies a diverse range of Bio-Organic Fertilizers in the market. The range includes Organic Manure, worm castings, and bone meal, Coco Peat Etc. Made from natural materials using advanced techniques; the Bio-Organic Fertilizers are suitable for all types of farming. Having a variety of features, these products are perfect for increasing yield while maintaining health of plant/crop in a natural manner.

Blog at WordPress.com.

Up ↑