Hi,

This patch adds an option to set OpenLayers.ImgPath to any directory desired. It's pretty essential for styling the OpenLayers controls, because without it, the default OL graphics are used from their site. It simply adds a new default option and a tiny bit of code in renderMap to hook that option in.

CommentFileSizeAuthor
image_path.patch2.07 KBtmcw

Comments

tmcw’s picture

Status: Active » Needs review

More appropriate status

zzolo’s picture

Thanks tmcw. Looks like a pretty simple patch. I will try to get it in tonight.

Hey, if you are working on some nice looking controls, I would love it if you could contribute it back. I think one of the more limiting factors of openlayers is its unappealing controls, so it would be really great to have some better looking ones as the default for the Drupal OL maps.

zzolo’s picture

Status: Needs review » Fixed

Committed: http://drupal.org/cvs?commit=227022

HAd made some new commits so patch did not apply, so manually put in. Feel free to test. Thanks for the work.

Status: Fixed » Closed (fixed)

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

yhahn’s picture

Status: Closed (fixed) » Needs work

FYI, the committed code and the patch code are different. The committed version does not work -- OpenLayers.js checks for the ImgPath property on the global OpenLayers object, so the correct code is:

-    OL.maps[map.id].map.ImgPath = map.image_path;
+    OpenLayers.ImgPath = map.image_path;
tmcw’s picture

Status: Needs work » Closed (fixed)
zzolo’s picture

Status: Closed (fixed) » Fixed

You're right, Young. My fault.

Looks like someone beat me to the punch: http://drupal.org/cvs?commit=245410

Status: Fixed » Closed (fixed)

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