Hi Rik

I try to use Location differentiator And it Works with Taxonomy Reference fields!
I my case I try to add List integer field as Differentiator to show different Markers.
and I get this message:
2fd.png

Views is showing nodes on map
In List integer field Values look like this

0| label ...
1| label ...
2| label ...
3| label ...
4| label ...
5| label ...

And I checked that nodes have values in this field.

Why I need to use List integer not taxonomy in content type?
For performance issues List integer field is more light than taxonomy.

CommentFileSizeAuthor
2fd.png10.07 KBJarviss

Comments

rdeboer’s picture

Assigned: Unassigned » rdeboer

Hi Mike,
I acknowledge that fields of type list should work in the IPGV&M Differentiator.
I'll try and reproduce your issue and fix it.

As an aside though, do you have any evidence that the use of a field is more efficient than using a taxonomy?
Under the hood, a field comes with its own database tables and thus JOINs in SQL queries etc, very much like a taxonomy term.
What aspect of a field do you feel is "light-weight" ?

Rik

rdeboer’s picture

Status: Postponed (maintainer needs more info) » Active

I cannot reproduce this alleged bug.
I created a field "List (Integer)" on a Business content type. I called it "Size of business" with "Allowed values list" like so:

0|Not specified
1|Sole Trader
2|Small (up to 20 employees)
3|Medium (21-100)
4|Enterprise (100+)

I edited some of the nodes to specify "Size of business".

I then added this content field to the View's Field list and selected it under "Location differentiator" in the "Map (Leaflet API, via IPGV&M)" config panel.
Clicked "Add another assoiciation". Selected a "Size of business" value from the drop-down (or radio buttons, if used) and a marker colour.
Repeat for other vales of "Size of business".

Saved Views and enjoyed map markers in colours that differ by "Size of business".

No errors.

Rik

rdeboer’s picture

Status: Active » Postponed (maintainer needs more info)

I need clearer steps to reproduce before I can do further work on this issue.
Rik

2pha’s picture

Status: Active » Postponed (maintainer needs more info)

I am seeing this bug too using a leaflet map.
I did the same as in #2

I tried with:

List(text) with values
test1|test1
test2|test2

List(integer) with values
1|1
2|2

List(integer) with values
1|test1
2|test2

I can select and assign associations fine in the view but the markers on the map are always the default blue marker.
This is the only reason I am using this module over the standard leaflet module, so am a bit disappointed :(

Also, while I'm here....how to get the layer/feature selector to display for leaflet maps?

2pha’s picture

Status: Postponed (maintainer needs more info) » Active

OK....I have found the problem after about 2 hours....

I was setting the differentiator and markers on the master view, doing this does not save them to the block and page views.
So when it got to line 568 of ip_geoloc_plugin_style.inc the variable $display_id was 'default' instead of 'block' which is what I was viewing.

It had nothing to do with the type of field.

Setting status back to 'active'

2pha’s picture

Category: support » bug
rdeboer’s picture

Title: Location differentiator using List integer field » Location differentiator defined on View master display does not activate on block an page displays

@2pha

Thanks for your report.
So the bug is, when the differentiator is defined on the master display, you don't see it on the 'block' display?

Rik

2pha’s picture

yep, that's correct.

rdeboer’s picture

Issue summary: View changes
Status: Active » Closed (works as designed)

No longer a problem as in the latest version of Views, the "Master" display gets dropped automatically the moment you add a "Page" or "Block" display.

2pha’s picture

The master display does not get "dropped" if you have set it to display in the views settings. It has been like this in drupal 7 views for as long as I can remember.

rdeboer’s picture

Re #10:
You are right -- totally forgot about that tick box!

Anyway, regarding your issue of the Block and Page displays not using the Master display, when Block and Page don't have their own Location Differentiator.... that has been fixed with the latest check-in.

Note that all displays share the same differentiator field, but the value/colour associations may be different.
Rik