Problem using Filter on Layer

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
21 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Problem using Filter on Layer

naish666
Hello,

I have a layer with bars, coffe shops, burger... On that layer I have a column called type (1, 2, 3...) where says if it is a bar, a burguer...
When I put the filter type=1 OR tipe=2 and preview on map it only shows bar and burguer. The problem is that when I put the cursor over any of the points always show the same tooltipo whit the name of the same burger.

What can I do?
Reply | Threaded
Open this post in threaded view
|

Re: Problem using Filter on Layer

jerome.duckers
Hello,

The tooltip is depending on your entire layer, not on a thema (filter).
Is the tooltip right when you remove your filter ?

duck.


2013/1/22 naish666 <[hidden email]>
Hello,

I have a layer with bars, coffe shops, burger... On that layer I have a
column called type (1, 2, 3...) where says if it is a bar, a burguer...
When I put the filter type=1 OR tipe=2 and preview on map it only shows bar
and burguer. The problem is that when I put the cursor over any of the
points always show the same tooltipo whit the name of the same burger.

What can I do?



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Problem-using-Filter-on-Layer-tp5028966.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users


_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

RE: Problem using Filter on Layer

Rémy Gourrat

Hi,

 

First, if your layer use an Oracle Provider (King or Autodesk) check that you have a primary key on your view/table

 

Rémy

 

AG-Carto - Bayonne
Reply | Threaded
Open this post in threaded view
|

RE: Problem using Filter on Layer

naish666
This post was updated on .
Hello,

Yes, when I remove the filter the tooltip is ok.

I am using PostgreSQL/PostGIS and I am not sure that have Primary Key I have to see... Is it necessary a PK for tooltip to function?


Regards
Reply | Threaded
Open this post in threaded view
|

RE: Problem using Filter on Layer

naish666
In reply to this post by Rémy Gourrat
I have checked and the table have a Primary Key.
Reply | Threaded
Open this post in threaded view
|

RE: Problem using Filter on Layer

Rémy Gourrat

So now i’ll check  the ajaxviewer request sended to mapguide server by using Fiddler.

 

I will see if the mapguide URL request change (normaly the Id) when you change the location cursor on different points (burger,, bar…)

 

Good luck

 

Rémy

AG-Carto - Bayonne
Reply | Threaded
Open this post in threaded view
|

Re: Problem using Filter on Layer

jerome.duckers
Hi,
 
It's very strange, can you copy the xml content of your LayerDefinition ?
 
 
Br
Duck

2013/1/23 Rémy Gourrat <[hidden email]>

So now i’ll check  the ajaxviewer request sended to mapguide server by using Fiddler.

 

I will see if the mapguide URL request change (normaly the Id) when you change the location cursor on different points (burger,, bar…)

 

Good luck

 

Rémy

AG-Carto - Bayonne


View this message in context: RE: Problem using Filter on Layer
Sent from the MapGuide Users mailing list archive at Nabble.com.

_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users



_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem using Filter on Layer

naish666
Hello,

Here you are the XML of the Layer "restaurantes":

<?xml version="1.0"?>
<LayerDefinition xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="2.4.0" xsi:noNamespaceSchemaLocation="LayerDefinition-2.4.0.xsd">
  <VectorLayerDefinition>
    <ResourceId>Library://Turismo/Datos/restauracion.FeatureSource</ResourceId>
    <Watermarks />
    <FeatureName>servicios:restauracion</FeatureName>
    <FeatureNameType>FeatureClass</FeatureNameType>
    <Filter>tipo=5 OR tipo=6 OR tipo=7</Filter>
    <Geometry>the_geom</Geometry>
    <ToolTip>Concat('&lt;div&gt;',Concat(Concat('&lt;strong&gt;&amp;nbsp',Concat(nombre,'&amp;nbsp;&lt;/strong&gt;')),Concat('&lt;br/&gt;', Concat('&amp;nbsp;&lt;a href="http://www.melilla.es/melillaPortal/floc_d4_v2.jsp?tipo=1&amp;nivel=1400&amp;language=es&amp;contenido=',Concat(contenido,'"target="_blank"&gt;Informacion&lt;/a&gt;&lt;/div&gt;')))))))</ToolTip>
    <VectorScaleRange>
      <CompositeTypeStyle>
        <CompositeRule>
          <LegendLabel />
          <CompositeSymbolization>
            <SymbolInstance>
              <ResourceId>Library://Turismo/Iconos/restaurantes.SymbolDefinition</ResourceId>
              <ParameterOverrides />
            </SymbolInstance>
          </CompositeSymbolization>
        </CompositeRule>
      </CompositeTypeStyle>
    </VectorScaleRange>
  </VectorLayerDefinition>
</LayerDefinition>
Reply | Threaded
Open this post in threaded view
|

Re: Problem using Filter on Layer

naish666
Any help?
Reply | Threaded
Open this post in threaded view
|

Re: Problem using Filter on Layer

jerome.duckers
Hi,
 
Is it normal that you make a filter on  "tipo=5 OR tipo=6 OR tipo=7"
and in your tooltip you write  : floc_d4_v2.jsp?tipo=1      ???
 
I thing that it's better to replace 1 by the "tipo"  fields, no ?
 
BR
Duck
 
 
 
2013/1/30 naish666 <[hidden email]>
Any help?



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Problem-using-Filter-on-Layer-tp5028966p5030971.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users


_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem using Filter on Layer

naish666
I have change the colum from tipo to tip. Still the same...
Reply | Threaded
Open this post in threaded view
|

Re: Problem using Filter on Layer

jerome.duckers
You have just rename the name of the column ?
This is not what i said.
 
I suggest you to have something like that for the tooltip
 
Concat('&lt;div&gt;&lt;strong&gt;&amp;nbsp',nombre,'&amp;nbsp;&lt;/strong&gt;&lt;br/&gt;&amp;nbsp;&lt;a href="http://www.melilla.es/melillaPortal/floc_d4_v2.jsp?tipo=',tipo,'&amp;nivel=1400&amp;language=es&amp;contenido=',contenido,'" target="_blank"&gt;Informacion&lt;/a&gt;&lt;/div&gt;')
 
 
BR
Duck
 
 
 
2013/2/1 naish666 <[hidden email]>
I have change the colum from tipo to tip. Still the same...



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Problem-using-Filter-on-Layer-tp5028966p5031371.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users


_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

RE: Problem using Filter on Layer

Rémy Gourrat

I just add a stupid  question.

 

Have you tried to put only the field in the tooltip => tipo to chek that it’s not your floc_d4_v2.jsp who have a bug ?

 

Rémy

AG-Carto - Bayonne
Reply | Threaded
Open this post in threaded view
|

Re: Problem using Filter on Layer

naish666
In reply to this post by jerome.duckers
The "tipo" of the tooltip it is no the same as the "tipo" (now rename to "tip") of the table. The "tipo" of tooltip must be always 1. The main variable on tooltip is "contenido".
Reply | Threaded
Open this post in threaded view
|

Re: Problem using Filter on Layer

jerome.duckers
So, as Remy said, you can use only contenido in the tooltip, and see if it's different.

2013/2/1 naish666 <[hidden email]>
The "tipo" of the tooltip it is no the same as the "tipo" (now rename to
"tip") of the table. The "tipo" of tooltip must be always 1. The main
variable on tooltip is "contenido".



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Problem-using-Filter-on-Layer-tp5028966p5031419.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users


_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem using Filter on Layer

naish666
I have done it. It shows the same "contenido" for all points, but in the table, the column "contenido" is different for every registry. Why show the tooltip the same "contenido" for al points?
If I left the filter field of the layer (in Maestro) it show all the points and different "contenido" for every point, but when I put the filter "tip=5 OR tip=6 OR tip=7" it show the same "contenido" for every point.
Reply | Threaded
Open this post in threaded view
|

Re: Problem using Filter on Layer

jerome.duckers
Do you know FDO Toolbox ?
If not, you can take it,
1. Create a connection to your data (sdf/shp/oracle/ ... )
2. Make a Data Query
3. Insert you filter
4. See the result, is the contenido field the same ?
 
The data are in a SDF or SHP ? Can you send it ?


 
2013/2/1 naish666 <[hidden email]>
I have done it. It shows the same "contenido" for all points, but in the
table, the column "contenido" is different for every registry. Why show the
tooltip the same "contenido" for al points?
If I left the filter field of the layer (in Maestro) it show all the points
and different "contenido" for every point, but when I put the filter "tip=5
OR tip=6 OR tip=7" it show the same "contenido" for every point.



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Problem-using-Filter-on-Layer-tp5028966p5031433.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users


_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem using Filter on Layer

naish666
When I do the Query with the same filter it shows me differents "contenido" and not the same "contenido" as in Maestro. I use a table in a PostgreSQL/PostGIS Database. I have export the table "restauracion" to a shp file and here you are:
restauracion.zip
Reply | Threaded
Open this post in threaded view
|

Re: Problem using Filter on Layer

jerome.duckers
Very strange, i've done the test with AutoCAD Map 3D
and with your filter, the contenido field is always different :S

2013/2/1 naish666 <[hidden email]>
When I do the Query with the same filter it shows me differents "contenido"
and not the same "contenido" as in Maestro. I use a table in a
PostgreSQL/PostGIS Database. I have export the table "restauracion" to a shp
file and here you are:
restauracion.zip
<http://osgeo-org.1560.n6.nabble.com/file/n5031441/restauracion.zip>



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/Problem-using-Filter-on-Layer-tp5028966p5031441.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users


_______________________________________________
mapguide-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem using Filter on Layer

naish666
Yes, it is very strange. I have tested on gvSIG and ArcGIS and it is ok, different "contenido" for different points. But on Maestro show the same "contenido" for every Point. See the images:




12