issue with openstreet map
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
issue with openstreet map
Hi,
I managed to use openstreet map to show some locations of vehicles from infotable (attached) , as you can see i use get properties to be able to use the "automatically update values when new values are available" check box, but the result is really bad, first whenever the infotable data updated the whole map refresh like it shows me a white screen then it load the map and the location as i did refresh the whole page , i wanted to only move the points on the map, also it doesn't show all the locations, sometimes all of them shown, sometime some of them, sometimes none of them, i don't know how to debug it , maybe it shows the ones that has data change, i don't know what is going on honestly, if there is a better way to refresh the data in the map widget please explain it to me,
form the infotable i use the LatitudeLongitude property of type "location"
hope someone can elaborate more on how to use openstreet map better, thank you
- Labels:
-
Coding
-
Design
-
Mashup-Widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @IA_10816220 ,
This question is more related on how to use Leaflet to display data without refreshing all the map area itself. I am not aware about the Widget implementation you're mentioning, but in short you need to understand what happens with the widget each time it receives new data. It should not recreate the whole leaflet object, and instead it should only use one of the methods from the existing object that set the point's locations (I'm not aware which one that is, but I'm assuming you can search it).
Debugging the widget is not that complex: in the Developer Tools you should be able to set a breakpoint in the code area you need. The file you need to go into is located here:
Note: I observed that your message had 6 lines of text without any breaks. This resulted in an unclear syntax that makes it very hard for anyone to provide the help you need. Please make sure in the future that your syntax follows the usual rules for a forum post (you can search on internet to see examples of forum posting best practices).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
thank you,
well, I am using an extension provided by one of your teammates, it uses openstreet map and no leaflet (from my understanding) .
I will attach it here also for your reference
regarding leaflet, I couldn't manage to use the leaflet widget i found online on this link
https://github.com/navkumar258/thingworx-leaflet-widget
I don't know if this is one has an issue or just old and cant work with 9.6 , I don't have enough experience to deal with it honestly, if there is another leaflet extension that i don't know of please share it with me
thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @IA_10816220 ,
The Extension I provided was provided as is. It is not a PTC supported Extension.
In regards to your question the Extension uses the leaflet Java Script library. In your original post you indicated that you could not use the OpenStreetMap Extension. I took a look at the leaflet.js library file which was included. It was a very old version.
I went out to the Leaflet Web site. I downloaded the latest version (1.9.4) and inserted it into the CommunitySupport Extension. This extension used the original Extension as a guide and created a new version.
When I go to the github thingworx-leaflet-widget it is using 1.3.4 version of the leaflet library. It might perform better if the library is updated. Have you reviewed the leaflet library for any information on updating the location data with out redrawing the map?
I have no experience with using the leaflet JavaScript library. Have you read the documents and reviewed the tutorials which they provide? I would be happy to assist with any updates to include additional information into the Extension.
Regards,
Pehowe
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hello @IA_10816220 ,
I did a search and found the following "Leaflet marker along a route" This might assist you in your work to get to your goal.
Regards,
Pehowe
