{"id":553,"date":"2012-09-18T23:58:58","date_gmt":"2012-09-19T05:58:58","guid":{"rendered":"https:\/\/toddbaginski.com\/blog\/?p=553"},"modified":"2013-06-28T15:44:25","modified_gmt":"2013-06-28T21:44:25","slug":"a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views","status":"publish","type":"post","link":"https:\/\/toddbaginski.com\/blog\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\/","title":{"rendered":"A Simple SharePoint 2013 App To Create Geolocation Fields and Map Views"},"content":{"rendered":"<p>One of the new features in SharePoint 2013 is the Geolocation field.&#160; You can learn more about it <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/jj163135(v=office.15).aspx\" target=\"_blank\">here<\/a> in the MSDN.&#160; As I was developing some new SharePoint 2013 demos for my upcoming sessions at the <a href=\"http:\/\/www.devconnections.com\/shows\/fall2012\/default.aspx?s=192\" target=\"_blank\">SharePoint Connections Fall 2012 Conference<\/a> I started looking into this new functionality.&#160; My goal was to see how I could use the new Geolocation field type it to replace the Silverlight Bing Maps control I created for my SharePoint 2010 <a href=\"http:\/\/www.sharepointpromag.com\/article\/sharepoint\/creating-sharepoint-mashups-129463\" target=\"_blank\">mashup demo<\/a>.<\/p>\n<p>As I went through the MSDN examples I saw that all of the examples and code samples use command line programs to create the Geolocation field and map-enabled list view that relies on the Geolocation field.&#160; Personally, I\u2019m not a fan of using command line tools when I develop solutions, I\u2019d rather have something with a simple user interface that allows me to create new components quickly and easily without having to open a command prompt and remember the syntax associated with the command line program or a script.&#160; If you have been following my blog for a while you\u2019re probably familiar with the SharePoint Feature Manager I created about 6 years ago to manage features for a SharePoint site which falls into this same category.<\/p>\n<p>So, along these lines, I decided to create a simple SharePoint Hosted App that allows me to easily specify which list I would like to add a Geolocation field to, give the Geolocation field a name, specify a name for the map-enabled list view that relies on the Geolocation field, and click a button or two to make everything for me.<\/p>\n<p><strong><em>This is also a fantastic way to roll out this functionality to your users and give them self service capabilities to create this type of functionality directly from a web browser.<\/em><\/strong><\/p>\n<p>It turned out to be a very easy exercise!&#160; Here\u2019s what the SP APP looks like.<\/p>\n<p><a href=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2012\/09\/image.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2012\/09\/image_thumb.png\" width=\"434\" height=\"417\" \/><\/a><\/p>\n<p>Just fill in the values, click the buttons the Geolocation field, and the Geolocation column and the map-enabled view are created in the target list as you can see below.<\/p>\n<p><a href=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2012\/09\/image1.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2012\/09\/image_thumb1.png\" width=\"601\" height=\"227\" \/><\/a><\/p>\n<p><a href=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2012\/09\/image2.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2012\/09\/image_thumb2.png\" width=\"383\" height=\"132\" \/><\/a><\/p>\n<p>Here\u2019s what the new Map list view looks like.&#160; That\u2019s some pretty sweet out of the box functionality!<\/p>\n<p><a href=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2012\/09\/image3.png\"><img loading=\"lazy\" decoding=\"async\" style=\"background-image: none; border-right-width: 0px; padding-left: 0px; padding-right: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px; padding-top: 0px\" title=\"image\" border=\"0\" alt=\"image\" src=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2012\/09\/image_thumb3.png\" width=\"485\" height=\"623\" \/><\/a><\/p>\n<p>Here\u2019s how I went about it.&#160; First, I added some simple controls to the default.aspx page.<\/p>\n<div style=\"border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px\" id=\"codeSnippetWrapper\">\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px\" id=\"codeSnippet\">&lt;%-- The following 4 lines are ASP.NET directives needed when <span style=\"color: #0000ff\">using<\/span> SharePoint components --%&gt;<br \/>&lt;%@ Page Inherits=<span style=\"color: #006080\">&quot;Microsoft.SharePoint.WebPartPages.WebPartPage, Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&quot;<\/span> MasterPageFile=<span style=\"color: #006080\">&quot;~masterurl\/default.master&quot;<\/span> language=<span style=\"color: #006080\">&quot;C#&quot;<\/span> %&gt;<br \/>&lt;%@ Register Tagprefix=<span style=\"color: #006080\">&quot;SharePoint&quot;<\/span> Namespace=<span style=\"color: #006080\">&quot;Microsoft.SharePoint.WebControls&quot;<\/span> Assembly=<span style=\"color: #006080\">&quot;Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&quot;<\/span> %&gt;<br \/>&lt;%@ Register Tagprefix=<span style=\"color: #006080\">&quot;Utilities&quot;<\/span> Namespace=<span style=\"color: #006080\">&quot;Microsoft.SharePoint.Utilities&quot;<\/span> Assembly=<span style=\"color: #006080\">&quot;Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&quot;<\/span> %&gt;<br \/>&lt;%@ Register Tagprefix=<span style=\"color: #006080\">&quot;WebPartPages&quot;<\/span> Namespace=<span style=\"color: #006080\">&quot;Microsoft.SharePoint.WebPartPages&quot;<\/span> Assembly=<span style=\"color: #006080\">&quot;Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c&quot;<\/span> %&gt;<br \/><br \/>&lt;%-- The markup and script <span style=\"color: #0000ff\">in<\/span> the following Content element will be placed <span style=\"color: #0000ff\">in<\/span> the &lt;head&gt; of the page --%&gt;<br \/>&lt;asp:Content ContentPlaceHolderId=<span style=\"color: #006080\">&quot;PlaceHolderAdditionalPageHead&quot;<\/span> runat=<span style=\"color: #006080\">&quot;server&quot;<\/span>&gt;<br \/>    &lt;script type=<span style=\"color: #006080\">&quot;text\/javascript&quot;<\/span> src=<span style=\"color: #006080\">&quot;..\/Scripts\/jquery-1.6.2.min.js&quot;<\/span>&gt;&lt;\/script&gt;<br \/><br \/>    &lt;!-- Add your CSS styles to the following file --&gt;<br \/>    &lt;link rel=<span style=\"color: #006080\">&quot;Stylesheet&quot;<\/span> type=<span style=\"color: #006080\">&quot;text\/css&quot;<\/span> href=<span style=\"color: #006080\">&quot;..\/Content\/App.css&quot;<\/span> \/&gt;<br \/><br \/>    &lt;!-- Add your JavaScript to the following file --&gt;<br \/>    &lt;script type=<span style=\"color: #006080\">&quot;text\/javascript&quot;<\/span> src=<span style=\"color: #006080\">&quot;..\/Scripts\/App.js&quot;<\/span>&gt;&lt;\/script&gt;<br \/><br \/>    &lt;!-- The following script runs when the DOM <span style=\"color: #0000ff\">is<\/span> ready. The inline code uses a SharePoint feature to ensure --&gt;<br \/>    &lt;!-- The SharePoint script file sp.js <span style=\"color: #0000ff\">is<\/span> loaded and will then execute the sharePointReady() <span style=\"color: #0000ff\">function<\/span> <span style=\"color: #0000ff\">in<\/span> App.js --&gt;<br \/>    &lt;script type=<span style=\"color: #006080\">&quot;text\/javascript&quot;<\/span>&gt;<br \/>        $(document).ready(<span style=\"color: #0000ff\">function<\/span> () {<br \/>            SP.SOD.executeFunc(<span style=\"color: #006080\">'sp.js'<\/span>, <span style=\"color: #006080\">'SP.ClientContext'<\/span>, <span style=\"color: #0000ff\">function<\/span> () { sharePointReady(); });<br \/>        });<br \/>    &lt;\/script&gt;<br \/>&lt;\/asp:Content&gt;<br \/><br \/>&lt;%-- The markup and script <span style=\"color: #0000ff\">in<\/span> the following Content element will be placed <span style=\"color: #0000ff\">in<\/span> the &lt;body&gt; of the page --%&gt;<br \/>&lt;asp:Content ContentPlaceHolderId=<span style=\"color: #006080\">&quot;PlaceHolderMain&quot;<\/span> runat=<span style=\"color: #006080\">&quot;server&quot;<\/span>&gt;<br \/><br \/>    &lt;div&gt;<br \/>        List Name:&lt;br \/&gt;&lt;input type=<span style=\"color: #006080\">&quot;text&quot;<\/span> id=<span style=\"color: #006080\">&quot;listName&quot;<\/span>\/&gt;&lt;p \/&gt;<br \/>        Geolocation Field Name:&lt;br \/&gt;&lt;input type=<span style=\"color: #006080\">&quot;text&quot;<\/span> id=<span style=\"color: #006080\">&quot;fieldName&quot;<\/span>\/&gt;&lt;p \/&gt;<br \/>        View Name:&lt;br \/&gt;&lt;input type=<span style=\"color: #006080\">&quot;text&quot;<\/span> id=<span style=\"color: #006080\">&quot;viewName&quot;<\/span>\/&gt;&lt;p \/&gt;<br \/>        &lt;button id=<span style=\"color: #006080\">&quot;createFieldButton&quot;<\/span> type=<span style=\"color: #006080\">&quot;button&quot;<\/span> value=<span style=\"color: #006080\">&quot;&quot;<\/span>&gt;Create Geolocation Field&lt;\/button&gt;&lt;p \/&gt;<br \/>        &lt;button id=<span style=\"color: #006080\">&quot;createViewButton&quot;<\/span> type=<span style=\"color: #006080\">&quot;button&quot;<\/span> value=<span style=\"color: #006080\">&quot;&quot;<\/span>&gt;Create Map View&lt;\/button&gt;<br \/>    &lt;\/div&gt;<br \/><br \/>&lt;\/asp:Content&gt;<br \/><\/pre>\n<p><\/div>\n<p>Then, I wrote the JavaScript to do the work and added it to the app.js file.<\/p>\n<div style=\"border-bottom: silver 1px solid; text-align: left; border-left: silver 1px solid; padding-bottom: 4px; line-height: 12pt; background-color: #f4f4f4; margin: 20px 0px 10px; padding-left: 4px; width: 97.5%; padding-right: 4px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; max-height: 200px; font-size: 8pt; overflow: auto; border-top: silver 1px solid; cursor: text; border-right: silver 1px solid; padding-top: 4px\" id=\"codeSnippetWrapper\">\n<pre style=\"border-bottom-style: none; text-align: left; padding-bottom: 0px; line-height: 12pt; background-color: #f4f4f4; margin: 0em; border-left-style: none; padding-left: 0px; width: 100%; padding-right: 0px; font-family: &#39;Courier New&#39;, courier, monospace; direction: ltr; border-top-style: none; color: black; border-right-style: none; font-size: 8pt; overflow: visible; padding-top: 0px\" id=\"codeSnippet\"><span style=\"color: #0000ff\">var<\/span> context;<br \/><span style=\"color: #0000ff\">var<\/span> web;<br \/><span style=\"color: #0000ff\">var<\/span> user;<br \/><span style=\"color: #0000ff\">var<\/span> field;<br \/><span style=\"color: #0000ff\">var<\/span> view;<br \/><br \/><span style=\"color: #0000ff\">function<\/span> sharePointReady() {<br \/>    context = <span style=\"color: #0000ff\">new<\/span> SP.ClientContext.get_current();<br \/>    web = context.get_web();<br \/><br \/>    $(<span style=\"color: #006080\">&quot;#createFieldButton&quot;<\/span>).click(<span style=\"color: #0000ff\">function<\/span> () {<br \/>        <span style=\"color: #0000ff\">var<\/span> fieldName = $(<span style=\"color: #006080\">&quot;#fieldName&quot;<\/span>).val();<br \/>        createGeoLocationField(fieldName);<br \/>    });<br \/><br \/>    $(<span style=\"color: #006080\">&quot;#createViewButton&quot;<\/span>).click(<span style=\"color: #0000ff\">function<\/span> () {<br \/>        <span style=\"color: #0000ff\">var<\/span> fieldName = $(<span style=\"color: #006080\">&quot;#fieldName&quot;<\/span>).val();<br \/>        <span style=\"color: #0000ff\">var<\/span> viewName = $(<span style=\"color: #006080\">&quot;#viewName&quot;<\/span>).val();<br \/>        createGeoLocationView(viewName, fieldName);<br \/>    });<br \/>}<br \/><br \/><span style=\"color: #0000ff\">function<\/span> createGeoLocationView(viewName, fieldName) {<br \/>    spHostUrl = decodeURIComponent(getQueryStringParameter(<span style=\"color: #006080\">&quot;SPHostUrl&quot;<\/span>));<br \/>    rootClientContext = <span style=\"color: #0000ff\">new<\/span> SP.ClientContext(spHostUrl);<br \/>    list = rootClientContext.get_web().get_lists().getByTitle($(<span style=\"color: #006080\">&quot;#listName&quot;<\/span>).val());<br \/><br \/>    <span style=\"color: #0000ff\">var<\/span> viewCreationInformation = <span style=\"color: #0000ff\">new<\/span> SP.ViewCreationInformation();<br \/>    viewCreationInformation.set_title(viewName);<br \/><br \/>    <span style=\"color: #0000ff\">var<\/span> viewType = <span style=\"color: #0000ff\">new<\/span> SP.ViewType();    <br \/>    viewCreationInformation.set_viewTypeKind(viewType.html)<br \/><br \/>    view = list.get_views().add(viewCreationInformation);<br \/><br \/>    view.set_jsLink(<span style=\"color: #006080\">&quot;mapviewtemplate.js&quot;<\/span>);<br \/>    view.get_viewFields().add(<span style=\"color: #006080\">&quot;Location&quot;<\/span>);<br \/><br \/>    view.update();<br \/><br \/>    rootClientContext.load(view);<br \/>    rootClientContext.executeQueryAsync(<br \/>        Function.createDelegate(<span style=\"color: #0000ff\">this<\/span>, <span style=\"color: #0000ff\">this<\/span>.onCreateGeoLocationViewSucceeded),<br \/>        Function.createDelegate(<span style=\"color: #0000ff\">this<\/span>, <span style=\"color: #0000ff\">this<\/span>.onCreateGeoLocationViewFailed)<br \/>    );<br \/>}<br \/><br \/><span style=\"color: #0000ff\">function<\/span> onCreateGeoLocationViewSucceeded() {<br \/>    <span style=\"color: #0000ff\">var<\/span> result = <span style=\"color: #006080\">'The view '<\/span> + view.get_title() + <span style=\"color: #006080\">' was successfully added.'<\/span>;<br \/>    alert(result);<br \/>}<br \/><br \/><span style=\"color: #0000ff\">function<\/span> onCreateGeoLocationViewFailed(sender, args) {<br \/>    alert(<span style=\"color: #006080\">'Request failed. '<\/span> + args.get_message() +<br \/>        <span style=\"color: #006080\">'\\n'<\/span> + args.get_stackTrace());<br \/>}<br \/><br \/><span style=\"color: #0000ff\">function<\/span> createGeoLocationField(fieldName) {<br \/>    spHostUrl = decodeURIComponent(getQueryStringParameter(<span style=\"color: #006080\">&quot;SPHostUrl&quot;<\/span>));<br \/>    rootClientContext = <span style=\"color: #0000ff\">new<\/span> SP.ClientContext(spHostUrl);<br \/>    list = rootClientContext.get_web().get_lists().getByTitle($(<span style=\"color: #006080\">&quot;#listName&quot;<\/span>).val());<br \/>    field = list.get_fields().addFieldAsXml(<br \/>        <span style=\"color: #006080\">'&lt;Field DisplayName=\\''<\/span> + fieldName + <span style=\"color: #006080\">'\\' Type=\\'Geolocation\\' \/&gt;'<\/span>,<br \/>        <span style=\"color: #0000ff\">true<\/span>,<br \/>        SP.AddFieldOptions.defaultValue<br \/>    );<br \/><br \/>    rootClientContext.load(field);<br \/>    rootClientContext.executeQueryAsync(<br \/>        Function.createDelegate(<span style=\"color: #0000ff\">this<\/span>, <span style=\"color: #0000ff\">this<\/span>.onCreateGeoLocationFieldSucceeded),<br \/>        Function.createDelegate(<span style=\"color: #0000ff\">this<\/span>, <span style=\"color: #0000ff\">this<\/span>.onCreateGeoLocationFieldFailed)<br \/>    );<br \/>}<br \/><br \/><span style=\"color: #0000ff\">function<\/span> onCreateGeoLocationFieldSucceeded() {<br \/>    <span style=\"color: #0000ff\">var<\/span> result = <span style=\"color: #006080\">'The GeoLocation field '<\/span> + field.get_title() + <span style=\"color: #006080\">' was successfully added.'<\/span>;<br \/>    alert(result);<br \/>}<br \/><br \/><span style=\"color: #0000ff\">function<\/span> onCreateGeoLocationFieldFailed(sender, args) {<br \/>    alert(<span style=\"color: #006080\">'Request failed. '<\/span> + args.get_message() +<br \/>        <span style=\"color: #006080\">'\\n'<\/span> + args.get_stackTrace());<br \/>}<br \/><br \/><span style=\"color: #0000ff\">function<\/span> getQueryStringParameter(paramToRetrieve) {<br \/>    <span style=\"color: #0000ff\">var<\/span> <span style=\"color: #0000ff\">params<\/span> =<br \/>        document.URL.split(<span style=\"color: #006080\">&quot;?&quot;<\/span>)[1].split(<span style=\"color: #006080\">&quot;&amp;&quot;<\/span>);<br \/>    <span style=\"color: #0000ff\">var<\/span> strParams = <span style=\"color: #006080\">&quot;&quot;<\/span>;<br \/>    <span style=\"color: #0000ff\">for<\/span> (<span style=\"color: #0000ff\">var<\/span> i = 0; i &lt; <span style=\"color: #0000ff\">params<\/span>.length; i = i + 1) {<br \/>        <span style=\"color: #0000ff\">var<\/span> singleParam = <span style=\"color: #0000ff\">params<\/span>[i].split(<span style=\"color: #006080\">&quot;=&quot;<\/span>);<br \/>        <span style=\"color: #0000ff\">if<\/span> (singleParam[0] == paramToRetrieve)<br \/>            <span style=\"color: #0000ff\">return<\/span> singleParam[1];<br \/>    }<br \/>}<br \/><\/pre>\n<p><\/div>\n<p>It\u2019s pretty simple, as you can see.&#160; Hopefully this helps you out and gives some ideas that you can use to create your own SP APPs.<\/p>\n<p>It\u2019s already snowing at the ski resorts in Colorado!&#160; Opening day shouldn\u2019t be more than 30 days away at some of them!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>One of the new features in SharePoint 2013 is the Geolocation field.&#160; You can learn more about it here in the MSDN.&#160; As I was developing<span class=\"excerpt-hellip\"> [\u2026]<\/span><\/p>\n","protected":false},"author":1,"featured_media":557,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[99],"tags":[10,22,75,5,76,7,68,74,72,73],"class_list":["post-553","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sharepoint-2013","tag-custom-development","tag-development-utilities","tag-geolocation","tag-helpful-code","tag-mapping","tag-sharepoint","tag-sharepoint-2013","tag-sharepoint-apps","tag-sharepoint-hosted","tag-sp-app"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 4.9.9 - aioseo.com -->\n\t<meta name=\"description\" content=\"One of the new features in SharePoint 2013 is the Geolocation field. You can learn more about it here in the MSDN. As I was developing some new SharePoint 2013 demos for my upcoming sessions at the SharePoint Connections Fall 2012 Conference I started looking into this new functionality. My goal was to see how\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Todd Baginski\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/toddbaginski.com\/blog\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 4.9.9\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"Todd Baginski&#039;s Blog - An AI, SharePoint, Office 365, Azure, Power Apps, Power Platform, and Mobile Blog\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"A Simple SharePoint 2013 App To Create Geolocation Fields and Map Views - Todd Baginski&#039;s Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"One of the new features in SharePoint 2013 is the Geolocation field. You can learn more about it here in the MSDN. As I was developing some new SharePoint 2013 demos for my upcoming sessions at the SharePoint Connections Fall 2012 Conference I started looking into this new functionality. My goal was to see how\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/toddbaginski.com\/blog\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2019\/09\/todd-400x400.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2019\/09\/todd-400x400.jpg\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2012-09-19T05:58:58+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2013-06-28T21:44:25+00:00\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@toddbaginski\" \/>\n\t\t<meta name=\"twitter:title\" content=\"A Simple SharePoint 2013 App To Create Geolocation Fields and Map Views - Todd Baginski&#039;s Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"One of the new features in SharePoint 2013 is the Geolocation field. You can learn more about it here in the MSDN. As I was developing some new SharePoint 2013 demos for my upcoming sessions at the SharePoint Connections Fall 2012 Conference I started looking into this new functionality. My goal was to see how\" \/>\n\t\t<meta name=\"twitter:creator\" content=\"@toddbaginski\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2019\/09\/todd-400x400.jpg\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"BlogPosting\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\\\/#blogposting\",\"name\":\"A Simple SharePoint 2013 App To Create Geolocation Fields and Map Views - Todd Baginski's Blog\",\"headline\":\"A Simple SharePoint 2013 App To Create Geolocation Fields and Map Views\",\"author\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/author\\\/todd\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/#person\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/09\\\/aspens-changing-fall-2012-e1348034856181.jpg\",\"width\":640,\"height\":249},\"datePublished\":\"2012-09-18T23:58:58-04:00\",\"dateModified\":\"2013-06-28T15:44:25-04:00\",\"inLanguage\":\"en\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\\\/#webpage\"},\"articleSection\":\"SharePoint 2013, Custom Development, Development Utilities, Geolocation, Helpful Code, Mapping, SharePoint, SharePoint 2013, SharePoint Apps, SharePoint Hosted, SP APP\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/toddbaginski.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/category\\\/sharepoint\\\/#listItem\",\"name\":\"SharePoint\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/category\\\/sharepoint\\\/#listItem\",\"position\":2,\"name\":\"SharePoint\",\"item\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/category\\\/sharepoint\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/category\\\/sharepoint\\\/sharepoint-2013\\\/#listItem\",\"name\":\"SharePoint 2013\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/category\\\/sharepoint\\\/sharepoint-2013\\\/#listItem\",\"position\":3,\"name\":\"SharePoint 2013\",\"item\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/category\\\/sharepoint\\\/sharepoint-2013\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\\\/#listItem\",\"name\":\"A Simple SharePoint 2013 App To Create Geolocation Fields and Map Views\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/category\\\/sharepoint\\\/#listItem\",\"name\":\"SharePoint\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\\\/#listItem\",\"position\":4,\"name\":\"A Simple SharePoint 2013 App To Create Geolocation Fields and Map Views\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/category\\\/sharepoint\\\/sharepoint-2013\\\/#listItem\",\"name\":\"SharePoint 2013\"}}]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/#person\",\"name\":\"Todd Baginski\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/author\\\/todd\\\/#author\",\"url\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/author\\\/todd\\\/\",\"name\":\"Todd Baginski\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\\\/#webpage\",\"url\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\\\/\",\"name\":\"A Simple SharePoint 2013 App To Create Geolocation Fields and Map Views - Todd Baginski's Blog\",\"description\":\"One of the new features in SharePoint 2013 is the Geolocation field. You can learn more about it here in the MSDN. As I was developing some new SharePoint 2013 demos for my upcoming sessions at the SharePoint Connections Fall 2012 Conference I started looking into this new functionality. My goal was to see how\",\"inLanguage\":\"en\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/author\\\/todd\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/author\\\/todd\\\/#author\"},\"image\":{\"@type\":\"ImageObject\",\"url\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/wp-content\\\/uploads\\\/2012\\\/09\\\/aspens-changing-fall-2012-e1348034856181.jpg\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\\\/#mainImage\",\"width\":640,\"height\":249},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\\\/#mainImage\"},\"datePublished\":\"2012-09-18T23:58:58-04:00\",\"dateModified\":\"2013-06-28T15:44:25-04:00\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/\",\"name\":\"Todd Baginski's Blog\",\"description\":\"An AI, SharePoint, Office 365, Azure, Power Apps, Power Platform, and Mobile Blog\",\"inLanguage\":\"en\",\"publisher\":{\"@id\":\"https:\\\/\\\/toddbaginski.com\\\/blog\\\/#person\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"A Simple SharePoint 2013 App To Create Geolocation Fields and Map Views - Todd Baginski's Blog","description":"One of the new features in SharePoint 2013 is the Geolocation field. You can learn more about it here in the MSDN. As I was developing some new SharePoint 2013 demos for my upcoming sessions at the SharePoint Connections Fall 2012 Conference I started looking into this new functionality. My goal was to see how","canonical_url":"https:\/\/toddbaginski.com\/blog\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"BlogPosting","@id":"https:\/\/toddbaginski.com\/blog\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\/#blogposting","name":"A Simple SharePoint 2013 App To Create Geolocation Fields and Map Views - Todd Baginski's Blog","headline":"A Simple SharePoint 2013 App To Create Geolocation Fields and Map Views","author":{"@id":"https:\/\/toddbaginski.com\/blog\/author\/todd\/#author"},"publisher":{"@id":"https:\/\/toddbaginski.com\/blog\/#person"},"image":{"@type":"ImageObject","url":"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2012\/09\/aspens-changing-fall-2012-e1348034856181.jpg","width":640,"height":249},"datePublished":"2012-09-18T23:58:58-04:00","dateModified":"2013-06-28T15:44:25-04:00","inLanguage":"en","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/toddbaginski.com\/blog\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\/#webpage"},"isPartOf":{"@id":"https:\/\/toddbaginski.com\/blog\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\/#webpage"},"articleSection":"SharePoint 2013, Custom Development, Development Utilities, Geolocation, Helpful Code, Mapping, SharePoint, SharePoint 2013, SharePoint Apps, SharePoint Hosted, SP APP"},{"@type":"BreadcrumbList","@id":"https:\/\/toddbaginski.com\/blog\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog#listItem","position":1,"name":"Home","item":"https:\/\/toddbaginski.com\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/#listItem","name":"SharePoint"}},{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/#listItem","position":2,"name":"SharePoint","item":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/","nextItem":{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/sharepoint-2013\/#listItem","name":"SharePoint 2013"},"previousItem":{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/sharepoint-2013\/#listItem","position":3,"name":"SharePoint 2013","item":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/sharepoint-2013\/","nextItem":{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\/#listItem","name":"A Simple SharePoint 2013 App To Create Geolocation Fields and Map Views"},"previousItem":{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/#listItem","name":"SharePoint"}},{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\/#listItem","position":4,"name":"A Simple SharePoint 2013 App To Create Geolocation Fields and Map Views","previousItem":{"@type":"ListItem","@id":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/sharepoint-2013\/#listItem","name":"SharePoint 2013"}}]},{"@type":"Person","@id":"https:\/\/toddbaginski.com\/blog\/#person","name":"Todd Baginski"},{"@type":"Person","@id":"https:\/\/toddbaginski.com\/blog\/author\/todd\/#author","url":"https:\/\/toddbaginski.com\/blog\/author\/todd\/","name":"Todd Baginski"},{"@type":"WebPage","@id":"https:\/\/toddbaginski.com\/blog\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\/#webpage","url":"https:\/\/toddbaginski.com\/blog\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\/","name":"A Simple SharePoint 2013 App To Create Geolocation Fields and Map Views - Todd Baginski's Blog","description":"One of the new features in SharePoint 2013 is the Geolocation field. You can learn more about it here in the MSDN. As I was developing some new SharePoint 2013 demos for my upcoming sessions at the SharePoint Connections Fall 2012 Conference I started looking into this new functionality. My goal was to see how","inLanguage":"en","isPartOf":{"@id":"https:\/\/toddbaginski.com\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/toddbaginski.com\/blog\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\/#breadcrumblist"},"author":{"@id":"https:\/\/toddbaginski.com\/blog\/author\/todd\/#author"},"creator":{"@id":"https:\/\/toddbaginski.com\/blog\/author\/todd\/#author"},"image":{"@type":"ImageObject","url":"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2012\/09\/aspens-changing-fall-2012-e1348034856181.jpg","@id":"https:\/\/toddbaginski.com\/blog\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\/#mainImage","width":640,"height":249},"primaryImageOfPage":{"@id":"https:\/\/toddbaginski.com\/blog\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\/#mainImage"},"datePublished":"2012-09-18T23:58:58-04:00","dateModified":"2013-06-28T15:44:25-04:00"},{"@type":"WebSite","@id":"https:\/\/toddbaginski.com\/blog\/#website","url":"https:\/\/toddbaginski.com\/blog\/","name":"Todd Baginski's Blog","description":"An AI, SharePoint, Office 365, Azure, Power Apps, Power Platform, and Mobile Blog","inLanguage":"en","publisher":{"@id":"https:\/\/toddbaginski.com\/blog\/#person"}}]},"og:locale":"en_US","og:site_name":"Todd Baginski's Blog - An AI, SharePoint, Office 365, Azure, Power Apps, Power Platform, and Mobile Blog","og:type":"article","og:title":"A Simple SharePoint 2013 App To Create Geolocation Fields and Map Views - Todd Baginski's Blog","og:description":"One of the new features in SharePoint 2013 is the Geolocation field. You can learn more about it here in the MSDN. As I was developing some new SharePoint 2013 demos for my upcoming sessions at the SharePoint Connections Fall 2012 Conference I started looking into this new functionality. My goal was to see how","og:url":"https:\/\/toddbaginski.com\/blog\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\/","og:image":"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2019\/09\/todd-400x400.jpg","og:image:secure_url":"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2019\/09\/todd-400x400.jpg","article:published_time":"2012-09-19T05:58:58+00:00","article:modified_time":"2013-06-28T21:44:25+00:00","twitter:card":"summary","twitter:site":"@toddbaginski","twitter:title":"A Simple SharePoint 2013 App To Create Geolocation Fields and Map Views - Todd Baginski's Blog","twitter:description":"One of the new features in SharePoint 2013 is the Geolocation field. You can learn more about it here in the MSDN. As I was developing some new SharePoint 2013 demos for my upcoming sessions at the SharePoint Connections Fall 2012 Conference I started looking into this new functionality. My goal was to see how","twitter:creator":"@toddbaginski","twitter:image":"https:\/\/toddbaginski.com\/blog\/wp-content\/uploads\/2019\/09\/todd-400x400.jpg"},"aioseo_meta_data":{"post_id":"553","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"BlogPosting","isEnabled":true},"graphs":[]},"schema_type":"default","schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2022-02-14 16:00:18","updated":"2025-06-03 20:57:41"},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/toddbaginski.com\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/\" title=\"SharePoint\">SharePoint<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/sharepoint-2013\/\" title=\"SharePoint 2013\">SharePoint 2013<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tA Simple SharePoint 2013 App To Create Geolocation Fields and Map Views\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/toddbaginski.com\/blog"},{"label":"SharePoint","link":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/"},{"label":"SharePoint 2013","link":"https:\/\/toddbaginski.com\/blog\/category\/sharepoint\/sharepoint-2013\/"},{"label":"A Simple SharePoint 2013 App To Create Geolocation Fields and Map Views","link":"https:\/\/toddbaginski.com\/blog\/a-simple-sharepoint-2013-app-to-create-geolocation-fields-and-map-views\/"}],"_links":{"self":[{"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/posts\/553","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/comments?post=553"}],"version-history":[{"count":6,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/posts\/553\/revisions"}],"predecessor-version":[{"id":735,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/posts\/553\/revisions\/735"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/media\/557"}],"wp:attachment":[{"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/media?parent=553"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/categories?post=553"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/toddbaginski.com\/blog\/wp-json\/wp\/v2\/tags?post=553"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}