I'm quite sure I looked everywhere, but if the option exists I didn't find it.
Can the height of the Leaflet map for creating content be set anywhere through drupal by content type, or at least in general?
I would expect to find it under Administration » Structure » Content types » eg "Blog entry" >> Manage Fields >> Leaflet.widget >> edit
where you also find Default Map Center and Default Zoom. Or else at least some "Leaflet default settings page".
Or should this be done within some .PHP, .JS or .CSS code?

CommentFileSizeAuthor
#9 Leaflet Widget.png269.92 KBrdeboer
#4 Leaflet config.png382.29 KBrdeboer

Comments

suffering drupal’s picture

Title: Set height for content create » Set height for content create or edit
rdeboer’s picture

This is not a UI option at the moment, so would be a feature request.
I'm not sure though if it really belongs in this module. Maybe stuff like this should be in a Leaflet-Extras module or submodule?

suffering drupal’s picture

Thanks again for quick reply Rik. Haven't been around here myself while trying to work out other problems.

If it is not in the UI I'd like to set it hardcoded to say 500 px. Through Firebug I see it says: element.style height 300px. Which is the file that produces that value? I hope it's a .PHP, because I can't even open .JS...

I'm trying to make webs on European and country scales and trying to outline for example Andalusia is quite frustrating at 300px. See www.spainonline.com recovery attempt.

Sorry, now that I'm at it. Any way to differentiate colours for areas by taxonomy (regions, coasts, nature reserves)?
Tnx

rdeboer’s picture

StatusFileSize
new382.29 KB

I may have misunderstood you at first.

You are talking about the Leaflet map that appears on individual nodes? You can set that by visiting the "Manage display" tab on the content type and then hitting the cogwheel on the far right for the Geofield in question (see screenshot).

For Leaflet maps in Views, you can also set the height, see for instance http://marzeelabs.org/blog/2012/09/24/building-maps-in-drupal-using-leaf.... Or if you want even more map options in Views you could use http://drupal.org/project/ip_geoloc (which you already do, looking at your screenshot). ip_geoloc allows you to have different colours for markers, not areas.

Talking about areas (border outlines, polygons).... if you want to quote distances from a reference point (i.e. the visitor's location) to a polygon, then this module could come in handy: https://www.drupal.org/project/geofield_proximity_polygon

rdeboer’s picture

Assigned: Unassigned » rdeboer
Status: Active » Closed (works as designed)
suffering drupal’s picture

Hi again Rik.

I'm afraid I haven't made myself clear yet, trying again ;)

I am NOT talking about the size of the maps when you are LOOKING at the content (nodes), I am talking about the maps when you are CREATING or EDITING content. In other words something that would belong under "Manage Fields" instead of "Manage Display".
This window where you CREATE/EDIT maps seems to be restricted to a hard-coded height of 300px, which is quite uncomfortable for drawing the example of Andalusia with some precision.
A UI is not really necessary, just knowing where those 300px come from (some .PHP or .JS?) to change it to a fixed 500px.

Thanks for the area info. I might get to distances if I ever overcome other priority problems first (now into adaptive themes for mobile-readyness...). Too bad the areas can't be differentiated by colour though.

Tnx2

rdeboer’s picture

RE #6
So I presume that in addition to the Geofield module and Leaflet you use a module that provides a widget to "edit" the map?
Which module is that?

suffering drupal’s picture

I think sometimes a phone would make life easier, lol.
Trying again.
It is about the (vertical) space of the map on the edit/add content page (eg http://spainonline.com/node/1/edit), which is a fixed 300 pix. That's to small for a man of my suffering... ;)
Let me try with a screenshot:

...
Right, seems can't just upload an image.
I put it on http://riccardobarbieri.com/en/druproblems/leaflet-map-height

Thanks again, enjoy your weekend.

rdeboer’s picture

StatusFileSize
new269.92 KB

You can upload images to this queue using the "Files" link.... I've just done it!

Thanks for that link, http://riccardobarbieri.com/en/druproblems/leaflet-map-height.
So from that screenshot, partly reproduced below, it seems to me that in addition to the Leaflet module you use another module, maybe this one https://www.drupal.org/project/leaflet_widget, I'm not sure.

That is what I was asking in #7. Once we have identified which module is responsible for offering the widget you use to draw your polygons we (or someone else) can have a look at the code and fix your issue.

We should also move this issue to the appropriate module.

suffering drupal’s picture

Oow... Ok, you're right: Leaflet.widget!
I took it as one and the same thing, sorry.
Will repost there.
Tnx4

suffering drupal’s picture

You know what? Issue can be closed.
Knowing it comes from leaflet.widget, I now DID find where it's hardcoded (line 139 leaflet_widget.module).
If you still want to have this issue reposted under leaflet.widget, in case it may serve someone else, it will be my pleasure to copy it there.
Thanks-1.5def ;)

rdeboer’s picture

Yes, considering this has been such a "must have" for you, it may be useful for others too.

I suggest you raise a Feature Request to have this as a UI option in Leaflet_Widget, rather than re-assigning the entire thread to Leaflet_Widget, as there are a few "red herrings" in this thread, mainly due to my misunderstanding -- reading back it all makes perfect sense what you said in the first place!

At least you got there in the end.

In your posting to Leafelt_Widget DO mention your findings about how to "hack" the module for a larger canvas window, for those who cannot wait for the developer to put your feature request in as a UI option.

Rik

suffering drupal’s picture

rdeboer’s picture

Lubley!