Page 1 of 2

Cannot Change order of locations in dropdown on map

Posted: 07 Sep 2011, 19:41
by jewilki
I have been trying to change the order of the locations from the dropdown on this page below in the "to:" section where you calculate the route.
http://www.encompassinteractive.com/~sl ... directions

If you change the ordering of the markers in the backend under this map it does nothing on the front end of the site. Right now i have them listed in alphabetical order in the back end of the site but it does nothing for the dropdown in the front end. I have tried everything and the order of the dropdown on the front end stays the same.

How can i change this? I have a bunch of locations and they have to be put in alphabetical order because of this

by the way i am using the component with the plugin and the newest version of each for joomla 1.7

Thanks,

Josh

Re: Cannot Change order of locations in dropdown on map

Posted: 09 Sep 2011, 21:06
by jewilki
Does no one know how to do this or fix it. It has been 2 days and i haven't got a response. I have searched the forum and the whole internet and i have not found a solution yet. Any help would be appreciated

Thanks,

Josh

Re: Cannot Change order of locations in dropdown on map

Posted: 11 Sep 2011, 20:41
by bcsgroup
Hi I am having the same issue. Please help.

Thanks
bcsgroup

Re: Cannot Change order of locations in dropdown on map

Posted: 12 Sep 2011, 18:02
by Jan
Does no one know how to do this or fix it. It has been 2 days and i haven't got a response
Hi, see Phoca Forum rules regarding this: forum-rules.php

Marker Ordering:

You can customize the sql query here:
components\com_phocamaps\models\map.php

to add ordering by your criterias.

Jan

Re: Cannot Change order of locations in dropdown on map

Posted: 15 Sep 2011, 21:40
by cranker625
The map.php looks like all greek to me.

Wouldn't it be better to have the market items arrange by ordering?
Should look into implementing this on future releases :)

Re: Cannot Change order of locations in dropdown on map

Posted: 15 Sep 2011, 23:00
by jewilki
Hi, i looked at the map.php file

Starting on line 70
$query = 'SELECT a.*, i.id as iconid, i.url as iurl, i.urls as iurls, i.object as iobject, i.objects as iobjects, i.objectshape as iobjectshape'
.' FROM #__phocamaps_marker AS a'
.' LEFT JOIN #__phocamaps_map AS c ON c.id = a.catid '
.' LEFT JOIN #__phocamaps_icon AS i ON i.id = a.iconext '
.' ' . $where;
I assumed you would somehow put the order feature after the where but i do not know how. Also i edited this file and it seemed to change nothing in fact i completely deleted the map.php file and nothing seemed to change at all. Does map.php even have anything to do with the ordering of the dropdown of the locations?

How can i change this ? because changing anything the map.php seems to have no effect

Re: Cannot Change order of locations in dropdown on map

Posted: 16 Sep 2011, 01:20
by cranker625
something even more curious happened.

I have around 45 markers on the map.
Most of the markers have an ordering of "0".
Some of the markers have proper ordering numbers ie: "1 2 3 4 5".
I had presumed that markers would be added in sequence assigning corresponding ID and ordering.
And then If I want to alphabetically re-order the dropdown, I change the ordering via up-button and down-button.

I wish this function was available :x

Re: Cannot Change order of locations in dropdown on map

Posted: 21 Sep 2011, 00:19
by Jan
Hi, I will add the ordering into the next version.

Jan

Re: Cannot Change order of locations in dropdown on map

Posted: 10 Oct 2011, 18:13
by sdragoninc
Easy fix:

edit /components/com_phocamaps/models/map.php

line 53 should be changed TO:

.' AND a.published = 1 ORDER BY a.ordering';

Re: Cannot Change order of locations in dropdown on map

Posted: 24 Nov 2011, 00:46
by Jan
Fixed in 2.0.3