PageSourceSearch

https://www.bgcgh.ca/wp-content/plugins/wp-google-maps/js/v8/googl…?ver=10.0.09+pro-10.0.07

js bgcgh.ca collected 2026-10-06 18:40:19 UTC 3,040 bytes, 125 lines download raw bytes

1/**
2 * @namespace WPGMZA
3 * @module GoogleTextOverlay
4 * @requires WPGMZA.GoogleText
5 */
6jQuery(function($) {
7	
8	WPGMZA.GoogleTextOverlay = function(options)
9	{
10		this.element = $("<div class='wpgmza-google-text-overlay'><div class='wpgmza-inner'></div></div>");
11		
12		if(!options)
13			options = {};
14		
15		if(options.position)
16			this.position = options.position;
17		
18		if(options.text)
19			this.element.find(".wpgmza-inner").text(options.text);
20		
21		if(options.map)
22			this.setMap(options.map.googleMap);
23	}
24	
25	if(window.google && google.maps && google.maps.OverlayView)
26		WPGMZA.GoogleTextOverlay.prototype = new google.maps.OverlayView();
27	
28	WPGMZA.GoogleTextOverlay.prototype.onAdd = function()
29	{
30		var overlayProjection = this.getProjection();
31		var position = overlayProjection.fromLatLngToDivPixel(this.position.toGoogleLatLng());
32		
33		this.element.css({
34			position: "absolute",
35			left: position.x + "px",
36			top: position.y + "px",
37			minWidth : "200px"
38		});
39
40		var panes = this.getPanes();
41		panes.floatPane.appendChild(this.element[0]);
42	}
43	
44	WPGMZA.GoogleTextOverlay.prototype.draw = function()
45	{
46		var overlayProjection = this.getProjection();
47		var position = overlayProjection.fromLatLngToDivPixel(this.position.toGoogleLatLng());
48		
49		this.element.css({
50			position: "absolute",
51			left: position.x + "px",
52			top: position.y + "px",
53			minWidth : "200px"
54		});
55	}
56	
57	WPGMZA.GoogleTextOverlay.prototype.onRemove = function()
58	{
59		this.element.remove();
60	}
61	
62	WPGMZA.GoogleTextOverlay.prototype.hide = function()
63	{
64		this.element.hide();
65	}
66	
67	WPGMZA.GoogleTextOverlay.prototype.show = function()
68	{
69		this.element.show();
70	}
71	
72	WPGMZA.GoogleTextOverlay.prototype.toggle = function()
73	{
74		if(this.element.is(":visible"))
75			this.element.hide();
76		else
77			this.element.show();
78	}
79
80	WPGMZA.GoogleTextOverlay.prototype.setPosition = function(position){
81		this.position = position;
82	}
83
84	WPGMZA.GoogleTextOverlay.prototype.setText = function(text){
85		this.element.find(".wpgmza-inner").text(text);
86	}
87
88	WPGMZA.GoogleTextOverlay.prototype.setFontSize = function(size){
89		size = parseInt(size);
90		this.element.find(".wpgmza-inner").css('font-size', size + 'px');
91	}
92
93	WPGMZA.GoogleTextOverlay.prototype.setFillColor = function(color){
94		if(!color.match(/^#/))
95			color = "#" + color;
96
97		this.element.find(".wpgmza-inner").css('color', color);
98	}
99
100	WPGMZA.GoogleTextOverlay.prototype.setLineColor = function(color){
101		if(!color.match(/^#/))
102			color = "#" + color;
103
104		this.element.find(".wpgmza-inner").css('--wpgmza-color-white', color);
105	}
106
107	WPGMZA.GoogleTextOverlay.prototype.setOpacity = function(opacity){
108		opacity = parseFloat(opacity);
109
110		if(opacity > 1){
111			opacity = 1;
112		} else if (opacity < 0){
113			opacity = 0;
114		}
115
116		this.element.find(".wpgmza-inner").css('opacity', opacity);
117	}
118
119	WPGMZA.GoogleTextOverlay.prototype.remove = function(){
120		if(this.element){
121			this.element.remove();
122		}
123	}
124	
125});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.