DrupalCon Portland 2013

Creando mapas geográficos con Drupal

Brandon Morrison, Patrick Hayes, Josef Dabernig, Pol Dellaiera, Tom Nightingale, Nate Parsons, Rik de Boer  · 

Transcripción

Extracto de la transcripción automática del vídeo realizada por YouTube.

okay everybody sorry about that brief delay welcome and thanks for attending one of the late sessions of the last day here we're very excited to have you all here and we're very excited to talk about the exciting things going on in Drupal mapping and

hopefully get you all excited as well I'm Nate Parsons and I'm going to be sort of emceeing this event and i am the the least least lit of these luminaries i have to say these are the the exciting guys who are sort of moving forward with a lot of the

drupal mapping and they can share a lot of really interesting things with us today and we're going to start off today talking with rick about what the state of drupal mapping looks like just from a high overview and then we're going to get into the

exciting things that are being done with drupal mapping today so reckoning in hand review thanks night hello and welcome to my presentation my name is Rick de Bourgh I'm from Melbourne Australia where I run the fling collective where we continue to have

great fun with Drupal and maps in particular you've come here because you want to take your next step into Maps maybe your next step is to create your first map or maybe you've been there done that and you are ready to cluster a hundred thousand markers

we've got all these bases covered with this wonderful team here for my mini presentation I hope to do I hope that you take away 2 points 1 a handy map starter kit and to a desire to take your next step into maps so let's begin just like you can't

have a school bus that goes at the speed of a Ferrari or a Ferrari that seat 65 people you can't have everything in the one map so you have to sit down with your client listen to their requirements and prioritize the feature list and balance that against

the timeframes and the costs and once you've done that you take your feature set to drupal.org and you look at the project pages and the document a ship's documentation pages you probably go like ah so many modules and they all have similar names as

well it can be very confusing you see Drupal my plant is a bit of a jungle I try to make a diagram here but it's not nearly complete what it shows is it's a mess I try to bring a little bit of order in it with on the left-hand side we've got a

silo for the coordinate storage modules and on the right-hand side we've got our map rendering modules the big ones being Google openlayers and leaflet and in the middle there's this bit usually views based that takes your locations from the left turns

them into Marcus applies the tooltips the color coding and all the rest of it and super imposes them on your map tiles and so your job is to find a path from the left to the through the middle to the right problem is many of those paths don't really don't

exist and the situation is further complicated through these bachelor call and auxiliary modules that do handy stuff on the input side like GL coder or beautiful stuff on the output side like marker clustering and they all combat their own constraints and

so that you can't have any of this with any that there is however one module in 0 to give you an example say you've got the location module and you're using your G map and it works fine nothing wrong with that setup but then you're ready to

put some fresh new lipstick and look on that old google face and you've read about the leaflet mark a cluster module you think this is cool I want to use that our leaflet and leaflet marker cluster only work with geo field there is a module though a slide

has gone missing that's okay there is a module which is right in the center here account highlight highlighted it's called IP geolocation views and maps that allows you to use any of the four input coordinates storage methods map modules to connect

those two any of the three map rendering engines and so it's no surprise that I recommend that as part of the starter pack but don't just believe me on my journey through my plans I've talked to a lot of people and they've come up with similar

solutions and I've asked them whether they want it to be on this slide so I'm sure there'll be more than willing to share their experience with the map starter kit and or a very similar setup so in closing for my maps data kit I would recommend

geo field for your latitude and longitude coordinates storage views because you can't avoid it leaflet because it's lightweight and mobile optimized for mobile and IP geolocation viewers and maps because of the reason I just mentioned but also that

it brings a few handy features of its own including some of the context sensitive stuff that Reese mentioned where he said if I go to a website it should know that I'm in denver and then do something with it like put up an ad or put my visitor marker on

the map and stuff like that so what's not to like for your next step into Drupal meting land thank you hi everyone I'm Paul the era jhoola Drupal on twitter and i'm going to show you i'm going to talk about openlayers i'm here to to show

you that open the year is not dead it's still maintained still 41 years now I'm the maintainer of upper layers and I will show you the new stuff and the upcoming stuff in openlayers to point x + 3 point X so first of all the two point X branch is the

stable branch of openlayers the one that you should use if you start mapping from today the tree point x is still highly experimental and it's still under development so as we only have five minutes per person here I cannot make live demo so I will only

show you screenshots but if you want to talk to me after the presentation i will show you those demo life on my computer so the first new stuff in openlayers is the unified and main user interface so if you install openlayers for the first time you'll

see those tabs layers maps projection and styles and you'll see that they all have the same aspects the same style so this is the layer page the maps page the projection page the style page so we are using CTools export UI and this allows us to create

those administration page really easily and it's really clean in the code also so second things is the behaviors of the the behaviors display improved into the map edit form so it is the old way of displaying those behaviors in map in the map edit form

this is the new way it's cleaner it's it's better and there is really less code than before there is a major cleanup new pop-up style so this is the old way of displaying pop-ups into openlayers which is a white pop up with a red button on the

right top right this is the new way this is a bit more beautiful this is modern next the new behaviors this is interesting so you have first the graticule behaviors which allows you to display parallels and meridians on a map you can customize the color of

the lines the everything you can customize a lot of stuff and you can display it on any map you want then the hover behavior this is when you are displaying features on a map like this map you have a couple of features on it when you pass your mouse on one

of the feature the hover behaviors allow you to allows you to change the icon and replace it by another icon this is really handy the compass behavior see on the top of the right on the top right of the map you have a compass and when you move when you pan

on the map the compass chain change the orientation you can change the icon you can change a lot of stuff also the Refresh layer strategy behavior this is a map provided by another module for openlayers which is called open weather map it's it's displaying

information about the weather and so on and this map has the Refresh layer strategy behavior enabled it means that every 16 seconds the layer will refresh automatically and you will have a beautiful animated map of the weather on your site so to save and edit

button this is a small feature but this is a time saver when you are working with maps so you are not going back to the map list when you hit and save you can click on save and edit and edit them up again dynamic markers so dynamic markers is when you are

displaying markers on your map and you want the image to be customized so for example this map is displaying two markers and the image of the markers the red images are coming from a field from an entity and you can change the size of it through the image

styles of Drupal and so on I told you it was faster so the new layer type in openlayers binged layer type is now that the earth is now into openlayers it has replaced the virtual hers from Microsoft mapbox layer types is also into openlayers you don't

need any more modules to get them working and an image layer type it means that you can upload an image as a layer into openlayers another new stuff is the contextual links so when you are editing a map when you over your mouse on the map you'll see on

the right some edit links so you don't have to go back to the administration interface to edit a map you have all the links on the right edit clone export and revert if you edit if you have a date at the map custom projection this is a big new features

that has been implemented in openlayers by by a friend August exclaim from Germany and it allows you to display custom projections on map maps with custom projections this is it and of course Ajax you can now display your maps using Ajax on forums and on pages

and unfortunately there is no demonstration but that if you want you can talk to me after the presentation I'll show you all of that well that's a bit of everything the new stuff in openlayers that this hi guys my name is a Tom nightingale i am from

vancouver bc and i work for affinity bridge so i'm going to talk about a couple of techniques we commonly use across all the libraries for visualizing geo data and the format's that we use and i'd like to talk about some advanced interactivity

techniques that we've been working on it if the new bridge so typically when we are visualizing we've got a bunch of Geo data that we've collected somehow put into Drupal there's two types two methods in which we can send the data to the browser

and render on screen the most common approaches would be vector data rendered as an SVG graphic or you can also rasterize your data into a bitmap image and serve that up its tiles vector data can come in a variety of formats there's more formats than you

can count but more often than not when we're dealing with the web we tend to stick to the plain text format such as wkt well-known text geo jason keyhole markup language k ml which both our main mapping libraries open layers and leaflet have or provides

support for fixed at is great because it's it's like the raw data it's very easy to process manipulate style but there are some downsides to it can be very it's the raw data so it can be very both have a very large footprint in sending over

the wire to your client the rendering is done client-side which can be a plus for your server people and boon for your end users and so typically when we have very large amounts of data the best way to get that into our clients browsers is actually by rasterizing

into bitmap images and serving them to the client as tiles once that image that data has been rasterized into an image where browsers handle images very well there r us Roger rasterized image is a consistent size it's just your typical 256 256 so doesn't

matter how much data you've stuffed in there you also benefit from images being fast to load cashable at the HTTP layer that kind of thing so moving on to interactivity in the part or traditionally with our Drupal modules and with maps in general inter

activities kind of being limited to putting markers on a map we've got a bunch of point data we've rented them as markers on a map and we have a little pop-ups when you click click or hover on you on your Marcus and I mean that's effective but

it's a little overused I think and you know with the state of JavaScript today this and the other javascript javascript libraries in the info on the internet there's a bunch of other really cool stuff we can do so one of my favorite libraries for data

visualizations is d3.js d3 stands for data-driven documents it's a library developed by Mike Bostock who does some really cool stuff and it it's a really useful tool when it comes to creating really interactive awesome SVG based graphics I got a couple

examples I'd like to quickly demo if they will work for me not that one this one hasn't loaded to try to begin here we go so uh this is really big this I we're just going to look at it all seemed out a little bit I've loaded the it's not

[ ... ]

Nota: se han omitido las otras 6.359 palabras de la transcripción completa para cumplir con las normas de «uso razonable» de YouTube.