[SAC] [OSGeo] #2083: map content integration not working on osgeo.org
OSGeo
trac_osgeo at osgeo.org
Fri Jan 19 16:51:49 PST 2018
#2083: map content integration not working on osgeo.org
---------------------+--------------------------------------
Reporter: jive | Owner: webcom@…
Type: task | Status: new
Priority: normal | Milestone: Website rebranding 2017
Component: WebSite | Resolution:
Keywords: |
---------------------+--------------------------------------
Comment (by jive):
That is fine I cut and pasted it it out of the git repo to share it here
(since the repo is private and open layers team was unable to see it).
Here is a summary of email exchange:
----
Jody:
Found it - https://git.osgeo.org/gitea/osgeo/wordpress/src/branch/master
/wp-content/themes/roots/templates/openstreetmap.php
----
Andreas:
That source code did not help, but I found the issue. It's a data
problem. There is a lab without a location:
labTitle: "Comunidad gvSIG Uruguay"
locationTitle: "Montevideo"
pageUrl: "https://www.osgeo.org/geo-for-all-labs/comunidad-gvsig-uruguay/"
lat and lng are null, but any item added to the map as feature
requires either a geometry with valid coordinates, or no geometry at
all.
The problem is in the updateMarkers function. It should start with
var markers = [];
for (var i = 0; i < items.length; i++) {
var currentItem = items[i];
if (currentItem.locations) {
for (var j = 0; j < currentItem.locations.length; j++)
{
var lat =
parseFloat(currentItem.locations[j].lat);
var lng =
parseFloat(currentItem.locations[j].lng);
if (isNaN(lat) || isNaN(lng) { continue }
The last line is the one that needs to be added.
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2083#comment:4>
OSGeo <http://www.osgeo.org/>
OSGeo committee and general foundation issue tracker.
More information about the Sac
mailing list