DataBind GoogleMap Control values inside a Data control.

Coordinator
Mar 24, 2009 at 8:35 AM
Hi there,

I was asked how to bind some values of GoogleMap control when it is inside a data control like DataList for example.
My plan is in next version that to available in the markup, but by then you can do it programmatically.

Here I'm placing a simple example how you can do that with DataList for example.
In order to set the values programmatically you have to subscribe for ItemDataBound event of the DataList and there set the desired values of the GoogleMap control.

This example page will become a part of the SampleWebSite in next release and it is available even now under SourceCode:
http://googlemap.codeplex.com/SourceControl/changeset/view/30279#453074
http://googlemap.codeplex.com/SourceControl/changeset/view/30279#453073
DataSourceHelper code is available here:
http://googlemap.codeplex.com/SourceControl/changeset/view/30279#387827

I'm using a simple ObjectDataSource helper class just for demo purpose, of course you can use any desired data source.


Happy coding ...
Regards