Internal error. Instance of GeoLocation must be initialised

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
MichaelQ
Posts: 122
Joined: Mon Aug 22, 2016 12:14 am
Location: UK

Internal error. Instance of GeoLocation must be initialised

Post by MichaelQ »

I'm working along with the mobile maps & geolocation video tutorial and tesing the app in my laptop browser using Firefox User Agent Switcher plugin and simulating Responsive Design View. I am also using the mobile url.
I get the following errors:

When running the "Read Current Location" processs:
"Internal error. Instance of GeoLocation must be initialised before GET LOCATION is used"

When running the "Take Photo" process:
"Internal error. Invalid format of the parameters for UI operation MOBILE CAMERA SNAP INTO"

Is this because these processes can only work on a real mobile phone (via Phonegap), or can they also be simulated on a laptop?
Just wanted to check that I'm not doing something wrong.

Thanks.
Michael Q
Devon, UK
aware_support
Posts: 7525
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Internal error. Instance of GeoLocation must be initiali

Post by aware_support »

MOBILE CAMERA SNAP INTO can only be used in native apps that you need to build - it won't work on a laptop. The manual and video tutorial are absolutely clear about that.

GET LOCATION will work on the laptop if you use it properly. You need to create an instance of the MGeoLocation object before you use it - please watch the corresponding tutorial and read the manual.
Aware IM Support Team
Markfre1
Posts: 221
Joined: Sun Mar 11, 2012 10:15 pm
Location: United States

Re: Internal error. Instance of GeoLocation must be initiali

Post by Markfre1 »

I notice I get a google error message, don't remember exactly but similar to yours or something about authorization from Chrome browser on my dekstop. However, on my Explorer it worked fine. Located me fine.

Also as a side note, when I was running from AWS and used the browser of the virtual server, it came up on my map as Washington DC which was really interesting because I guess that's where the server was.

The mapping is working nicely, and I am trying to figure out how to be able to click on a map pin and have it execute a process. There seems to be two options. Directions and Default. I thought maybe default was a default operation which could call a process, but have not had time to test it. But the thought is to be able to click and send a message to the user, or other functions to that user. Any info on this is, please let me know although I am in another C/S project until year end but test in free moments.

Mark F
MichaelQ
Posts: 122
Joined: Mon Aug 22, 2016 12:14 am
Location: UK

Re: Internal error. Instance of GeoLocation must be initiali

Post by MichaelQ »

I still can't get Geolocation to work.

I have watched the tutorial and read the manual.
I have an MGeoLocation BO and have created the Processes & Actions exactly as described in the video.
2016-11-07_1055.png
2016-11-07_1055.png (8.6 KiB) Viewed 6597 times
I have made a native app for Android.

However I still get the error.
2016-11-07_1101.png
2016-11-07_1101.png (3.87 KiB) Viewed 6597 times
Perhaps it is something to do with the error I get when saving the project? I did rename some "Submission" attributes a while back, but my understanding is that AIM should accommodate this.
2016-11-07_1059.png
2016-11-07_1059.png (16.49 KiB) Viewed 6597 times
Michael Q
Devon, UK
Markfre1
Posts: 221
Joined: Sun Mar 11, 2012 10:15 pm
Location: United States

Re: Internal error. Instance of GeoLocation must be initiali

Post by Markfre1 »

I'm in a conference this week but will try to get you the coding that worked for me. I ran on both explorer and mobile, but Google gave me an error (think had to do with some type of registration). Its been a couple of months and I was testing for future apps.

One issue different than yours was my map was not displaying. YOu must have the width and height defined in the HTML. But my problem in adding it was I had a : instead of a ; or some simple syntax error.

The app I wrote was to experiment on tracking anything via a phone and displaying all users on the map and it worked.

Mark F
MichaelQ
Posts: 122
Joined: Mon Aug 22, 2016 12:14 am
Location: UK

Re: Internal error. Instance of GeoLocation must be initiali

Post by MichaelQ »

Ah ha...I got it working!

After I placed "Submission" into the Process Input window of the ReadCurrentLocation process, it worked.

It seems that there is an error in the ReadCurrentLocation process part of the tutorial video. It shows the Process Input as blank, but my experience suggests that in the case of the tutorial you need to ensure that LoggedInStaffMember is placed into Process Input window when setting up the process.
Michael Q
Devon, UK
Post Reply