Last active
July 9, 2024 05:58
-
-
Save amirhp-com/1f30132afbb54970930690d06dc9a764 to your computer and use it in GitHub Desktop.
Remove Google Map "FOR DEVELOPMENT PURPOSES ONLY" Watermark !
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
📝 Remove "For Development Only" Watermark on GOOGLE MAP 😁 | |
👤 SCRIPT BY AmirhpCom ( https://amirhp.com/) 👑 | |
➕ Add this code on your project and edit langID,mapCanvas variables | |
*/ | |
var langID = "en-US", mapCanvas = "#map-canvas", $ = jQuery; | |
setInterval(function () {googlemap_remap();}, 10); | |
function googlemap_remap() { | |
$(`${mapCanvas}>div:last-of-type`).hide(); //hide top message says this is for dev only | |
var gimg = $(`img[src*="maps.googleapis.com/maps/vt?"]:not(.gmf)`); | |
$.each(gimg, function(i,x){ | |
var imgurl = $(x).attr("src"); | |
var urlarray = imgurl.split('!'); | |
var newurl = ""; var newc = 0; | |
for (i = 0; i < 1000; i++) {if (urlarray[i] == "2s"+langID){newc = i-3;break;}} | |
for (i = 0; i < newc+1; i++) {newurl += urlarray[i] + "!";} | |
$(x).attr("src",newurl).addClass("gmf"); | |
}); | |
} |
Okay, thank you :)
Hi, thanks for reaching out. Yes, this message was displayed before, it's because we manipulate the structure of the map and there's no way to get rid of it. But it's worth using the trick, isn't it?
I see but thanks for this code. I think it is ok even if it has that kind of error message since I am using the API for free.
by the way it this is a nice trick
It only works for the street layer, not for the terrain one
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have not tested it recently but Google might have changed its pattern of showing maps. so, it this does not work I'm sorry.