Error while importing google map widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Error while importing google map widget
Hi All,
I ma getting a error when I am importing google map widget in Thingworx 9.1. Can you please have a look and let me know why is the issue coming.
Below is the error message -
ERROR [widget] "CustomCSS" widget type is missing required member widgetProperties()
I am also attaching the widget zip file for reference.
Regards
Swaraj Ostwal
SO
Solved! Go to Solution.
- Labels:
-
Extensions
-
Mashup-Widget
- Tags:
- google map widget
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @SO_9699370
It appears that it is necessary to activate the billing for maps to work well but they won’t charge you for anything unless you have over 20,000 people viewing your map each month. Here are some links from internet mentioning the same:
Google Maps shows “For development purposes only”
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I was able to import the google widget extension you provided on my Thingworx 9.1 instance. Please check if "ExtensionPackageImportPolicy" tag is present in your platform-settings.json file or not.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @SO_9699370
If you are still facing the issue than please share the log files from thingworx storage folder. And as mentioned by sachin please also check for ExtensionPackageImportPolicy section under platformsettings.json.
Thanks
Om Dukiya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @odukiya and @SachinSharma
I have checked the platfrom-setting.json it has ExtensionPackageImportPolicy section in which all field are true. I am attaching log as per your request to help me better.
SO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @SO_9699370
I cannot see anything related to map widget here in the logs. It seems they are current log where might be you haven't tried the import. Can you please try importing it again and than share the logs of that particular time?
If there are any error message over the composer itself you can share the screenshot of that too.
Thanks
Om Dukiya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
As per the logs it seems that the extension is already imported. Following is the entry in the logs 'Extension GoogleWidgets_ExtensionPackage:3.1.1 skipped because it is already installed'
Can you check from composer if there is a GoogleWidget extension?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @SachinSharma,
Yup this time the map is present in the list of widget, but when I place the widget in the mashup, it says google maps are not available.
SO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @SO_9699370
It seems you have not configured Google API key which is required here.
Please refer the following article for the same
https://www.ptc.com/en/support/article/CS188314
Feel free to revert in case you still face any further challenges.
Thanks
Om Dukiya
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
You can refer help center as well for steps to configure the Google Maps API key. If you still see the same behavior then remove the google widget extension(make sure all the related entities are deleted) and then reimport the extension.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @SO_9699370.
We've also seen issues requiring a user to clear the browser cache in order for the widget to show up in the mashup builder. Once you've confirmed your configuration, if you still have issues, please give this is a try.
Regards.
--Sharon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @SachinSharma, @odukiya and @slangley,
Firstly thanks for the detailed information about google widget and API key. Here's what happened.
1. I created a API string for google map as per the guide.
2. I tried checking the metadata,xml of the widget to replace the connection string but I couldn't find API key related string. As shown below the "//replace this - https://maps.google.com/maps/api/js?sensor=false" section doesn't exist the XML data.
// replace this
https://maps.google.com/maps/api/js?sensor=false
// with this
https://maps.google.com/maps/api/js?key=API_KEY&sensor=
false
3. As per other documentation in PTC help center i tried to set google map connection string with the service. It worked but now I see the map say give pop-message and say "This page can't load google maps correctly" and if we hit OK the maps shows up with a message "for development purpose only".
4. I tried putting connecting string in the PlatfromSubsystem>>configuration under the Required string to connect with google for Google Widgets but no change.
5. I even cleared my cache and tried. Restarted Tomcat to see if it makes any difference. Even used incognito mode on chrome, but no luck.
I am attaching metadata.xml for information.
Kind Regards
Swaraj Ostwal
SO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @SO_9699370.
Give me a little time to test this myself and I will try to advise further.
Regards.
--Sharon
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @slangley ,
Did you get a chance to see what's happening? I will be keen to know.
Thanks
Swaraj
SO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Swaraj,
I read the steps last performed by you and would like to add inline points for few of them:
2. I tried checking the metadata,xml of the widget to replace the connection string but I couldn't find API key related string. As shown below the "//replace this - https://maps.google.com/maps/api/js?sensor=false" section doesn't exist the XML data. This was only for older versions, widgets above 3.1.0 will not require this to be added.
3. As per other documentation in PTC help center i tried to set google map connection string with the service. It worked but now I see the map say give pop-message and say "This page can't load google maps correctly" and if we hit OK the maps shows up with a message "for development purpose only". Please ensure your connection string value is: https://maps.googleapis.com/maps/api/js?key=<Your API key>
You can also follow this tutorial to Configure Google Map: Configure Google Map Widget
Do revert back if you are still facing issue while configuring Google Map.
Regards,
Sudeepta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @suverma,
I tired the tutorial you mentioned. I can see the location on the map but the water mark and "For development purposes only" message don't go. I tried creating another key and using it, still no luck. Is it that I have to purchase a key because i am using a free key which allows 25000 calls a day to map.
Thanks
SO
SO
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @SO_9699370
It appears that it is necessary to activate the billing for maps to work well but they won’t charge you for anything unless you have over 20,000 people viewing your map each month. Here are some links from internet mentioning the same:
Google Maps shows “For development purposes only”
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @SO_9699370.
If you feel your issue has been resolved, please mark the appropriate response as the Accepted Solution for the benefit of others with the same problem.
Regards.
--Sharon
