-2

I created an html page that display a map using javaScript (google maps api) the map contains markers I want to get data (attitude and longitude) from "mysql" database to use it for markers (to make dynamic markers) Is there a way that I can get data from database to use it with javascript? ps : I couldn't find solutions online

this is for html5,javascript (using jquery),google maps

//creating the marker on first position   
marker = new google.maps.Marker({
    position : MarkerCoords,
    map : map,
    title : 'your position'
});
Filburt
  • 17,626
  • 12
  • 64
  • 115
mehdi
  • 1
  • 4

1 Answers1

1

You will need some kind of server side script like PHP to get the data from the database and export it to the javascript via JSON or something like that.

JQuery offers functionality to get information from a server. Google maps api does exactly the same, but you don't see that.

something like this: jQuery AJAX Call to PHP Script with JSON Return

Sango
  • 144
  • 4