I apologize if this isn't the right venue for something like this, but I'm wondering if there's any documentation on how to configure your map once you have some sources and a map defined with the UI. Specifically, I'd like to know about 1) how to set the style of my points/markers. 2) how to get popups for the fields in my spatial data. 3) how to add a google-maps data overlay to a map. 4) Creating a map container block.

Thanks in advance and apologies on issue-queue etiquette.

Comments

Nkendall created an issue. See original summary.

m.stenta’s picture

Status: Active » Fixed

This is the right venue. I'm not very familiar with the current state of documentation, other than "it's not complete". But I can probably answer some of these questions:

1) Layer styles can be configured on a per-map basis: edit the map you want, click on the Layers tab, and you will see a "Styles" column with a dropdown of available styles. New styles can be defined in /admin/structure/openlayers/styles

2) Enable the Openlayers Examples module - there is an example map in there that demonstrates the Popup features. Use that as a guide (this advice is helpful in a lot of ways - some of the best "documentation" at this point is in the form of examples in that module).

3) Not sure what you mean by this. Do you want Google Map tile layer? Or some kind of data overlayed on top of other layers? Need more details on what you're trying to do...

4) Also not sure what you mean by "Openlayers container block" - do you need to show a map in a Block? If so, enable the Openlayers Block module - this will add an option to each map that allows you to say "provide a block for this map" and when you do that a new block will be available in /admin/structure/blocks

Hope that helps!

Nkendall’s picture

Hi M. Stenta,

Thanks for your response.
1) I just poked around in styles and I've kind of got the hang of it. I'm having a little trouble with icons, is there a specific place in the OL directory that I should put my icons?

2) Ultimately, I just want a popup with the field values from the individual locus and I'd like to use custom icons for the markers.

3) As far as the google layer, I would like to use the tiles google wms, or whichever tile/wms service they expose via API. I'm pretty sure I saw one in the examples I just don't know how to add one to the list of options.

4) Using a block. I guess, I was wondering on how to go from assembling the map in the OL UI, to placing that final map in a view. Basically, how to get the map from the OL ui to something I can place on a page.

Much appreciated.

m.stenta’s picture

1) Drupal best practice is never to put files into a module directory, because they will no longer be there when you upgrade that module. Your best option is probably to put them into your sites/*/files directory, where your other site-specific files reside. Then you can reference the path from the style in Openlayers.

2) See my answer to #2 in my previous comment.

3) Which example did you see it in? I'm still not sure if you are asking for Google Maps "Layers" (ie: Satellite, Roads, Terrain, or Hybrid - which are the four possible layer options) - or if you're talking about something else. You can definitely enable the layer types. See the example module for how the Google example map is configured.

4) See my answer to #4 in my previous comment (enable the Openlayers Block module, and you will be able to create a Block with the map in it, which can be placed in your site like any other Drupal Block).

Nkendall’s picture

Hi M. Stenta,

I figure most of it out, however I am still having trouble with markers. I looked at the example with markers and I tried to replicate the example: 1) add a style of type icon 2) set the style options to the path to my markers. The issue is that the marker doesn't show up in my preview of the style or on my map. I followed the example and used the absolute path to the marker (e.g. "http://mydevsite/sites/default/ol-markers/mymarker.png" but it's not showing up. I've tried a couple of variations of the path, relative to both the drupal root and openlayers module folders, but it doesn't show up. I sometimes get the "Unable to load CTools exportable Style undefined." with this.

The rest I solved, with the google layer, I had to add a source and then select google, then add it as a layer. Not the most obvious workflow, but once I figured that out it was a breeze.

P.S. thanks for being so helpful.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.