0
votes

I have a table of geocoded data in a DNN database: several columns of data plus latitude and longitude.

I want to create a Google Map and put markers on the map that correspond to the items in the data table.

I have a SQL data source set up, and can get the geocoded data into the razor script, produces tables, etc.

I can create the Google Map, and put markers on it appropriately, but only if the marker data is hard-coded into the javascript that creates the map.

Where I am having conceptual trouble is getting the geocoded data into a form where the javascript can use it. Can someone help me with that part?

Thanks.

1

1 Answers

1
votes

I guess the core question is how you store your coordinates - whether you have each number in a field or joined. I would basically follow the example of the map in the default bootstrap 3 templates - here's a link, but I recommend that you install the default templates to see how it's built:

https://github.com/2sic/2sxc-content-bootstrap3/blob/master/_Location%20-%20Full%20Size%20Map.cshtml