Looking further into it, the error appears to be
var ll = new OpenLayers.LonLat(,).transform(map_1.displayProjection, map_1.projection);
“Unexpected ‘,’.”
Well, I’ve partially solved it 🙂
In osm-oljs2.php
change
From:
$Layer .= 'var ll = new OpenLayers.LonLat('.$a_MarkerArray[$row][lon].','.$a_MarkerArray[
To:
$Layer .= 'var ll = new OpenLayers.LonLat('.$a_MarkerArray[$row][lon].'\',\''.$a_MarkerArray[
I’m now getting a different set of errors, but at least the map is displaying!
Plugin Author
MiKa
(@photoweblog)
Hi edent,
could you post the osm shortcode of your map to reproduce the error?
Thx, photoweblog
Sorry for the delay. The OSM shortcode is
[osm_map lat="51.745" lon="-1.262" zoom="10" width="600" height="450" marker="51.75353,-1.25342" marker_name="wpttemp-green.png" import="exif_m"]
This generates the code
var ll = new OpenLayers.LonLat(,).transform(map_1.displayProjection, map_1.projection);var feature = new OpenLayers.Feature(MarkerLayer, ll, data);feature.closeBox = true;feature.popupClass = OpenLayers.Class(OpenLayers.Popup.FramedCloud, {"autoSize": true, minSize: new OpenLayers.Size(310,227),"keepInMap": true } );feature.data.popupContentHTML = "<img width=\"290\" height=\"217\" src=\"http://shkspr.mobi/blog/wp-content/uploads/2014/06/IMG_20140625_194228-290x217.jpg\" class=\"attachment-thumbnail\" alt=\"IMG_20140625_194228\" data-attachment-id=\"10599\" data-orig-file=\"http://shkspr.mobi/blog/wp-content/uploads/2014/06/IMG_20140625_194228.jpg\" data-orig-size=\"4128,3096\" data-comments-opened=\"1\" data-image-meta=\"{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":""}\" data-image-title=\"IMG_20140625_194228\" data-image-description=\"\" data-medium-file=\"http://shkspr.mobi/blog/wp-content/uploads/2014/06/IMG_20140625_194228-300x225.jpg\" data-large-file=\"http://shkspr.mobi/blog/wp-content/uploads/2014/06/IMG_20140625_194228-1024x768.jpg\" />";feature.data.overflow = "hidden";var marker = new OpenLayers.Marker(ll,data.icon.clone());marker.feature = feature;marker.events.register("mousedown", feature, osm_map_1MarkerPopUpClick);MarkerLayer.addMarker(marker);map_1.addPopup(feature.createPopup(feature.closeBox));var MarkerLayer = new OpenLayers.Layer.Markers("Marker");map_1.addLayer(MarkerLayer);