HEllo all : I must be a total noob - I have these two javascript scripts in the head of my html file but I want to hide the api number, and also the 2nd js. What do I need to write instead to have these js in another file that nobody can read when right clicking the mouse/show source code, and have the same google maps apearing in a div
I tried to put src="filename.js" but the google maps won't load at all.
Obfuscating the JS code ? But how can we put it after in a on the side file ? src="obfuscated code.js" won't load google maps at all Only putting obfiscated code in the head, but will it mess up with google indexing ?
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key= ...&sensor=false"></script>
<script type="text/javascript"> function initialize() { var latlng = new google.maps.LatLng(-19.991901,57.592607); var settings = { zoom: 1, disableDoubleClickZoom: true, draggable: false, scrollwheel: false, minZoom: 1, maxZoom: 18, center: latlng, mapTypeControl: false, navigationControl: true, navigationControlOptions: {style: google.maps.NavigationControlStyle.BIG}, mapTypeId: google.maps.MapTypeId.ROADMAP}; var map = new google.maps.Map(document.getElementById("map_canvas"), settings); var companyImage = new google.maps.MarkerImage('images/logo.png', new google.maps.Size(100,50), new google.maps.Point(0,0), new google.maps.Point(50,50) ); var companyShadow = new google.maps.MarkerImage('images/logo_shadow.png', new google.maps.Size(130,50), new google.maps.Point(0,0), new google.maps.Point(65, 50)); var companyPos = new google.maps.LatLng(-19.9913,57.592607); var companyMarker = new google.maps.Marker({ position: companyPos, map: map, icon: companyImage, shadow: companyShadow, title:"Bur-Nas Beach", zIndex: 3}); google.maps.event.addListener(companyMarker, 'click', function() { infowindow.open(map,companyMarker); }); } </script>