Ok I almost have a working basic google map... There is one problem... When I pass the map.setCenter it causes the app to fail.. Here is my code for you guys to look at and or use.. I used the Bi4ce.GoMap as a reference to get me started.. I checked the GoMap source and could not find where the Map.setCenter was passed.
.ascx file
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="maps.ascx.vb" Inherits="maps" %>
<asp:Literal ID="GoogleMapScript" Runat="server"></asp:Literal>
<asp:Literal ID="GoogleMap" Runat="server"></asp:Literal>
<asp:Literal ID="GoogleJavaScript" Runat="server"></asp:Literal>
.ascv.vb file
Imports DotNetNuke.Entities.Modules
Imports DotNetNuke.UI.Utilities
Imports Microsoft.VisualBasic.ControlChars
Public Class maps
Inherits PortalModuleBase
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
GoogleMapScript.Text = "<script src='http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA1K8Zoeblm8NGUhtVKx9XWBTTIzPU9tdsxWq6A66V5E_Uwk7exBR9yo5xeFaVgit0d1j77-k5M3VwGQ' type=""text/javascript""></script>"
GoogleMap.Text = "<div id=""map"" style=""width:640; height:480;""></div>"
SetGoogleJavaScript()
End Sub
Private Sub SetGoogleJavaScript()
Dim js As New System.Text.StringBuilder
js.Append("<script language=""javascript"">" & vbCrLf)
js.Append("//<![CDATA[" & vbCrLf)
js.Append("var map = new GMap2(document.getElementById(""map""));" & vbCrLf)
js.Append("map.addControl(new GSmallMapControl());" & vbCrLf)
js.Append("map.addControl(new GMapTypeControl());" & vbCrLf)
js.Append("map.setCenter(new GLatLng(37.4419, -122.1419));" & vbCrLf) <-- this is where it causes an error.. Am I missing some quotes or something?
js.Append("//]]>" & vbCrLf)
js.Append("</script>" & vbCrLf)
GoogleJavaScript.Text = js.ToString
js = Nothing
End Sub
End Class