OpenStreetMap is a powerfull worldwide map created by volunteers. You can read more here: http://wiki.openstreetmap.org/wiki/Main_Page
To implement OpenStreetMap on Dynamics CRM 2011 we use the following services:
- GeoNames (to lookup post codes) - http://www.geonames.org/
- OpenStreetMap layers
Step 1 - Create a HTML webresource
Navigate to Settings > Customizations > Customize the system > click on web resources and click new.
Click Text Editor > click tab source > < paste the below code:
When you save it, you can ignore the error messages $. is undefined. Save and Publish.
Step 2 - Customize your entityusing the account entity start by creating a new section called map:
1. Customize the main Account form, click the insert tab and select One column Section.
2. Confirm is set to one column and click OK
3. High light the section on the form and go to insert > Webresource and add the osmap_loader
Click ok, Save and Publish.
Open an account make sure the postal code is not empty:
You can navigate around, and zoom in and out.
Hope you enjoyed this tutorial, is pretty straight forward and completely free of charges.
The solution above uses the Postal code lookup API from GeoNames however GeoNames have more API's that can search for addresse's cities etc, lookup GeoNames services here:
Note that I'm loading the jquery library and openlayers library on the form, if you have a heavily customized form, this can add some extra load time, my advise would be to collapse the tab and allow users to expand the map as they needed, this way the map will only be loaded when you expand the tab.