Google Maps Hide POIs, External links

by Abid Shaik

HTML

<script src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<!-- Google Maps Hide POIs, External links -->
<div id="map"></div>

CSS

body {
  font-family: Arial;
  font-size: 20px;
  line-height: 40px;
}

#map {
  height: 600px;
  width: 600px;
}

a[href^="http://maps.google.com/maps"] {
  display: none !important
}

a[href^="https://maps.google.com/maps"] {
  display: none !important
}

.gmnoprint a,
.gmnoprint span,
.gm-style-cc {
  display: none;
}

.gmnoprint div {
  background: none !important;
}

JavaScript

var map;

function initialize() {

  var poiOff = [
  /*{
    "featureType": "all",
    "elementType": "all",
    "stylers": [{
      "visibility": "off",
    }, {
      "color": "#FFFFFF"
    }]
  }, To hide everything on Map*/
  {
    "featureType": "poi",
    "elementType": "all",
    "stylers": [{
      "visibility": "off"
    }]
  }, {
    "featureType": "all",
    "elementType": "labels.icon",
    "stylers": [{
      "visibility": "off"
    }]
  }];

  var mapOptions = {
    center: new google.maps.LatLng(35.780, -78.640),
    styles: poiOff,
    zoom: 14,
    streetViewControl: false,
    panControl: false,
    mapTypeControl: false,
    mapTypeId: google.maps.MapTypeId.ROAD
  };

  map = new google.maps.Map(document.getElementById('map'), mapOptions);

}

initialize();