-
Notifications
You must be signed in to change notification settings - Fork 141
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
dynamic buildings #26
Comments
In case of GeoJSON you could already do that. Do you have a more specific use case, i.e. creating an editor? |
Oh? How do you do it with GeoJSON? I thought that the data was inaccessible What I had in mind was making the wallColor properties depend on both a On Sat, Apr 6, 2013 at 12:17 PM, Jan Marsch notifications@github.comwrote:
|
It is inacessible indeed :-) Workaround would be storing it in your context before injecting to OSM Buildings and re-injecting it after a change. I'll consider making it accessible. Thats why I asked for a use case. |
I'm thinking this should eventually involve some kind of animation from old values -> new values. What do you think? |
👍 |
+1 to this. It'd be awesome to be able to import some buildings, and when a user pans around the map, load some more data from the server and add that to the data object. |
@oddityoverseer13 like mixing your very own data set with a common buildings layer? |
well, not really. I'm using a custom node.js server to send geojson about the buildings back to the client. What'd I'd like to be able to do is when a user pans around, the client requests the new building data from the server, and adds it to the geojson for the osm buildings layer. |
Ok, then its alredy done with latest commits to master :-) Just dont have docs yet, but we may work that out. |
I'm not sure I understand. So, lets say I have some geoJSON I want to add to a osmbuildings layer (var osmb). How would I go about adding it? |
I assume, your Node.js backend is serving GeoJSON and you are able to parametrize that. In my case, I'm using CartoDB which's query is more complicated, but does exactly this:
|
Server-less version is now official. You could go with suggested solution noted above. |
Hey, Jan. I'm up for working a bit on interactive building data. (I need to be able to animate building color.) Have you started this yet? Are you thinking of exposing some methods to edit / redraw properties of cached data? |
Hi Benny, nothing is started yet. My thoughts about this are: buildings will need to be act on hover and click. How the reaction looks, be it just an event or something on the buildings changes, that's not clear yet. But once that mechanism is in place, it could also act on a chosen building programmatically. Things you need to consider:
What I would offer is:
The above things are ok performance wise, it's the animation which probably kills it. I need to know a bit more about your application and you will have a bit of work ahead as I can't provide all of that right now. But I'm here to help. |
@bennlich Let me know if you need help with this. It's something I would really like to see happen. I am working on an RTS game and clicking and "selecting" buildings is a must for me. I can probably handle the "selection" separately, but I do need some sort of click functionality. I recently talked to Jan about doing this myself, but I'm a bit busy with other things atm, so I don't have much time to think about how to do it. But I am willing to help if someone gives me something to do 😄 |
I will jump in and help at some point! |
Might be nice to make a public method for modifying building data, so you can make changes on the fly. It could accept an array argument that contains an object per building, where each object contains only the key/value pairs that are to be updated.
The text was updated successfully, but these errors were encountered: