Page 3 of 6

How do I remove map markers?

Posted: Tue Apr 07, 2015 10:02 am
by Joe Sharples

I tried it again and received no error the first time i loaded the page.

But then if i load the page again it showed this:

Code: Select all

[url=https://d2r1vs3d9006ap.cloudfront.net/s3_images/1184864/ScreenShot2015-04-07at10.56.24.png?1428400954][img]https://d2r1vs3d9006ap.cloudfront.net/s3_images/1184864/ScreenShot2015-04-07at10.56.24_inline.png?1428400954[/img] [/url]

How do I remove map markers?

Posted: Tue Apr 07, 2015 6:53 pm
by Egor Kotov6832188

Hello Joe,

You are receiving getBounds exceptions, this issue based on lat and lang, which you are setting, check if value was provided to the map


How do I remove map markers?

Posted: Wed Apr 08, 2015 9:17 am
by Joe Sharples

Originally I mapped an 'address' field from my service response to the 'address' field in the gmap component.

but just now I have tried using googles address converting service https://maps.googleapis.com/maps/api/... to get the lat and lng values and then map those values to map component.
Image

When I tested it this lat lng method I receive this error in the console:
Image


How do I remove map markers?

Posted: Thu Apr 09, 2015 1:58 am
by Yurii Orishchuk

Hi Joe,

You need to check values you pass to this properties:

Please click on "JS" for these links and populate it with code like:
Details: http://prntscr.com/6rfirl/direct

pre

console.log("lat = " + value);

/pre

Then please check logs in console.

Regards


How do I remove map markers?

Posted: Thu Apr 09, 2015 7:47 am
by Joe Sharples

It must do this correctly as the marker is dropped on the right location. even though this error occurs, the map still seems to work correctly.


How do I remove map markers?

Posted: Thu Apr 09, 2015 8:00 am
by Joe Sharples

I just double checked it. It is passes the the correct lat and lng values, drops the marker in the correct place, it centres the map correctly. I even have a 'directions from your location' button that runs a geolocation service and then displays the directions. This all works correctly... but I still get this error.

preUncaught TypeError: Cannot read property 'getBounds' of null/pre

Image

I fear that Apple will reject the app, or this error will cause future problems.


How do I remove map markers?

Posted: Mon Apr 13, 2015 2:23 am
by Yurii Orishchuk

Hi Joe,

As i can see you have a lot of event handlers for your "Info_Rest" datasource.

Please try to narrow the problem in way of deleting these event handlers (previously saved it on your local computer) one by one.

So we need to know only one thing that produce this problem.

Regards.


How do I remove map markers?

Posted: Mon Apr 13, 2015 9:47 am
by Joe Sharples

Ok thank you, i will do this today


How do I remove map markers?

Posted: Mon Apr 13, 2015 1:50 pm
by Joe Sharples

Hi Yurii,

I narrowed the problem down as much as I could.
I created a new database service called Info_Rest_test.

I removed all page show and load events, expect for invoking the Info_Rest_test service.

The request is a local storage variable mapped to query _id.
the response is the 'address' field mapped to a local storage variable 'addressConvert'.
on success the 'convertAddress' service is invoked.

The convertAddress service is googles address convert service https://maps.googleapis.com/maps/api/...

The request is the local storage 'addressConvert' mapped to the address query also the sensor query is set to false.
The response is the lat lng values mapped to the google map component latitude and longitude, and it is also mapped to the maker latitude and longitude.

These are the only thing happening on the page, and i still receive the same error.
I can't narrow the problem any further.


How do I remove map markers?

Posted: Wed Apr 15, 2015 2:37 am
by Yurii Orishchuk

Hi Joe,

Thanks for this clarification.

Here is what i did:

  1. Deleted convert_address datasource invocation on "success"
    event handler.
    Details: http://prntscr.com/6tw6jx/direct

  2. Then run app and see following result:
    Details: http://prntscr.com/6tw71z/direct

    Thus "addressConvert" datasource is not a culprit of this problem.

    You need to go ahead and narrow the problem in success mapping.
    Details: http://prntscr.com/6tw7fx/direct

    Regards.