G12Consult
Programmer
Hi,
I have a table with lat and long fields. I also have geolocation field which I populate using the following StoreProc.
I now need to know how I can populate a list of those values on a google map?
Most of the tutorials I see online, dont use the new geography field. just lat and long.
Thanks
Andrew
I have a table with lat and long fields. I also have geolocation field which I populate using the following StoreProc.
Code:
USE [property]
GO
/****** Object: StoredProcedure [dbo].[spUpdateGeoCodes] Script Date: 19/05/2016 22:40:56 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[spUpdateGeoCodes]
AS
BEGIN
SET NOCOUNT ON;
UPDATE [dbo].[Properties]
SET [Geocode] = geography::STPointFromText('POINT(' + CAST([Longitude] AS VARCHAR(20)) + ' ' +
CAST([Latitude] AS VARCHAR(20)) + ')', 4326)
END
I now need to know how I can populate a list of those values on a google map?
Most of the tutorials I see online, dont use the new geography field. just lat and long.
Thanks
Andrew