@Ashritha ,
I was looking at another question which involved Google Map API. I agree that the answer I provided was not helpful. I believe that you need to find a Google Map API Style definition which only shows the items you want on your map.
To help in demonstrating my solution I took the "NightMap" style which is described on the Google Map API site. https://developers.google.com/maps/documentation/javascript/examples/style-array
To use this information will require you to create a custom version of the Google Widget. You will need to update 2 files, googlemap.ide.js and googlemap.runtime.js.
In the googlemap.ide.js you will find the below code. I have added the last value line which adds "NightMode".
'MapSkin': {
'isBindingTarget': false,
'description' : 'A few options on the look of the map',
'baseType': 'STRING',
'defaultValue': 'normal',
'selectOptions': [
{ value: 'normal', text: 'Normal' },
{ value: 'blue', text: 'Blue' },
{ value: 'gray', text: 'Gray' },
{ value: 'nitemode', text: 'NiteMode' }
]
},
In the googlemap.runtime.js you will find the below code.
switch( thisWidget.getProperty('MapSkin','normal') ) {
case 'normal':
break;
case 'blue':
options['styles'] = [{"featureType":"water","elementType": <code removed> ];
break;
case 'gray':
options['styles'] = [{"featureType":"landscape","stylers": <code removed> }]}];
break;
case 'nitemode':
options['styles'] = [{elementType: 'geometry', stylers: <code removed> ]}];
break;
}
I have added a case using the information from Google Map API page. I added the case for 'nightmode'. For the purpose of this posting I have removed some of the code to make it readable.
I hope this information is helpful. Please let me know if you have any questions.
Regards,
Peter