Posted 10/2/2006 10:16:27 PM | | | | Overview The goal of this sample is to display a map of the area where an account or contact is located. Also, in the case of an order, we want to display directions to get to the delivery destination. (Please note that the starting address for the directions has be set to c360 Solutions' main office in Atlanta, but feel free to change it to your own address). This sample demonstrates the following: - Fetch data about the current account or order
- Redirect the user to Google map and pass the information expected by Google in order to be able to display a map
Installation Step 1 – Edit ISV.config This sample must be added as a new link on the left navigation bar of the Microsoft CRM account edit screen and the order edit screen as well. Therefore we need to edit the “account” and the “salesorder” entity sections in Microsoft CRM’s ISV.config file like so: <ENTITY name="account"> <NAVBAR ValidForUpdate="1" ValidForCreate="0"> <NAVBARITEM id=googleMap title="Google map" Url="http://localhost:4589/c360Sdk/Samples/GoogleMap/GoogleMap.aspx" Icon="http://localhost:4589/c360Sdk/Samples/GoogleMap/GoogleMap.jpg" /> </NAVBAR> </ENTITY> <ENTITY name="salesorder"> <NAVBAR ValidForUpdate="1" ValidForCreate="0"> <NAVBARITEM id=googleMap title="Google map" Url="http://localhost:4589/c360Sdk/Samples/GoogleMap/GoogleMap.aspx" Icon="http://localhost:4589/c360Sdk/Samples/GoogleMap/GoogleMap.jpg" /> </NAVBAR> </ENTITY> Note: you will need to adjust the url in the above sample to match your environment. Step 2 – Copy files In your Visual Studio 2005 project, make sure you have a folder called “Samples” and create a sub-folder called “GoogleMap”. In this new folder, copy the image, the ASPX page and it’s corresponding code behind file: - GoogleMap.jpg
- GoogleMap.aspx
- GoogleMap.aspx.cs
Screenshots 


|
| Posted 10/3/2006 10:15:05 AM | | | Funny, I came across something simular for Virtual Earth yesterday... So I created a sample like Jeremie's GoogleMap sample but one that uses the Virtual Earth's MapControl
http://dev.live.com/virtualearth/sdk/
|
| Posted 10/3/2006 10:19:37 AM | | | About the Virtual Earth Sample:
For creating the mapcontrol I would like to call the getMap() method in the onload event of the body of the aspx page. (I now have to use a button to accomplish this...)
It seems as if the onload property is removed by the AreaPage when the c360BaseForm is created...
Why this is happening...? |
| Posted 10/8/2006 10:30:15 PM | | | You can add the following line of code to execute the get map when the page loads:Instance.RegisterClientScriptBlock("window.onload", "function window.onload() { getMap(); }");By the way, with your permission, I would like to include this sample you created in the next version of the SDK. Let me know if you agree.
|
| Posted 10/9/2006 5:29:37 AM | | | Jeremie Desautels (10/8/2006)
Instance.RegisterClientScriptBlock("window.onload", "function window.onload() { getMap(); }"); Tried several possible workarounds, but this one might do the trick. Will give it a try. Thanx.
Jeremie Desautels (10/8/2006) By the way, with your permission, I would like to include this sample you created in the next version of the SDK. Let me know if you agree. Put me in the credit and you have my GO! 
side note: I was looking at Virtual Earth because Google Maps could not calculate a correct (detailed) route between locations in the Netherlands. But I it seems that on october 4 2006 an updated version of Google Maps for the Netherlands was released that fixes this: http://www.google.nl/maps |
| Posted 10/9/2006 2:35:18 PM | | | Thanks. your sample will be included in the next release of the SDK along with the others I posted in the last couple days. Of course, you get full credit 
|
| |
|