It would be cool to support a Drupal path for the style graphics. Currently, it just is a regular path and can easily break if you move the site with a different web directory structure.

This isn't a big deal, but just dont have time to address and figured I would put it here to remind me later. The one question that comes to mind is should this be handled by the UI (like in the form submit) or in the API (like when rendering styles). We could also do it on the JS side, but I dont think its worth the processing.

Marking as minor.

Comments

strk’s picture

I think the goal is to have drupal paths in the exportable so most likely need to be resolved at rendering (or load) time.
Surely not on form submit/save time. I'd be also interested in having such support for KML layer urls.

zzolo’s picture

Also note that I am a fool. Saving the full path (rendering path on submit) would be pointless. :(

tmcw’s picture

I think that this is a good goal - to keep style graphics resolving even if you move around a site or a feature, but this is the wrong way to look at it - styles should 'own' their graphics - whether this means that the graphics should be uploaded parts of the exportable that are managed by OpenLayers or it's enforced that graphics are relative to an owning module and its exported styles.

zzolo’s picture

Though I agree with the idea of creating a stronger link between styles and icon paths (without sacrificing usability), I think we should simply allow for more flexible paths now and look at creating that stronger link later on.

  • If we allow people to use a path for graphics, they should be able to use a Drupal path, an absolute, or a full URL. This seems like a stable and widely used paradigm for similar things in Drupal, and we use it for map paths for images and CSS.
  • If we allow people to upload graphics (which I am not against), then, IMO, we have to be able to create that as part of the export which, as far as I know, is not really in the paradigm of exportables at the moment.
  • It seems like this could just be accomplished with creating an interface for the drupal_load_module() function (which seems a bit unnecessary and bad UI).
zzolo’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
dgastudio’s picture

zzolo, and how to make it work?

zzolo’s picture

Hi @kervi. You should be able to simply put in a Drupal, absolute, or full path in the field. What specific problems are you having?

zzolo’s picture

Status: Active » Fixed

This is fixed. Please open a support issue if needed.

Status: Fixed » Closed (fixed)

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