Welcome Guest! To enable all features please Login or Register.

Login


Options
View
Go to last post Go to first unread
Offline rhender9  
#1 Posted : 02 October 2018 22:10:16(UTC)
rhender9


Rank: YAF Forumling

Reputation:

Joined: 20/02/2014(UTC)
Posts: 6
United States

I am trying to add the following code in a ascx control to load a google map. Has someone done this before.

Code:
  <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>

Edited by moderator 04 October 2018 17:27:38(UTC)  | Reason: added syntax highlighting

Sponsor
Offline rhender9  
#2 Posted : 03 October 2018 19:21:21(UTC)
rhender9


Rank: YAF Forumling

Reputation:

Joined: 20/02/2014(UTC)
Posts: 6
United States

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?
Offline tha_watcha  
#3 Posted : 04 October 2018 17:32:11(UTC)
tha_watcha


Rank: YAF.NET Project Lead

Reputation:

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(UTC)
Posts: 3,968
Germany

Thanks: 73 times
Was thanked: 1198 time(s) in 1026 post(s)
Originally Posted by: rhender9 Go to Quoted Post
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...

Code:
yourforumurl.com/YafAjax.asmx/MethodName


Rss Feed  Atom Feed
Users browsing this topic
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.

Notification

Icon
Error