In my free time I am working on a social networking site for RC pilots. I have information pages for various RC airfields and I was looking for a good way to display a listing of the fields. Putting markers on an embedded google map is a great way to display this type of data to users. The method I have seen recommended for this is to make separate list and map views. I don't really think that is a great user experience though.
The main reason making two pages is suggested is that maps require many lines of code and JavaScript functions that will dilute your content. The solution I arrived at was to use as little javascript as possible to generate my map. I ended up accomplishing this by using javascript to parse the content of the page to generate the markers.
To be able to easily parse out the data I wanted to display on the map I ended up making my own microformat. I put a class of field on the div that contained each field I was showing on the page. In that div I put the content that I wanted to display in the information popup for each marker. Then in that div I put two spans that contained the latitude and longitude and gave them each a class. The results ended up looking like this:
Then I wrote some javascript to parse this microformat and generate markers for my map. I used jQuery selectors to select each field in the html. For each field the latitude, longitude, and html contents are selected. Then the add_marker method is called to setup the marker with that data. After the marker is created I hide the field div.
Users with javascript will see a map with a bunch of markers that have an information bubble when clicked on. Users that do not have javascript enabled will see a list of field information. The textual content is the same for both users, the users with javascript just get an improved experience.
Go to www.checkthesock.com/fields to see the end result.
216 comments:
«Oldest ‹Older 201 – 216 of 216Awesome blog with useful information.. Thanks for sharing such a informative blog. Ziyyara Edutech’s online English class offers the best English tutoring in Bahrain, designed to cater to your specific needs.
Book a free demo today. Online tuition for english language in Bahrain
The information you have posted is very useful. The sites you have referred was good. Thanks for sharing. Struggling with challenging GCSE subjects like Mathematics, Science, and Religious Studies?
For more info visit Online tuition for GCSE
Great experience I got good information from your blog. Say goodbye to the search for "online tuition for class 1 – Ziyyara Edutech program addresses parent pain points head-on.
For more info visit online classes for grade 1st
I think this is the best information for me that I need in the past some time. Ziyyara Edutech's specialized Online GCSE Tuition – where academic challenges become opportunities for growth.
For more info visit online GCSE tuition
Really enjoyed this post! With everything moving online, it’s great to see more parents exploring online tuition in Kerala. I’ve noticed students do much better with one-on-one sessions since it gives them space to ask questions without hesitation.
Thanks so much for sharing this awesome info! I am looking forward to see more postsby you!
Learn Java Online
Really helpful article! Language learning requires consistency and the right guidance. I’ve noticed that english online language classes are becoming popular since students can practice from anywhere. With the right approach to the best online english language learning, learners can gradually improve their vocabulary, pronunciation, and overall fluency.
Great post! The way you explained the topic is really helpful and easy to understand. Content like this helps beginners learn faster. For anyone interested in upgrading their programming skills, you can also check out Java Certification Course in Coimbatore and Python Training Institute in Coimbatore which provide practical learning with real-time projects. Keep sharing such valuable content!
Interesting read! I really like how this blog shares personal thoughts along with meaningful insights—it makes the content feel authentic and engaging. Looking forward to exploring more posts here.
For anyone interested in building strong programming skills, this resource might also be helpful:
Java Course for Beginners
Informative post, keep sharing! Also see: Digital Marketing Training in Chennai
Really helpful, here’s another resource: Data Science or Data Analytics
Really useful tips on making SEO-friendly maps with jQuery thanks for sharing such practical guidance! For readers also exploring data and tech careers, it can be helpful to check out key topics like Data Science vs Data Analytics to understand how different data roles and skills compare. Keep up the great content!
Very informative content. I recently discovered How to Learn Data Analytics which adds even more clarity.
Thanks for this info! Also worth checking Digital Marketing Training in Chennai and Data Science Courses in Chennai.
Very well written article. Keep sharing more like this!
How to Learn Data Analytics and Full Stack Developer Course
Loved this post! Sharing a great resource: Social Media Marketing Course
Post a Comment