27 Jul 2013

Multiple Markers View in Google Map Integration :

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <script type="text/javascript" src="http://maps.googleapis.com/maps/api/js?sensor=false"></script>
        <script type="text/javascript">
            var map; var infowindow;
            function InitializeMap() {
                var latlng = new google.maps.LatLng(40.756, -73.986);
                var myOptions =
        {
            zoom: 8,
            center: latlng,
            mapTypeId: google.maps.MapTypeId.ROADMAP
        };
                map = new google.maps.Map(document.getElementById("map"), myOptions);
            }


            function markicons() {

                InitializeMap();

                var ltlng = [];

                ltlng.push(new google.maps.LatLng(17.22, 78.28));
                ltlng.push(new google.maps.LatLng(13.5, 79.2));
                ltlng.push(new google.maps.LatLng(15.24, 77.16));

                map.setCenter(ltlng[0]);
                for (var i = 0; i <= ltlng.length; i++) {
                    marker = new google.maps.Marker({
                        map: map,
                        position: ltlng[i]
                    });

                    (function (i, marker) {

                        google.maps.event.addListener(marker, 'click', function () {

                            if (!infowindow) {
                                infowindow = new google.maps.InfoWindow();
                            }

                            infowindow.setContent("Message" + i);

                            infowindow.open(map, marker);

                        });

                    })(i, marker);

                }

            }

            window.onload = markicons;

        </script>
        <h2>
            Multiple Markers View in Google Map Integration :</h2>
        <div id="map" style="width: 896px; top: 51px; left: 32px; position: absolute; height: 400px">
        </div>
    </div>
    </form>
</body>
</html>


16 comments:


  1. Ver nice Blog , You are sharing nice info with peoples. would youlike to visit my Website And Get Cool Stuff

    ReplyDelete
  2. I used to be able to find good advice from your blog posts.


    My webpage :: blog sites

    ReplyDelete
  3. Yesterday, while I was at work, my sister stole my iPad
    and tested to see if it can survive a 25 foot drop, just so she can be a
    youtube sensation. My apple ipad is now broken and she has 83
    views. I know this is totally off topic but I had
    to share it with someone!

    Here is my page - blogging jobs online

    ReplyDelete
  4. I'm really impressed with your writing skills as well as with the layout on your blog.

    Is this a paid theme or did you modify it yourself?

    Anyway keep up the excellent quality writing, it's rare to see a nice
    blog like this one today.

    My blog; french languages online

    ReplyDelete
  5. It's hard to find knowledgeable people for this topic, however,
    you seem like you know what you're talking about! Thanks

    Also visit my page: make money blogging

    ReplyDelete
  6. Everything is very open with a precise explanation of
    the challenges. It was definitely informative. Your website is extremely helpful.
    Thank you for sharing!

    Feel free to surf to my weblog; sell your house quickly

    ReplyDelete
  7. No matter if some one searches for his vital thing, so he/she wishes to be
    available that in detail, so that thing is maintained over here.


    Also visit my homepage - fees for buy and sell a house

    ReplyDelete
  8. I've been exploring for a little for any high quality articles or weblog posts
    on this sort of area . Exploring in Yahoo I at last stumbled upon this site.
    Studying this info So i am glad to convey that I have an incredibly excellent uncanny feeling I came upon just
    what I needed. I so much unquestionably will make sure to don?t fail to remember
    this site and give it a glance on a constant basis.

    Feel free to surf to my page: make a blog for free

    ReplyDelete
  9. Thank you for the auspicious writeup. It actually was once
    a entertainment account it. Look advanced to more delivered agreeable from
    you! However, how can we be in contact?

    Here is my weblog - hoover carpet cleaner reviews Vancouver

    ReplyDelete
  10. It's in point of fact a nice and useful piece of info.
    I'm happy that you shared this useful information with us.
    Please keep us up to date like this. Thank you
    for sharing.

    Visit my homepage Déménagement Martin

    ReplyDelete
  11. Hi there, yes this piece of writing is truly good and I
    have learned lot of things from it concerning blogging. thanks.


    my webpage :: social media marketing prices

    ReplyDelete
  12. Hello, I enjoy reading through your article. I wanted to write a little comment to support you.



    Here is my web-site: private plane rental rates

    ReplyDelete
  13. Thank you for another informative website. Where else
    may I am getting that type of information written in such an ideal means?
    I have a venture that I am just now working on, and I have been at the look out for such info.



    my site make blog

    ReplyDelete
  14. This post is invaluable. When can I find out more?

    My blog - extremely hard work

    ReplyDelete
  15. Hey! This post could not be written any better! Reading through
    this post reminds me of my old room mate! He always kept
    chatting about this. I will forward this post to him.
    Fairly certain he will have a good read. Many thanks for
    sharing!

    Feel free to visit my web blog; social signals

    ReplyDelete
  16. Hi, this weekend is good in support of me, for the reason that this occasion i
    am reading this enormous informative post here at my house.


    Here is my web page :: grill electric tefal

    ReplyDelete