Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.getJSON(
- "https://XXXXX.json",
- function(data) {
- data.data1.forEach(function(datas1) {
- var var1 = new google.maps.LatLng(
- datas1.marker_coordinates[0],
- datas1.marker_coordinates[1]
- );
- var var2 = new google.maps.Marker({
- position: var1,
- map: map,
- icon: icon
- });
- var InfoCardContent =
- "<h3>" +
- datas1.test +
- " - " +
- datas1.test2 +
- '</h3><h4 style="margin-top:-10px;">Streets: </h4>' +
- datas1.test3;
- var InfoWindow = new google.maps.InfoWindow({
- content: InfoCardContent
- });
- var2.addListener("click", function() {
- InfoWindow.close();
- InfoWindow.open(map, var2);
- });
- });
- }
- );
Add Comment
Please, Sign In to add comment