I have already done that by creating a new service called Info_Rest_test, and removed the event that invoked the Info_rest service.
now all I have is
Info_Rest_test invoked on page show.
I still receive the error.
I've tried doing the same as above but mapping the address response directly to the map component. I don't get the "Uncaught TypeError: Cannot read property 'getBounds' of null" error but the debugger opens and shows this:
I deleted the map from the NightsOut page and added a new map to my startScreen.
I havent mapped anything to it, i have just left it as the default gmap component, with the default addresss "San Francisco, CA". The debugger opens again.
Hi Joe,
Seems to be find a reason of this problem.
Here is what is did to fix it:
Use correct address for "Map" component.
Use correct address for "Marker" component.
Please check it.
Regards
example addresses:
29 Jackson's Row, Manchester M2 5WD
11 Peter St, Manchester M2 5QR
17 Thomas Street, Northern Quarter, Manchester M4 1FS
Arches 9 & 10, Whitworth West, Manchester M1 5LH
All addresses work on a google search.
Hi Joe,
Thanks for this update.
Regards.
I've managed to get the map to work without receiving the error.
I'm storing lat and lng values in the db.
on the previous page when list item is clicked, the _id and lat and lng values are now
saved to local storage and the page navigates to the current page.
on page show:
pre
var mapO = Apperyio("google_mapNight").gmap;
Code: Select all
if (!mapO)
{
setDelayO();
}
else
{
initializeNO();
}
function setDelayO()
{
setTimeout(500);
}
/pre
I have a js file:
pre
var mapO;
var boundsO = new google.maps.LatLngBounds();
var markerLatLngO = new google.maps.LatLng(localStorage.getItem('markerLat'), localStorage.getItem('markerLng'));
function initializeNO() {
console.log('Initializing...');
var myOptions = {
zoom :20,
center: new google.maps.LatLng(markerLatLngO),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
mapO = new google.maps.Map($('div[dsid="google_mapNight"]').get(0), myOptions);
//mapO = Apperyio("google_mapNight").gmap;
var marker = new google.maps.Marker({
position: markerLatLngO,
map: mapO,
animation: google.maps.Animation.DROP,
zoom: 20
});
aofmarkers.push(marker);
boundsO.extend(markerLatLngO);
mapO.fitBounds(boundsO);
}/pre
The map now works.
the only problem is, whenever I invoke a read service, I get the error.
even if the service is not connected with the map.
I have the map component working as stated above.
I have removed all services on the page, expect for one test service 'restservice1'
I have a button on the page that invokes this test.
it is only when I click the button that i receive the error.
I don't understand why i receive the error when I invoke this service... it has no connection to the map component.
I've been having this problem for too long now. I am willing to pay to have this problem fixed for me.
Hi Joe,
Checked your app and could not see any "address" field value map and marker component.
Detais:
map: http://prntscr.com/6xfyvd/direct
marker: http://prntscr.com/6xfyz8/direct
Regards.
The map and marker address are assigned based on the response of a database service. I have tried using a default address in these fields and i still receive the error.
Hi Joe,
Set "29 Jackson's Row, Manchester M2 5WD " address for map and marker component for your app.
Now you should not see this error.
Regards.