-
Notifications
You must be signed in to change notification settings - Fork 6
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
Pass json data to JavaScript without creating new object #1
Comments
I would consider separating function for initializing map object ie. olMap.showMap() from the one updating the vector layer. You can add a function for updating the vector layer e.g olMap.UpdateVector(vectordata) |
Thank you for example! It was very helpful. However I am having an issue and not aware about how to fix this.
I am querying json data from database then performing some filtering and further procedures. After that I want to display that data on map, so I am passing it through JSInterop to JavaScript. Everything seems to be working except that on each
UpdateData()
method execution I am getting new map on my webpage. So after executing method 4 times, I am having 4 maps on web page.Index.razor:
Index.razor.cs:
map.js:
The text was updated successfully, but these errors were encountered: