SharePoint 2013 and Bing Maps Integration

7 Comments

I was excited to learn that I could use Geolocation and Bing Maps in SharePoint 2013.  So I started down this path,

1. Get Bing Maps Key from here http://www.bingmapsportal.com/. (Note: You don’t need this key, but a bar will display in the middle of your map.)

Bing-Maps-with-Bar

2. Set Bing Maps key at the farm level by running the following PowerShell command:

Set-SPBingMapsKey –BingKey “<Enter a valid Bing Maps key>”

Set-SPBingMapsKey

3. Create a custom list called “Convention Centers”.

4. Add a column called “GPS Location” using the following PowerShell script: (This adds GPS Location to your site columns under Custom Columns.)

Add-PSSnapin Microsoft.SharePoint.PowerShell -EA 0

$weburl = "http://<my-web-site>"

$fieldXml = "<Field Type ='Geolocation' DisplayName='GPS Location'/>"

$web = Get-SPWeb $weburl

$fieldName = $web.Fields.AddFieldAsXml($fieldXml)

$web.Update()

5. Add GPS Location column to Convention Centers custom list.

6. Find longitude and latitude for convention locations.  There are many out there, but I used this one http://www.findlatitudeandlongitude.com/.

7. Edit each location with longitude and latitude from step 6 above or you can use “Use my location”.

Here I used longitude and latitude for Seattle Conference Center:

Seattle Conference Longitude Latitude

After clicking OK. You’ll get this.

Seattle Conference Longitude Latitude-2

8. Test from the geolocation map icon.

Seattle Conference Longitude Latitude-3

9. Create a Map View.

10. Test map view.

Seattle Conference Longitude Latitude-4

Well, everything seems to work as expected.  So far, so good.

11. Create a page with Web parts.

12. Add Convention Centers list to the Web part. Still working.

13. Check in page. Again, still working.

Seattle Conference Longitude Latitude-5

14. Publish page.  It spins and spins and never renders.

Seattle Conference Longitude Latitude-6

I checked all the logs I could think of, but I couldn’t find anything.  I know I’m missing something here.

Anyway, I have to get this resolved, so I took another route.

15. Back to my page, I added the following code using Script Editor Web Part. I added the following code to get one static location (Columbus Convention Center)to display:

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html>
 <head>
 <title>Map with initial zoom</title>
 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
 <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script>
 <script type="text/javascript">
 var map = null;

function getMap()
 {
 map = new Microsoft.Maps.Map(document.getElementById('myMap'), {credentials: '<Your Bing Map Key>', zoom: 16, center: new Microsoft.Maps.Location(39.9722857, -83.0008507)});
 }

</script>
 </head>
 <body onload="getMap();">
 <div id='myMap' style="position:relative; width:400px; height:400px;"></div>
 </body>
 </html>

16. I published the page and it continues to work.

ColumbusConventionCenterBingMaps

After I find a solution to my issue with Geolocation and Bing Maps, I’ll provide an update.

Advertisements

Enabling Hyper-V on Windows 8

1 Comment

In my previous post, I walked through the process of ensuring that your PC can run Hyper-V on Windows 8.  This post is the next step, enabling Hyper-V.

The following assumes that you have already installed Windows 8 Pro or Enterprise on your PC.

Let’s get started.

1. Press Windows + R keys to open the Run box and type appwiz.cpl
appwiz-cpl

or, from Control Panel, select Programs and Features

2. Select Turn Windows features on or off

TurnFeaturesOnorOff

3. Select Hyper-V, and click OK

SelectHyper-V

The Hyper-V binaries is now added to your Windows installation.

Hyper-VApplyingChanges

4. Once Hyper-V feature is enabled, you must reboot your PC to complete the installation.

Restart

After your PC is restarted, Hyper-V Manager is added to your start screen.

Windows8-Start-Screen-Hyper-V

I use Hyper-V Manager often, so I chose to pin it to my taskbar. Here’s my Hyper-V Manager.

Hyper-V-Manager

Next post, I’ll walkthrough setting up networking on your PC (host) and your VMs (guests) with Ethernet and wireless.

A Day in a Life for “Buddy” (Dogfood Conference 2012 #DogFoodCon)

Leave a comment

From the lighter side of Dogfood Conference.

8:35 Buddy receives a call from a customer with the system down.

8:42 Buddy works on the down system trying to get it back up.

8:48 Buddy receives a tweet “Are you working on it?” from the customer.

5 minutes later, manager, team, sales rep ask if the problem is solved. ¡Ay, Caramba!

A big thank you to Dan Shultz for the drawings of “Buddy” and Danilo Casino the mastermind behind this.

Dogfood Conference 2012 starts tomorrow, November 8th (8:00 AM – 4: 30 PM) at Microsoft Offices in Polaris (Columbus, OH).

Building SharePoint 2013 with PowerShell

1 Comment

In my previous post, I installed and configured SharePoint Configuration and Central Admin databases as well as provisioned Central Admin Site.

I continued to build my new SharePoint environment to see if there’s a difference in the script I used with SharePoint Preview.  It turned out better than I thought.  In the Preview product, I would get the following message occasionally.

could not create a CmdletConfiguration for CmdletName Start-BulkOperation, CmldetClass  , CmdletHelpFile C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\CONFIG\PowerShell\Help\Microsoft.Office.Education.Institution.dll-Help.xml.

Nothing like such happened with this new environment.  As a matter of fact, it was so clean.  I was very surprised.  Below are the screenshots of the script’s results.  I had to capture two screenshots because Search components displayed a lot of information.

I guess I could take a look at my script to limit the amount of Search information displayed here.

Just because there’s a lot of IDs displayed in the PowerShell window, Search components are very “clean” in Search Administration window.

All SharePoint databases that I’ve provisioned so far look like this (no GUIDs).

I look forward to working more with SharePoint 2013.  If I should come across something “unusual”, I’ll try to keep them posted.

SharePoint 2013 and MAXDOP

2 Comments

I started installing SharePoint  2013 on Windows Server 2012 and SQL Server 2012.  I used PowerShell to configure SharePoint Configuration and Central Administration Databases.

I used SPService account which has dbcreator and securityadmin rights to the SQL Server.  Normally, this would prompt me for SPService’s password and create SharePoint Configuration and Central Administration databases without any issues.

SharePoint 2013 now has intelligence, or whatever you want to call it, built in to detect whether SQL is set to perform at its maximum performance potential.

If you just install SQL without taking advantage of its performance settings, you’d get an error similar to this.

Open SQL Server Management Studio and right click on the SQL Server properties

Navigate to Advanced and change Max Degree of Parallelism (MAXDOP) from 0 to 1

After fixing what SharePoint and SQL are looking for, my PowerShell script ran with expected results.

Here’s how the databases (no GUIDs) look from SQL Server Management Studio.

I still have to finish configuring the Service Applications.  I’ll post my learning experience in my next post.

Managing Memory Allocation for Distributed Cache in SharePoint 2013

4 Comments

By default, the Distributed Cache service’s memory allocation is set to 10% of the total physical memory when SharePoint 2013 is installed.  For a single server installation with SQL and SharePoint running on the same server, I was not able to do much with this default configuration.

Microsoft provides a TechNet article on how to change this setting using PowerShell (http://technet.microsoft.com/en-us/library/jj219613%28v=office.15%29.aspx).

I followed step 1 under the “Change the memory allocation of the Distrbuted Cache by using Windows PowerShell” with no issues.

$instanceName =”SPDistributedCacheService Name=AppFabricCachingService”
$serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
$serviceInstance.Unprovision()

When I used what is listed in step 2,

Set-CacheHostConfig -Hostname Hostname -cacheport Cacheport -cachesize Cachesize

I received an error.  I don’t remember the exact error message, but it was similar to “No valid cluster settings were provided with Use-CacheCluser”. (I closed the PS window before capturing the screenshot).

By simply typing “Use-CacheCluster” first, followed by

Set-CacheHostConfig -Hostname Hostname -cacheport Cacheport -cachesize Cachesize

$serviceInstance.Provision()

it allowed me to continue and finish the memory allocation for Distributed Cache.

With this and NodeRunner.exe changes, I’m able to run SharePoint 2013 with SQL on the same server with 6GB RAM.

**Update**

Math is off between SharePoint and Windows server.

I stopped the Distributed Cache service from Central Admin.  That stopped the DistributedCacheService.exe from running on my server.

I updated my Distributed Cache Settings to 200 MB

AFCacheUpdate

I restarted the Distributed Cache service from Central Admin; hoping to see a change in my server’s memory consumption.

Instead, I saw this.

AFCacheUpdateMemory

Nothing here matches to 200 MB or 204800 KB.

What gives?