How to hide the initial marker on map

Feb 2, 2009 at 4:11 AM
Is it possible to display the map without any markers???
Coordinator
Feb 3, 2009 at 10:27 AM
Hiya,

I think the answer is yes and no.  Yes it should be possible to display a google map without any points but no I don't think its possible to do it with this web part.  I'll put it down as a possible future feature.

Mike
Feb 4, 2009 at 12:23 AM
Thanks Mike,
i appreciate your quick response. I think it will be very useful if the map can be displayed without having specify any markers, especially directions part. I am using this webpart on our first public sharepoint website for our holiday resort on an island. So basically i just wanted to show a satellite or hybrid map view of the island without any markers or directions.

Sriraj
Coordinator
Feb 4, 2009 at 8:54 AM
Hi,

One option would be to just drop the following code into a content editor webpart

<style>
#map, #directions {height:500px; width:600px;}
</style>

<div ID="map"></div>
<script type="text/javascript" language="javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=YOUR_GOOGLE_MAPS_API_KEY"></script>

<script language="javascript" type="text/javascript">

//<![CDATA[
if (GBrowserIsCompatible()) {

var map = new GMap2(document.getElementById("map"));
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
map.setMapType(G_NORMAL_MAP);
map.setCenter(new GLatLng(53.285919,-4.337869),10);

setTimeout('map.setCenter(new GLatLng(53.285919,-4.337869),10)','750');
setTimeout('map.checkResize()','500');
}

//]]>
</script>

You can edit the latitude and longitude and the zoom of the map - the bits in bold - to make them match your requirements.  You can get the Lat and Long from Google Earth or from any GPS receiver.  You can also change G_NORMAL_MAP to G_SATELLITE_MAP  or G_HYBRID_MAP.

Mike