Hi,
I have noticed that on pages where no map is integrated, the CSS and JS from the plugin is still loaded in the head.
Is there a possibility to load the said data only on the corresponding pages where a map is integrated?
Any tips would be appreciated
]]>The Marker text popup is blank when I click on the marker. I only have one word in the Marker Text box which is ‘Venturers’ no <b>, <i>, or <br>
The map marker shows up properly, I am just not getting any text.
Here is the Shortcode being used
[osm_map_v3 map_center=”44.2695,-76.5799″ zoom=”15.0″ width=”95%” height=”450″ post_markers=”1″ ]
I don’t know if this is a limitation of the map plugin or the theme. I know enough about WordPress to be dangerous ??
At the bottom of the page I would like to have a full width map. I’ve tried shortcode on its own, and placing it inside a cover set to ‘full width’ but the maps stays the same size.
I’ve tried using custom CSS but the best I’ve been able to pull off is to move the map from side to side by playing with the margins, again the map doesn’t get any wider.
This isn’t a huge deal, it’s just more in line with the original design.
Is it possible to change the width of the map?
Thanks
]]>The following CSS from osm.map.css line 87 breaks some of the Flatsome theme look in the last 2 versions… working fine before.
#li.active a {
border: 1px solid #D8D8D8;
border-bottom-color: rgb(216, 216, 216);
border-bottom-style: solid;
border-bottom-width: 1px;
background: #FFFFFF;
border-bottom: none;
color: black;
}
Since the last Update there occurs a problem for sites that run in debug mode.
The problem:
Every time the website is loaded osm creates an error messages (see details at the end of this page):
... Called osm_restrict_mime_types filter.
... Allowed MIME types after modification: Array
https://plugintests.com/plugins/wporg/osm/latest
In our case it filled up the debug-logfile with over 80MB Logdata within 8 days! That means that all local services, that run on the dashboard that help to show the logfile will create critical errors since the logfile is too big. Important other log messages are almost unvisible since it is totaly spamed.
]]>Hi there,
In our small WooCommerce online shop (using the Bridge theme by qcode), I realised that the product description was placed in a very narrow column, and after some investigation I found out that it is due to some CSS code in osm/css/osm_map_v3.css on line 53:
.toggle {
width: 100px;
}
The issue is that the 100px width affects the shop description. By commenting this line out, the problem got solved. May be this hint is useful for you to change the code to avoid some interference.
Side note: We keep the accordion with the product descirption always open by using this modification.
]]>Hello,
After working flawlessly for a year or so, some changes (probably introduced in recent versions) are now breaking my contact page (getting the dreadful “Whoops, looks like something went wrong.”)
I’ve been following recent resolutions, but even with the latest patch I cannot display anymore multiple maps on a page. If I keep only one map, no problem whatsoever. At 2 maps, the page crashes and I see in my PHP logs:
ErrorException: Constant DEFAULT_MAP_WIDTH already defined in /var/www/example.com/wordpress/wp-content/plugins/osm/osm_map_v3/osm-sc-osm_map_v3.php:18
]]>
Hi,
following scene: adding a new page and paste the script from the tool for filtered category:
[osm_map_v3 map_center=”57.3696,17.8012″ zoom=”5.3″ width=”100%” height=”450″ tagged_type=”post” marker_name=”mic_black_pinother_02.png” tagged_filter=”xyz” map_border=”thin solid grey” tagged_color=”black”]?
If you have a mistake in the filter and the category “xyz” does not exist, you get error messages from the plugin on the page. It gives you a hint, that a category not exists. But not concrete the name “xyz”.
Problem is, that the page in WordPress crashes and is not more editable afterwords.
So you have to know, which was the wrong name you put in. Add a category with the wrong name “xyz”. Than you can edit the page again and correct the category. Then delete the wrong category “xyz”.
Not a very cool error handling ??
Why don’t you show just the map without any location markers?
Hi,
WordPress 6.4.3, OSM 6.1.0 (but pbm already existed on previous version).
Even though it says “Le plugin OSM a ajouté : GPX / KML” in the media library, attempting to upload a kml file returns a “test.kml Désolé, vous n’avez pas l’autorisation de téléverser ce type de fichier.” (ie you don’t have the right to upload such a file).
We did a Insta-WP install of a fresh WP with OSM and we do see the same exact problem … of course there is a way to allow upload of kml files (using functions.php, a few lines of code) but I guess it would be better if OSM was really able to allow these files instead of just saying it did allow them ??
Thanks
]]>The addin and website has been working perfectly for 3 years. After your last update we now get an error. We use a map displaying a set of geotagged posts. They suddenly no longer work. We have not changed anything (except your addin auto updated 10 hours ago).
We now get the messages:
[OSM-Plugin-Error]:[OL3_createMarkerList]: No posts/pages with geotag found!
[OSM-Plugin-Error]:CustomField: OSM_geo_data
[OSM-Plugin-Error]:PostType: post
[OSM-Plugin-Error]:Tagged_Filter: Trail
]]>Since 6.0.5 (6.0.4?) I got these errors on the setting page ofvthe plugin
[OSM-Plugin-Error]:e_nonce_verification_failed
[OSM-Plugin-Error]:Nicht alle Optionen konnten gespeichert werden!
Maps of all locations with a category are empty.
Reinstall did not help.
]]>Fatal error: Uncaught Error: Undefined constant “Osm_GOOGLE_LibraryLocation” in osm.php on line 269
Also there is a PHP 8 error Creation of dynamic property Osm::$localizionName is deprecated in /plugins/osm/osm.php on line 282
Please can you check and fix this
]]>Getting security warnings. Will there be an update?
]]>Hello,
I would like to create a map with more than 3000 POI I have on a CSV file.
Is there a way to add them easily ?
Thanks
]]>When will be this patched??
]]>good day dear experts – want ot add a layer on wordpress – widget. question.- do i need to have a fully fledged open-streetmap plugin if i want to do so – or is it suffice – if i add such a resultpage – in a apropriate formate!?
note: this request can be runned in Overpass-turbo
cf https://overpass-turbo.eu/?Q=%5Bout%3Ajson%5D%5Btimeout%3A250%5D%3B%7B%7BgeocodeArea%3ADeutschland%7D%7D-%3E.searchArea%3Bnwr%5Bamenity%3Dschool%5D%5B!%22isced%3Alevel%22%5D(area.searchArea)%3Bout%20geom%3B&C=51.55658;12.44202;7&R
[out:json][timeout:250];
{{geocodeArea:Deutschland}}->.searchArea;
nwr[amenity=school][!"isced:level"](area.searchArea);
out geom;
]]>
Hello,
Thanks for this plugin, but when I follow this guide. the map doesn’t show right position although I just change the latlong only. Your example : 17.130,49.977,0, and I input like this : -6.175247,106.8270488
I don’t know what wrong.
Thanks.
]]>can we create a wordpress-plugin that offers the output of the following data …:the data of a a Neaby-search:
Can we create a quewry that shows up all the schools that are in the near – in other words
example: what i am after. how to create a request to find all the schools – in the area of – let us say munich -in a radius of 10 km for example!?
eg like so: first of all see the intened osm – nearby-search that runs against the overpass-Turbo.eu -API – the idea of a “Nearby Schools Widget”
a output that shows all the schools around a certain point – or in other words; all in Munich – in a area /(radius) of let us say 10 kilometers can we create a query that works on Overpass-turbo.eu
[out:csv(::id,::type,::lon,::lat,amenity,name,"addr:postcode","addr:city","addr:street","addr:housenumber","contact:website",website,"contact:email")]
[timeout:600];
area[name="München"];
nwr(area)[name="Marienplatz"];
nwr"amenity"="school";
out center;
it gives back the results
@id @type @lon @lat amenity name addr:postcode addr:city addr:street addr:housenumber contact:website website contact:email
312793352 node 11.5815046 48.1322045 school Schulverbund München 80469 München Kohlstra?e 5 https://www.schulverbund.de/
703266518 node 11.5746643 48.1387135 school EAM School of International Business https://eam-muenchen.com/
1096318121 node 11.5827303 48.1368214 school Otto-Falckenberg-Schule 80539 München Stollbergstra?e 7a https://www.otto-falckenberg-schule.de/
1096318127 node 11.5822067 48.1376239 school Otto-Falckenberg-Schule 80539 München Falckenbergstra?e 2 https://www.otto-falckenberg-schule.de/
1142514805 node 11.5665710 48.1353750 school Evangelisches Bildungszentrum 80331 München Herzog-Wilhelm-Stra?e 24 https://www.stadtakademie-muenchen.de/ [email protected]
1576527684 node 11.5728245 48.1336093 school Theresia-Gerhardinger-Grundschule am Anger https://gs-am-anger.de/
1576528339 node 11.5721671 48.1333479 school Theresia-Gerhardinger-Gymnasium am Anger https://www.tggaa.de/
2493656150 node 11.5814603 48.1366835 school F?rderschule an der Herrnstra?e 80539 München Herrnstra?e 21 https://stadt.muenchen.de/service/info/sonderpaedagogisches-foerderzentrum-muenchen-mitte-2-herrnstr-21/1060084/
2654727020 node 11.5812823 48.1365482 school Grundschule an der Herrnstra?e
Create the WordPress Plugin Structure: Set up the basic structure of your WordPress plugin, including a main PHP file and any additional files or folders you may need.
Register the Widget: Define a custom widget class that extends the WP_Widget class provided by WordPress.
Implement the Widget Logic: Within your custom widget class, implement the logic to retrieve data from the Overpass API and format it for display.
Display the Widget: Register a callback function to output the widget content, including any HTML markup necessary to display the data.
Here’s a basic approach of the intended steps:
<??php
/*
Plugin Name: osm Nearby Schools Widget
Description: Widget to display nearby schools using Overpass API.
Version: 0.9
Author: osm-fan
*/
// Step 2: well - first of all - we ought to register the Widget propperly
class Nearby_Schools_Widget extends WP_Widget {
// Constructor
public function __construct() {
parent::__construct(
'nearby_schools_widget', // Base ID
'Nearby Schools Widget', // Name
array( 'description' => 'Displays nearby schools using Overpass API' ) // Args
);
}
// Step 4: we ought to display the Widget
public function widget( $args, $instance ) {
// Widget output
echo $args['before_widget'];
echo $args['before_title'] . 'Nearby Schools' . $args['after_title'];
echo '<ul>';
// Step 3: Implement the Widget Logic
$schools = $this->get_nearby_schools();
foreach ($schools as $school) {
echo '<li>' . $school->name . '</li>';
}
echo '</ul>';
echo $args['after_widget'];
}
// Step 3: here we implement the Widget Logic
private function get_nearby_schools() {
$url = 'https://overpass-api.de/api/interpreter';
$data = array(
'data' => '[out:json][timeout:25];(node["amenity"="school"](around:10000,48.1351,11.5820););out;',
);
$response = wp_remote_post( $url, array(
'body' => $data,
) );
if ( is_wp_error( $response ) ) {
return array();
}
$body = wp_remote_retrieve_body( $response );
$schools = json_decode( $body );
return $schools->elements;
}
<??php
/*
Plugin Name: osm Nearby Schools Widget
Description: Widget to display nearby schools using Overpass API.
Version: 0.9
Author: osm-fan
*/
// Step 2: well - first of all - we ought to register the Widget propperly
class Nearby_Schools_Widget extends WP_Widget {
// Constructor
public function __construct() {
parent::__construct(
'nearby_schools_widget', // Base ID
'Nearby Schools Widget', // Name
array( 'description' => 'Displays nearby schools using Overpass API' ) // Args
);
}
// Step 4: we ought to display the Widget
public function widget( $args, $instance ) {
// Widget output
echo $args['before_widget'];
echo $args['before_title'] . 'Nearby Schools' . $args['after_title'];
echo '<ul>';
// Step 3: Implement the Widget Logic
$schools = $this->get_nearby_schools();
foreach ($schools as $school) {
echo '<li>' . $school->name . '</li>';
}
echo '</ul>';
echo $args['after_widget'];
}
// Step 3: here we implement the Widget Logic
private function get_nearby_schools() {
$url = 'https://overpass-api.de/api/interpreter';
$data = array(
'data' => '[out:json][timeout:25];(node["amenity"="school"](around:10000,48.1351,11.5820););out;',
);
$response = wp_remote_post( $url, array(
'body' => $data,
) );
if ( is_wp_error( $response ) ) {
return array();
}
$body = wp_remote_retrieve_body( $response );
$schools = json_decode( $body );
return $schools->elements;
}
}// Step 2: Register the Widgetfunction register_nearby_schools_widget() {register_widget( 'Nearby_Schools_Widget' );}add_action( 'widgets_init', 'register_nearby_schools_widget' );
This code sets up a WordPress plugin that creates a widget called “OSM-Nearby Schools Widget”. Well the widget retrieves nearby schools using Overpass API within a 10km radius of Munich’s coordinates (48.1351 latitude, 11.5820 longitude), and displays them in an unordered list.
Well we may need to adjust the coordinates and then run it against the Overpass API query to fit even more specific requirements. What do you say!? Do you think that wen need to have to add even more osm-specific things and ideas !?
]]>Hello,
Any chance to get a fix on this 8 months old XSS issue :
https://wpscan.com/vulnerability/1df3c17c-990d-4074-b1d5-b26da880d88e/
Thanks in advance.
]]>I would like to hide a OSM-map inside a standard wordpress Details block
Pasting the shortcode inside the block brakes the map to be shown in the expandes state. Is there any solution for that?
Thank you for your work
]]>Shortcode:
[osm_map_v3 map_center=”52.8940,5.3832″ zoom=”10.0″ width=”100%” height=”450″ file_list=”../../../../wp-content/uploads/Toerns/9-2023/Navionics_export_16.9.2023.kml,../../../../wp-content/uploads/Toerns/9-2023/Navionics_export_17.9.2023.kml,../../../../wp-content/uploads/Toerns/9-2023/Navionics_export_18.9.2023.kml” type=”OpenSeaMap” file_color_list=”red,yellow,black” control=”fullscreen,scaleline” file_title=”16.9.2023,17.9.2023,18.9.2023″ file_select_box=”one”]
my problem is that all 3 tracks shown in yellow.
where is the error?
]]>Hi Mika, sorry if my question already got an aswer, but I couldn’t find it.
I need to switch base maps under my bunch of gpx, e.g. from opencyclemap to opencyclemap-transport for a quick preview of train stations. I can’t find in new versions of your plugin a parameter to add in the shortcode. What I’d like to have is something similar to
https://wp-osm-plugin.hyumika.com/deprecated-ol-2-part-2/
that has a command on top-right to schitch base maps.
Is it possible or it was taken away for good reasons?
Thanks a lot, Fede.
]]>Hello,
It seems the CSRF is always available in your plugin. Do you have any time frame when it will be secured ?
https://patchstack.com/database/vulnerability/osm/wordpress-osm-openstreetmap-plugin-6-0-cross-site-request-forgery-csrf-vulnerability
Regards
]]>Hi, I got a problem with a map included in a page, that is supposed to show the line from a kml-file. When I see the page in preview everything looks fine, but when published, the map does not show the lines anymore. The code I use is the following (in brackets, of course):
osm_map_v3 map_center=”autolat,autolon” zoom=”autozoom” width=”100%” height=”450″ file_list=”../../../../wp-content/uploads/2023/tracks/route_MyRout_2023-11-02.kml” type=”OpenSeaMap” file_color_list=”red” control=”fullscreen,scaleline” file_title=”From a to b”
Is there anything wrong? Is there a known bug (I haven’t seen anything related)
Thanks for your help,
Bodo
Hello Mika
I would like to use your plugin with Maptiler (I have a key) (for topographic maps in French).
Can you add this card?
Thanks in advance !
Jean-Louis Coquin
https://cavaliers23.fr/caucase2023/index.php/2023/07/30/1072/
Hi,
I’ve created a map, it shows no problem on desktop, but if I look at the page on a mobile, the map is blank.
Could you let me know if I missed a configuration.
Thanks
Please can you tell me how to fix this: Wordfence found the following new issues on my website
Critical Problems:
* The Plugin “OSM” has a security vulnerability.
Vulnerability Severity: 6.4/10.0 (Medium)?Vulnerability Information
https://www.ads-software.com/plugins/osm/#developers
hi MiKa
first of all – many thanks for bringing the great map to the WP – Community.
i have a question – can we make some thing like this
see the base-dataset: here – with map and corresponding table
https://hub.arcgis.com/datasets/esri-de-content::schulen-hamburg/explore?locati
table
https://imgur.com/BQI3dcO
see the digitale netzwerkkarte – a interesting thing – with various views and options to the dataset – to visualize the data of certain schools
]]>Hi,
it seems this plugin is not updated for a long time. Any plan to maintain it?
My webhost security sent me this on email:
“Cross-Site Request Forgery (CSRF) ?r en attack som tvingar en slutanv?ndare att utf?ra o?nskade ?tg?rder i en webbapplikation d?r de som b?st autentiseras.
Se hela Patchstack-rapporten“
something about a security risk – CSRF, and they includea report on this as linked above. Any idea if you can fix this?
Best regards,
Flamuren
]]>It can be tedious to zoom all the way into the map and click on a specific region. Is there a way to just input the geotag as a lat/long string?
]]>