Community Map

Cableguy

Expert
Licensed User
Longtime User
@Cableguy, I like this idea. However I don't think that it will work with these settings. Eventually someone will mistakenly (or not) move the placemarks and will save it.

I'm not too familiar with GMaps, so I don't know how to prevent that...
However, from what I understand, a prompt will show asking to wither save it or not, so an accidently saving will not be so easy... Still.. on purpose... it's another ball game.
 

Cableguy

Expert
Licensed User
Longtime User
Googling around, this seems to be a common issue with collaborative GMaps...
The best prevention measure is to advert people to check their markers every once in a while and to ask to NOT change other people's markers..
 

Cableguy

Expert
Licensed User
Longtime User
An idea came to mind that could make it a bit more usefull and safe to use...
That idea was to create both a win32, using B4Ppc, and an Android Map viewer... The user would set his position, and would be able to "see" the others on the map, and if aditional info was available, like e-mail or such, send a message... Chat integration would be nice too...

This could be a Collaborative Developed Aplication... How about Guys??
 

stevel05

Expert
Licensed User
Longtime User
That could be an interesting project. I've not worked on a collaborative project like this before, how would it work?
 

warwound

Expert
Licensed User
Longtime User
We can get the map data in KML format by adding GET parameter output=kml to the original map URL:

https://maps.google.com/maps/ms?output=kml&msid=214724887690720235962.0004d7043550452e089c3&msa=0

Parsing the KML and displaying the placemarkers on a map in an android app is pretty straightforward.

Restricting access and authenticating users would be a bigger task i think.

Martin.
 

Cableguy

Expert
Licensed User
Longtime User
we need to gather a small team of Geeks... I mean, Brains... for each platform ... and another of nerds... hummm... Beta-Testers.. I guess...
Basic funtionality shouldn't be too hard... I offer myself as a Nerd!
 

Cableguy

Expert
Licensed User
Longtime User
We can get the map data in KML format by adding GET parameter output=kml to the original map URL:

https://maps.google.com/maps/ms?output=kml&msid=214724887690720235962.0004d7043550452e089c3&msa=0

Parsing the KML and displaying the placemarkers on a map in an android app is pretty straightforward.

Restricting access and authenticating users would be a bigger task i think.

Martin.

I think that would be easilly achieved by creating a Dummy G account and have that being the creator of the map and solo user allowed to change the map... (already available in GMaps)
 

Cableguy

Expert
Licensed User
Longtime User
That would require a database and a server... but making it G independant sounds quite good... we only need the map... and we can get that from other sources
 

warwound

Expert
Licensed User
Longtime User
How about this for the basis of a map...?

screengrab.png


  • I've used XOM to parse a KML file that i downloaded from Google - no real time KML download so far it's a flat file.
  • Then LabelExtras properly handles any HTML in the user name and description fields from the KML.
  • Finally GoogleMaps and GoogleMapsExtras render the member locations on a map.

Member marker icons are a random hue at the moment - extracting the URL for each icon and then downloading the icons is on the 'to do' list, along with downloading up to date KML.

I see there's no way to get whether the infowindow is visible, so no way to save and restore the infowindow state on orientation change - or have i missed something here?

The project is attached but will not work as it is...
I've updated GoogleMapsExtras with a new method AnimateToBounds but have not yet uploaded the update. I may update GoogleMapsExtras again if required to save and restore the infowindow state so for now if you want to compile the project simply comment out line 54:

B4X:
GoogleMapsExtras1.AnimateToBounds(GoogleMap1, Bounds, 0)

The FitMapToMembers Sub isn't very useful to be honest as the bounds of all members covers the globe and trying to fit the map to the bounds doesn't work very well.

Martin.
 

Attachments

  • CommunityMap 20130307.zip
    11.2 KB · Views: 310

Cableguy

Expert
Licensed User
Longtime User
It's looking pretty promising. ..
I have one question though. .. how do you forsee a user cresting a new marker?
It should not be done in the map website... so a means of updating a small database or the kml file must be made available.. no?
 

cjolly

Member
Licensed User
Longtime User
Ya me registre...
 

HotShoe

Well-Known Member
Licensed User
Longtime User
I seem to have been moved to the Atlantic Ocean off the coast of NJDude. :)

--- Jem
 

Laurent95

Active Member
Licensed User
Longtime User
In the map also
 

robife

Member
Licensed User
Longtime User
NJDude Do not stay too long there, I need your help on B4A forum !!! ;)
 
Last edited:

Laurent95

Active Member
Licensed User
Longtime User
Why Klaus take a bath now :p
 
Top