Download & Extend

Adding option for setting ImgPath for styling UI controls

Project:OpenLayers
Version:6.x-1.x-dev
Component:Code
Category:task
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

AttachmentSizeStatusTest resultOperations
image_path.patch2.07 KBIgnored: Check issue status.NoneNone

Comments

#1

Status:active» needs review

More appropriate status

#2

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.

#3

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.

#4

Status:fixed» closed (fixed)

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

#5

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;

#6

Status:needs work» closed (fixed)

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

#7

Status:closed (fixed)» fixed

You're right, Young. My fault.

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

#8

Status:fixed» closed (fixed)

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

nobody click here