1 (edited by TonyP 02-02-2016 15:44:48)

Topic: Maps not initialising

The map is initially blank until I switch to an alternative layer. Then all seems fine. Now by default switching will turn on the Google Aerial. So when I zoom in it auto switches to the Google street map. The second problem I'm guessing is where there is a simple toggle rather than it checking to see if the aerial is loaded and it switches to the wrong one. That I guess I can live with if the first problem didn't exist.

What might cause the initial map from not loading? Has anyone seen this behaviour before?

Data Manger
Somerset Environmental Records Centre

2

Re: Maps not initialising

Hi

The problem you are describing with a map initially blank sounds like one caused by changes made to the Google Maps API some months ago. If it is then there there is a fix available from the Indicia code repository.

If your work is on a production site then you may like to just replace the OpenLayers.js files with those available from https://github.com/Indicia-Team/media/tree/develop/js

If you are working on a development site then you might do well to update the iform module, client_helpers and media in their entirety from the develop branches in the repository.

Jim Bacon.

3

Re: Maps not initialising

Hi Tony,

The initial Google map tiles are requested separately once the map object is initialised.

Check the network tab in your browser developer's tools to ensure the request is being sent by your page and that a reply is being received (you want a 200 response code - see my screenshot attached).

Best to turn the network tab on and then refresh the page. You will see lots of entries and somewhere at the bottom will be the google map tile requests

p.s. in Chrome the F12 key will open the developer tools

If you are getting an entry in red text the request is failing for some reason and there should be some information. If you are on a network that requires proxy authentication the proxy server could be squashing your requests for instance.

Post's attachments

google map tile request - 200 response.jpg 388.75 kb, 1 downloads since 2016-02-02 

You don't have the permssions to download the attachments of this post.

4

Re: Maps not initialising

Thanks guys. It was the js layer code out of date.

Data Manger
Somerset Environmental Records Centre