2sxc and Google Maps - dotnetnuke

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.

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

Related

Using Google Apps Script or a Google Sheets formula, How can I get the shared ID of an image that is stored in a Google Drive folder?

I am using Google AppsSheet as a front end to a small business Application I built for a friend using Google Sheets as the user interface, dashboard and database. The Sheet has a dashboard and mockup invoicing system that can display a signature image at the bottom of the invoice that was captured using AppSheet. The filename of the signature is stored in a column as well as all of the other invoice data. On the invoice page, I have a dropdown list of customers and after selecting the customer I click a button that runs a script to populate the invoice with all of the customer data. For the Signature, I am using the Google Sheets formula " =IMAGE("https://drive.google.com/open?id=" & CELL W/IMAGE ID) " to display the captured image on the Google drive. This part works fine BUT only if I use the ID of the image, not the Filename of the image. If have to manually add the image ID, this defeats the automation aspect and I can not expect my buddy to figure that out for every image...
Finally the Question:
Since I have the file name of the image, I would like to get the ID of the image to save in a new column for the recall of the signature Image at the bottom of the invoice page. Then he can export the invoice as a PDF and send to the customer.
Is this possible or is there another way to accomplish displaying an image in Google Sheets using the Filename of an image stored in a Google Drive folder?
I'm a noob and have accomplished a lot using stackOverflow as my main coding reference. I applaud all who contribute to helping us noobs out. Thanks in advance!
I have searched all over google and tried using .getId(), getFilesByName() then trying to get the ID.... As I mentioned before... I am a noob and still wrapping my head around how Objects and Methods work together and trying to visualize the relationships between all of the moving parts. Any good resources for explaining all of this would be helpful as well... Thanks.

Is a way to show multiple metrics on Google Data Studio Geo Map?

I'm trying to use Google Data Studio (GDS) to display a dashboard with a map. I want to show 2 metrics on the tooltip - Number of Trips and Number of Customers. But GDS lets me select only one metric at a time as the default and makes everything else optional. Is there a way to show both metrics simultaneously?
I'm able to show both metrics on the map using Tableau Public. However, I would prefer staying within the Google ecosystem, if possible.
For reference, I've attached a screenshot below - comparing the two visualizations.
Geo Maps in Google Data Studio currently only display a single metric at a time (no optional or additional tooltips for Geo Maps at the moment).
However, as alluded to, Optional Metrics would allow viewers to choose a single metric from a range of different metrics.
Google Data Studio Report and a GIF to demonstrate:

Database search field database

I'm looking for a way to create a search box in wordpress, where visitors can search a number from the database. Is this possible? I have several package numbers in my database. I want to give my visitors the ability to search for their package number and request the information that comes with the number.
What you want to do can be done.
I suggest a different approach than using wp-exec. (I just looked at wp-exec website, and that plugin was created for WordPress 1.5, which means it hasn't been updated in about 5 years).
The content you want to display exists entirely outside of WordPress. I suggest you use a custom page template - see
http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates
In this case you would not use WordPress posts or pages or custom post types. On the custom page template you would write (or have written if you don't have the knowhow to do it yourself) PHP code to extract the info from the database and display it on a page.
For pages like that you would be using WordPress only as a container within which to display the results - they custom page would appear in the site Nav, The page of results would use the site's theme to display so it looks like the rest of the site.
But the code to display from the database would not use the WordPress loop. It would be PHP / MySQL data retrieval and display code.
I really doubt you will find a plugin that lets you display results from an external database, formatted the way you want them to appear. The reason is every external database is different, has different tables and table structures. And no two sites will want the external data visually displayed in the same way. So there is little generalization to encapsulate in a plugin as everyone wants it different.
I've created pages on some sites along the lines of what you want to do thus I know it can be done. But it requires writing custom code.

creating a custom database in adobe business catalyst?

I want to create a custom database within Adobe Business Catalyst. I have an Excel Spreadsheet with 1000's of rows of data that I want to upload.
Does anyone know how I can do this or where I can find instructions on how to do this as I cant seem to find anything anywhere???
What you need to use is the Web Apps module. You haven't told us what you want to do with this data but I assume that you simply want to render it on the page. Web apps will allow you to crate a custom field for every column in your spreadsheet and import that spreadsheet into it. It has a list view which creates an automatic link to a detail view. See the following link for more info -
http://kb.worldsecuresystems.com/kb/add-custom-content-using-web.html

Possible to SQL Server database drive a Google Map by UK postcode?

We have a property/accommodation profile page that lists a property address including postcode. This information is stored in a SQL Server database table and the page has a recordset that allows us to feed profile information onto a page depending on the propertyID that is selected (either via link or using a form) by the user.
We created a field in the database table that would allow us to insert the Google Map embed code for a property and, subsequently, we'd then call that on the property profile page but this requires us to create the embed code in Google Maps first, have to paste that into our database field etc, before it would display a map on our page.
So...we would like to database drive the map based on the postcode. Is that possible?
We really don't want to have to get into longitude/latitude coordinates, we just want the map to identify the postcode and put a place marker on a map where that postcode appears.
How do we acheive this? We've tried looking through the documentation and help files, but we really don't know what we're asking for so finding answers is proving incredibly difficult or the answers that we've found seem extremely technical (Google API, Geocoding, etc) for what we're trying to acheive.
Could someone point us in the right direction?
We hoped that there would be some way of inserting the postcode, dynamically, into generic embed code from Google Maps and that Google Maps would do the rest.
Anyway, we would appreciate any help and advice that could be offered. Thank you.
Regards
NJ
Traditionally Postcode data in the UK costs lots of money.
You can now download the Ordnance Survey data and convert their data into Latitude and longitude which would let you plot coordinates on google maps. (http://www.ordnancesurvey.co.uk/oswebsite/products/code-point-open/index.html)

Resources