[mapguide-users] RE: RE: ODBC Provider with SQL Server 2005: Doesit worksfor somebody?

Brad Nesom kidsmake6 at msn.com
Wed Feb 21 09:35:45 EST 2007


Very interesting. Can we hear more?

-----Original Message-----
From: mapguide-users-bounces at lists.osgeo.org
[mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of pdtechguy
Sent: Tuesday, February 20, 2007 11:53 PM
To: mapguide-users at lists.osgeo.org
Subject: [mapguide-users] RE: RE: ODBC Provider with SQL Server 2005: Doesit
worksfor somebody?


What I did was really pretty simple... just not for me as I know very little
about javascript or html(or maps for that matter)

1.Created the basemap with streets and such(used our county data)
2.wrote an interface to our cad system that parses out the gps data and unit
info and populates the sql table(s)
3.Created a layer of points from that data (an odbc connection to a sql 2k5
server)

I had a lot of trouble with this part and would really like to hear from
someone who's done it right -

4. loaded this page as the taskpane (it's narrow enough you can's see
anything) it's just there for the code.

<html>
<head>
   <title>Test App</title>
</head>
<script language="javascript">

function reloadSpecificLayers(){
parent.parent.Refresh(); 
}

</script>
<script language="javascript">

var initTimer = setInterval(reloadSpecificLayers, 10000);
</script>

</body>
</html>

IAs a whole it work great - much much better than I thought it would. The
ajax client seems pretty intelligent and the refresh is imperceptible except
that the points move.

Hope this helps.

Pat




ctallman wrote:
> 
> pdtechguy,
>  
> I would be interested in seeing what you have done and how.  I'm working
> on an application similar to this.  Anything you are willing to share
> would be very helpful.
>  
> Chris
> 
> ________________________________
> 
> From: mapguide-users-bounces at lists.osgeo.org
> [mailto:mapguide-users-bounces at lists.osgeo.org] On Behalf Of Andrew
> DeMerchant
> Sent: Friday, February 16, 2007 8:03 AM
> To: MapGuide Users Mail List
> Subject: Re: [mapguide-users] RE: ODBC Provider with SQL Server 2005:
> Doesit worksfor somebody?
> 
> 
> Moving points, as in the locations move frequently? Do you have it set
> up to refresh the points layer automatically?
> 
> Andrew
> 
> 
> pdtechguy wrote: 
> 
> 	It works very good for an avl map that I created as a tech demo.
> It's is
> 	displaying 30'ish moving points on a street level tiled base map
> of our
> 	county. Be happy to share any info you'd like.
> 	
> 	BTW thanks to all who participate in this project.
> 	
> 	Here is the sql table that contains the points I am using:
> 	
> 	USE [AVL_CAD]
> 	GO
> 	/****** Object:  Table [dbo].[avl_last_known]    Script Date:
> 02/13/2007
> 	22:26:43 ******/
> 	SET ANSI_NULLS ON
> 	GO
> 	SET QUOTED_IDENTIFIER ON
> 	GO
> 	CREATE TABLE [dbo].[avl_last_known](
> 		[servertimestamp] [datetime] NULL,
> 		[cadunit1] [text] COLLATE SQL_Latin1_General_CP1_CI_AS
> NULL,
> 		[cadunit2] [text] COLLATE SQL_Latin1_General_CP1_CI_AS
> NULL,
> 		[caduser] [text] COLLATE SQL_Latin1_General_CP1_CI_AS
> NULL,
> 		[gpstimeofday] [text] COLLATE
> SQL_Latin1_General_CP1_CI_AS NULL,
> 		[lattitude] [float] NULL,
> 		[longitude] [float] NULL,
> 		[speed] [text] COLLATE SQL_Latin1_General_CP1_CI_AS
> NULL,
> 		[heading] [text] COLLATE SQL_Latin1_General_CP1_CI_AS
> NULL,
> 		[sourceofdata] [text] COLLATE
> SQL_Latin1_General_CP1_CI_AS NULL,
> 		[ageofdata] [text] COLLATE SQL_Latin1_General_CP1_CI_AS
> NULL
> 	) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
> 	
> 	
> 	
> 	
> 	FGoulet wrote:
> 	  
> 
> 		Sure,
> 		
> 		Here's the script:
> 		
> 		USE [DredgingRegister]
> 		GO
> 		/****** Object:  Table [dbo].[Dredging_Activity]
> Script Date:
> 		01/31/2007 14:53:46 ******/
> 		SET ANSI_NULLS ON
> 		GO
> 		SET QUOTED_IDENTIFIER ON
> 		GO
> 		CREATE TABLE [dbo].[Dredging_Activity](
> 			[Activity_ID] [int] IDENTITY(1,1) NOT NULL,
> 			[UserName] [nvarchar](256) COLLATE
> SQL_Latin1_General_CP1_CI_AS NULL,
> 			[Location_FR] [nvarchar](32) COLLATE
> SQL_Latin1_General_CP1_CI_AS NULL,
> 			[Location_EN] [nvarchar](32) COLLATE
> SQL_Latin1_General_CP1_CI_AS NULL,
> 			[Description_FR] [nvarchar](32) COLLATE
> SQL_Latin1_General_CP1_CI_AS
> 		NULL,
> 			[Description_EN] [nvarchar](32) COLLATE
> SQL_Latin1_General_CP1_CI_AS
> 		NULL,
> 			[Start_Date] [datetime] NULL,
> 			[Finish_Date] [datetime] NULL,
> 			[Dredging_Type_CD] [int] NULL,
> 			[Material_Quantity] [numeric](9, 3) NULL,
> 			[Material_Disposal] [nchar](10) COLLATE
> SQL_Latin1_General_CP1_CI_AS
> 		NULL,
> 			[Longitude] [float] NULL,
> 			[Latitude] [float] NULL,
> 			[Registration_Date] [datetime] NULL,
> 			[Approved] [bit] NULL,
> 			[Proponent_ID] [int] NULL,
> 			[Responsible_ID] [int] NULL,
> 		 CONSTRAINT [PK_Dredging_Activity] PRIMARY KEY CLUSTERED
> 
> 		(
> 			[Activity_ID] ASC
> 		)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON
> [PRIMARY]
> 		) ON [PRIMARY]
> 		
> 		GO
> 		ALTER TABLE [dbo].[Dredging_Activity]  WITH CHECK ADD
> CONSTRAINT
> 		[FK_Dredging_Activity_Contact] FOREIGN
> KEY([Responsible_ID])
> 		REFERENCES [dbo].[Contact] ([Contact_ID])
> 		GO
> 		ALTER TABLE [dbo].[Dredging_Activity] CHECK CONSTRAINT
> 		[FK_Dredging_Activity_Contact]
> 		GO
> 		ALTER TABLE [dbo].[Dredging_Activity]  WITH CHECK ADD
> CONSTRAINT
> 		[FK_Dredging_Activity_Dredging_Type] FOREIGN
> KEY([Dredging_Type_CD])
> 		REFERENCES [dbo].[Dredging_Type] ([Dredging_Type_CD])
> 		GO
> 		ALTER TABLE [dbo].[Dredging_Activity] CHECK CONSTRAINT
> 		[FK_Dredging_Activity_Dredging_Type]
> 		GO
> 		ALTER TABLE [dbo].[Dredging_Activity]  WITH CHECK ADD
> CONSTRAINT
> 		[FK_Dredging_Activity_Proponent] FOREIGN
> KEY([Proponent_ID])
> 		REFERENCES [dbo].[Proponent] ([Proponent_ID])
> 		GO
> 		ALTER TABLE [dbo].[Dredging_Activity] CHECK CONSTRAINT
> 		[FK_Dredging_Activity_Proponent]
> 		
> 		
> 		The columns mapped to X and Y in MG Studio are Longitude
> and Latitude. I
> 		tried with  others numeric type (real, decimal, numeric)
> and I always get
> 		that error.
> 		
> 		
> 		Thanks
> 		
> 		
> 		
> 		
> 		JasonBirch wrote:
> 		    
> 
> 			Frederic wrote:
> 			 
> 			        An exception occurred in FDO component.
> 			        RDBMS: Incompatible column type
> 			
> 			Care to share the table definition?  The problem
> with ODBC is that it's
> 			not generic enough :)
> 			 
> 			Jason
> 			 
> 			
> 			 
> 			_______________________________________________
> 			mapguide-users mailing list
> 			mapguide-users at lists.osgeo.org
> 			
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 			
> 			
> 			      
> 
> 		    
> 
> 	
> 	  
> 
> 
> -- 
> 
>  
> Andrew DeMerchant
> Computer Technologist
> ph.1-877-2GEMTEC x.163
> fax 506-453-9470
> 
> 
> GEMTEC Limited <http://www.gemtec.ca> 
> 191 Doak Road
> Fredericton, NB, Canada
> E3C 2E6
> 
> 
>  
> _______________________________________________
> mapguide-users mailing list
> mapguide-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapguide-users
> 
> 

-- 
View this message in context:
http://www.nabble.com/ODBC-Provider-with-SQL-Server-2005%3A-Does-it-works-fo
r-somebody--tf3144880s16610.html#a9075760
Sent from the MapGuide Users mailing list archive at Nabble.com.

_______________________________________________
mapguide-users mailing list
mapguide-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users



More information about the mapguide-users mailing list