I cannot work out whether OL is supposed to provide basic building blocks, as per GMAP, or is it an API, and if an API, does it improve on using my own module? Anyone help? Please.

Comments

phayes’s picture

It's both. :-)

You'll note that openlayers comes with a whole bunch of modules. At it's core is openlayers.module, that is just an API.

The rest of the modules included in the package implement the API to do various things like adding maps to cck, adding maps to views etc. All together it provides both an API, and a whole wack of building blocks to get you started.

doompal’s picture

But there's no new type eg. "openmap"? Will investigate further.

zzolo’s picture

I think what you are assuming this module does and what it actually does are two different things. The project page describes things pretty well, and there is some good technical documentation with Advanced Help. If you are unfamiliar with CCK or Views, then there is some core Drupal things you are missing. Not sure how else to help.

doompal’s picture

I'm not assuming anything, just trying to work out what the modules will do for me. If I seem impatient, its because I tried the other map modules in Drupal, going in alphabetic order. I want to upload GPS tracks and have them display on a map that is centred and zomed correctly and provide a choice of map sources. I've done this using JS and put this in a Drupal module. This module only requires the GPX to be uploaded: no map setup. I'm just wondering whether to continue with this or am I reinventing the wheel?

It appears that Views is fundamental and I was unaware of this. I will now look for an example or an easy HOWTO. I have read he project page but perhaps that which is obvious to someone who has worked on the project is not so clear to a newcomer?

zzolo’s picture

Title: Is OpenLayers just an API » How to Integrate GPS Tracks and OpenLayers

Hey doompal. Sorry to be a little short with you, but your original question is so vague and not very constructive, if you are looking for help. As a newcomer to Drupal, I would suggest going the route of asking questions in the form: "I am trying to do X, can this module help me do this?"

It is true, it is hard for the developers to remove themselves and put themselves in the shoes of Drupal newcomers (myself included). We do need your input to get this to be a well-rounded module.

I think for your solution, you should look at using the Geo module to input data (not sure if you can just upload GPS tracks or not, but it is a place to start). Geo is a still-beta module that stores GIS data in Drupal. Then you can create a View with the OpenLayers plugin with that data.

tmcw’s picture

Status: Active » Closed (works as designed)

Hi,

We're working on documentation in the OpenLayers Module Book, and there is a bit built into the module. Start there if you want to learn more. If you've got a working solution for your problem, then it seems like you've got it under control. The OpenLayers module alone would not be enough to handle GPX uploads as far as uploads and parsing / output. You need something like Geo to do that - separating modules into different tasks (input, output, parsing, etc) can make them a little trickier to understand, but they make it possible to handle lots of odd tasks with moderate work, instead of handling one off the bat and making the rest hacks.

For something that's specifically tailored to your use, you might want to check out Track, which appears to be moderately maintained and does precisely what you're talking about.

doompal’s picture

Thanks for the info. I was going to look at Tracks but having gone through the module list alphabetically, from Gmap, I think, I was beginning to despair. Looked at the documentation couldn't get past step 3. Views doesn't seem to know about openlayers, two others have left comments saying the same. My own solution? CCK for file upload and a bit of javascript to add layers and zoom the map; am now looking at static maps hence my interest in openlayers again. Trying to make the site google-free.

doompal’s picture

Not strictly speaking Drupal but you may know something about another problem. I can no longer use the open maps I had set up. Tile at home still works but not, say, open cycle map. Has the api changed and will this affect the Drupal openlayers module.

doompal’s picture

Looks like the problem was with OSM, sorry.