#1
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),
                mapTypeI😛 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>
Topic Starter
  • rhender9
  • Rank: YAF Forumling
  • Reputation:
    Neutral
    53.6%
  • Joined: 20/02/2014
  • Posts: 6
  •  United States
#2
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?
Topic Starter
  • rhender9
  • Rank: YAF Forumling
  • Reputation:
    Neutral
    53.6%
  • Joined: 20/02/2014
  • Posts: 6
  •  United States
#3
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
  • tha_watcha
  • Rank: YAF.NET Project Lead
  • Reputation:
    Exalted
    100%
  • Medals:
    Medal of Honor: Portal Puzzle Master: Portal Puzzle Master for DNNMedal of Honor Key: Given to pillars of the community who are key players in the YAF community and project.DNN Master: DNN Module ManBug Killer Medal of Honor: Medal for being a kick-ass bug killer!Medal of Honor for the Support King: Support King! Amazing asset to the YAF.NET Community.
  • Joined: 06/03/2010
  • Posts: 4,002
  •  Germany
  • Thanks: 74 times
  • Was thanked: 1205 time(s) in 1031 post(s)
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