Google Offset in MGOS 3.1.1

classic Classic list List threaded Threaded
24 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Google Offset in MGOS 3.1.1

GordonL
Reply | Threaded
Open this post in threaded view
|

Re: Google Offset in MGOS 3.1.1

GordonL
This affects all MGOS 3.1.1 sites currently using Google.  just happened
overnight.





--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Google Offset in MGOS 3.1.1

Kajar
Same problem, now it's clear that this is not only  my problem :)
Whats going on with it?

Kajar



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Google Offset in MGOS 3.1.1

GordonL
In reply to this post by GordonL
Solved it:  Google has updated it's API in the past couple of days.  This
offsets the map.

I just had to force it to use the older API:

   
<GoogleScript>https://maps.googleapis.com/maps/api/js?key=AIzaSyD9iypThfjzfCwasdaasdfasdfe_dGs*&amp;v=3.33*</GoogleScript>





--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Google Offset in MGOS 3.1.1

RenoSun
In reply to this post by GordonL
Same here with AIMS 2017, fixed by changing the XML of the fusion from

<GoogleScript>http://maps.google.com/maps/api/js?key=APIKEY&amp;v=weekly&amp;use_slippy=true</GoogleScript>
to

<GoogleScript>http://maps.google.com/maps/api/js?key=APIKEY&amp;v=quarterly&amp;use_slippy=true</GoogleScript>



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Google Offset in MGOS 3.1.1

RenoSun
This post was updated on .
In reply to this post by GordonL
I wonder why we couldn't use the latest version. What did Google Map API
change to cause this offset issue?

https://developers.google.com/maps/documentation/javascript/releases



--
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
Reply | Threaded
Open this post in threaded view
|

Re: Google Offset in MGOS 3.1.1

CBeuk
I also turned to the Google release notes and dint find anything after 3.35 which worked perfectly till last night as well. Glad someone fixed it cause I was busy testing all possible coordinate systems.

On Tue, 13 Nov 2018, 19:37 RenoSun <[hidden email] wrote:
I wonder why we couldn't use the latest version. What did Google Map API
change to cause this offset issue?



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users

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

Re: Google Offset in MGOS 3.1.1

GordonL
In reply to this post by RenoSun
The Monthly may end up changing the API next month and you might have the
same issue.

I haven't seen the change that offsets everything in Google API yet.





--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Google Offset in MGOS 3.1.1

RenoSun
Google Map JS API V3.34 will still be working with MapGuide, but not V3.35.
Yeah, I should set the version to 3.34 for now.

I also sent Google Map API team a feedback, and hope they may fix it at some
point. It works for me once for sending them a request about Google Map API
full screen wasn't working with Bootstrap. The street view pegman was having
some offset issue as well.

Cheers,
Reno



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Google Offset in MGOS 3.1.1

MHerel
OK. Today v3.33 just seems to have dropped off. 3.34 still works but for how
long?

Will there be a MapGuide fix by the time we have to move to v3.35 or newer?



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Google Offset in MGOS 3.1.1

constantini
In reply to this post by RenoSun
I got the same problem with 3.36 and 3.35 and set the version to 3.34 to
continue use.

Has anyone gotten any response from Google about the problem?

Thanks...



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Google Offset in MGOS 3.1.1

RenoSun
Hi,

I don't think they fix it yet, if this is actually a issue should be fixed
by Google Map or Mapguide itself.

I will just use 3.34 for now, and you should send the Google Map API team
regarding to this issue as well. I didn't get any responses from them.

Then, test the newer version they are going to release in the future.
https://developers.google.com/maps/documentation/javascript/releases

Cheers,
Reno



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Google Offset in MGOS 3.1.1

Alec Bell
Going by this link Google Maps changed to azimuthal projection not sure if
that means the api has changed as well.
There's nothing in the release notes for Google Maps API indicating this
change.

https://gis.stackexchange.com/questions/302795/what-is-the-new-projection-for-google-maps-called





--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Google Offset in MGOS 3.1.1

CBeuk
Tried to fiddle with the mapguide fusionSF.js file trying to get the WKT for the World Azimuthal Equidistant projection to work but to no avail.
I set the Projection of my map manually to the WKT value from here: https://epsg.io/54032
Then found that it would try to load a JavaScript projection file from my servers Mapguide location i.e. /mapguide/fusion/templates/mapguide/aqua/defs/EPSG54032.js.
This file obviously didn't exist.
Then when looking through the fusionSF.js file I found a function that allows for web service reference to a projection (Proj4js.loadFromService).
I was trying to reference the following : "http://spatialreference.org/ref/esri/54032/proj4js/".
However, it would always change the "srsAuth" value from esri to epsg and force the URL to be "http://spatialreference.org/ref/epsg/54032/proj4js/" no matter what I tried.

I might just be going about this all wrong thinking this can be "hotfixed" MGOS side or this could help someone with a lot more skill than me in the right direction.
I can't help believe that this is all due to ESRI partnering with Google to support and deliver map solutions.


-----Original Message-----
From: mapguide-users <[hidden email]> On Behalf Of Alec Bell
Sent: 20 February 2019 02:55 AM
To: [hidden email]
Subject: Re: [mapguide-users] Google Offset in MGOS 3.1.1

Going by this link Google Maps changed to azimuthal projection not sure if that means the api has changed as well.
There's nothing in the release notes for Google Maps API indicating this change.

https://gis.stackexchange.com/questions/302795/what-is-the-new-projection-for-google-maps-called





--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users

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

Re: Google Offset in MGOS 3.1.1

andrewd

Good detective work so far - I'd suggest trying to create that EPSG54032.js file manually, in the spot that it's looking for it. This would maybe let you get to the bottom of whether or not it's even possible to hotfix this. 


I can only find one epsg js file on my installation. Here's the contents, in case you don't have any (EPSG42304.js): 


Proj4js.defs["EPSG:42304"]="+title=Atlas of Canada, LCC +proj=lcc +lat_1=49 +lat_2=77 +lat_0=49 +lon_0=-95 +x_0=0 +y_0=0 +ellps=GRS80 +datum=NAD83 +units=m +no_defs";


This looks like a slightly modified version of what you get from the epsg.io proj4js link...my best guess would be that your file would need to look like this:


Proj4js.defs["ESRI:54032"]="+title=World_Azimuthal_Equidistant +proj=aeqd +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs";


Now, note that that's "ESRI:54032", not "EPSG:54032"...that would lend a bit of credence to your theory about ESRI and Google. I have no idea if Mapguide can do ESRI projections, but if that didn't work, I'd consider replacing the "ESRI:54032" with "EPSG:54032". In the WKT, it uses EPSG, so it's not unprecedented. 


Definitely let us know what you find out! 


Andrew


GEMTEC

Andrew DeMerchant

Fredericton, NB
tel: 506.453.1025 x163  /  toll-free: 1.877.243.6832
mobile: 506.470.2007 /  fax: 506.453.9470



From: mapguide-users <[hidden email]> on behalf of Charl Jameson Beukes <[hidden email]>
Sent: Wednesday, February 20, 2019 8:22:03 AM
To: 'MapGuide Users Mail List'
Subject: Re: [mapguide-users] Google Offset in MGOS 3.1.1
 
Tried to fiddle with the mapguide fusionSF.js file trying to get the WKT for the World Azimuthal Equidistant projection to work but to no avail.
I set the Projection of my map manually to the WKT value from here: https://epsg.io/54032
Then found that it would try to load a JavaScript projection file from my servers Mapguide location i.e. /mapguide/fusion/templates/mapguide/aqua/defs/EPSG54032.js.
This file obviously didn't exist.
Then when looking through the fusionSF.js file I found a function that allows for web service reference to a projection (Proj4js.loadFromService).
I was trying to reference the following : "http://spatialreference.org/ref/esri/54032/proj4js/".
However, it would always change the "srsAuth" value from esri to epsg and force the URL to be "http://spatialreference.org/ref/epsg/54032/proj4js/" no matter what I tried.

I might just be going about this all wrong thinking this can be "hotfixed" MGOS side or this could help someone with a lot more skill than me in the right direction.
I can't help believe that this is all due to ESRI partnering with Google to support and deliver map solutions.


-----Original Message-----
From: mapguide-users <[hidden email]> On Behalf Of Alec Bell
Sent: 20 February 2019 02:55 AM
To: [hidden email]
Subject: Re: [mapguide-users] Google Offset in MGOS 3.1.1

Going by this link Google Maps changed to azimuthal projection not sure if that means the api has changed as well.
There's nothing in the release notes for Google Maps API indicating this change.

https://gis.stackexchange.com/questions/302795/what-is-the-new-projection-for-google-maps-called





--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users

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

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

Re: Google Offset in MGOS 3.1.1

lbressan
Hi, I tried to use a version of Openlayers without changes (2.13.1) instead
of using Fusion. In this way everything works correctly. If I try to insert
the patch that I find in the following page (created to solve other problems
with the ApiKey), however, the problem reoccurs.

http://osgeo-org.1560.x6.nabble.com/fusion-error-searchStr-test-is-not-a-function-td5360383.html
It makes me think that the problem is related to the patch created earlier
to solve other problems with the Google ApiKey. Or I think that Fusion is
missing something that is present in the version of Openlayers without
changes.




--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Google Offset in MGOS 3.1.1

mayoAbi_GIS
This post was updated on .
Ok, I understand where the problem is!!
Inside the Fusion (compressed or no) there is the same function that was
present in the patch of your post. After removing the following part of code
from Fusion, all started working properly!!

Part of code removed from fusion:

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;
};

Or in the Fusion compressed version:

Array.prototype.find=function(a){var
b=null;for(i=0;i<this.length;i++)"function"==typeof
a?a.test(this[i])&&(b||(b=[]),b.push(i)):this[i]===a&&(b||(b=[]),b.push(i));return
b};

We must also remove the patch mentioned in your post.

I don't know exactly what that function do. But it is the cause of our
problems!!

Bye.





--
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
Reply | Threaded
Open this post in threaded view
|

Re: Google Offset in MGOS 3.1.1

Alec Bell
This post was updated on .
Hi from memory the original issue was caused by Google Maps API implementing
the Array.prototype.find as it became standard in ECMA 2015.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/find

Commenting out the function at the time resolved the issue but then caused
errors with making selections using shift-click.

To get around that, the Array.prototype.find function (in MapGuide.js) was
reinstated and a check added for the test function.

Seems Google may have changed the array.prototype.find function since then
which is causing the alignment issue to come back?

Commenting out the function in MapGuide.js resolves the issue as you have
found but reintroduced the selection issue and possible other(s) that
haven't been found in testing yet?

Searching through the FusionSF the only reference I see to the find method of Array.prototype is in the merge function in MapGuide.js:

var prevSelFeatureIndexes = currentLayer.featIds.find(prevSelLayer.featIds[j]);

So a quick hack to fix I tried was changing the find definition to Array.prototype.find2 and method call in merge function to find2 which resolved the shift-click error I was getting & the alignment issue.



--
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
Reply | Threaded
Open this post in threaded view
|

Re: Google Offset in MGOS 3.1.1

Jackie Ng
In reply to this post by mayoAbi_GIS
Really? This function again?

It seems every breakage of Google Maps in Fusion revolves around this
function.

If removing this function indeed fixes the issue, then I'll get these
changes into Fusion pronto. I'm starting the 3.1.2 release cycle soon, so if
this is indeed the fix, I want it in asap.

- Jackie



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
Reply | Threaded
Open this post in threaded view
|

Re: Google Offset in MGOS 3.1.1

mayoAbi_GIS
Hi, as said by Alec, without this function the selection with shift-click
does not work.
The solution proposed by Alec to change the name in the fusion to the
function (from find to find2) worked. In this way both basemaps and
shift-click selection work.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/MapGuide-Users-f4182607.html
_______________________________________________
mapguide-users mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/mapguide-users
12