A map page reading marker and infowindow data from a text file. It comes equipped with a 2-way interactive sidebar. That that fulfills many basic needs.
If you have a single file with not very many markers and they do not overlap, you don't need the upcoming parts of this series. Just copy the code and display your file. You can make the infowindow and sidebar look good by css.
Sidebar label and marker tooltips title are the same as infowindow header. The data cell of them is still hardcoded [2] but it is easy to find in the source code and can be changed independently to any cell in your csv line.
I suddenly noticed that [part 1] did not parse the text file with IE7. It is fixed now and it was just introducing the parseCsv() too late in the code for IE. Risk of that kind of troubles is avoided when I package the methods as a library. There are methods coming before that.
Too many markers is the most common UI issue on map pages. The following parts will show methods for filtering the markers.
Subscribe to:
Post Comments (Atom)
4 comments:
Having trouble reading the txt file:
text:
http://www.eriksdeli.com/content/locations2_csv.txt
source:
http://www.eriksdeli.com/content/locations5.php
I don't need to import the data, static would work fine too - please help!
Esa,
I really like your example code and appreciate your efforts.
However, I am running into a problem when I try to run the source code.
I am a beginner to all of this and basically what happens is that the map and side bar do not populate with the information?? I copied your web example exactly and all of the files as well. They have been placed in the same folder as I assume they should be. I use my API key for the map, or yours and no matter what I can't get the map to show or the side bar to fill.
When I run the debugger in chrome it says ajaxLoad is not defined?
Lets assume I don't know anything about programming in this language, are there some packages that I need to have installed in order to run it? I installed asp.net with ajax support, however that did nothing for me.
If you could please give me some direction of how to get this working I would greatly appreciate it.
If you wish you can contact me at timwardlaw@gmail.com
Thanks again,
Tim
Got it working. I installed asp.net with ajax support and it did the trick.
Esa,
Thank you so much for sharing this code! I had made a less satisfactory version of this idea and have moved to your solution. You have been a big help!
I am still trying to get the code to accept CSV output from a PHP script but when that is done I will be dancing!
Thaks,
JG
Post a Comment