﻿function LocalSearchMarker() {
    var me = this;
    this.lat = 0;
    this.lng = 0;
    this.gmarker = null;
    this.glocalresult = null;

    // get ajax search mouse over
    this.getLocalSearchMouseOverHtml = function() {
        var mouseHtml = "<div class=\"tooltip\">";
        mouseHtml += this.glocalresult.titleNoFormatting;
        mouseHtml += "</div>";
        return mouseHtml;
    }

    // get ajax search info window
    this.getLocalSearchInfoWindowHtml = function() {
        var infoHtml = "<div class=\"mapInfoWindow\" style=\"padding-right:10px;\">";
        infoHtml += this.glocalresult.titleNoFormatting;
        for (var i = 0; i < this.glocalresult.addressLines.length; i++) {
            infoHtml += "<br />" + this.glocalresult.addressLines[i];
        }
        if (this.glocalresult.phoneNumbers.length >= 1) {
            infoHtml += "<br />" + this.glocalresult.phoneNumbers[0].number;
        }
        infoHtml += "<br /><a href=\"" + this.glocalresult.url + "\" target=\"_blank\">More Details</a>";
        infoHtml += "</div>";
        return infoHtml;
    };    
}
