Re: [mapguide-users] fusion error - searchStr.test is not a function

2018-04-05 Thread sebafr
That's a good discussion, Jackie!
I think 'test' is a method of the searchstr object that derives from
Array.prototype.find.
Testing, after Gordon's tips, on handling the versions in google api, I
noticed that the latest version is assumed whenever no version is reported
in the google api call. The last version in development is 3.32.8 and this
searchstr.temp function does not exist in this context and for some reason,
in the load of the google map, this routine that runs the searchStr.temp is
executed and therefore gives the commented error. When we use any other
version before that, in the map load, it simply does not pass through these
lines in fusionSF.js, that is, it does not give an error, but it does not
mean that it exists, but that simply in the previous versions of google api
this routine is not called. Now why is running this now, only the google
team could respond.
Best Regards
Sebafr



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] fusion error - searchStr.test is not a function

2018-04-05 Thread sebafr
Many thanks for your response GordonL!

It worked, and now everything makes sense: google was the problem !!!

I change as you said, and the version (v parameter) was the solution.

The google api recommends putting only the main version and letting them
choose the last released minor version for us, there I put only: v=3 and
everything worked perfect.

Thanks again for your time.
Sebafr



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

[mapguide-users] fusion error - searchStr.test is not a function

2018-04-04 Thread sebafr

Today, all off ours mapguide servers (5 different places, 2 different
versions) happened this error:

fusionSF.js:132996 Uncaught TypeError: searchStr.test is not a function

Looking at fusionSF,js i found this code:

...
Array.prototype.find = function(searchStr) {
  var returnArray = null;
  for (i=0; i<this.length; i++) {
if (typeof(searchStr) == 'function') {
  if (searchStr.test(this[i])) {
if (!returnArray) { returnArray = [] }
returnArray.push(i);
  }
} else {
  if (this[i]===searchStr) {
if (!returnArray) { returnArray = [] }
returnArray.push(i);
  }
}
  }
  return returnArray;
};


Somebody knows whats happens ? 

I comment the lines below and everything works again, apparently well, but I
wanted to know why?

...
Array.prototype.find = function(searchStr) {
  var returnArray = null;
  for (i=0; i<this.length; i++) {
if (typeof(searchStr) == 'function') {
  //if (searchStr.test(this[i])) {
  //  if (!returnArray) { returnArray = [] }
  //  returnArray.push(i);
  //}
} else {
  if (this[i]===searchStr) {
if (!returnArray) { returnArray = [] }
returnArray.push(i);
  }
}
  }
  return returnArray;
};

thanks in advance
sebafr



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

[mapguide-users] new mapguide project on linux ubuntu

2017-02-02 Thread sebafr
We are conducting initial studies for a project with Mapguide on a ubuntu
Linux. We have a project running linux 12 with 32 bits, mapguide 2.6 and
Postgresql 9.1 and now we would like to update it all and the first scenario
was to use linux 14 with 64 bits and Mapguide 3.1 and Postgresql 9.4.
Our current provider only supports 64-bit linux (14 or 16) and did not
succeed in the initial tests. Has anyone ever used similar architecture?

Thanks,
Seba



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/new-mapguide-project-on-linux-ubuntu-tp5305975.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] Mapguide 3.0 Postgre view problem

2016-12-08 Thread sebafr
solution 1: (for programers people !) note: '' is two Single quotation marks 

guide_generic_search_table('CASE  when owner = 1 THEN ''one''  when  owner =
2 then ''TWO'' END ', 'piping.pipe', 'pipe.dp_oid=' || symg.dp_oid) AS owner

solution 2: (for normal people!)

create a view vw_pipe with the field CASE  when owner = 1 THEN 'one'  when 
owner = 2 then 'TWO' END and use then on fuction:

guide_generic_search_table('field_case', 'piping.vw_pipe', 'pipe.dp_oid=' ||
symg.dp_oid) AS owner





--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Mapguide-3-0-Postgre-view-problem-tp5298765p5299224.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] Mapguide 3.0 Postgre view problem

2016-12-08 Thread sebafr
Hi Kajar,
Yes for both issues.
You have to keep in mind that the function requires 3 parameters
1) return field, which can be any valid expression, with when, other
functions etc. But remember only one field (or expression) per function call
2) a table name, but can be a view for example
3) a filter expression, which can combine as many boolean expressions as
necessary. Here the most important point, this expression should return only
1 line, or none. If you return more than one you will have an error of
exception. The trick here is to combine the expression with the values you
have from your main table. Knowing how to do this, the sky is the limit !!!
;-)
Abs
Seba



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Mapguide-3-0-Postgre-view-problem-tp5298765p5299198.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] Mapguide 3.0 Postgre view problem

2016-12-06 Thread sebafr
You should update the layer (recreate if need) and mapguide (if you need to
stop and restart the service)
Try and see if it works:
1) Try to create another view only from the main table (no join or
function), remember to put the primary key in the view
2) Create a new layer for this new view
3) test the mapguide selection
4) If it works, please create a new layer for the view with the function and
test again, remembering to include the primary key.
The use of functions is not detected by mapguide as a join, so it should
work!



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Mapguide-3-0-Postgre-view-problem-tp5298765p5298852.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] Mapguide 3.0 Postgre view problem

2016-12-06 Thread sebafr
Junction of two table for mapguide is already complex (a little ;-))

First you need to create this function in your postgres, then when creating
the view you will only use a table in the "from" getting the second table or
how many more are needed for use in the function.

View example:

Create view myview as
Select cp1, cp2, guide_generic_search_table ('cp2_second_table',
'name_second_table', 'cp1_second_table_key =' || cp3_fk) as mypesq1 from
mytable

If you need help, please forward a your generic model view



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Mapguide-3-0-Postgre-view-problem-tp5298765p5298817.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] Mapguide 3.0 Postgre view problem

2016-12-06 Thread sebafr
Hi,

I had the same problem here and really complex views do not work in the
guide
One solution is to use a function to get fields from the second table

CREATE OR REPLACE FUNCTION public.guide_generic_search_table(vfield
character varying, vNameTable character varying, vfilter character varying)
  RETURNS character varying AS
   $BODY$
DECLARE
v_out character varying;
cSQL character varying;
BEGIN
   cSQL := 'SELECT '||vfield||' FROM '||vNameTable||' WHERE '||vfilter 
||
';';
   EXECUTE cSQL INTO v_out;
   return (v_out);
END;
   $BODY$
  LANGUAGE plpgsql 

This way you cheat the mapguide, but it works!

[]s





--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Mapguide-3-0-Postgre-view-problem-tp5298765p5298792.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users

Re: [mapguide-users] Google Layers Not Showing - Fix to Open Layers

2016-06-07 Thread sebafr
I have problem with google layers on mapguide.
The big problem was everthing look fine when use SATELLITE option
(G_SATELLITE_MAP), but if use another option (G_HYBRID_MAP or G_PHYSICAL_MAP
etc) the map hangs and show nothing as base layer.
This post solved this. Thanks a lot



--
View this message in context: 
http://osgeo-org.1560.x6.nabble.com/Google-Layers-Not-Showing-Fix-to-Open-Layers-tp5268375p5270395.html
Sent from the MapGuide Users mailing list archive at Nabble.com.
___
mapguide-users mailing list
mapguide-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapguide-users