Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Hi
trying to change the image of marker but getting broker (like image not found) on the map
please view the attachment.
all the path to img styles and file located in correct directory.
please advice.
Comment | File | Size | Author |
---|---|---|---|
#19 | openlayers-1404912-7.x-2.0-beta7-do-not-test.patch | 1.87 KB | tobiasb |
#17 | openlayers-1404912.patch | 2.15 KB | tobiasb |
Comments
Comment #1
j0rd CreditAttribution: j0rd commentedI have the same problem.
@martin.riggs by any chance is your site a multi-lingual site?
It works fine for me when the language is set to the default language english.
Path example:
domain.tld/sites/all/modules/contrib/openlayers/theme/default_dark/img/marker-red.png
But when I switch the language to French, which uses a prefix folder, I get this path for the image which is a 404
domain.tld/fr/sites/all/modules/contrib/openlayers/theme/default_dark/img/marker-red.png
The /fr/ appears to be the problem. Most likely the Javscript used in this module isn't setting up the paths right. This might also be a problem for you if your Drupal is installed in a sub-folder I'm guessing
Comment #2
j0rd CreditAttribution: j0rd commentedAdding a better title.
Comment #3
j0rd CreditAttribution: j0rd commentedI've attached a patch, which adds base_url() to the externalGraphic paths.
@martin.riggs Please apply it and see if it works for you.
Comment #4
martin.riggs CreditAttribution: martin.riggs commentedThank, but please don't be mad on me, i never applied patches
could you guide me in few lines how to do it ?
i actually could follow the diffs by if there some better way i would like to know..
and thanks again...
Comment #5
j0rd CreditAttribution: j0rd commentedIf you've downloaded the module through git, you go into the module folder and `git apply -v PATCH.patch`
If you've simply downloaded the source, you do `cd sites/all/modules/openlayers; patch -p1 < PATCH.patch`
the `patch` command is with linux. If you're using mac or windows, you''ll have to do some reading for those OS's
Here's more information http://drupal.org/node/707484. Usually a quick google will solve these problems for you.
Comment #6
nod_I'd go with
file_create_url()
instead ofbase_path()
, it's the same issue we had with URL using ${dynamic}.Comment #7
nod_Actually, try this patch instead #1364778: openlayers_style_path() must not use url() to create file paths. and tell me if it fixes the problem.
Comment #8
RuiMendes CreditAttribution: RuiMendes commentedI worked thanks
Comment #9
nod_I'll commit the patch later, unless there is still an issue here.
Comment #10
martin.riggs CreditAttribution: martin.riggs commentedok, thanks, i will wait for your update, meanwhile i working with default style.
Comment #12
RuiMendes CreditAttribution: RuiMendes commentedSorry but this only works with clean urls.
If you can't use clean urls this patch won't work. It tries to get the image from:
localhost/?q=sites/all/modules/openlayers/themes/default_dark/img/marker-blue.png
the ?q= breaks the url.
Thanks
Comment #13
RuiMendes CreditAttribution: RuiMendes commentedupps forgot to reopen
Comment #14
nod_Does the patch in #7 fixes this ? I'm sorry haven't got around committing it yet.
Comment #15
RuiMendes CreditAttribution: RuiMendes commentedSorry. You are right.
I was using the old patch, the one that doesn't use the file_create_url()
Thanks.
Comment #16
jrogen CreditAttribution: jrogen commentedThis is still in the current versions over a year later. Can this be rolled in?
Comment #17
tobiasbThis happens also for file urls in layers etc.
Comment #18
tobiasbThis patch is for the current stable release.
Comment #19
tobiasb* Added "do-not-test" to filename.
Comment #20
PolExcellent, committed and pushed!
Thank you very much !
Comment #23
Pol