Hello Hope this help... There is a learning curve with Appery, probably a little bit more then with other programs but you will find that you are able to do so much more. The other programs are basically web pages were Appery allows you to add allot more functions. I tried them ALL and this is the best and worth the money and time it took me. It defiantly will take more then a month to learn how to do some more advanced functions like looping through an array.
I suggest you save the database to a local storage. In Models and Storage set it up like. This:
Then map your database to it.
Then on page load or a button run this Javascript code
//Name of LOCALSTORAGE
var list_location = localStorage.getItem('mysqlHospitalsArray');
var image = '../img/h_white_circle.png';
var obj = JSON.parse(list_location);
var coordsArray = obj;
var marker;
//NAME YOUR MAP (googlemap_6)
var map = Appery("googlemap_6").options.mapElement.gmap('get', 'map');
var CreateMarker = function(coordsArray, i){
var marker = new MarkerWithLabel({
//Make sure your Lat and Lon or spelled same as below
position: new google.maps.LatLng( coordsArray.Lat, coordsArray.Lon ),
icon: image,
//NAME is the Name you want to appear on the map (
labelContent: coordsArray.Name,
map: map,
Code: Select all
labelAnchor: new google.maps.Point(35, 0),
labelClass: "mapHospitals", // the CSS class for the label
labelStyle: {opacity: 0.75},
clickable: true
});
var infowindow = new google.maps.InfoWindow({content: coordsArray.Name});
google.maps.event.addListener(marker, 'click', function() {
//Ads info Window
//infowindow.open(map,marker);
window.open('http://maps.apple.com/?daddr=' + (coordsArray.Lat) + "," + (coordsArray.Lon),'_system', 'location=yes');
});
};
for (var i = 0, j = coordsArray.length; i < j; i++)
CreateMarker(coordsArray, i);