DROP TABLE IF EXISTS `#__zhgooglemaps_maps`;

CREATE TABLE `#__zhgooglemaps_maps` (
  `id` int(11) NOT NULL auto_increment,
  `catid` int(11) NOT NULL default '0',
  `title` varchar(255) NOT NULL default '',
  `width` int(5) NOT NULL default '0',
  `height` int(5) NOT NULL default '0',
  `latitude` varchar(20) NOT NULL default '',
  `longitude` varchar(20) NOT NULL default '',
  `zoom` int(3) NOT NULL default '0',
  `minzoom` int(3) NOT NULL default '0',
  `maxzoom` int(3) NOT NULL default '0',
  `draggable` tinyint(1) NOT NULL default '1',
  `doubleclickzoom` tinyint(1) NOT NULL default '0',
  `scrollwheelzoom` tinyint(1) NOT NULL default '0',
  `zoomcontrol` tinyint(1) NOT NULL default '0',
  `scalecontrol` tinyint(1) NOT NULL default '0',
  `maptype` tinyint(1) NOT NULL default '0',
  `maptypecontrol` tinyint(1) NOT NULL default '0',
  `overviewmapcontrol` tinyint(1) NOT NULL default '0',
  `rotatecontrol` tinyint(1) NOT NULL default '0',
  `pancontrol` tinyint(1) NOT NULL default '0',
  `trafficcontrol` tinyint(1) NOT NULL default '0',
  `transitcontrol` tinyint(1) NOT NULL default '0',
  `streetviewcontrol` tinyint(1) NOT NULL default '0',
  `streetview` tinyint(1) NOT NULL default '0',
  `streetviewstyleid` int(11) NOT NULL default '0',
  `bikecontrol` tinyint(1) NOT NULL default '0',
  `balloon` tinyint(1) NOT NULL default '0',
  `openballoon` tinyint(1) NOT NULL default '0',
  `pospan` tinyint(1) NOT NULL default '0',
  `posmaptype` tinyint(1) NOT NULL default '0',
  `poszoom` tinyint(1) NOT NULL default '0',
  `posscale` tinyint(1) NOT NULL default '0',
  `posstreet` tinyint(1) NOT NULL default '0',
  `description` text NOT NULL,
  `markermanager` tinyint(1) NOT NULL default '0',
  `published` tinyint(1) NOT NULL default '0',
  `earth` tinyint(1) NOT NULL default '0',
  `markercluster` tinyint(1) NOT NULL default '0',
  `markerclustergroup` tinyint(1) NOT NULL default '0',
  `clusterzoom` int(3) NOT NULL default '0',
  `kmllayer` text NOT NULL,
  `markergroupcontrol` tinyint(1) NOT NULL default '0',
  `markergroupwidth` int(5) NOT NULL default '20',
  `markergroupshowicon` tinyint(1) NOT NULL default '0',
  `markergroupshowiconall` tinyint(1) NOT NULL default '100',
  `markergroupcss` int(5) NOT NULL default '0',
  `markergroupdesc1` text NOT NULL,
  `markergroupdesc2` text NOT NULL,
  `markergrouptitle` varchar(255) NOT NULL default '',
  `markergroupsep1` tinyint(1) NOT NULL default '0',
  `markergroupsep2` tinyint(1) NOT NULL default '0',
  `markergrouporder` tinyint(1) NOT NULL default '0',
  `markerlist` tinyint(1) NOT NULL default '0',
  `markerlistpos` tinyint(1) NOT NULL default '0',
  `markerlistwidth` int(5) NOT NULL default '0',
  `markerlistheight` int(5) NOT NULL default '0',
  `markerlistbgcolor` text NOT NULL,
  `markerlistaction` tinyint(1) NOT NULL default '0',
  `markerlistcontent` tinyint(1) NOT NULL default '0',
  `markerlistbuttonpos` tinyint(1) NOT NULL default '3',
  `markerlistbuttontype` tinyint(1) NOT NULL default '0',
  `headerhtml` text NOT NULL,
  `footerhtml` text NOT NULL,
  `headersep` tinyint(1) NOT NULL default '0',
  `footersep` tinyint(1) NOT NULL default '0',
  `openstreet` tinyint(1) NOT NULL default '0',
  `nztopomaps` tinyint(1) NOT NULL default '0',
  `placesenable` tinyint(1) NOT NULL default '0',
  `placesautocomplete` tinyint(1) NOT NULL default '0',
  `placesacwidth` int(5) NOT NULL default '70',
  `placestypeac` text NOT NULL,
  `placestype` text NOT NULL,
  `placesradius` int(10) NOT NULL default '0',
  `placesdirection` tinyint(1) NOT NULL default '0',
  `panoramioenable` tinyint(1) NOT NULL default '0',
  `panoramiofiltercontrol` tinyint(1) NOT NULL default '0',
  `panoramiofiltercontrolpos` tinyint(1) NOT NULL default '2',
  `panoramiotag` varchar(250) NOT NULL default '',
  `panoramiouser` varchar(250) NOT NULL default '',
  `findcontrol` tinyint(1) NOT NULL default '0',
  `findwidth` int(5) NOT NULL default '0',
  `findpos` tinyint(1) NOT NULL default '2',
  `findroute` tinyint(1) NOT NULL default '0',
  `elevation` tinyint(1) NOT NULL default '0',
  `usercontact` tinyint(1) NOT NULL default '0',
  `useruser` tinyint(1) NOT NULL default '0',
  `usermarkers` tinyint(1) NOT NULL default '0',
  `usermarkersfilter` tinyint(1) NOT NULL default '0',
  `usermarkerspublished` tinyint(1) NOT NULL default '0',
  `usermarkersicon` tinyint(1) NOT NULL default '1',
  `usercontactpublished` tinyint(1) NOT NULL default '0',
  `usermarkersinsert` tinyint(1) NOT NULL default '1',
  `usermarkersupdate` tinyint(1) NOT NULL default '1',
  `usermarkersdelete` tinyint(1) NOT NULL default '1',
  `routedraggable` tinyint(1) NOT NULL default '0',
  `routeshowpanel` tinyint(1) NOT NULL default '0',
  `routeaddress` text NOT NULL,
  `autoposition` tinyint(1) NOT NULL default '0',
  `geolocationcontrol` tinyint(1) NOT NULL default '0',
  `geolocationpos` tinyint(1) NOT NULL default '2',
  `geolocationbutton` tinyint(1) NOT NULL default '1',
  `lang` varchar(20) NOT NULL default '',
  `custommaptype` tinyint(1) NOT NULL default '0',
  `custommaptypelist` text NOT NULL,
  `usercontactattributes` text NOT NULL,
  `mapstyles` text NOT NULL,
  `css2load` text NOT NULL,
  `cssclassname` text NOT NULL,
  `mapbounds` varchar(100) NOT NULL default '',
  `weathertypeid` int(11) NOT NULL default '0',
  `panoramiotypeid` int(11) NOT NULL default '0',
  `routedriving` tinyint(1) NOT NULL default '1',
  `routewalking` tinyint(1) NOT NULL default '1',
  `routebicycling` tinyint(1) NOT NULL default '1',
  `routetransit` tinyint(1) NOT NULL default '0',
  `routeavoidhighways` tinyint(1) NOT NULL default '0',
  `routeavoidtolls` tinyint(1) NOT NULL default '0',
  `routeunitsystem` tinyint(1) NOT NULL default '0',
  `useajax` tinyint(1) NOT NULL default '0',
  `useajaxobject` tinyint(1) NOT NULL default '0',
  `zoombyfind` int(3) NOT NULL default '100',
  `markergroupctlmarker` tinyint(1) NOT NULL default '1',
  `markergroupctlpath` tinyint(1) NOT NULL default '0',
  `placemark_rating` tinyint(1) NOT NULL default '0',
  `hovermarker` tinyint(1) NOT NULL default '0',
  `hoverinfobubble` int(11) NOT NULL default '0',
  `defaultmaptypes` tinyint(1) NOT NULL default '1',
  `disableautopan` tinyint(1) NOT NULL default '0',
  `ajaxbufferplacemark` int(5) NOT NULL default '0',
  `region` varchar(20) NOT NULL default '',
  `country` varchar(20) NOT NULL default '',
  `trafficcontrolpos` tinyint(1) NOT NULL default '3',
  `transitcontrolpos` tinyint(1) NOT NULL default '3',
  `bikecontrolpos` tinyint(1) NOT NULL default '3',
  `panoramiocontrolpos` tinyint(1) NOT NULL default '3',
  `params` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM CHARACTER SET `utf8`;

DROP TABLE IF EXISTS `#__zhgooglemaps_markers`;

CREATE TABLE `#__zhgooglemaps_markers` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `catid` int(11) NOT NULL default '0',
  `title` varchar(250) NOT NULL default '',
  `latitude` varchar(20) NOT NULL default '',
  `longitude` varchar(20) NOT NULL default '',
  `addresstext` text NOT NULL,
  `mapid` int(11) NOT NULL default '0',
  `openbaloon` tinyint(1) NOT NULL default '0',
  `actionbyclick` tinyint(1) NOT NULL default '1',
  `zoombyclick` int(3) NOT NULL default '100',
  `baloon` tinyint(1) NOT NULL default '0',
  `icontype` varchar(250) NOT NULL default '',
  `description` text NOT NULL,
  `descriptionhtml` text NOT NULL,
  `descriptionfullhtml` text NOT NULL,
  `hoverhtml` text NOT NULL,
  `published` tinyint(1) NOT NULL default '0',
  `hrefsite` text NOT NULL,
  `hrefimage` text NOT NULL,
  `hrefimagethumbnail` text NOT NULL,
  `hrefsitename` text NOT NULL,
  `markergroup` int(11) NOT NULL default '0',
  `markercontent` tinyint(1) NOT NULL default '0',
  `contactid` int(11) NOT NULL default '0',
  `createdbyuser` int(11) NOT NULL default '0',
  `showcontact` tinyint(1) NOT NULL default '0',
  `showuser` tinyint(1) NOT NULL default '0',
  `publish_up` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `publish_down` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `createddate` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `infographicstype` text NOT NULL,
  `infographicswidth` int(5) NOT NULL default '0',
  `infographicsheight` int(5) NOT NULL default '0',
  `userprotection` tinyint(1) NOT NULL default '0',
  `streetviewstyleid` int(11) NOT NULL default '0',
  `streetviewinfowin` tinyint(1) NOT NULL default '0',
  `streetviewinfowinw` int(3) NOT NULL default '400',
  `streetviewinfowinh` int(3) NOT NULL default '250',
  `params` text NOT NULL,
  `attribute1` text NOT NULL,
  `attribute2` text NOT NULL,
  `attribute3` text NOT NULL,
  `attribute4` text NOT NULL,
  `attribute5` text NOT NULL,
  `attribute6` text NOT NULL,
  `attribute7` text NOT NULL,
  `attribute8` text NOT NULL,
  `attribute9` text NOT NULL,
  `tabid` int(11) NOT NULL default '0',
  `tab1` text NOT NULL,
  `tab2` text NOT NULL,
  `tab3` text NOT NULL,
  `tab4` text NOT NULL,
  `tab5` text NOT NULL,
  `tab6` text NOT NULL,
  `tab7` text NOT NULL,
  `tab8` text NOT NULL,
  `tab9` text NOT NULL,
  `tab10` text NOT NULL,
  `tab11` text NOT NULL,
  `tab12` text NOT NULL,
  `tab13` text NOT NULL,
  `tab14` text NOT NULL,
  `tab15` text NOT NULL,
  `tab16` text NOT NULL,
  `tab17` text NOT NULL,
  `tab18` text NOT NULL,
  `tab19` text NOT NULL,
  `tab1title` varchar(250) NOT NULL default '',
  `tab2title` varchar(250) NOT NULL default '',
  `tab3title` varchar(250) NOT NULL default '',
  `tab4title` varchar(250) NOT NULL default '',
  `tab5title` varchar(250) NOT NULL default '',
  `tab6title` varchar(250) NOT NULL default '',
  `tab7title` varchar(250) NOT NULL default '',
  `tab8title` varchar(250) NOT NULL default '',
  `tab9title` varchar(250) NOT NULL default '',
  `tab10title` varchar(250) NOT NULL default '',
  `tab11title` varchar(250) NOT NULL default '',
  `tab12title` varchar(250) NOT NULL default '',
  `tab13title` varchar(250) NOT NULL default '',
  `tab14title` varchar(250) NOT NULL default '',
  `tab15title` varchar(250) NOT NULL default '',
  `tab16title` varchar(250) NOT NULL default '',
  `tab17title` varchar(250) NOT NULL default '',
  `tab18title` varchar(250) NOT NULL default '',
  `tab19title` varchar(250) NOT NULL default '',
  `tab1image` text NOT NULL,
  `tab2image` text NOT NULL,
  `tab3image` text NOT NULL,
  `tab4image` text NOT NULL,
  `tab5image` text NOT NULL,
  `tab6image` text NOT NULL,
  `tab7image` text NOT NULL,
  `tab8image` text NOT NULL,
  `tab9image` text NOT NULL,
  `tab10image` text NOT NULL,
  `tab11image` text NOT NULL,
  `tab12image` text NOT NULL,
  `tab13image` text NOT NULL,
  `tab14image` text NOT NULL,
  `tab15image` text NOT NULL,
  `tab16image` text NOT NULL,
  `tab17image` text NOT NULL,
  `tab18image` text NOT NULL,
  `tab19image` text NOT NULL,
  `ordering` int(11) NOT NULL DEFAULT '0',
  `rating_value` FLOAT NOT NULL DEFAULT '0',
  `rating_count` int(11) NOT NULL DEFAULT '0',
  `labelinbackground` tinyint(1) NOT NULL default '0',
  `labelanchorx` int(5) NOT NULL default '0',
  `labelanchory` int(5) NOT NULL default '0',
  `labelclass` varchar(250) NOT NULL default '',
  `labelcontent` text NOT NULL,
  `includeinlist` tinyint(1) NOT NULL default '1',
  `access` int(11) NOT NULL DEFAULT '1',
  `hrefcontact` text NOT NULL,
  `hrefarticle` text NOT NULL,
  `hrefdetail` text NOT NULL,
  `toolbarcontact` tinyint(1) NOT NULL default '0',
  `toolbararticle` tinyint(1) NOT NULL default '0',
  `toolbardetail` tinyint(1) NOT NULL default '0',
  `articleid` int(11) NOT NULL default '0',
  `attributesdetail` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM CHARACTER SET `utf8`;

CREATE TABLE `#__zhgooglemaps_routers` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `catid` int(11) NOT NULL default '0',
  `title` varchar(250) NOT NULL default '',
  `providealt` tinyint(1) NOT NULL default '0',
  `optimizewaypoints` tinyint(1) NOT NULL default '0',
  `avoidhighways` tinyint(1) NOT NULL default '0',
  `avoidtolls` tinyint(1) NOT NULL default '0',
  `travelmode` tinyint(1) NOT NULL default '0',
  `unitsystem` tinyint(1) NOT NULL default '0',
  `route` text NOT NULL,
  `routebymarker` text NOT NULL,
  `mapid` int(11) NOT NULL default '0',
  `description` text NOT NULL,
  `descriptionhtml` text NOT NULL,
  `published` tinyint(1) NOT NULL default '0',
  `showtype` tinyint(1) NOT NULL default '0',
  `draggable` tinyint(1) NOT NULL default '0',
  `showpanel` tinyint(1) NOT NULL default '0',
  `showpaneltotal` tinyint(1) NOT NULL default '1',
  `showdescription` tinyint(1) NOT NULL default '0',  
  `suppressmarkers` tinyint(1) NOT NULL default '0',
  `publish_up` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `publish_down` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `params` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM CHARACTER SET `utf8`;

CREATE TABLE `#__zhgooglemaps_paths` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `catid` int(11) NOT NULL default '0',
  `title` varchar(250) NOT NULL default '',
  `weight` tinyint(1) NOT NULL default '0',
  `color` varchar(250) NOT NULL default '',
  `hover_color` varchar(250) NOT NULL default '',
  `opacity` varchar(20) NOT NULL default '',
  `path` text NOT NULL,
  `kmllayer` text NOT NULL,
  `mapid` int(11) NOT NULL default '0',
  `description` text NOT NULL,
  `descriptionhtml` text NOT NULL,
  `published` tinyint(1) NOT NULL default '0',
  `elevation` tinyint(1) NOT NULL default '0',
  `showtype` tinyint(1) NOT NULL default '0',
  `suppressinfowindows` tinyint(1) NOT NULL default '0',
  `geodesic` tinyint(1) NOT NULL default '0',
  `publish_up` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `publish_down` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `infowincontent` tinyint(1) NOT NULL default '0',
  `actionbyclick` tinyint(1) NOT NULL default '0',
  `objecttype` tinyint(1) NOT NULL default '0',
  `fillcolor` varchar(250) NOT NULL default '',
  `fillopacity` varchar(20) NOT NULL default '',
  `radius` varchar(250) NOT NULL default '',
  `elevationwidth` int(5) NOT NULL default '400',
  `elevationheight` int(5) NOT NULL default '200',
  `elevationcount` int(5) NOT NULL default '256',
  `elevationcountkml` int(5) NOT NULL default '0',
  `elevationicontype` varchar(250) NOT NULL default '',
  `elevationbaseline` int(11) NOT NULL default '0',
  `v_min_value` varchar(20) NOT NULL default '',
  `v_max_value` varchar(20) NOT NULL default '',
  `v_baseline_color` varchar(250) NOT NULL default '',
  `v_gridline_color` varchar(250) NOT NULL default '',
  `v_gridline_count` int(3) NOT NULL default '5',
  `v_minor_gridline_color` varchar(250) NOT NULL default '',
  `v_minor_gridline_count` int(3) NOT NULL default '0',
  `background_color_stroke` varchar(250) NOT NULL default '',
  `background_color_width` tinyint(1) NOT NULL default '0',
  `background_color_fill` varchar(250) NOT NULL default '',
  `markergroup` int(11) NOT NULL default '0',
  `params` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM CHARACTER SET `utf8`;

DROP TABLE IF EXISTS `#__zhgooglemaps_markergroups`;

CREATE TABLE `#__zhgooglemaps_markergroups` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `catid` int(11) NOT NULL default '0',
  `title` varchar(250) NOT NULL default '',
  `icontype` varchar(250) NOT NULL default '',
  `overridegroupicon` tinyint(1) NOT NULL default '0',
  `overridemarkericon` tinyint(1) NOT NULL default '0',
  `markermanagerminzoom` int(3) NOT NULL default '0',
  `markermanagermaxzoom` int(3) NOT NULL default '18',
  `activeincluster` tinyint(1) NOT NULL default '0',
  `description` text NOT NULL,
  `published` tinyint(1) NOT NULL default '0',
  `publish_up` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `publish_down` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `ordering` int(11) NOT NULL DEFAULT '0',
  `userorder` int(11) NOT NULL default '0',
  `params` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM CHARACTER SET `utf8`;

DROP TABLE IF EXISTS `#__zhgooglemaps_maptypes`;

CREATE TABLE `#__zhgooglemaps_maptypes` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `catid` int(11) NOT NULL default '0',
  `title` varchar(250) NOT NULL default '',
  `description` text NOT NULL,
  `published` tinyint(1) NOT NULL default '0',
  `gettileurl` text NOT NULL,
  `tilewidth` int(5) NOT NULL default '256',
  `tileheight` int(5) NOT NULL default '256',
  `ispng` tinyint(1) NOT NULL default '1',
  `minzoom` int(3) NOT NULL default '0',
  `maxzoom` int(3) NOT NULL default '18',
  `opacity` varchar(20) NOT NULL default '',
  `layertype` tinyint(1) NOT NULL default '1',
  `projectionglobal` text NOT NULL,
  `projectiondefinition` text NOT NULL,
  `fromlatlngtopoint` text NOT NULL,
  `frompointtolatlng` text NOT NULL,
  `publish_up` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `publish_down` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `params` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM CHARACTER SET `utf8`;

DROP TABLE IF EXISTS `#__zhgooglemaps_infobubbles`;

CREATE TABLE `#__zhgooglemaps_infobubbles` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `catid` int(11) NOT NULL default '0',
  `title` varchar(250) NOT NULL default '',
  `description` text NOT NULL,
  `published` tinyint(1) NOT NULL default '0',
  `shadowstyle` int(3) NOT NULL default '0',
  `padding` varchar(50) NOT NULL default '',
  `borderradius` varchar(50) NOT NULL default '',
  `borderwidth` varchar(50) NOT NULL default '',
  `bordercolor` varchar(50) NOT NULL default '',
  `backgroundcolor` varchar(50) NOT NULL default '',
  `minwidth` varchar(50) NOT NULL default '',
  `maxwidth` varchar(50) NOT NULL default '',
  `minheight` varchar(50) NOT NULL default '',
  `maxheight` varchar(50) NOT NULL default '',
  `arrowsize` varchar(50) NOT NULL default '',
  `arrowposition` varchar(50) NOT NULL default '',
  `arrowstyle` int(3) NOT NULL default '0',
  `disableautopan` tinyint(1) NOT NULL default '0',
  `disableanimation` tinyint(1) NOT NULL default '0',
  `hideclosebutton` tinyint(1) NOT NULL default '0',
  `backgroundclassname` varchar(250) NOT NULL default '',
  `publish_up` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `publish_down` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `params` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM CHARACTER SET `utf8`;

DROP TABLE IF EXISTS `#__zhgooglemaps_streetviews`;

CREATE TABLE `#__zhgooglemaps_streetviews` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `catid` int(11) NOT NULL default '0',
  `title` varchar(250) NOT NULL default '',
  `description` text NOT NULL,
  `published` tinyint(1) NOT NULL default '0',
  `publish_up` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `publish_down` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `heading` varchar(10) NOT NULL default '0',
  `pitch` varchar(10) NOT NULL default '0',
  `zoom` int(3) NOT NULL default '1',
  `params` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM CHARACTER SET `utf8`;

DROP TABLE IF EXISTS `#__zhgooglemaps_adsences`;

CREATE TABLE `#__zhgooglemaps_adsences` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `catid` int(11) NOT NULL default '0',
  `title` varchar(250) NOT NULL default '',
  `description` text NOT NULL,
  `published` tinyint(1) NOT NULL default '0',
  `publish_up` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `publish_down` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `mapid` int(11) NOT NULL default '0',
  `unitpos` tinyint(1) NOT NULL default '1',
  `unitformat` tinyint(1) NOT NULL default '1',
  `publisherid` text NOT NULL,
  `channelnumber` text NOT NULL,
  `params` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM CHARACTER SET `utf8`;

DROP TABLE IF EXISTS `#__zhgooglemaps_weathertypes`;

CREATE TABLE `#__zhgooglemaps_weathertypes` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `catid` int(11) NOT NULL default '0',
  `title` varchar(250) NOT NULL default '',
  `description` text NOT NULL,
  `published` tinyint(1) NOT NULL default '0',
  `publish_up` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `publish_down` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `clickable` tinyint(1) NOT NULL default '1',
  `suppressinfowindows` tinyint(1) NOT NULL default '0',
  `labelcolor` tinyint(1) NOT NULL default '0',
  `temperatureunits` tinyint(1) NOT NULL default '1',
  `windspeedunits` tinyint(1) NOT NULL default '2',
  `weatherlayer` tinyint(1) NOT NULL default '1',
  `cloudlayer` tinyint(1) NOT NULL default '1',
  `params` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM CHARACTER SET `utf8`;

DROP TABLE IF EXISTS `#__zhgooglemaps_widgettypes`;

CREATE TABLE `#__zhgooglemaps_widgettypes` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `catid` int(11) NOT NULL default '0',
  `title` varchar(250) NOT NULL default '',
  `description` text NOT NULL,
  `published` tinyint(1) NOT NULL default '0',
  `publish_up` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `publish_down` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `params` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM CHARACTER SET `utf8`;

DROP TABLE IF EXISTS `#__zhgooglemaps_marker_rates`;

CREATE TABLE `#__zhgooglemaps_marker_rates` (
  `id` int(11) unsigned NOT NULL auto_increment,
  `markerid` int(11) NOT NULL default '0',
  `rating_value` FLOAT NOT NULL DEFAULT '0',
  `rating_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
  `ip` text NOT NULL,
  `hostname` text NOT NULL,
  `createdbyuser` int(11) NOT NULL default '0',
  `params` text NOT NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM CHARACTER SET `utf8`;



ALTER TABLE `#__zhgooglemaps_maps` ADD INDEX `idx_catid` (`catid`);

ALTER TABLE `#__zhgooglemaps_markers` ADD INDEX `idx_catid` (`catid`);
ALTER TABLE `#__zhgooglemaps_markers` ADD INDEX `idx_mapid` (`mapid`);
ALTER TABLE `#__zhgooglemaps_markers` ADD INDEX `idx_markergroup` (`markergroup`);
ALTER TABLE `#__zhgooglemaps_markers` ADD INDEX `idx_createdbyuser` (`createdbyuser`);
ALTER TABLE `#__zhgooglemaps_markers` ADD INDEX `idx_access` (`access`);

ALTER TABLE `#__zhgooglemaps_routers` ADD INDEX `idx_catid` (`catid`);
ALTER TABLE `#__zhgooglemaps_routers` ADD INDEX `idx_mapid` (`mapid`);

ALTER TABLE `#__zhgooglemaps_paths` ADD INDEX `idx_catid` (`catid`);
ALTER TABLE `#__zhgooglemaps_paths` ADD INDEX `idx_mapid` (`mapid`);
ALTER TABLE `#__zhgooglemaps_paths` ADD INDEX `idx_markergroup` (`markergroup`);

ALTER TABLE `#__zhgooglemaps_markergroups` ADD INDEX `idx_catid` (`catid`);

ALTER TABLE `#__zhgooglemaps_maptypes` ADD INDEX `idx_catid` (`catid`);

ALTER TABLE `#__zhgooglemaps_infobubbles` ADD INDEX `idx_catid` (`catid`);

ALTER TABLE `#__zhgooglemaps_streetviews` ADD INDEX `idx_catid` (`catid`);

ALTER TABLE `#__zhgooglemaps_adsences` ADD INDEX `idx_catid` (`catid`);

ALTER TABLE `#__zhgooglemaps_weathertypes` ADD INDEX `idx_catid` (`catid`);

ALTER TABLE `#__zhgooglemaps_widgettypes` ADD INDEX `idx_catid` (`catid`);

ALTER TABLE `#__zhgooglemaps_marker_rates` ADD INDEX `idx_markerid` (`markerid`);


