james
james

Reputation: 717

add more functionality to drupal 7 openlayers

I have openlayers setup on a drupal 7 site. I can't see how to delete or move the map icons around. Do I have to edit the openlayers JS code? If so how?

Another issue I have is that I want to make one layer of content (nodes) a base layer and then have other nodes of other content types be the layers over that base layer. I've gotten so far as to have a multi-layered map with icons/layers based on taxonomy terms, but I don't know how to set the base layer (that will always stay visible).

The nodes that I want for the base layer do not have a taxonomy associated wit them. I suppose I could just give them a term in the same taxonomy category so they'd show up, but I'd still need to make it so they are always on the map acting as a base layer. (hope you can follow that)

Any help greatly appreciated. James

Upvotes: 1

Views: 1552

Answers (1)

Ajinkya Kulkarni
Ajinkya Kulkarni

Reputation: 1022

The answer to your question can get quite complex so I am answering a part of it. To move icons, you may need to change CSS file instead JS. We have developed a Web GIS portal where layers are stored as Drupal nodes. And these nodes have taxonomy terms associated with them. Using those taxonomy terms, the layers are categorized into different folders. Our front end is developed using ExtJS and nodes/layers are fetched using background AJAX service calls.

Also you do not need to store base map as a Drupal node. If you are not going to support different customizable base maps, you can directly hard code base map in the JavaScript while creating OpenLayer object. See an example here . And demo here.

Upvotes: 1

Related Questions