[SAC] [OSGeo] #2083: map content integration not working on osgeo.org
OSGeo
trac_osgeo at osgeo.org
Fri Jan 19 21:29:40 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 robe):
Okay I fixed, the above snippet wasn't complete, was missing a close ) and
had to add the same logic to the currentItem.location section.
https://www.osgeo.org/initiatives/geo-for-all/
I committed changes to this branch
https://git.osgeo.org/gitea/osgeo/wordpress/src/branch/openlayers-fix-
broken-location and deployed.
The diff with the master looks like this.
{{{
@@ -126,6 +126,7 @@
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
}
markers.push(new ol.Feature({
type: 'icon',
@@ -138,7 +139,7 @@
} else if (currentItem.location) {
var lat = parseFloat(currentItem.location.lat);
var lng = parseFloat(currentItem.location.lng);
-
+ if (isNaN(lat) || isNaN(lng) ) { continue }
markers.push(new ol.Feature({
type: 'icon',
geometry: new
ol.geom.Point(convertGoogleMapCordsToOpenLayerCords(lat, lng)),
}}}
I'm going to tag master later as first release we had and then create
another branch that reflects current code. Plugins have been updated etc,
so what is master is not quite what we are running with.
--
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/2083#comment:7>
OSGeo <http://www.osgeo.org/>
OSGeo committee and general foundation issue tracker.
More information about the Sac
mailing list