rhender9
  • Posts: 6
  • Joined: 20/02/2014
I am trying to add the following code in a ascx control to load a google map. Has someone done this before.

  <div id="map">
    </div>
    <script type="text/javascript">
        var map;
        function initMap() {
            var mapOptions = {
                zoom: 15,
                center: new google.maps.LatLng(38.252666, -85.758453),
                mapTypeId: google.maps.MapTypeId.ROADMAP
            };

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

            
            var Latlng_0 = new google.maps.LatLng(38.249390, -85.751630);
            var marker_0 = new google.maps.Marker({
                position: Latlng_0,
                title: "Look1"
         
            });

            marker_0.setMap(map);

            var Latlng_1 = new google.maps.LatLng(38.256080, -85.751570);
            var marker_1 = new google.maps.Marker({
                position: Latlng_1,
                title: "Look2",
                icon:image
            });

            marker_1.setMap(map);
        };
    </script>
    <script type="text/javascript" async defer src="https://maps.googleapis.com/maps/api/js?key=MyKey&callback=initMap"></script>
Sponsor
rhender9
  • Posts: 6
  • Joined: 20/02/2014
Got this working. I had to set the height of my map div to a px instead of %. Now I need to figure out how to retrieve my custom data using the existing Web Service ajax. Does anyone know the url to call to access the methods in the yafwebservice.cs or YafAjax.cs?
tha_watcha
  • Posts: 4080
  • Joined: 06/03/2010
Originally Posted by: rhender9

Got this working. I had to set the height of my map div to a px instead of %. Now I need to figure out how to retrieve my custom data using the existing Web Service ajax. Does anyone know the url to call to access the methods in the yafwebservice.cs or YafAjax.cs?



The url would be like...

yourforumurl.com/YafAjax.asmx/MethodName



UserPostedImage
Forum Jump  
  • You cannot post new topics in this forum.
  • You cannot reply to topics in this forum.
  • You cannot delete your posts in this forum.
  • You cannot edit your posts in this forum.
  • You cannot create polls in this forum.
  • You cannot vote in polls in this forum.

About Us

The YAF.NET is an open source .NET forum project. YAF.NET is supported by an team of international developers who are build community by building community software.

Powered by Resharper Donate with PayPal button

Project Twitter Updates

Copyright © YetAnotherForum.NET & Ingo Herbote. All rights reserved