rhender9
2018-10-02T20:10:16Z
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
2018-10-03T17:21:21Z
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?
2018-10-04T15:32:11Z
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

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