GithubHelp home page GithubHelp logo

web5design / geoiq-drupal-plugin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from geocommons/geoiq-drupal-plugin

0.0 3.0 0.0 60 KB

Drupal Module for embedding GeoCommons maps and datasets

Home Page: http://geocommons.com

geoiq-drupal-plugin's Introduction

GeoIQ Drupal Module

The GeoIQ module adds the capabilities to adding GeoCommon maps to Drupal content type. It also allows the site administrator to add any GeoRSS and KML feed that they wish.

Directory contents

The directory contains the files needed for the module. Also included are two files, mexico.atom and mexico.php used to test the search capabilities when the server is not available.

Dependencies:

This is a Drupal 6.x module that requires having PHP 5.2 or higher and having php_curl extension turned on in php.ini. Check your phpinfo() page to see if it is already installed. If not, open php.ini and uncomment extension=php_curl.dll.

Installation

  1. Place the GeoIQ directory in sites/all/modules. If the sites/all/module directory doesn_t exist, create it and place the GeoIQ folder there.
  2. On your Drupal site, go to Adminster →Site Building →Modules. Find GeoIQ, check the enabled checkbox, and click Save Configuration at the bottom of the modules page.

Configuration

For GeoIQ to properly work, you must have the module properly configured.

  1. Set Permissions.
    • Go to Adminster→User Management→Permissions and find the permissions section for GeoIQ. There are 3 possible permissions: GeoIQ add map to content_, GeoIQ administer feeds_, and GeoIQ administer settings.
    • GeoIQ administer settings will give the user rights to set the server address for the GeoIQ API REST service, the user name and password. It also has the power to choose which content types will be able to search and add maps. Only give this right to site administrators.
    • GeoIQ administer feed will give the user the opportunity to add kml or GeoRSS feeds as data sources for GeoCommons. Since this can affect the GeoCommons account of the user whose credentials are being used to access the API, you should grant this right to a few trusted people as well.
    • GeoIQ add map to content gives the user the opportunity to search for maps and add it to their content. The role that has this permissions must be able to post Full HTML input type since this is necessary t o be able to render the map.
  2. Set GeoIQ: Credentials
    • Go to Adminster→Site Configuration→GeoIQ: Credentials to set the server address where the GeoIQ API REST server is located, the user name and password. The user name and password are the same as the onaes that one uses to log into GeoCommons.
  3. a) Server address
    • The module should enter automatically http://geocommons.com as the server address, but you can modify it. Make sure that you don_t enter a trailing slash at the end of the address. Doing so will can cause errors.
  4. b) User name and password.
    • These are the same user name and password that you use to log into GeoCommons. These are the credentials that will be used when adding KML or GeoRSS feeds as data sources to GeoCommons.
  5. c) Updating the Credentials settings page
    • If you update any part of this page, you must re-enter your password. The password is not loaded automatically into the form for security reasons. Again, you must re-enter it every time you update any part of this settings page.
  6. Add GeoIQ to Content Types

Go to Administer→Site Configuration→GeoIQ: Content Types. Select the content types where you wish to have the ability to search for GeoCommons maps and to add them to the content. Click Save Configuration when you are done.

Using the Module

Adding a GeoCommons map to Drupal content:

Assuming that the module has been configured correctly and the right permissions have been granted to the correct roles:

  1. Click on Create content. Then click on the content type that can add a GeoCommons maps.
  2. In the add/edit page, look below the body field for a section called GeoIQ. Click to expand it.
  3. Enter a search term in the search field, and click on Search. A result are should be filled.
  4. Click on the add map button. This should add automatically the markup code to add this map at the end of the content of the body. You can also copy and paste the markup at in the Markup area below the results.
  5. IMPORTANT: Click on Input Format and select Full HTML. If you don_t do it, THE MAP WILL NOT RENDER. You will only see the markup as text.

Troubleshooting

Problem: I don_t see the map. When I click Preview or Save, I only see the markup text.

Solution: Click Edit. Below the body text, look for Input Format. Click to expand it. Select Full HTML. If you don_t see it, then the site administrator needs to grant users with your role the ability to post using Full HTML.

Problem: When I click Save or Preview and I see my content, I get a javascript error message. When I examine it, I realize that it is part of the map markup.

Solution: Change the Post Trim setting either to exclude the map or to allow it in the teaser. That will fix future problems. For this specific content, you will need to place <! break --> either before or below the map markup to that the teaser text won_t cut it in half.

Adding a KML or GeoRSS feed as a data source to GeoCommons:

Assuming that the values in GeoIQ: Credentials have been entered correctly:

  1. Go to Administer→Site Configuration→GeoIQ Add Feeds
  2. Enter the address of the KML or GeoRSS feed that you are trying to add in the Enter Feed field
  3. Click on Insert Feed. You will get a message telling you if you were successful or if there were errors.

Data Troubleshooting

If you are having trouble adding a feed, check the following:

  • Is the feed address correct?
  • Does the feed have location data? Is the location data missing?
  • Is the server address entered correctly in the GeoIQ: Credentials settings page?
  • Is the user name and password the correct ones?

If everything looks fine and you are still having problems, please contact the [email protected].

geoiq-drupal-plugin's People

Contributors

oskipa avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.