Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

DotNetNuke Marketplace
  Ads  
OnyakTech
 


  Sponsors  

Meet Our Sponsors

.: CounterSoft :.
telerik
ExactTarget email software solutions
Merak Mail Server
WebSecureStores -- ASP.NET & DotNetNuke Hosting Solutions
FCKeditor Project
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Map Module [Lea...  Creating a basic map
Previous Previous
 
Next Next
New Post 11/21/2006 12:32 PM
User is offline Robert Stanionis
5 posts
www.atlantapd.org
10th Ranked


Re: Creating a basic map 

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&amp;v=2&amp;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

 
New Post 11/22/2006 3:29 AM
User is offline Rodney Joyce
1661 posts
www.smart-thinker.com
5th Ranked




Re: Creating a basic map 
Sorry, I don't know enough to help you, but I have noticed all maps (on different sites and localhost) are causing my browser (IE and FF) to fail - I am not sure what the problem is but are you sure it's your code (maybe the Google API has changed recently?)

Thanks,
Rodney
Smart-Thinker - Social Networking modules for DotNetNuke
The DotNetNuke Directory - Are you listed?
PokerDIY - Example Implementation of DNN Social Network
Do use DNN a lot? Try the DotNetNuke Toolbar to save you time!
 
New Post 11/23/2006 8:02 AM
User is offline Robert Stanionis
5 posts
www.atlantapd.org
10th Ranked


Re: Creating a basic map 

It is the code.. I was able to create a map that would display everything correctly when you clicked a button.

I also noticed in the above code if I do not have the SetCenter line in the code and ran the page when you click on one of the controls it would give an error of something not defined...I am not sure if it has something to do with SetCenter not being there...But it was my understanding that SetCenter was optional and was not needed to get the map running.

When I get back from Thanksgiving break I will test this with the button method that I know works.

 
New Post 11/28/2006 2:05 PM
User is offline Robert Stanionis
5 posts
www.atlantapd.org
10th Ranked


Re: Creating a basic map 

I got it working!

It is mostly the fault of IE.

If you want a basic google map v2 api here are the source files.

 
New Post 5/29/2007 11:24 AM
User is offline Andrew Hawes
57 posts
www.fish4him.net
10th Ranked


Re: Creating a basic map 

Mobious, have you made any updates to this code since you created it? I am trying to do the same think and just want to see what the latest is. Thanks for your work.

 

 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Map Module [Lea...  Creating a basic map
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, please observe the following posting guidelines:

1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


Bring2mind
Document Centric DNN Module Solutions
www.bring2mind.net
WEBPC™ DotNetNuke® sites for Small Business
WEBPC™ are internet consultants and web hosters catering to the small business market.
www.webpc.biz
Perpetual Motion Interactive Systems Inc.
A solutions company specializing in Microsoft enterprise technologies.
www.perpetualmotion.ca

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP