B4J Question [BANanoVuetifyAD3] Load Image/GMap Error/ Gmap Api Key

magdoz

Member
Licensed User
Hi

I have three questions, hope, somebody can give some solution for them.

Q1. The GMap Component give the following error message in the debug Window (The Kitchen Sink Maps ....). I should to ignore or it's a way to not see this error message ? Don't looking good at the customer side saving this kind of errors....
===========================================
app1653524176604.js:50

TypeError: Cannot read properties of null (reading 'lat')
at a.finalLat (app1653524176604.js:1016:20098)
at pn.get (app1653524176604.js:50:26855)
at pn.evaluate (app1653524176604.js:50:27995)
at a.finalLat (app1653524176604.js:50:29899)
at a.<anonymous> (app1653524176604.js:50:26688)
at pn.get (app1653524176604.js:50:26855)
at new pn (app1653524176604.js:50:26773)
at a.e.$watch (app1653524176604.js:50:33443)
at r (app1653524176604.js:1016:8597)
at app1653524176604.js:1016:21059
Ve @ app1653524176604.js:50
app1653524176604.js:50

TypeError: Cannot read properties of null (reading 'lng')
at a.finalLng (app1653524176604.js:1016:20208)
at pn.get (app1653524176604.js:50:26855)
at pn.evaluate (app1653524176604.js:50:27995)
at a.finalLng (app1653524176604.js:50:29899)
at a.<anonymous> (app1653524176604.js:50:26688)
at pn.get (app1653524176604.js:50:26855)
at new pn (app1653524176604.js:50:26773)
at a.e.$watch (app1653524176604.js:50:33443)
at r (app1653524176604.js:1016:8597)
at app1653524176604.js:1016:21059

===========================================

Q2. How I can change at Runtime the GMap Api Key ? My platform users having different GMap Api Keys, so, depending of the user I need to change the Key....

Q3. File Input widget ? What is the best practice to use this component to upload/save and show the pictures/company logos etc. ? Maybe this question was answered already, I don't know...

I appreciate any kind of help, Thanks.
 

Mashiane

Expert
Licensed User
Longtime User
This is a known issue at at the moment no solution has been found yet. It does not affect the functionality of your app though.

Q2. How I can change at Runtime the GMap Api Key ? My platform users having different GMap Api Keys, so, depending of the user I need to change the Key....
Will investigate, will keep you posted.

Q3. File Input widget ? What is the best practice to use this component to upload/save and show the pictures/company logos etc. ? Maybe this question was answered already, I don't know...
Code is available in the kitchen sink on how to upload files to server. To show an image to a vimg just use the URL of the file.
 
Upvote 0

magdoz

Member
Licensed User
Can You Sir be more specific about what example ? Thanks.... The Kitchen Sink it's a large example, I don't studied all examples...
 
Upvote 0

magdoz

Member
Licensed User
Yes Sir, I understand.... I need some time to reproduce that.

To bee more exact, this is my scenario :
1. Using FileInput component I chouse one img/png/ico/... file.
2. Pushed Upload button and what after that ?
...
I need to save to one db Blob Field or to a Server side file folder ? I'm little bit confused
...
I used your example at Kitchen Sink. I selected one image file, uploaded and nothing, i don't saw the updated image on the current page.
 
Upvote 0

Mashiane

Expert
Licensed User
Longtime User
Q3. File Input widget ? What is the best practice to use this component to upload/save and show the pictures/company logos etc. ?
This was your question.

The VFileInput intellisense has 2 options to upload files. 1, upload a single file (FileChangeSingle) and 2, upload multiple files. (FileChangeMultiple)



Select FileChangSingle on the intellisense, click "copy" on the provided code. Both FileChangeMultiple an FileChangeSingle DO NOTHING but are included as a guide for this control.

Part of this code has this section...



where fp is the returned path of the imported file, you can then use the v-model value you used for the VImg you use to show your image or use vimg.SetImage.

I hope this clarifies it.
 
Upvote 0

magdoz

Member
Licensed User
I have to check/read again the instructions. Thanks !
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…