-
Notifications
You must be signed in to change notification settings - Fork 818
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
data layer styling, geoJSON change no styles apply #1099
Comments
if i set my object to null and then call my service and it sets a new json the item will draw fresh as i have an ngif in my code for a null json object.
|
If a plunker is problematic, could you provide a demo repo? Then you can still use the CLI for it, and we could just clone it. |
will see if i have time to get one made, if i do i will post back here with info. |
The issue seems to be that the manager gets called with empty dataOptions when the geoJson is updated. This is because only the geoJson is present in the changes object and the style function isn't (although it was set during the initialization of the layer, causing the confusion). File: core/directives/data-layer.ts
A possible solution:
What do you guys think? ( @SebastianM) |
+1 |
Any Ideas when this fix will be pushed into master? |
Hi, I have the same problem. My file is not data-layer.ts but data-layer.js. Do you know how write the same thing in javascript? Thank you very much!!! |
Issue description
i have an app that allows the user to select a different geoJSON object for the map.
when the map is first drawn all is good.
when the geoJSON changes the new line is drawn but the styles are not applied.
Steps to reproduce and a minimal demo of the problem
i tried to create a plunk but i am working with angular CLI , not sure how to switch up.
_Use https://plnkr.co or similar -- try this template as a starting point: http://plnkr.co/edit/YX7W20?p=preview
What steps should we try in your demo to see the problem?
Current behavior
updated map loses style
Expected/desired behavior
updated map has style
angular2 & angular-google-maps version
AGM 1, angular 4
Other information
The text was updated successfully, but these errors were encountered: