Giter VIP home page Giter VIP logo

Comments (8)

robertjf avatar robertjf commented on August 30, 2024 1

@Myster thanks for reporting, this will be release in the next version within the next couple of days.

from our.umbraco.gmaps.

robertjf avatar robertjf commented on August 30, 2024 1

@Myster pinCoordinates is represented by the Address.Coordinates object. The centerCoordinates should be represented by the MapConfig.CenterCoordinates property if the map is moved, for example (taken from the example projects):

    <h3>Address</h3>
    <ul>
        <li>
            Coordinates (@Model.SingleMap.Address.Coordinates):
            <ul>
                <li>Latitude: @Model.SingleMap.Address.Coordinates.Latitude</li>
                <li>Longitude: @Model.SingleMap.Address.Coordinates.Longitude</li>
            </ul>
        </li>
        <li>FullAddress: @Model.SingleMap.Address.FullAddress</li>
        <li>StreetNumber: @Model.SingleMap.Address.StreetNumber</li>
        <li>Street: @Model.SingleMap.Address.Street</li>
        <li>City: @Model.SingleMap.Address.City</li>
        <li>State: @Model.SingleMap.Address.State</li>
        <li>PostalCode: @Model.SingleMap.Address.PostalCode</li>
        <li>Country: @Model.SingleMap.Address.Country</li>
    </ul>

    <h3>MapConfig</h3>
    <ul>
        <li>ApiKey: @Model.SingleMap.MapConfig.ApiKey</li>
        <li>Zoom: @Model.SingleMap.MapConfig.Zoom</li>
        <li>
            CenterCoordinates @(Model.SingleMap.MapConfig.CenterCoordinates):
            @if (Model.SingleMap.MapConfig.CenterCoordinates != null)
            {
            <ul>
                <li>Latitude: @Model.SingleMap.MapConfig.CenterCoordinates.Latitude</li>
                <li>Longitude: @Model.SingleMap.MapConfig.CenterCoordinates.Longitude</li>
            </ul>
            } else {
                <span><b>Center Coordinates IS NULL</b></span>
            }
        </li>
        <li>MapType: @Model.SingleMap.MapConfig.MapType</li>
    </ul>

from our.umbraco.gmaps.

robertjf avatar robertjf commented on August 30, 2024 1

@Myster I found the issue, will be fixed in release 2.0.7 in the next couple of days :)

from our.umbraco.gmaps.

Myster avatar Myster commented on August 30, 2024

Also note:
I can only access the CenterCoordinates via Our.Umbraco.GMaps.Models.MapConfig I think I should also be able to access the PinCoordinates also.

image

from our.umbraco.gmaps.

robertjf avatar robertjf commented on August 30, 2024

@Myster are you able to test the latest version (2.0.6) and see if your issue is resolved or not?

from our.umbraco.gmaps.

Myster avatar Myster commented on August 30, 2024

Hi @robertjf
Unfortunately, I still have the same/similar issue.
The parts I see contributing to the issue are:

  1. saving the content in admin should persist BOTH the pinCoordinates and centerCoordinates.
  2. the front end has no access to the pinCoordintes

In the back office, I see the pin coordinates persist correctly, but the centre coordinates always reset to be the same as the pin when I load the back office. However, IIRC the difference is that v2.0.6 seems to not update any coordinates unless I interact with the map (drag or re-search for the address)

Persisting-or-not based on interaction would be a red herring if both coordinates persisted. (I'm not sure if that's what you were trying to address or not)

Thanks for your work on this plugin. :-)

from our.umbraco.gmaps.

robertjf avatar robertjf commented on August 30, 2024

it sounds like the Umbraco Backoffice rendering of the map is ignoring CenterCoordinates even though they are persisted when you save the content node. I'll take a look.

from our.umbraco.gmaps.

Myster avatar Myster commented on August 30, 2024

Awesome, thanks @robertjf

from our.umbraco.gmaps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.