infowindow in external kml

Home Forums MapPress Support infowindow in external kml

Tagged: ,

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #14541
    James Proctor
    Participant

    Greetings — Unless I’m wrong, I’m not able to view InfoWindow contents in an external KML I reference; I see the placemark titles only, and the InfoWindow content is blank. (InfoWindow is set as a Google InfoWindow in MapPressPro settings.) I’m using MapPressPro 2.40.7.

    Thanks for your advice!

    Jim P.

    #14542
    Chris
    Keymaster

    Hi,

    If the infoWindow was defined in the KML itself, then this is because the plugin suppresses the KML infowindows. Instead it shows its own info (such as the POI title & body defined in the map editor, or the post title & body for mashups).

    I’m not sure if it’ll work in your case, but one options is to just add the content in the MapPress editor or post body.

    #14543
    James Proctor
    Participant

    Okay, thanks. Was just checking in, as realized this is on an older site; newer site is in MapPress latest.

    Not sure if others would have this need, but we are working with relatively complex KMLs for which InfoWindow content is crucial, and it’d be tedious to manualy re-add. (In other cases users want to work with KMZs, including e.g. images, which also would not be immediately supported in MapPress without manually editing.)

    Regards,

    Jim P.

    #14578
    Chris
    Keymaster

    Hi,

    I took another look at this today and I’m not sure I fully understood (or answered) your question. I just went through the relevant MapPress code to recall the details so I’ll try again.

    The plugin does suppress the default infoWindows as I said in my earlier message. But when a feature is clicked, MapPress should show the infoWindow content from the original KML file – it just wraps it in MapPress CSS. The idea was to provide a consistent CSS style without interfering with the KML.

    If the clicked feature has no infoWindow in the KML file, then it should show the MapPress title and body. This is also true if a KML is clicked from the POI list, or in the editor.

    I wasn’t clear from your post if current version of the plugin isn’t working this way, or if that’s undesirable – or if there’s something specific to your KML file. Could you elaborate about what you’re expecting to see and provide an example URL or KML?

    #14580
    James Proctor
    Participant

    Thanks. I looked at this in a bit more detail, and it appears that in the cases I was testing (which were exports from apps such as fulcrumapp.com and pdf-maps.com) the KML extendeddata element was used, which is somewhat more convoluted than a simple description element. Is this what may’ve messed with what you provide above?

    Jim

    #14586
    Chris
    Keymaster

    Hi,

    Possibly – I don’t know enough about KML files to say. MapPress uses the infoWindowHtml property of the KmlFeatureData object.

    From what I’ve read, that should include the extendeddata, but you need to use ‘entity replacement’ to make it available to the infoWindowHtml property:

    https://developers.google.com/maps/tutorials/kml/#extendeddata_elements

    #14587
    James Proctor
    Participant

    Okay, got it. We’ll experiment with this over the next month. I can imagine some rather simple KML text edits, then, that will accomplish what we desire.

    Many thanks,

    Jim P.

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.