Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why Geometry/Point created in Geolocate? #122

Closed
probins opened this issue Dec 29, 2011 · 5 comments
Closed

Why Geometry/Point created in Geolocate? #122

probins opened this issue Dec 29, 2011 · 5 comments

Comments

@probins
Copy link
Contributor

probins commented Dec 29, 2011

Why is "locationupdated" in Control/Geolocate/geolocate() creating and returning a Geometry/Point? Surely all that's needed is the position as provided by navigator.geolocation.

I would like to create a simple page using a marker to mark current position, and to cut bandwidth to the minimum by using only the essential classes. Having this in there just adds unnecessary classes to my build.

@elemoine
Copy link
Member

We could add a point property to the event only if Geometry.Point is defined, and document this in the doc strings for locationupdated. Would that work for you?

@probins
Copy link
Contributor Author

probins commented Dec 29, 2011

yes, i did think of suggesting that. But I'm wondering why the Point is created at all. Alternatively, as a LonLat is being created, why not return that?

@elemoine
Copy link
Member

To make it easier to add the location to a vector layer, but I agree this is of little value.

@probins
Copy link
Contributor Author

probins commented Dec 31, 2011

I'm also thinking it would be useful to have a bindZoom option, so people could set the zoomlevel bind should use. I would imagine in most cases, a zoom level of 0 is not what people would want.

@probins
Copy link
Contributor Author

probins commented Jan 4, 2012

I've decided the simplest way to get what I want is not to use the OL control. Creating my own code for this is pretty straightforward. So I will close the issue.

@probins probins closed this as completed Jan 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants