Wesley Bakker

Interesting things I encounter doing my job...

Sponsors

News

Wesley Bakker
motion10
Rivium Quadrant 151
2909 LC Capelle aan den IJssel
Region of Rotterdam
The Netherlands
Phone: +31 10 2351035

(feel free to chat with me)
 

Add to Technorati Favorites

Virtual Earth vs Google Maps in a SharePoint feature

Which one suites me better?

I do get asked about implementing a Google Maps feature into SharePoint pretty often. Most of the time however it's not that the client wants Google Maps. No, they want a maps implementation on their SharePoint site and they don't really care if that's Google Maps or Virtual Earth. I developed both features lately and did notice some points that make the implementation of Virtual Earth as the one I prefer. I'll show you why in this post.

Google Maps Key

If you like to implement Google Maps on a site you'll have to add a script tag to the head of our page that refers to the Google Maps API. Unfortunately this URL needs a Google Maps key. This key is some sort of hash that corresponds to the hostname of your site. So if you do like to add a Google Maps feature to a site, you'll need some sort of user UI to add the Google Maps key. I decided to create a layouts page to do the job. I't not that it's hard to do, but it does give me extra work. Oh... and don't forget that a user can enter a site in multiple URL zones.

Google Maps Feature Settings

For using Virtual Earth you don't need any key whatsoever so it's very easy to implement a feature for Virtual Earth. Add a script tag to the additional page head and we're done!

Development Experience

Google Maps has an API that is TOO complicated in a lot of ways. You can't simply change the icon image you would like to use for the icon size will not match up and mess up your image. The Google Maps API does not have an easy way to fetch the best zoom level. You need to create a GLatLngBounds object and extend it with all markers you like to add to your page and then get the zoom level. You can bind html to a marker's info window but markers don't have an openInfoWindowHtml method that takes zero arguments. You can't however get the marker's infoWindowHtml because it doesn't expose a property to do so. All together it get's a very annoying job to add some markers, open the last marker its info window, right after we zoomed in to the best level. It costs me a 100 lines of JavaScript code to do so.

The exact same functionality built with Virtual Earth cost me exactly half the amount of code. I used 50 lines!

You can download this zip file with both js files to see for yourself.

User Experience

Virtual Earth loads its maps way faster and by default looks an awfull lot better than Google Maps. But that's just my opinion. You have to judge that one for yourself.

Google Maps Feature Settings

Conclusion

I'ld pick Virtual Earth above Google Maps anytime. And not because it's better in a sense that I can do more with it. It's just that I can accomplish even better results in less time.

Cheers,

Wes

P.S. : If there's enough demand for it I'll write a few blogposts on how to create a connected Virtual Earth Maps control. Just let me know in the comments if you would like me to do so.

Comments

Chris said:

I would be interested in reading about a virtual maps control.

# January 13, 2009 10:32 AM

webbes said:

@Chris and everybody who missed the post script:

If there's enough demand for it, I'll write a blog series about this subject which 'll demonstrate how to create such a control. So start getting others to comment....

# January 13, 2009 11:15 AM

tsantos said:

I don't share all your opinions about Google Maps vs Virtual Earth (I wouldn't say Google Maps API is complicated), but there is one thing agree 110%: It's much simplier to develop using Virtual Earth; you write less code and create apps in less time as a consequence. Not mentioning that the look and feel of Virtual Earth tends to be better and many ways, but it's just my opinion.

# January 13, 2009 1:32 PM

Bill said:

Count me in, I'd love to see a control

# January 13, 2009 3:30 PM

John said:

Sure would love see some samples on how SharePoint integrates with Virtual Earth

# January 17, 2009 11:40 PM

Maik’s Blog » Blog Archive » Virtual Earth WebPart said:

Pingback from  Maik’s Blog  » Blog Archive   » Virtual Earth WebPart

# January 27, 2009 8:24 AM

Me too said:

I want more examples of Virtual Earth too.

# February 14, 2009 3:25 PM

J. Albert Bowden II said:

please show more VE examples. there aren't enough on the web.

# March 16, 2009 3:41 PM

webbes said:

@J. Albert Bowden: weblogs.asp.net/.../default.aspx

Cheers,

Wes

# March 17, 2009 4:19 AM

Tom Resing said:

Wes,

I've worked with both and can agree they provide different programming experience. My latest issue was with Virtual Earth. The SDK broke the example from the SharePoint Developer Team blog. I just found a workaround and will be posting details on my blog. You can see my latest google maps post here:

blogs.microlinkllc.com/.../followup-to-sharepoint-contacts-list-on-a-map-from-google.aspx

-Tom

# April 1, 2009 4:50 PM

Ard van Someren said:

I would like a example of VE controls too

# April 16, 2009 1:17 PM

webbes said:

@JArd van Someren: weblogs.asp.net/.../default.aspx

Cheers,

Wes

# April 17, 2009 8:21 AM

Pieter said:

Hi,

I'd definately be interested in such an example!

# May 14, 2009 7:18 AM

Stephane Malo said:

Yes a step-by-step would be amazing.

I would like to see certain points on a map but also like to specify my own marker.

By that i mean instead of have the plain old maker is it possible to have one either green,yellow or red to be able to show a different status per location?

# May 19, 2009 2:13 PM

Manuel Fernandez said:

I am a new to the Virtual Earth experience. I have been working with Google Earth Pro using VB6 and it is working for me, But I am definitely interested in learning more about the Virtual Earth and how I can programmatically make it do what I needed it to do for me.

Can Virtual Earth be developed in VB6?

# August 7, 2009 11:16 AM

webbes said:

@Manuel Fernandez: Sorry but I can't help you with that. You should have a look at a VB6 forum.

# August 9, 2009 4:36 PM

debug.write("Microsoft Playground") said:

After reading a post on the blog of Wesley Bakker I thought by myself maybe it is fun to create a webpart

# October 26, 2009 9:41 AM

Panoone said:

I'd like to see one too.

Better yet, a complete solution with custom list and web part so that end users can add location name and coordinates and have them plotted on a map.

Filtering by column (e.g. post code) would also be a great asset. :)

# May 9, 2010 6:55 PM

MFix said:

What Panoone Said!!!! I looks to be an interesting event if this comes together!

# August 16, 2010 1:50 PM

Atli Þórðarson said:

I just created a silverlight webpart in sharepoint 2010 which displays a map of contact locations.  It reads the address from a custom list, which my client will add new items to.  I am using the Geocoding web service from bing maps to Geocode the addresses to Latitude and Longitude.  Here comes the best part:  If my customer who is Norwegian will enter addresses in his language using Norwegian letters, Å Ø, f. etc. the web service will not deliver any results.  So it seems that for any addresses using other letters than are included in the english alphabet, bing maps is useless!

# October 13, 2010 8:53 AM
Leave a Comment

(required) 

(required) 

(optional)

(required)