Cannot Change order of locations in dropdown on map

Phoca Maps - displaying maps in Joomla! CMS
jewilki
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 07 Sep 2011, 19:31

Cannot Change order of locations in dropdown on map

Post 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
jewilki
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 07 Sep 2011, 19:31

Re: Cannot Change order of locations in dropdown on map

Post 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
bcsgroup
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 11 Sep 2011, 20:38

Re: Cannot Change order of locations in dropdown on map

Post by bcsgroup »

Hi I am having the same issue. Please help.

Thanks
bcsgroup
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Cannot Change order of locations in dropdown on map

Post 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
If you find Phoca extensions useful, please support the project
cranker625
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 28 Jun 2011, 21:30

Re: Cannot Change order of locations in dropdown on map

Post 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 :)
jewilki
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 07 Sep 2011, 19:31

Re: Cannot Change order of locations in dropdown on map

Post 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
cranker625
Phoca Newbie
Phoca Newbie
Posts: 3
Joined: 28 Jun 2011, 21:30

Re: Cannot Change order of locations in dropdown on map

Post 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
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Cannot Change order of locations in dropdown on map

Post by Jan »

Hi, I will add the ordering into the next version.

Jan
If you find Phoca extensions useful, please support the project
sdragoninc
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 10 Oct 2011, 18:09

Re: Cannot Change order of locations in dropdown on map

Post 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';
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 48403
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Cannot Change order of locations in dropdown on map

Post by Jan »

Fixed in 2.0.3
If you find Phoca extensions useful, please support the project
Post Reply