0

Hi i am using the google map v3.For the test purpose i just loaded the google map by pasting the below code

in html page.the map is successfully getting loaded.But how to load the initial markers on the map and my markers should not get repeated as i will be using the info window as well.like for one country say north america if marker is loaded now when i scroll right/left on map to get another instance of north america either my marker should get shifted to this new one and previous marker should got deleted.I hope i am not much confusing.I am very much new to this field.Please guide.Thanks

i tried something like this http://gmaps-utility-library-dev.googlecode.com/svn/trunk/markermanager/examples/google_northamerica_offices.html(please zoom out to 0 level and then observe the marker,i need something like this only)

using marker manager to achieve above purpose but this is nt wrkng for me as marker itself is not getting loaded

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="utf-8" />
    <title>JS Bin</title>
    <!--[if IE]>
  <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
html, body{
    margin:0;
    height: 100%;  
    padding: 0;
}
#map {
height: 100%;
}
</style>
    <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
    <script type="text/javascript" src="../../Scripts/MarkerManager.js"></script>
<script>
    var map;
    function initialize() {

        var mapOptions = {
            center: new google.maps.LatLng(0, 0), zoom: 2,
            mapTypeId: google.maps.MapTypeId.ROADMAP
        };

        map = new google.maps.Map(document.getElementById("map"), mapOptions);
        // map.setCenter(new google.maps.LatLng(37.4419, -122.1419), 13);
        // var mgr = new MarkerManager(map, mapOptions);
    }
        google.maps.event.addDomListener(window, 'load', initialize);


</script>
</head>
<body>
     <div id="map"></div>
</body>
</html>
rahul
  • 3
  • 4
  • http://gmaps-utility-library-dev.googlecode.com/svn/trunk/markermanager/examples/google_northamerica_offices.html – rahul Jan 09 '14 at 11:20
  • please use the above mentioned link – rahul Jan 09 '14 at 11:22
  • Simply You can simply register markers in javascript array also. – Jaykishan Jan 09 '14 at 11:33
  • Hi Jaykishan,,Can u please provide me some code to do this.I am very much new to this.thanks for help – rahul Jan 09 '14 at 11:35
  • possible duplicate of [Display world map with no repeats](http://stackoverflow.com/questions/20498210/display-world-map-with-no-repeats) – geocodezip Jan 09 '14 at 11:47
  • Hi i donot want my markers to get repeated rather than country(i will be showing the map on whole screen hence the countries would get repeat.what i want is on page load all my markers should get load(which is happening now)but as sson as i scroll the map say from australia in one map to australia in another map my marker should also get shifted accordingly(check this in by zooming the map level to 0 and scroll when multiple instance of map is loaded and scroll from one map to another.the markers should shift aacordingly.Any pointer in this regard is highly appreciated – rahul Jan 09 '14 at 12:09
  • @rahul looks like above library is solution of all your problems, try to implement it properly. – Jaykishan Jan 09 '14 at 13:33
  • making the marker as draggable solve the problem.. – rahul Jan 23 '14 at 07:24
  • in marker properties set the attribute as draggable:true – rahul Jan 23 '14 at 07:24

0 Answers0