mbachjack
Forum Replies Created
-
I tried it again with the additional [zoomhomemap][fullscreen] tags at the end of the code block and got duplicate controls on the map:
Here is the code for the image above:
[leaflet-map lat=44.58553079587806 lng=-123.28651428222658 fitbounds height=550 width=100% zoomcontrol show_scale] [leaflet-geojson src=https://corvallisareampo.org/wp-content/uploads/2024/01/StreetCenterli_AdairVillage.geojson color='yellow']Street Name: {Street Name} Ownership: {Ownership_Text}[/leaflet-geojson] [leaflet-geojson src=https://corvallisareampo.org/wp-content/uploads/2024/01/StreetCenterli_BentonCo.geojson color='red']Street Name: {Street Name} Ownership: {Ownership_Text}[/leaflet-geojson] [leaflet-geojson src=https://corvallisareampo.org/wp-content/uploads/2024/01/StreetCenterli_Corvallis.geojson color='purple']Street Name: {Street Name} Ownership: {Ownership_Text}[/leaflet-geojson] [leaflet-geojson src=https://corvallisareampo.org/wp-content/uploads/2024/01/StreetCenterli_ODOT.geojson color='brown']Street Name: {Street Name} Ownership: {Ownership_Text}[/leaflet-geojson] [leaflet-geojson src=https://corvallisareampo.org/wp-content/uploads/2024/01/StreetCenterli_OSU.geojson color='orange']Street Name: {Street Name} Ownership: {Ownership_Text}[/leaflet-geojson] [leaflet-geojson src=https://corvallisareampo.org/wp-content/uploads/2024/01/StreetCenterli_Philomath.geojson color='green']Street Name: {Street Name} Ownership: {Ownership_Text}[/leaflet-geojson] [leaflet-geojson src=https://corvallisareampo.org/wp-content/uploads/2024/01/StreetCenterli_Unchanged.geojson color='pink']Street Name: {Street Name} Ownership: {Ownership_Text}[/leaflet-geojson] [leaflet-geojson src=https://corvallisareampo.org/wp-content/uploads/2024/01/CAMPO_Boundary.geojson color='blue' fill=false]CAMPO Boundary[/leaflet-geojson] [leaflet-featuregroup property="Ownership_Text" values="Adair Village,Benton County,Corvallis,ODOT,OSU,Philomath,Unchanged" groups="Adair Village,Benton County,Corvallis,ODOT,OSU,Philomath,Unchanged"] [zoomhomemap] [fullscreen] [hover][zoomhomemap][fullscreen]If I remove the final [zoomhomemap][fullscreen], I have only a single set of controls:
Here is my code for the image:
[leaflet-map lat=44.58553079587806 lng=-123.28651428222658 fitbounds height=550 width=100% zoomcontrol show_scale] [leaflet-geojson src=https://corvallisareampo.org/wp-content/uploads/2024/01/StreetCenterli_AdairVillage.geojson color='yellow']Street Name: {Street Name} Ownership: {Ownership_Text}[/leaflet-geojson] [leaflet-geojson src=https://corvallisareampo.org/wp-content/uploads/2024/01/StreetCenterli_BentonCo.geojson color='red']Street Name: {Street Name} Ownership: {Ownership_Text}[/leaflet-geojson] [leaflet-geojson src=https://corvallisareampo.org/wp-content/uploads/2024/01/StreetCenterli_Corvallis.geojson color='purple']Street Name: {Street Name} Ownership: {Ownership_Text}[/leaflet-geojson] [leaflet-geojson src=https://corvallisareampo.org/wp-content/uploads/2024/01/StreetCenterli_ODOT.geojson color='brown']Street Name: {Street Name} Ownership: {Ownership_Text}[/leaflet-geojson] [leaflet-geojson src=https://corvallisareampo.org/wp-content/uploads/2024/01/StreetCenterli_OSU.geojson color='orange']Street Name: {Street Name} Ownership: {Ownership_Text}[/leaflet-geojson] [leaflet-geojson src=https://corvallisareampo.org/wp-content/uploads/2024/01/StreetCenterli_Philomath.geojson color='green']Street Name: {Street Name} Ownership: {Ownership_Text}[/leaflet-geojson] [leaflet-geojson src=https://corvallisareampo.org/wp-content/uploads/2024/01/StreetCenterli_Unchanged.geojson color='pink']Street Name: {Street Name} Ownership: {Ownership_Text}[/leaflet-geojson] [leaflet-geojson src=https://corvallisareampo.org/wp-content/uploads/2024/01/CAMPO_Boundary.geojson color='blue' fill=false]CAMPO Boundary[/leaflet-geojson] [leaflet-featuregroup property="Ownership_Text" values="Adair Village,Benton County,Corvallis,ODOT,OSU,Philomath,Unchanged" groups="Adair Village,Benton County,Corvallis,ODOT,OSU,Philomath,Unchanged"] [zoomhomemap] [fullscreen] [hover]Hope this helps to explain. Thank you again for your help!
I split up the streets.geojson file into separate files according to ownership and your solution worked perfectly (see screenshot or link to screenshot below). NOTE: I think the final [zoomhomemap][fullscreen] tags are redundant – they caused an additional set of controls to appear on the map.
Unfortunately, I found out that our WordPress server can’t handle 4000 pieces of data on a map…it kept lagging and saying page unresponsive. I tried again with only a few hundred pieces and it worked just fine.
Thank you so much for your assistance!
And the boundary, if you need it.
Here is a selection with a few more road sections – 134 – which might be easier to see.
Yes, here is a geojson file with one road of each type of ownership. THANK YOU for your help!
Thanks for the help! Here is a copy of the geojson file I am working with. The attribute I am hoping to work with is “Ownership”.