Versions

Leaflet.fwaction (2014-04-26) (Downloaded 242 times)

Contains:

  • Leaflet (item-action) - v. 0.3
  • LeafletMarker (action) - v. 0.2

Compatible: Pro 5.5 and Pro 6

Leaflet.fwaction (2014-04-09) (Downloaded 3 times)

Contains:

  • Leaflet (item-action) - v. 0.2
  • LeafletMarker (action) - v. 0.2

Compatible: Pro 5.5 and Pro 6

Author: Walter Davis

map

This Action allows you to use the Open Street Map service wherever you might use Google Maps. The resulting map is pleasantly-colored, and is very mobile-friendly. It works well in flexible or responsive layouts, too.

To use, draw or insert an HTML box where the map should appear, and apply the Leaflet Action to that box. If you know the latitude/longitude that you would like to center the map on, you may enter it directly, or you can use the address lookup service to find it. Zoom goes from 1 to 18, with illegal values ignored.

To add markers to the map, use the included Leaflet Marker Action. This is a “draw it on the page” Action, accessible from the Action tool in the application toolbar. The marker element may be drawn anywhere you like on the page, the resulting HTML will be removed anyway.

Choose which map it belongs to (you may have multiple maps, or multiple markers per map).

Use the address/latitude/longitude interface fields to enter the location of the pin, then enter the text you would like to see on the marker tooltip. If you want to split the text across multiple lines, just add <br> tags where needed.

6 Comments

Can the wheel scroll zoom function be disabled as in Google maps ? - Which uses "wheelscroll:false"

Richard

As a refugee from Google Maps (not happy about giving credit card details to the big G) this looks an ideal replacement, especially as I love OpenStreetMap and am a contributor.

I've had a try running this action (running FreewayPro 7.1.3 but can't get it to accept any address or Long/Lat details. Is there a guide for what the action expects to receive? I'm in the UK so have tried postal (number/street/town) and postcodes plus N50º W005º type Long/Lat numbers but get an error box every time. Error underlines in red: "location=eval(location.toString())[0];" as near as I can make out (very small type)

Thanks for any response.

Try using https://nominatum.openstreetmap.org to calculate these. They need to be in the format 39.9604402,-75.1597701.

Walter

Walter, thanks for responding so quickly. I tried to open https://nominatum.openstreetmap.org but all i get is "server not found". I'm on a private connection so there shouldn't be any access problems.

I've just tried the example coordinates you posted and I've now got a nice map of Philly! I'll try and sort out my coordinates and see what happens.

Much appreciate your help! Thanks

Sorry, I spelled the subdomain incorrectly. It’s https://nominatim.openstreetmap.org/

No worries - I used the Open Street Map editor to find the coordinates I needed. Works a treat. One last thing - is it possible to have the blue marker without text (or style the text to make it smaller)? At the moment the text balloon is taking up a good chunk of my small map! If it's not possible, I can make the map bigger so clients can see enough context map around the edges. ;-)

Thanks so much for your help.

Sign In or Sign Up to comment.