Integrate google map in SF 4.4
hi,
how can I integrate Google map with multiple locations in my sitefinity 4.4 project.
if anyone knows please help me..
its urgent ....
thanks in advance..
Hi Rakesh,
private void BuildMarkersArray(IQueryable<ProjectItem> projects) var sb = new StringBuilder(); sb.Append("var markersArray = [];"); sb.Append("markersArray = ["); foreach (var item in projects) if (!string.IsNullOrEmpty(item.ProjectLocation)) // Construct the infowindow content string content = BuildInfoWindowContent(item); sb.Append("['" + item.ProjectLocation + "', '" + content + "'],"); sb.Remove(sb.Length - 1, 1); sb.Append("]"); // Get a ClientScriptManager reference from the Page class. ClientScriptManager cs = Page.ClientScript; Type cstype = this.GetType(); string scriptImages = "ScriptImages"; var sbImages = new StringBuilder(); sbImages.Append("var imageIcon = '" + Page.ResolveUrl("~/Assets/Images/gmarker.png") + "';"); sbImages.Append("var imageShadow = '" + Page.ResolveUrl("~/Assets/Images/gmarker-shw.png") + "';"); if (!cs.IsStartupScriptRegistered(cstype, scriptImages)) cs.RegisterStartupScript(cstype, scriptImages, sbImages.ToString(), true); // Define the name and type of the client scripts on the page. string scriptName = "LocationList"; // Check to see if the startup script is already registered. if (!cs.IsStartupScriptRegistered(cstype, scriptName)) cs.RegisterStartupScript(cstype, scriptName, sb.ToString(), true); Hi Daniel,
Thanks for your replay.Let me try it...