Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Locations Module/Google Maps Issue


Go to End


3 Posts   974 Views

Avatar
ambient

Community Member, 130 Posts

13 August 2013 at 4:52am

Hi All,

I've been using the Locations module on a clients website with great success but recently they surpassed 26(a-z) locations causing
the map to crash (disappear).

I've driven myself crazy trying to figure out a way to use numbers instead of letters but have not been able to figure it out.

Does anyone have any idea of how this problem of being limited to 26 locations could be fixed?

Any help would be very much appreciated.

Avatar
Nobrainer Web

Community Member, 138 Posts

13 August 2013 at 7:11am

I Think you should look at the function ón Line 64 of https://github.com/webair/thinc.silverstripe.locations/blob/master/code/PoiLocationPage.php

Changing
$poi->Label = chr(65 + $i);
To

$poi->Label = $i;
Should give you a number as label.

Note that you may have to change Line 23 of
https://github.com/webair/thinc.silverstripe.locations/blob/master/templates/Layout/PoiLocationPage.ss
As that file might not exist.

Hope it helps

Avatar
ambient

Community Member, 130 Posts

14 August 2013 at 5:01am

Dude you are a legend!!! Thank you so much!!

I thought it might have had something to do with that line but I couldn't figure out what the chr(65+$i) did or meant.

My programming skills aren't the greatest (obviously) so thanks again :D