[ANN] Leaflet Action for Open Street Map

http://actionsforge.com/actions/view/315-leaflet-for-open-street-map

This uses the Leaflet.js library for a very mobile-friendly street map with multiple marker support. Draw an HTML box on the page, apply the Leaflet Action to it, set the center location and zoom of the map. Draw one or more Leaflet Marker Action elements on the page, set each to the desired location and enter any desired marker text.

It’s a lovely and refreshing change from the ubiquitous Google map.

I’m also quite pleased with how the location-finder works, since the OSM people have a nice API for their geolocation tool, and there don’t seem to be the same hangups around needing account keys or such. I’ll write a little more about that on the ActionsDev list.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Very nice http://leafletjs.com. Thanks for the heads-up, Walter.

Todd
http://xiiro.com


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter, many thanks I’ve just started to use this Action, great it
uses Open Street Map, glad to be rid of the curse of Google Maps.

FYI: There is a great [offline] Map App for iPhone and iPad –
MapsWithMe, which uses the same OSM maps, which I wholeheartedly
recommend, at least for the UK, it one very few apps that shows
footpaths/public rights of way.

Cheers Peter

Walter Lee Davis wrote:

Leaflet for Open Street Map - ActionsForge

This uses the Leaflet.js library for a very mobile-friendly street map with multiple marker support. Draw an HTML box on the page, apply the Leaflet Action to it, set the center location and zoom of the map. Draw one or more Leaflet Marker Action elements on the page, set each to the desired location and enter any desired marker text.

It’s a lovely and refreshing change from the ubiquitous Google map.

I’m also quite pleased with how the location-finder works, since the OSM people have a nice API for their geolocation tool, and there don’t seem to be the same hangups around needing account keys or such. I’ll write a little more about that on the ActionsDev list.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


Best wishes Peter

Peter Tucker . Oxford, UK . email@hidden


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thanks Walter

Looks good and easy to use.

Paul
On 10 Apr 2014, at 1:32 am, Walter Lee Davis email@hidden wrote:

Leaflet for Open Street Map - ActionsForge

This uses the Leaflet.js library for a very mobile-friendly street map with multiple marker support. Draw an HTML box on the page, apply the Leaflet Action to it, set the center location and zoom of the map. Draw one or more Leaflet Marker Action elements on the page, set each to the desired location and enter any desired marker text.

It’s a lovely and refreshing change from the ubiquitous Google map.

I’m also quite pleased with how the location-finder works, since the OSM people have a nice API for their geolocation tool, and there don’t seem to be the same hangups around needing account keys or such. I’ll write a little more about that on the ActionsDev list.

Walter


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi Walter,

is it possible to ad a link to the description (if yes: how to).
I tried , but didn’t work for me.

Hubert


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Try back-slashing the URL quotes.

<a href=\"path/to/where\">Marker text</a>

The issue would be quotes within a quoted string, which have to be escaped or else the string ends prematurely in an error.

Walter

On Apr 22, 2014, at 10:05 AM, H.Banken wrote:

Hi Walter,

is it possible to ad a link to the description (if yes: how to).
I tried , but didn’t work for me.

Hubert


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Great, works best.
Thank you.

Hubert


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi - I am just starting to make use of this on a site. All fine except I am getting tiny tiny unreadable, 1px?, text in the map marker. I know this happened to me before with another element but for the life of me can notremember how to get around the problem. Can anyone one remind me?

Best wishes Richard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

What version of Freeway, and where are you making the marker elements? Are you drawing them over the top of the map element (such that they become nested children of the map) or are you drawing them on the pasteboard or elsewhere on the page? I’ve only tested the latter.

Walter

On Apr 25, 2014, at 9:58 AM, Richard Lowther wrote:

Hi - I am just starting to make use of this on a site. All fine except I am getting tiny tiny unreadable, 1px?, text in the map marker. I know this happened to me before with another element but for the life of me can notremember how to get around the problem. Can anyone one remind me?

Best wishes Richard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

On the paste board to the right of the map. Latest version of FW6

http://www.lachambre-du21.com/plan.php


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

It might be that Freeway treats the #MAPTROUVILLE as empty box (perhaps) and adds therefor a font-size: 1px to this?

Try the empty box-helper:

http://actionsforge.com/actions/view/261-emptyboxhelper

Cheers

Thomas


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I agree, but that’s odd. I didn’t see this error when I was testing the Action here. What HTML (Output) level is your page set to?

Walter

On Apr 25, 2014, at 10:24 AM, Thomas Kimmich wrote:

It might be that Freeway treats the #MAPTROUVILLE as empty box (perhaps) and adds therefor a font-size: 1px to this?

Try the empty box-helper:

EmptyBoxHelper - ActionsForge

Cheers

Thomas


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Your page is missing the prototype.js library (needed by the lightbox.js script added by WebYep). That’s throwing a JavaScript error, although it shouldn’t cause any issues with Leaflet (which is library-agnostic).

I have just tested this some more, and I’m not able to get the font-size error you are seeing in my test document, not when the HTML box to which the Leaflet Action is applied is drawn on the page, nor if it is inline within another drawn element, nor even if it is inline in the PageDiv itself. I am using the exact same version of Freeway as you are.

Try this on a new blank page, and see if you can repeat the issue.

Walter

On Apr 25, 2014, at 10:30 AM, Walter Lee Davis wrote:

I agree, but that’s odd. I didn’t see this error when I was testing the Action here. What HTML (Output) level is your page set to?

Walter

On Apr 25, 2014, at 10:24 AM, Thomas Kimmich wrote:

It might be that Freeway treats the #MAPTROUVILLE as empty box (perhaps) and adds therefor a font-size: 1px to this?

Try the empty box-helper:

EmptyBoxHelper - ActionsForge

Cheers

Thomas


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Hi - I tried to add empty box action to the marker action but Freeway would not let me. I then inserted the marker action into a HTML box with the empty box action inserted into that. Same size text though - seen locally using MAMP

The Outpt is HTML5 - which I was unaware of to be honest as I began this site using Joe Bs most recent template as I was curious to work with a full page width header. I will change it to see what happens.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

OK Latest version uses HTML 4 Transitional Also tried XHTML Trans but no change. This page, and the whole site, is php using Webyep. Could this have a influence?

http://www.lachambre-du21.com/plan.php

Richard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

You would want to apply the Empty Box Action to the map, not the marker element. The marker element is an Action-item, and you can’t apply Actions to Actions.

Walter

On Apr 25, 2014, at 10:41 AM, Richard Lowther wrote:

Hi - I tried to add empty box action to the marker action but Freeway would not let me. I then inserted the marker action into a HTML box with the empty box action inserted into that. Same size text though - seen locally using MAMP

The Outpt is HTML5 - which I was unaware of to be honest as I began this site using Joe Bs most recent template as I was curious to work with a full page width header. I will change it to see what happens.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Messages crossed in sending. Just seen your latest advice Walter and I will see what happens on a new page with nothing else on. Will look to that missing protaculous too !

Thanks Richard.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

http://www.lachambre-du21.com/map.html

A new page with no Webyep, php. Just a leaflet and a marker action. I added protaculous 2 to the page but no go either.

Looking back at Thomas’ observation about empty boxes I tried adding that to the marker action but of course he was thinking of the leaflet item on the page. I will see if I can get an empty box action into the empty box. Sounds easy but knowing me …

Richard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Switch this page to HTML5 output and publish again – no other changes or Actions.

Walter

On Apr 25, 2014, at 11:11 AM, Richard Lowther wrote:

http://www.lachambre-du21.com/map.html

A new page with no Webyep, php. Just a leaflet and a marker action. I added protaculous 2 to the page but no go either.

Looking back at Thomas’ observation about empty boxes I tried adding that to the marker action but of course he was thinking of the leaflet item on the page. I will see if I can get an empty box action into the empty box. Sounds easy but knowing me …

Richard


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Changed to HTML5 and with a ‘republish everything’. But still the same little text. Should I try a whole new freeway document ?

R


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options