What Page Variable Type Is Correct?


#1

Hello!

What type of page variable should I be using for a Latitude and Longitude?

String?

It’s being called as a Number type.


#2

Hi @justincrabbe,

Doubles are good for storing decimals numbers.


#3

I switched the page variables accepting the lat/long decimal as a Double.

On Create I:

Create 2 lat long objects (i have two maps on the page)

Set visible map regions

Create the 2 markers

But each time I go to the page using the web viewer it crashes my app and I can’t view any of the response or anything inside of the console.

What do I do to determine what is causing the app to crash all of the time?


#4

On Android you aren’t able to do anything with the map until it’s ready on the page so I’d recommend moving your actions from page create to the map finished loading event to see if that resolves the issue. I know it might seem counter-intuitive to wait for the map to load before setting the location but this usually works for me…


#5

That’s a good point and 1 I wouldn’t have thought of. Thanks @sue.