Mapping out The City. - by Digital Nightfall
Doc_Brown on 26/3/2014 at 19:51
Props, Sxerks. :thumb:
Grandmauden on 22/4/2015 at 22:34
So, after figuring out how to use OpenLayers, I managed to put together a basic interactive City map. Where could I post or upload the file so that other people can check it out?
Yandros on 22/4/2015 at 23:29
Google Drive or Dropbox if you have an account with either.
Grandmauden on 23/4/2015 at 00:40
Okay, here's the link:
(
https://drive.google.com/file/d/0B22DV_F74Bc5Q2c1ZDJ6LTVrRGs/view?usp=sharing) https://drive.google.com/file/d/0B22DV_F74Bc5Q2c1ZDJ6LTVrRGs/view?usp=sharing
If you follow the link and click "Download" at the top, then open the file in your Internet browser, it should show up as an interactive map and not the html code. Hope this works!
Tannar on 23/4/2015 at 05:33
It works. That's pretty cool!
Yandros on 23/4/2015 at 11:38
That is cool! I didn't realize it was just an HTML file or I would offered to host it. I still can if you'd like, and that would also allow all the images to be hosted along with the HTML instead of pointing to the Wiki, in case they ever become unavailable there. Then you can just share it as a link instead of a raw HTML file.
Also: 8 space indentation? :erg:
Grandmauden on 23/4/2015 at 16:01
Huh. Guess I forgot how long those tabs are. Usually, with coding software like Visual Studio, tabs are only 3 or 4 spaces, so I shrank the tabs while writing the text file to make up for that.
Yeah, you can host the files. I'll zip them up and email them to you, if you like (I don't think I need to include Sxerks's base map, since I didn't make any edits to that).
Glad to know it's working!:)
Yandros on 23/4/2015 at 16:14
That's fine, and if you would please include in the ZIP all the images referenced in the HTML, so I don't have to hunt them down and they can all be local to the page. I'll get it all uploaded tonight or tomorrow once I have the files.
We use 2 space indents at work so I guess I'm used to that, and 8 looks huge. :D
Grandmauden on 23/4/2015 at 18:35
Okay, I've sent the ZIP file.
To be honest, the map has a few flaws I was unable to work out. I wanted to add labels for each of the districts, but couldn't figure out how to implement them. Also, the original plan was to let users toggle each individual map or district on and off, rather than all maps or all districts at once. While that's not hard to do, having so many checkboxes and sliders would've taken up far too much space. Ah, well...I'm glad you guys still like it!
I must say, coding for OpenLayers is quite tricky to learn, because the tutorials I found were mostly limited to teaching the basics, and the examples on the OpenLayers website were rather vague and more oriented towards using a map of Earth rather than a custom map. Thank goodness the DromEd tutorials are much more thorough and precise.