Kentico tinyurl api2/14/2024 ![]() ScriptHelper.RegisterScriptFile(page, mainScriptPath) If (!string.IsNullOrEmpty(mainScriptPath)) Register GoogleMaps helper javascript file ScriptHelper.RegisterStartupScript(page, typeof(string), "googleMapsStartup_" + mapId, ScriptHelper.GetScript("addLoadEvent(MapLoad_" + mapId + ") ")) ScriptHelper.RegisterClientScriptBlock(page, typeof(string), "googleMapsScriptFile", ScriptHelper.GetIncludeScript(apiUrl)) Var key = string.IsNullOrEmpty(apiKey) ? ProviderObject.ApiKey : apiKey ĪpiUrl = string.IsNullOrEmpty(key) ? apiUrl : string.Format("", apiUrl, key) Var apiUrl = "///maps/api/js?sensor=false" Public static void RegisterMapScripts(Page page, string mapId, string mainScriptPath, string apiKey = "") / Registers necessary Google javascript files. MProviderObject = new BasicGoogleMapsFixed() Protected new static BasicGoogleMapsFixed ProviderObject ![]() / Api key for communicating with Google services. Private static BasicGoogleMapsFixed mProviderObject Public class BasicGoogleMapsFixed : BasicGoogleMaps Open your Kentico web project in Visual Studio (use the WebSite.sln or WebApp.sln file in the website installation directory), create a file called BasicGoogleMapsFixed.cs, and put it anywhere into the CMSApp project (a web application project) or App_Code (a website project).Sign up for API credentials for Google Maps.Therefore, we released the Kentico 9.0.32 hotfix, which added a new property for entering the Google Maps API key for Google Maps web parts.įor versions of Kentico 8.0, 8.1, and 8.2, it's necessary to follow these instructions to be able to add and use this new property: They are not affected by keyless access being unavailable for new domains.Īll new Google Maps API implementations need to support Google Map API key. However, active domains created before Jcontinue to be able to access the Google Maps JavaScript API, Static Maps API, and Street View Image API without an API key. Specifically, one of the changes is that they no longer support keyless access (any request that doesn't include an API key). Google changed their Google Maps APIs on June 22, 2016, and some of the changes affect Kentico, as well.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |