// point array var point_types=[];point_types[0]='View Point';point_types[1]='Car Parking';point_types[2]='Maritime';point_types[3]='Other';var customIcons = [];customIcons[0] = new GIcon();customIcons[0].image='imgs/icon_d_view.png';customIcons[0].iconAnchor = new GPoint(0, 0);customIcons[0].iconSize = new GSize(25, 25);customIcons[0].shadow = 'imgs/icon_s_view.png';customIcons[0].shadowSize = new GSize(38.0, 25.0);customIcons[0].infoWindowAnchor = new GPoint(5, 1);customIcons[1] = new GIcon();customIcons[1].image='imgs/icon_m_view.png';customIcons[1].iconAnchor = new GPoint(0, 0);customIcons[1].iconSize = new GSize(25, 25);customIcons[1].shadow = 'imgs/icon_s_view.png';customIcons[1].shadowSize = new GSize(38.0, 25.0);customIcons[1].infoWindowAnchor = new GPoint(5, 1);customIcons[2] = new GIcon();customIcons[2].image='imgs/icon_d_park.png';customIcons[2].iconAnchor = new GPoint(0, 0);customIcons[2].iconSize = new GSize(25, 25);customIcons[2].shadow = 'imgs/icon_s_park.png';customIcons[2].shadowSize = new GSize(38.0, 25.0);customIcons[2].infoWindowAnchor = new GPoint(5, 1);customIcons[3] = new GIcon();customIcons[3].image='imgs/icon_m_park.png';customIcons[3].iconAnchor = new GPoint(0, 0);customIcons[3].iconSize = new GSize(25, 25);customIcons[3].shadow = 'imgs/icon_s_park.png';customIcons[3].shadowSize = new GSize(38.0, 25.0);customIcons[3].infoWindowAnchor = new GPoint(5, 1);customIcons[4] = new GIcon();customIcons[4].image='imgs/icon_d_maritime.png';customIcons[4].iconAnchor = new GPoint(0, 0);customIcons[4].iconSize = new GSize(25, 25);customIcons[4].shadow = 'imgs/icon_s_maritime.png';customIcons[4].shadowSize = new GSize(38.0, 25.0);customIcons[4].infoWindowAnchor = new GPoint(5, 1);customIcons[5] = new GIcon();customIcons[5].image='imgs/icon_m_maritime.png';customIcons[5].iconAnchor = new GPoint(0, 0);customIcons[5].iconSize = new GSize(25, 25);customIcons[5].shadow = 'imgs/icon_s_maritime.png';customIcons[5].shadowSize = new GSize(38.0, 25.0);customIcons[5].infoWindowAnchor = new GPoint(5, 1);customIcons[6] = new GIcon();customIcons[6].image='imgs/icon_d_info.png';customIcons[6].iconAnchor = new GPoint(0, 0);customIcons[6].iconSize = new GSize(25, 25);customIcons[6].shadow = 'imgs/icon_s_info.png';customIcons[6].shadowSize = new GSize(38.0, 25.0);customIcons[6].infoWindowAnchor = new GPoint(5, 1);customIcons[7] = new GIcon();customIcons[7].image='imgs/icon_m_info.png';customIcons[7].iconAnchor = new GPoint(0, 0);customIcons[7].iconSize = new GSize(25, 25);customIcons[7].shadow = 'imgs/icon_s_info.png';customIcons[7].shadowSize = new GSize(38.0, 25.0);customIcons[7].infoWindowAnchor = new GPoint(5, 1);icon_cluster= new GIcon();icon_cluster.image='imgs/icon_cluster.png';icon_cluster.iconAnchor = new GPoint(25, 25);icon_cluster.iconSize = new GSize(50, 50);icon_cluster.shadow = 'imgs/icon_s_cluster.png';icon_cluster.shadowSize = new GSize(76.0, 50.0);icon_cluster.infoWindowAnchor = new GPoint(5, 1); // default lat, lon and zoom levels var center_lat=51.96117; var center_lon=1.353624; var start_zoom=5; var map_type=0; // min zoom level for markers var detail_zoom=8; //var description='Center point'; // the google map var map; // google map event listener var myEventListener; // list of markers currently on map var marker_list=new Object; // geocoder var geocoder; // globals holding types of marker to show var load_ptype=0; var load_owner=0; // status bar to show all text information // global reference var status_bar; function StatusControl() { // create local vars this.statusDiv=document.createElement("div"); this.currentTextNode=document.createTextNode(""); this.statusDiv.appendChild(this.currentTextNode); } // subclass StatusControl.prototype = new GControl(); // initialise StatusControl.prototype.initialize = function(map) { var container = document.createElement("div"); container.appendChild(this.statusDiv); map.getContainer().appendChild(container); this.setButtonStyle_(this.statusDiv); return container; } // default positioning StatusControl.prototype.getDefaultPosition = function() { return new GControlPosition(G_ANCHOR_TOP_LEFT, new GSize(100, 7)); } // CSS for the button element. StatusControl.prototype.setButtonStyle_ = function(button) { button.style.textDecoration = "none"; button.style.color = "black"; button.style.backgroundColor = "white"; button.style.font = "small Arial"; button.style.border = "1px solid black"; button.style.padding = "2px"; button.style.marginBottom = "3px"; button.style.textAlign = "center"; button.style.width = "12em"; button.style.cursor = "pointer"; } // display given text inside status bar StatusControl.prototype.setText = function(newtext) { // create new text node var newTextNode=document.createTextNode(newtext); // replace text node this.statusDiv.replaceChild(newTextNode, this.currentTextNode); // keep new text node this.currentTextNode=newTextNode; } // end status bar function createMarker(id, userid, username, point, label, ptype) { /// create a new marker from given data /// return the new marker var iptype=ptype-1; // user not logged in iptype=iptype*2; // html for displaying in info window var html = '
| ' + label + ' | |
| Created by ' + username + ' | |
| Last updated on ' + updated + ' | |
| Details |