Skip to content

Instantly share code, notes, and snippets.

@jonathanablanida
Created May 20, 2014 22:48
Show Gist options
  • Save jonathanablanida/e276513c6884b5560847 to your computer and use it in GitHub Desktop.
Save jonathanablanida/e276513c6884b5560847 to your computer and use it in GitHub Desktop.
jQuery(window).load(function() {
if (data.property_data) {
if (data.property_data.gps) {
var lat = data.property_data.gps.lat;
var lng = data.property_data.gps.lng;
var zoom = 15;
var _map;
var _point = new google.maps.LatLng(lat, lng);
var imagePath = documentRoot + "components/com_webportal/assets/googlemap/images/everything_else.png";
_map = new google.maps.Map(document.getElementById("webportal_gmap_area"), {
center: _point,
zoom: 15,
mapTypeId: google.maps.MapTypeId.ROADMAP
});
var marker = new google.maps.Marker({
position: _point,
map: _map,
icon: imagePath
});
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment