0

I'm new in drupal(2 days), never used it before. I have taken over this site knowing nothing about it and right away got new assigment to create clustered looking map and markers should be put from already data in drupal site. So there is a page on the site https://esc.gsfc.nasa.gov/view-all-saves that shows all information needed to place markers on the map. How do I connect to that table, loop through records to call google API to place markers. Do I have to create my own php file and put inside the root? I looked in database and couldn't find any tables that stores that data.

0

The best way (the Drupal way) is to build on top of available Drupal features, rather than creating a custom solution that may do the narrow task at hand, but bypasses a lot of the built-in structure that carries a lot of value when using Drupal.

Views module is used to build the page you linked to, and Views is also the best module to use to list the geo-data to be displayed on a map.

Each node from that table has Longitude and Latitude coordinates (visible when you visit a node page, not directly in the table). These coordinates fields can be used to feed a Views map display.

You'll need to install a module that provides a special Views Format that renders a map. Then add that Display type to the same Views where the page you linked is built. Adjust the fields (override) to provide for the map display.

Are your Longitude/Latitude fields from Geolocation Field? Check under Structure > Content types > SAR Saves > Manage fields. Also check under Extend which geo-modules you have available.

With Geolocation Field you already have everything you need, you just need to configure a new map display in Views configuration, no coding required ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.