Google Map Marker Function (alternate, non-geocoding)


/ Published in: JavaScript
Save to your folder(s)

* Used to create markers based solely on latitude and longitude
* Replace the existing mainPoints() function in map-functions.js


Copy this code and paste it in your HTML
  1. // A function that will load the main map points when called
  2. function mainPoints(){
  3. // pointData function exists in HTML for population and data re-use purposes
  4. pointData();
  5. searchMap();
  6. for (var j = 0; j < points.length; j++) {
  7. if(points[j]['active']=='true'){
  8. createMarker(points[j]['name'],points[j]['address'],points[j]['citystate'],points[j]['lat'],points[j]['lng'],points[j]['query']);
  9. }
  10. }
  11. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.