#9204: Google Maps Marker to change the Icon
---------------------------------+------------------------------------------
Reporter: qingfeng | Owner: jbronn
Status: new | Milestone: post-1.0
Component: GIS | Version: 1.0
Resolution: | Keywords: geodjango google map icon
gicon
Stage: Unreviewed | Has_patch: 1
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------+------------------------------------------
Comment (by prairiedogg):
OK, that patch certainly works but there's no documentation. I'm happy to
clean this up if folks think this is the direction we want to go in.
I think I've come up with one slight API change, I'd appreciate any input
on it.
Right now you can instantiate a default icon by with just GIcon() and that
will use google's default icon, and specify the variable name "custom"
("_icon" is appened on the default template to try and minimize the
possibility of js namespace collision). I think users should be required
to specify at least a js variable name when instantiating a GIcon, so as
to further minimize the possibility of name space collisions. The new
syntax would be GIcon('myvar'), GIcon('var2'), at a minimum, just GIcon()
would raise an error, not enough args.
The other keyword arguments wold remain optional.
I'm guessing there's a way for the GIcon class to keep track of all of its
instantiated objects and prevent 2 of them from having the same name as
well, but that might be overkill. Thoughts?
--
Ticket URL: <http://code.djangoproject.com/ticket/9204#comment:7>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---