problem with disappearing basemap

10 views
Skip to first unread message

Garey Mills

unread,
May 21, 2015, 5:23:47 PM5/21/15
to opengeop...@googlegroups.com, openge...@elist.tufts.edu
Hi -

     I'm running OGP1 on a Redhat Linux machine, and it has been working perfectly for quite a while now. 

     But today I got a message that it wasn't working. I opened it up (http://gis.lib.berkeley.edu:9081) and the basemap isn't showing up. None of the basemap choices display.

     And there is nothing in the tomcat logs.

     Has anyone had this problem? Has something changed?
     Can you give me some idea how to debug this?


Any help appreciated;

Garey Mills

--
Generate messages about directories that cannot  be
read,  files  that  cannot be opened ... rather than being silent ... 
(from `man du`)

Barnett, Christopher S

unread,
May 21, 2015, 5:42:53 PM5/21/15
to Garey Mills, opengeop...@googlegroups.com, openge...@elist.tufts.edu
Hi Garey,

This has to do with a change in the Google maps javascript API code.

In mapDiv.js, there is a function: 
org.OpenGeoPortal.MapController.prototype.changeBackgroundMap 
This function adds a listener via the Google maps javascript API:
google.maps.event.addListener(bgMap.mapObject, "tilesloaded", function() { //console.log("Tiles loaded"); that.render(that.userDiv); jQuery(".mapClearButtonItemInactive").text("clear previews"); that.userMapAction = true; jQuery(document).trigger("mapReady"); //really should only fire the first time google.maps.event.clearListeners(bgMap.mapObject, "tilesloaded"); jQuery("#geoportalMap").fadeTo("slow", 1); });
For some reason, “tilesloaded” is no longer being called when the first set of tiles is loaded.

You might try manually firing the “tilesloaded” event, like so:

google.maps.event.trigger(bgMap.mapObject, "tilesloaded”);

This isn’t perfect, since the whole point of having the listener is to wait for the tiles to be loaded.
thanks,
Chris

Garey Mills

unread,
May 21, 2015, 5:48:12 PM5/21/15
to opengeop...@googlegroups.com
sorry to be thick, but is there someplace that you would recommend putting the trigger code?

--
You received this message because you are subscribed to the Google Groups "OpenGeoportal Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to opengeoportal-...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
The brain is not where you think.
Me

Barnett, Christopher S

unread,
May 21, 2015, 6:03:29 PM5/21/15
to opengeop...@googlegroups.com

Sorry Garey,

Put the trigger code right after the chunk listed below.

This must be Google update day. My gmail settings in my email client are now causing me problems.

-Chris


Garey Mills

unread,
May 21, 2015, 6:11:12 PM5/21/15
to opengeop...@googlegroups.com
Thanks Chris. That worked. Why is it only affecting OGP1?

Garey


Chris Barnett

unread,
May 21, 2015, 6:39:08 PM5/21/15
to opengeop...@googlegroups.com
Hi Garey,

I’m not totally sure yet. I’m working on a minor update to OGP2 that includes moving to OpenLayers 2.13.1 and am experiencing a similar issue. I’ll let you know when I figure it out!

thanks,
Chris

Chris Barnett

unread,
May 22, 2015, 11:25:03 AM5/22/15
to opengeop...@googlegroups.com
Sorry Garey,

Put the trigger code right after the chunk listed below.

Chris

On May 21, 2015, at 5:47 PM, Garey Mills <garey...@gmail.com> wrote:

Dave Siegel

unread,
May 22, 2015, 11:29:54 AM5/22/15
to opengeop...@googlegroups.com, openge...@elist.tufts.edu
Garey,

I just hit your site (http://gis.lib.berkeley.edu:9081/) and the base map, as well as selected layers are displaying fine for me. Perhaps it could be a simple browser caching issue?

Dave

Inline image 1



D

_________________________
Dave Siegel

--

Garey Mills

unread,
May 22, 2015, 11:41:51 AM5/22/15
to opengeop...@googlegroups.com, openge...@elist.tufts.edu
Thanks Dave. No, Chris was right. I put the line he sent triggering the 'tilesloaded' event into mapDiv.js and everything started working correctly.

Garey
Reply all
Reply to author
Forward
0 new messages